From 6168504a4a83ae36e903e0dac65b996d57e0a470 Mon Sep 17 00:00:00 2001 From: Kevin Zou Date: Wed, 31 Jan 2024 16:55:01 -0500 Subject: [PATCH 1/5] add optional param helper functions to models --- .generator/src/generator/cli.py | 2 + .generator/src/generator/openapi.py | 13 +- .generator/src/generator/templates/api.j2 | 30 +- .../src/generator/templates/model_oneof.j2 | 6 +- .../src/generator/templates/model_simple.j2 | 16 +- src/datadogV1/api/api_authentication.rs | 2 - src/datadogV1/api/api_aws_integration.rs | 190 +--- src/datadogV1/api/api_aws_logs_integration.rs | 87 +- src/datadogV1/api/api_azure_integration.rs | 66 +- src/datadogV1/api/api_dashboard_lists.rs | 74 +- src/datadogV1/api/api_dashboards.rs | 273 ++--- src/datadogV1/api/api_downtimes.rs | 119 +-- src/datadogV1/api/api_events.rs | 82 +- src/datadogV1/api/api_gcp_integration.rs | 50 +- src/datadogV1/api/api_hosts.rs | 104 +- src/datadogV1/api/api_ip_ranges.rs | 2 - src/datadogV1/api/api_key_management.rs | 138 +-- src/datadogV1/api/api_logs.rs | 38 +- src/datadogV1/api/api_logs_indexes.rs | 73 +- src/datadogV1/api/api_logs_pipelines.rs | 92 +- src/datadogV1/api/api_metrics.rs | 144 +-- src/datadogV1/api/api_monitors.rs | 252 ++--- src/datadogV1/api/api_notebooks.rs | 128 +-- src/datadogV1/api/api_organizations.rs | 94 +- .../api/api_pager_duty_integration.rs | 69 +- src/datadogV1/api/api_security_monitoring.rs | 63 +- src/datadogV1/api/api_service_checks.rs | 16 +- ...api_service_level_objective_corrections.rs | 98 +- .../api/api_service_level_objectives.rs | 238 ++--- src/datadogV1/api/api_slack_integration.rs | 105 +- src/datadogV1/api/api_snapshots.rs | 54 +- src/datadogV1/api/api_synthetics.rs | 518 +++------- src/datadogV1/api/api_tags.rs | 122 ++- src/datadogV1/api/api_usage_metering.rs | 978 +++++++++--------- src/datadogV1/api/api_users.rs | 71 +- src/datadogV1/api/api_webhooks_integration.rs | 144 +-- .../model_add_signal_to_incident_request.rs | 10 + .../model_alert_graph_widget_definition.rs | 25 +- .../model_alert_value_widget_definition.rs | 36 + src/datadogV1/model/model_api_key.rs | 20 + .../model/model_api_key_list_response.rs | 5 + src/datadogV1/model/model_api_key_response.rs | 7 +- .../model_apm_stats_query_column_type.rs | 18 + .../model/model_apm_stats_query_definition.rs | 13 + src/datadogV1/model/model_application_key.rs | 15 + .../model_application_key_list_response.rs | 8 + .../model/model_application_key_response.rs | 10 +- ...odel_authentication_validation_response.rs | 5 + src/datadogV1/model/model_aws_account.rs | 58 ++ .../model_aws_account_create_response.rs | 5 + .../model/model_aws_account_delete_request.rs | 15 + .../model/model_aws_account_list_response.rs | 5 + ..._aws_event_bridge_account_configuration.rs | 18 + .../model_aws_event_bridge_create_request.rs | 20 + .../model_aws_event_bridge_create_response.rs | 23 + .../model_aws_event_bridge_delete_request.rs | 15 + .../model_aws_event_bridge_delete_response.rs | 8 + .../model_aws_event_bridge_list_response.rs | 13 + .../model/model_aws_event_bridge_source.rs | 10 + .../model/model_aws_logs_async_error.rs | 10 + .../model/model_aws_logs_async_response.rs | 13 + src/datadogV1/model/model_aws_logs_lambda.rs | 5 + .../model/model_aws_logs_list_response.rs | 18 + .../model_aws_logs_list_services_response.rs | 10 + src/datadogV1/model/model_aws_tag_filter.rs | 10 + .../model_aws_tag_filter_create_request.rs | 15 + .../model_aws_tag_filter_delete_request.rs | 10 + .../model_aws_tag_filter_list_response.rs | 5 + src/datadogV1/model/model_azure_account.rs | 65 ++ .../model/model_canceled_downtimes_ids.rs | 5 + .../model/model_change_widget_definition.rs | 33 +- .../model/model_change_widget_request.rs | 145 ++- ...model_check_can_delete_monitor_response.rs | 12 +- ..._check_can_delete_monitor_response_data.rs | 5 + .../model_check_can_delete_slo_response.rs | 15 +- ...odel_check_can_delete_slo_response_data.rs | 5 + .../model_check_status_widget_definition.rs | 40 +- src/datadogV1/model/model_creator.rs | 15 + src/datadogV1/model/model_dashboard.rs | 93 ++ .../model/model_dashboard_delete_response.rs | 5 + .../model/model_dashboard_global_time.rs | 8 + src/datadogV1/model/model_dashboard_list.rs | 37 +- .../model_dashboard_list_delete_response.rs | 5 + .../model_dashboard_list_list_response.rs | 8 + .../model/model_dashboard_summary.rs | 8 + .../model_dashboard_summary_definition.rs | 48 + .../model_dashboard_template_variable.rs | 24 + ...odel_dashboard_template_variable_preset.rs | 13 + ...ashboard_template_variable_preset_value.rs | 18 + .../model_delete_shared_dashboard_response.rs | 5 + src/datadogV1/model/model_deleted_monitor.rs | 5 + .../model/model_distribution_points_series.rs | 18 + .../model_distribution_widget_definition.rs | 78 +- ...ribution_widget_histogram_request_query.rs | 6 +- .../model_distribution_widget_request.rs | 120 ++- .../model/model_distribution_widget_x_axis.rs | 20 + .../model/model_distribution_widget_y_axis.rs | 25 + src/datadogV1/model/model_downtime.rs | 116 ++- src/datadogV1/model/model_downtime_child.rs | 106 +- .../model/model_downtime_recurrence.rs | 30 + src/datadogV1/model/model_event.rs | 68 ++ .../model/model_event_create_request.rs | 48 + .../model/model_event_create_response.rs | 12 +- .../model/model_event_list_response.rs | 10 + src/datadogV1/model/model_event_response.rs | 12 +- .../model_event_stream_widget_definition.rs | 38 +- .../model_event_timeline_widget_definition.rs | 30 +- ...n_apm_dependency_stats_query_definition.rs | 15 + ...ion_apm_resource_stats_query_definition.rs | 25 + ...nd_function_cloud_cost_query_definition.rs | 8 + ...ula_and_function_event_query_definition.rs | 32 +- ...function_event_query_definition_compute.rs | 10 + ...rmula_and_function_event_query_group_by.rs | 15 +- ..._and_function_event_query_group_by_sort.rs | 10 + ...la_and_function_metric_query_definition.rs | 8 + ...a_and_function_process_query_definition.rs | 33 + ...l_formula_and_function_query_definition.rs | 14 +- ...rmula_and_function_slo_query_definition.rs | 26 + .../model_free_text_widget_definition.rs | 18 + .../model/model_funnel_widget_definition.rs | 25 +- .../model/model_funnel_widget_request.rs | 4 +- src/datadogV1/model/model_gcp_account.rs | 80 ++ .../model/model_geomap_widget_definition.rs | 41 +- .../model/model_geomap_widget_request.rs | 74 +- src/datadogV1/model/model_graph_snapshot.rs | 15 + .../model/model_group_widget_definition.rs | 28 + .../model/model_heat_map_widget_definition.rs | 55 +- .../model/model_heat_map_widget_request.rs | 116 ++- src/datadogV1/model/model_host.rs | 77 +- .../model/model_host_list_response.rs | 15 + src/datadogV1/model/model_host_map_request.rs | 85 +- .../model/model_host_map_widget_definition.rs | 70 +- ...del_host_map_widget_definition_requests.rs | 14 +- .../model_host_map_widget_definition_style.rs | 20 + src/datadogV1/model/model_host_meta.rs | 80 +- .../model/model_host_meta_install_method.rs | 15 + src/datadogV1/model/model_host_metrics.rs | 15 + .../model/model_host_mute_response.rs | 20 + .../model/model_host_mute_settings.rs | 15 + src/datadogV1/model/model_host_tags.rs | 10 + src/datadogV1/model/model_host_totals.rs | 10 + .../model_hourly_usage_attribution_body.rs | 51 + ...model_hourly_usage_attribution_metadata.rs | 10 +- ...del_hourly_usage_attribution_pagination.rs | 5 + ...model_hourly_usage_attribution_response.rs | 18 +- src/datadogV1/model/model_http_log_item.rs | 20 + .../model/model_image_widget_definition.rs | 41 + .../model/model_intake_payload_accepted.rs | 5 + .../model/model_ip_prefixes_agents.rs | 10 + src/datadogV1/model/model_ip_prefixes_api.rs | 10 + src/datadogV1/model/model_ip_prefixes_apm.rs | 10 + .../model/model_ip_prefixes_global.rs | 10 + src/datadogV1/model/model_ip_prefixes_logs.rs | 10 + .../model/model_ip_prefixes_orchestrator.rs | 10 + .../model/model_ip_prefixes_process.rs | 10 + .../model_ip_prefixes_remote_configuration.rs | 10 + .../model/model_ip_prefixes_synthetics.rs | 26 + ...p_prefixes_synthetics_private_locations.rs | 10 + .../model/model_ip_prefixes_webhooks.rs | 10 + src/datadogV1/model/model_ip_ranges.rs | 102 +- .../model/model_list_stream_compute_items.rs | 5 + .../model/model_list_stream_query.rs | 41 +- .../model_list_stream_widget_definition.rs | 35 +- .../model/model_list_stream_widget_request.rs | 4 +- src/datadogV1/model/model_log.rs | 12 +- src/datadogV1/model/model_log_content.rs | 33 + .../model/model_log_query_definition.rs | 38 +- .../model_log_query_definition_group_by.rs | 15 +- ...odel_log_query_definition_group_by_sort.rs | 5 + .../model_log_stream_widget_definition.rs | 82 +- src/datadogV1/model/model_logs_api_error.rs | 15 + .../model/model_logs_api_error_response.rs | 7 +- .../model/model_logs_arithmetic_processor.rs | 15 + .../model/model_logs_attribute_remapper.rs | 38 + .../model/model_logs_by_retention.rs | 25 +- .../model_logs_by_retention_monthly_usage.rs | 13 + .../model_logs_by_retention_org_usage.rs | 8 + .../model/model_logs_by_retention_orgs.rs | 8 + .../model/model_logs_category_processor.rs | 10 + .../model_logs_category_processor_category.rs | 12 +- .../model/model_logs_date_remapper.rs | 10 + src/datadogV1/model/model_logs_exclusion.rs | 15 +- .../model/model_logs_exclusion_filter.rs | 5 + src/datadogV1/model/model_logs_filter.rs | 5 + .../model/model_logs_geo_ip_parser.rs | 10 + src/datadogV1/model/model_logs_grok_parser.rs | 19 +- .../model/model_logs_grok_parser_rules.rs | 5 + src/datadogV1/model/model_logs_index.rs | 27 +- .../model/model_logs_index_list_response.rs | 5 + .../model/model_logs_index_update_request.rs | 27 +- .../model/model_logs_list_request.rs | 29 +- .../model/model_logs_list_request_time.rs | 5 + .../model/model_logs_list_response.rs | 15 + .../model/model_logs_lookup_processor.rs | 15 + .../model/model_logs_message_remapper.rs | 10 + src/datadogV1/model/model_logs_pipeline.rs | 35 +- .../model/model_logs_pipeline_processor.rs | 25 +- src/datadogV1/model/model_logs_processor.rs | 34 +- .../model/model_logs_query_compute.rs | 10 + .../model_logs_retention_agg_sum_usage.rs | 20 + .../model/model_logs_retention_sum_usage.rs | 20 + .../model/model_logs_service_remapper.rs | 10 + .../model/model_logs_status_remapper.rs | 10 + .../model_logs_string_builder_processor.rs | 15 + .../model/model_logs_trace_remapper.rs | 15 + src/datadogV1/model/model_logs_url_parser.rs | 15 + .../model/model_logs_user_agent_parser.rs | 15 + .../model/model_matching_downtime.rs | 15 + src/datadogV1/model/model_metric_metadata.rs | 35 + .../model/model_metric_search_response.rs | 10 +- .../model_metric_search_response_results.rs | 5 + .../model/model_metrics_list_response.rs | 10 + .../model/model_metrics_query_metadata.rs | 68 ++ .../model/model_metrics_query_response.rs | 48 + .../model/model_metrics_query_unit.rs | 25 + src/datadogV1/model/model_monitor.rs | 87 +- ...ula_and_function_event_query_definition.rs | 27 +- ...function_event_query_definition_compute.rs | 10 + ...rmula_and_function_event_query_group_by.rs | 15 +- ..._and_function_event_query_group_by_sort.rs | 10 + ...r_formula_and_function_query_definition.rs | 2 +- .../model_monitor_group_search_response.rs | 28 +- ...el_monitor_group_search_response_counts.rs | 16 + .../model_monitor_group_search_result.rs | 38 + src/datadogV1/model/model_monitor_options.rs | 221 +++- .../model_monitor_options_aggregation.rs | 15 + .../model_monitor_options_custom_schedule.rs | 8 + ...itor_options_custom_schedule_recurrence.rs | 15 + ...odel_monitor_options_scheduling_options.rs | 20 +- ...ns_scheduling_options_evaluation_window.rs | 15 + .../model/model_monitor_search_count_item.rs | 10 + .../model/model_monitor_search_response.rs | 28 +- .../model_monitor_search_response_counts.rs | 32 + .../model_monitor_search_response_metadata.rs | 20 + .../model/model_monitor_search_result.rs | 73 +- ...odel_monitor_search_result_notification.rs | 10 + src/datadogV1/model/model_monitor_state.rs | 8 + .../model/model_monitor_state_group.rs | 33 + ...model_monitor_summary_widget_definition.rs | 87 ++ .../model_monitor_threshold_window_options.rs | 10 + .../model/model_monitor_thresholds.rs | 30 + .../model/model_monitor_update_request.rs | 89 +- .../model_monthly_usage_attribution_body.rs | 48 +- ...odel_monthly_usage_attribution_metadata.rs | 18 +- ...el_monthly_usage_attribution_pagination.rs | 5 + ...odel_monthly_usage_attribution_response.rs | 18 +- .../model_monthly_usage_attribution_values.rs | 600 +++++++++++ .../model/model_note_widget_definition.rs | 46 + .../model/model_notebook_absolute_time.rs | 5 + src/datadogV1/model/model_notebook_author.rs | 45 + .../model_notebook_cell_create_request.rs | 4 +- ...notebook_cell_create_request_attributes.rs | 16 +- .../model/model_notebook_cell_response.rs | 4 +- ...model_notebook_cell_response_attributes.rs | 16 +- .../model/model_notebook_cell_time.rs | 4 +- .../model_notebook_cell_update_request.rs | 4 +- ...notebook_cell_update_request_attributes.rs | 16 +- .../model/model_notebook_create_data.rs | 4 +- .../model_notebook_create_data_attributes.rs | 16 +- .../model/model_notebook_create_request.rs | 4 +- ...l_notebook_distribution_cell_attributes.rs | 29 +- .../model/model_notebook_global_time.rs | 4 +- ...model_notebook_heat_map_cell_attributes.rs | 29 +- ...del_notebook_log_stream_cell_attributes.rs | 22 +- ...model_notebook_markdown_cell_attributes.rs | 4 +- .../model/model_notebook_metadata.rs | 18 + .../model/model_notebook_response.rs | 7 +- .../model/model_notebook_response_data.rs | 4 +- ...model_notebook_response_data_attributes.rs | 33 +- ...del_notebook_timeseries_cell_attributes.rs | 29 +- .../model_notebook_toplist_cell_attributes.rs | 29 +- .../model/model_notebook_update_cell.rs | 4 +- .../model/model_notebook_update_data.rs | 4 +- .../model_notebook_update_data_attributes.rs | 16 +- .../model/model_notebook_update_request.rs | 4 +- .../model/model_notebooks_response.rs | 18 +- .../model/model_notebooks_response_data.rs | 4 +- ...odel_notebooks_response_data_attributes.rs | 44 +- .../model/model_notebooks_response_meta.rs | 10 +- .../model/model_notebooks_response_page.rs | 10 + .../model/model_org_downgraded_response.rs | 5 + src/datadogV1/model/model_organization.rs | 63 +- .../model/model_organization_billing.rs | 5 + .../model/model_organization_create_body.rs | 22 +- .../model_organization_create_response.rs | 31 +- .../model/model_organization_list_response.rs | 5 + .../model/model_organization_response.rs | 7 +- .../model/model_organization_settings.rs | 73 +- .../model/model_organization_settings_saml.rs | 5 + ..._settings_saml_autocreate_users_domains.rs | 10 + ...ation_settings_saml_idp_initiated_login.rs | 5 + ..._organization_settings_saml_strict_mode.rs | 5 + .../model/model_organization_subscription.rs | 5 + src/datadogV1/model/model_pagination.rs | 10 + ...el_powerpack_template_variable_contents.rs | 5 + .../model_powerpack_template_variables.rs | 16 + .../model_powerpack_widget_definition.rs | 30 +- .../model/model_process_query_definition.rs | 15 + .../model_query_value_widget_definition.rs | 66 +- .../model/model_query_value_widget_request.rs | 135 ++- ...l_reference_table_logs_lookup_processor.rs | 10 + .../model/model_response_meta_attributes.rs | 7 +- .../model_run_workflow_widget_definition.rs | 41 +- .../model/model_scatter_plot_request.rs | 93 +- .../model_scatter_plot_widget_definition.rs | 56 +- ...scatter_plot_widget_definition_requests.rs | 24 +- .../model/model_scatterplot_table_request.rs | 24 + .../model/model_scatterplot_widget_formula.rs | 5 + .../model_search_service_level_objective.rs | 10 +- ...arch_service_level_objective_attributes.rs | 98 +- ...del_search_service_level_objective_data.rs | 20 +- src/datadogV1/model/model_search_slo_query.rs | 15 + .../model/model_search_slo_response.rs | 30 +- .../model/model_search_slo_response_data.rs | 15 +- ...del_search_slo_response_data_attributes.rs | 18 +- ...rch_slo_response_data_attributes_facets.rs | 64 ++ ...ponse_data_attributes_facets_object_int.rs | 10 + ...se_data_attributes_facets_object_string.rs | 10 + .../model/model_search_slo_response_links.rs | 25 + .../model/model_search_slo_response_meta.rs | 10 +- .../model_search_slo_response_meta_page.rs | 40 + .../model/model_search_slo_threshold.rs | 15 + ...odel_selectable_template_variable_items.rs | 20 + src/datadogV1/model/model_series.rs | 20 + src/datadogV1/model/model_service_check.rs | 10 + .../model/model_service_level_objective.rs | 72 +- .../model_service_level_objective_request.rs | 45 +- .../model_service_map_widget_definition.rs | 26 + ...model_service_summary_widget_definition.rs | 71 +- src/datadogV1/model/model_shared_dashboard.rs | 61 +- .../model/model_shared_dashboard_author.rs | 10 + .../model/model_shared_dashboard_invites.rs | 14 +- .../model_shared_dashboard_invites_data.rs | 4 +- ...el_shared_dashboard_invites_data_object.rs | 4 +- ...ashboard_invites_data_object_attributes.rs | 30 + .../model_shared_dashboard_invites_meta.rs | 10 +- ...odel_shared_dashboard_invites_meta_page.rs | 5 + .../model_shared_dashboard_update_request.rs | 30 +- ...ed_dashboard_update_request_global_time.rs | 8 + .../model_signal_assignee_update_request.rs | 5 + .../model_signal_state_update_request.rs | 18 + .../model/model_slack_integration_channel.rs | 15 +- ...model_slack_integration_channel_display.rs | 20 + .../model/model_slo_bulk_delete_response.rs | 18 +- .../model_slo_bulk_delete_response_data.rs | 10 + src/datadogV1/model/model_slo_correction.rs | 20 +- .../model/model_slo_correction_create_data.rs | 10 +- .../model_slo_correction_create_request.rs | 10 +- ...lo_correction_create_request_attributes.rs | 25 + .../model_slo_correction_list_response.rs | 15 +- .../model/model_slo_correction_response.rs | 7 +- ...odel_slo_correction_response_attributes.rs | 71 +- ...correction_response_attributes_modifier.rs | 15 + .../model/model_slo_correction_update_data.rs | 15 +- .../model_slo_correction_update_request.rs | 10 +- ...lo_correction_update_request_attributes.rs | 38 + src/datadogV1/model/model_slo_creator.rs | 15 + .../model/model_slo_delete_response.rs | 10 + .../model/model_slo_history_metrics.rs | 13 +- .../model/model_slo_history_metrics_series.rs | 10 +- ...del_slo_history_metrics_series_metadata.rs | 33 + ...lo_history_metrics_series_metadata_unit.rs | 30 + .../model/model_slo_history_monitor.rs | 78 ++ .../model/model_slo_history_response.rs | 18 +- .../model/model_slo_history_response_data.rs | 63 +- .../model/model_slo_history_response_error.rs | 5 + .../model/model_slo_history_sli_data.rs | 78 ++ .../model/model_slo_list_response.rs | 23 +- .../model/model_slo_list_response_metadata.rs | 10 +- .../model_slo_list_response_metadata_page.rs | 10 + .../model/model_slo_list_widget_definition.rs | 18 + .../model/model_slo_list_widget_query.rs | 10 + .../model/model_slo_list_widget_request.rs | 4 +- .../model/model_slo_overall_statuses.rs | 50 +- .../model_slo_raw_error_budget_remaining.rs | 10 + src/datadogV1/model/model_slo_response.rs | 12 +- .../model/model_slo_response_data.rs | 95 +- src/datadogV1/model/model_slo_status.rs | 40 +- src/datadogV1/model/model_slo_threshold.rs | 15 + .../model/model_slo_widget_definition.rs | 51 + src/datadogV1/model/model_split_config.rs | 12 +- ...el_split_graph_source_widget_definition.rs | 18 +- .../model_split_graph_widget_definition.rs | 25 +- src/datadogV1/model/model_split_sort.rs | 10 +- ...model_successful_signal_update_response.rs | 5 + .../model/model_sunburst_widget_definition.rs | 48 +- .../model/model_sunburst_widget_legend.rs | 4 +- ...sunburst_widget_legend_inline_automatic.rs | 10 + .../model/model_sunburst_widget_request.rs | 126 ++- .../model/model_synthetics_api_step.rs | 32 +- .../model/model_synthetics_api_test.rs | 39 +- .../model/model_synthetics_api_test_config.rs | 34 +- .../model_synthetics_api_test_result_data.rs | 69 +- ...odel_synthetics_api_test_result_failure.rs | 13 + .../model_synthetics_api_test_result_full.rs | 48 +- ...l_synthetics_api_test_result_full_check.rs | 4 +- .../model_synthetics_api_test_result_short.rs | 33 +- ...synthetics_api_test_result_short_result.rs | 12 +- .../model/model_synthetics_assertion.rs | 8 +- ...l_synthetics_assertion_json_path_target.rs | 15 +- ...etics_assertion_json_path_target_target.rs | 15 + .../model_synthetics_assertion_target.rs | 13 + ...odel_synthetics_assertion_x_path_target.rs | 15 +- ...nthetics_assertion_x_path_target_target.rs | 15 + .../model/model_synthetics_basic_auth.rs | 12 +- .../model_synthetics_basic_auth_digest.rs | 8 + .../model/model_synthetics_basic_auth_ntlm.rs | 20 + ...odel_synthetics_basic_auth_oauth_client.rs | 23 + .../model_synthetics_basic_auth_oauth_rop.rs | 33 + .../model_synthetics_basic_auth_sigv4.rs | 15 + .../model/model_synthetics_basic_auth_web.rs | 8 + .../model/model_synthetics_batch_details.rs | 10 +- .../model_synthetics_batch_details_data.rs | 23 +- .../model/model_synthetics_batch_result.rs | 56 + .../model/model_synthetics_browser_error.rs | 5 + .../model/model_synthetics_browser_test.rs | 36 +- .../model_synthetics_browser_test_config.rs | 25 +- ...del_synthetics_browser_test_result_data.rs | 70 +- ..._synthetics_browser_test_result_failure.rs | 13 + ...del_synthetics_browser_test_result_full.rs | 48 +- ...nthetics_browser_test_result_full_check.rs | 4 +- ...el_synthetics_browser_test_result_short.rs | 33 +- ...hetics_browser_test_result_short_result.rs | 27 +- ...el_synthetics_browser_test_rum_settings.rs | 10 + .../model_synthetics_browser_variable.rs | 20 + .../model_synthetics_ci_batch_metadata.rs | 20 +- .../model_synthetics_ci_batch_metadata_ci.rs | 20 +- .../model_synthetics_ci_batch_metadata_git.rs | 10 + ...l_synthetics_ci_batch_metadata_pipeline.rs | 5 + ...l_synthetics_ci_batch_metadata_provider.rs | 5 + .../model/model_synthetics_ci_test.rs | 86 +- .../model/model_synthetics_ci_test_body.rs | 8 + .../model/model_synthetics_config_variable.rs | 20 + .../model/model_synthetics_core_web_vitals.rs | 15 + .../model_synthetics_delete_tests_payload.rs | 5 + .../model_synthetics_delete_tests_response.rs | 8 + .../model/model_synthetics_deleted_test.rs | 10 + .../model/model_synthetics_device.rs | 5 + ...cs_get_api_test_latest_results_response.rs | 13 + ...et_browser_test_latest_results_response.rs | 13 + .../model/model_synthetics_global_variable.rs | 34 +- ...l_synthetics_global_variable_attributes.rs | 5 + ...odel_synthetics_global_variable_options.rs | 11 +- ...tics_global_variable_parse_test_options.rs | 20 +- ...thetics_global_variable_totp_parameters.rs | 10 + .../model_synthetics_global_variable_value.rs | 20 +- ...nthetics_list_global_variables_response.rs | 8 + .../model_synthetics_list_tests_response.rs | 8 + .../model/model_synthetics_location.rs | 10 + .../model/model_synthetics_locations.rs | 8 + .../model/model_synthetics_parsing_options.rs | 33 +- .../model/model_synthetics_patch_test_body.rs | 8 + .../model_synthetics_patch_test_operation.rs | 18 + .../model_synthetics_private_location.rs | 25 +- ...tics_private_location_creation_response.rs | 31 +- ...ion_creation_response_result_encryption.rs | 10 + ...el_synthetics_private_location_metadata.rs | 5 + ...del_synthetics_private_location_secrets.rs | 20 +- ...private_location_secrets_authentication.rs | 10 + ...vate_location_secrets_config_decryption.rs | 5 + .../model/model_synthetics_ssl_certificate.rs | 70 +- ...model_synthetics_ssl_certificate_issuer.rs | 30 + ...odel_synthetics_ssl_certificate_subject.rs | 35 + src/datadogV1/model/model_synthetics_step.rs | 38 + .../model/model_synthetics_step_detail.rs | 103 ++ .../model/model_synthetics_test_ci_options.rs | 8 + .../model/model_synthetics_test_config.rs | 34 +- .../model/model_synthetics_test_details.rs | 86 +- .../model/model_synthetics_test_options.rs | 141 ++- ...synthetics_test_options_monitor_options.rs | 5 + .../model_synthetics_test_options_retry.rs | 10 + ...odel_synthetics_test_options_scheduling.rs | 13 + ...etics_test_options_scheduling_timeframe.rs | 15 + .../model/model_synthetics_test_request.rs | 162 ++- ...del_synthetics_test_request_certificate.rs | 20 +- ...ynthetics_test_request_certificate_item.rs | 15 + .../model_synthetics_test_request_proxy.rs | 5 + .../model/model_synthetics_timing.rs | 45 + ...del_synthetics_trigger_ci_test_location.rs | 10 + ...l_synthetics_trigger_ci_test_run_result.rs | 20 + ...el_synthetics_trigger_ci_tests_response.rs | 26 + .../model/model_synthetics_trigger_test.rs | 10 +- ...hetics_update_test_pause_status_payload.rs | 8 + .../model/model_synthetics_variable_parser.rs | 5 + .../model/model_table_widget_definition.rs | 41 +- .../model/model_table_widget_request.rs | 158 ++- src/datadogV1/model/model_tag_to_hosts.rs | 8 + .../model/model_timeseries_background.rs | 7 +- .../model_timeseries_widget_definition.rs | 83 +- ...odel_timeseries_widget_expression_alias.rs | 5 + .../model/model_timeseries_widget_request.rs | 147 ++- .../model/model_toplist_widget_definition.rs | 40 +- .../model/model_toplist_widget_display.rs | 4 +- .../model/model_toplist_widget_request.rs | 134 ++- .../model/model_toplist_widget_style.rs | 18 +- .../model_topology_map_widget_definition.rs | 26 + src/datadogV1/model/model_topology_query.rs | 18 + src/datadogV1/model/model_topology_request.rs | 15 +- .../model/model_tree_map_widget_definition.rs | 41 +- .../model/model_tree_map_widget_request.rs | 29 + .../model/model_usage_analyzed_logs_hour.rs | 20 + .../model_usage_analyzed_logs_response.rs | 8 + ...model_usage_attribution_aggregates_body.rs | 15 + .../model/model_usage_attribution_body.rs | 43 +- .../model/model_usage_attribution_metadata.rs | 18 +- .../model_usage_attribution_pagination.rs | 25 + .../model/model_usage_attribution_response.rs | 18 +- .../model/model_usage_attribution_values.rs | 260 +++++ .../model/model_usage_audit_logs_hour.rs | 20 + .../model/model_usage_audit_logs_response.rs | 8 + .../model_usage_billable_summary_body.rs | 35 + .../model_usage_billable_summary_hour.rs | 50 +- .../model_usage_billable_summary_keys.rs | 888 ++++++++++++++-- .../model_usage_billable_summary_response.rs | 8 + .../model/model_usage_ci_visibility_hour.rs | 35 + .../model_usage_ci_visibility_response.rs | 8 + ..._cloud_security_posture_management_hour.rs | 50 + ...ud_security_posture_management_response.rs | 8 + .../model_usage_custom_reports_attributes.rs | 25 + .../model/model_usage_custom_reports_data.rs | 20 +- .../model/model_usage_custom_reports_meta.rs | 10 +- .../model/model_usage_custom_reports_page.rs | 5 + .../model_usage_custom_reports_response.rs | 18 +- src/datadogV1/model/model_usage_cws_hour.rs | 25 + .../model/model_usage_cws_response.rs | 5 + src/datadogV1/model/model_usage_dbm_hour.rs | 25 + .../model/model_usage_dbm_response.rs | 5 + .../model/model_usage_fargate_hour.rs | 35 + .../model/model_usage_fargate_response.rs | 8 + src/datadogV1/model/model_usage_host_hour.rs | 85 ++ .../model/model_usage_hosts_response.rs | 5 + .../model_usage_incident_management_hour.rs | 20 + ...odel_usage_incident_management_response.rs | 8 + .../model/model_usage_indexed_spans_hour.rs | 20 + .../model_usage_indexed_spans_response.rs | 8 + .../model/model_usage_ingested_spans_hour.rs | 20 + .../model_usage_ingested_spans_response.rs | 8 + src/datadogV1/model/model_usage_io_t_hour.rs | 20 + .../model/model_usage_io_t_response.rs | 5 + .../model/model_usage_lambda_hour.rs | 25 + .../model/model_usage_lambda_response.rs | 8 + .../model/model_usage_logs_by_index_hour.rs | 35 + .../model_usage_logs_by_index_response.rs | 8 + .../model_usage_logs_by_retention_hour.rs | 30 + .../model_usage_logs_by_retention_response.rs | 8 + src/datadogV1/model/model_usage_logs_hour.rs | 55 + .../model/model_usage_logs_response.rs | 5 + .../model/model_usage_network_flows_hour.rs | 20 + .../model_usage_network_flows_response.rs | 8 + .../model/model_usage_network_hosts_hour.rs | 20 + .../model_usage_network_hosts_response.rs | 8 + .../model/model_usage_online_archive_hour.rs | 20 + .../model_usage_online_archive_response.rs | 8 + .../model/model_usage_profiling_hour.rs | 30 + .../model/model_usage_profiling_response.rs | 8 + .../model/model_usage_rum_sessions_hour.rs | 45 + .../model_usage_rum_sessions_response.rs | 8 + .../model/model_usage_rum_units_hour.rs | 25 + .../model/model_usage_rum_units_response.rs | 8 + src/datadogV1/model/model_usage_sds_hour.rs | 40 + .../model/model_usage_sds_response.rs | 5 + src/datadogV1/model/model_usage_snmp_hour.rs | 20 + .../model/model_usage_snmp_response.rs | 5 + ...age_specified_custom_reports_attributes.rs | 30 + ...del_usage_specified_custom_reports_data.rs | 20 +- ...del_usage_specified_custom_reports_meta.rs | 10 +- ...del_usage_specified_custom_reports_page.rs | 5 + ...usage_specified_custom_reports_response.rs | 20 +- .../model/model_usage_summary_date.rs | 618 +++++++++++ .../model/model_usage_summary_date_org.rs | 639 ++++++++++++ .../model/model_usage_summary_response.rs | 704 ++++++++++++- .../model/model_usage_synthetics_api_hour.rs | 20 + .../model_usage_synthetics_api_response.rs | 8 + .../model_usage_synthetics_browser_hour.rs | 20 + ...model_usage_synthetics_browser_response.rs | 8 + .../model/model_usage_synthetics_hour.rs | 20 + .../model/model_usage_synthetics_response.rs | 8 + .../model/model_usage_timeseries_hour.rs | 30 + .../model/model_usage_timeseries_response.rs | 8 + .../model/model_usage_top_avg_metrics_hour.rs | 23 + .../model_usage_top_avg_metrics_metadata.rs | 20 +- .../model_usage_top_avg_metrics_pagination.rs | 15 + .../model_usage_top_avg_metrics_response.rs | 18 +- src/datadogV1/model/model_user.rs | 38 + .../model/model_user_disable_response.rs | 5 + .../model/model_user_list_response.rs | 5 + src/datadogV1/model/model_user_response.rs | 7 +- .../model/model_webhooks_integration.rs | 18 + ...ks_integration_custom_variable_response.rs | 5 + ...egration_custom_variable_update_request.rs | 15 + ...del_webhooks_integration_update_request.rs | 28 + src/datadogV1/model/model_widget.rs | 16 +- src/datadogV1/model/model_widget_axis.rs | 25 + .../model/model_widget_conditional_format.rs | 30 + .../model/model_widget_custom_link.rs | 20 + .../model/model_widget_definition.rs | 68 +- src/datadogV1/model/model_widget_event.rs | 5 + src/datadogV1/model/model_widget_formula.rs | 35 +- .../model/model_widget_formula_limit.rs | 10 + .../model/model_widget_formula_style.rs | 10 + src/datadogV1/model/model_widget_layout.rs | 5 + src/datadogV1/model/model_widget_marker.rs | 15 + .../model/model_widget_request_style.rs | 18 + src/datadogV1/model/model_widget_style.rs | 5 + src/datadogV1/model/model_widget_time.rs | 5 + .../api/api_apm_retention_filters.rs | 93 +- src/datadogV2/api/api_audit.rs | 49 +- src/datadogV2/api/api_auth_n_mappings.rs | 105 +- .../api/api_ci_visibility_pipelines.rs | 82 +- src/datadogV2/api/api_ci_visibility_tests.rs | 67 +- .../api/api_cloud_cost_management.rs | 136 +-- .../api/api_cloud_workload_security.rs | 73 +- .../api/api_cloudflare_integration.rs | 75 +- src/datadogV2/api/api_confluent_cloud.rs | 197 ++-- src/datadogV2/api/api_container_images.rs | 33 +- src/datadogV2/api/api_containers.rs | 33 +- src/datadogV2/api/api_dashboard_lists.rs | 82 +- src/datadogV2/api/api_dora_metrics.rs | 30 +- src/datadogV2/api/api_downtimes.rs | 132 +-- src/datadogV2/api/api_events.rs | 49 +- src/datadogV2/api/api_fastly_integration.rs | 187 +--- src/datadogV2/api/api_gcp_integration.rs | 70 +- src/datadogV2/api/api_incident_services.rs | 113 +- src/datadogV2/api/api_incident_teams.rs | 107 +- src/datadogV2/api/api_incidents.rs | 413 +++----- src/datadogV2/api/api_ip_allowlist.rs | 17 +- src/datadogV2/api/api_key_management.rs | 364 +++---- src/datadogV2/api/api_logs.rs | 94 +- src/datadogV2/api/api_logs_archives.rs | 157 +-- src/datadogV2/api/api_logs_metrics.rs | 74 +- src/datadogV2/api/api_metrics.rs | 297 ++---- src/datadogV2/api/api_monitors.rs | 77 +- src/datadogV2/api/api_okta_integration.rs | 72 +- src/datadogV2/api/api_opsgenie_integration.rs | 80 +- src/datadogV2/api/api_organizations.rs | 10 +- src/datadogV2/api/api_powerpack.rs | 91 +- src/datadogV2/api/api_processes.rs | 38 +- src/datadogV2/api/api_restriction_policies.rs | 62 +- src/datadogV2/api/api_roles.rs | 264 ++--- src/datadogV2/api/api_rum.rs | 136 +-- src/datadogV2/api/api_security_monitoring.rs | 410 +++----- .../api/api_sensitive_data_scanner.rs | 141 +-- src/datadogV2/api/api_service_accounts.rs | 154 +-- src/datadogV2/api/api_service_definition.rs | 82 +- src/datadogV2/api/api_service_scorecards.rs | 166 ++- src/datadogV2/api/api_spans.rs | 67 +- src/datadogV2/api/api_spans_metrics.rs | 74 +- src/datadogV2/api/api_synthetics.rs | 18 +- src/datadogV2/api/api_teams.rs | 383 +++---- src/datadogV2/api/api_usage_metering.rs | 296 +++--- src/datadogV2/api/api_users.rs | 171 +-- ...el_active_billing_dimensions_attributes.rs | 10 + .../model_active_billing_dimensions_body.rs | 23 +- ...odel_active_billing_dimensions_response.rs | 10 +- .../model/model_api_key_create_data.rs | 4 +- .../model/model_api_key_create_request.rs | 4 +- .../model/model_api_key_relationships.rs | 20 +- src/datadogV2/model/model_api_key_response.rs | 15 +- .../model_api_key_response_included_item.rs | 2 +- .../model/model_api_key_update_data.rs | 4 +- .../model/model_api_key_update_request.rs | 4 +- .../model/model_api_keys_response.rs | 20 +- .../model/model_api_keys_response_meta.rs | 15 +- .../model_api_keys_response_meta_page.rs | 5 + ...model_application_key_create_attributes.rs | 5 + .../model_application_key_create_data.rs | 4 +- .../model_application_key_create_request.rs | 4 +- .../model_application_key_relationships.rs | 10 +- .../model/model_application_key_response.rs | 15 +- ..._application_key_response_included_item.rs | 4 +- .../model_application_key_response_meta.rs | 15 +- ...odel_application_key_response_meta_page.rs | 5 + ...model_application_key_update_attributes.rs | 10 + .../model_application_key_update_data.rs | 4 +- .../model_application_key_update_request.rs | 4 +- src/datadogV2/model/model_audit_logs_event.rs | 20 +- .../model_audit_logs_event_attributes.rs | 28 + .../model/model_audit_logs_events_response.rs | 25 +- .../model/model_audit_logs_query_filter.rs | 15 + .../model/model_audit_logs_query_options.rs | 10 + .../model_audit_logs_query_page_options.rs | 10 + .../model/model_audit_logs_response_links.rs | 5 + .../model_audit_logs_response_metadata.rs | 36 +- .../model/model_audit_logs_response_page.rs | 5 + .../model_audit_logs_search_events_request.rs | 35 +- .../model/model_audit_logs_warning.rs | 15 + src/datadogV2/model/model_auth_n_mapping.rs | 20 +- .../model/model_auth_n_mapping_attributes.rs | 25 + .../model_auth_n_mapping_create_attributes.rs | 10 + .../model/model_auth_n_mapping_create_data.rs | 20 +- ...del_auth_n_mapping_create_relationships.rs | 7 +- .../model_auth_n_mapping_create_request.rs | 6 +- .../model/model_auth_n_mapping_included.rs | 4 +- .../model_auth_n_mapping_relationships.rs | 17 +- .../model/model_auth_n_mapping_response.rs | 15 +- .../model_auth_n_mapping_update_attributes.rs | 10 + .../model/model_auth_n_mapping_update_data.rs | 20 +- ...del_auth_n_mapping_update_relationships.rs | 7 +- .../model_auth_n_mapping_update_request.rs | 6 +- .../model/model_auth_n_mappings_response.rs | 23 +- src/datadogV2/model/model_aws_cur_config.rs | 9 +- .../model/model_aws_cur_config_attributes.rs | 30 + .../model/model_aws_cur_config_patch_data.rs | 4 +- .../model_aws_cur_config_patch_request.rs | 6 +- .../model/model_aws_cur_config_post_data.rs | 4 +- .../model_aws_cur_config_post_request.rs | 6 +- ..._aws_cur_config_post_request_attributes.rs | 15 + .../model/model_aws_cur_config_response.rs | 7 +- .../model/model_aws_cur_configs_response.rs | 5 + .../model/model_aws_related_account.rs | 10 +- .../model_aws_related_account_attributes.rs | 10 + .../model_aws_related_accounts_response.rs | 8 + src/datadogV2/model/model_azure_uc_config.rs | 36 + .../model/model_azure_uc_config_pair.rs | 9 +- .../model_azure_uc_config_pair_attributes.rs | 5 + .../model_azure_uc_config_pairs_response.rs | 7 +- .../model/model_azure_uc_config_patch_data.rs | 4 +- .../model_azure_uc_config_patch_request.rs | 6 +- .../model/model_azure_uc_config_post_data.rs | 4 +- .../model_azure_uc_config_post_request.rs | 6 +- ...azure_uc_config_post_request_attributes.rs | 13 +- .../model/model_azure_uc_configs_response.rs | 8 + .../model/model_bulk_mute_findings_request.rs | 4 +- ...l_bulk_mute_findings_request_attributes.rs | 4 +- .../model_bulk_mute_findings_request_data.rs | 8 +- .../model_bulk_mute_findings_request_meta.rs | 8 + ...ulk_mute_findings_request_meta_findings.rs | 5 + ...l_bulk_mute_findings_request_properties.rs | 10 + .../model_bulk_mute_findings_response.rs | 4 +- .../model_bulk_mute_findings_response_data.rs | 10 + .../model/model_chargeback_breakdown.rs | 15 + ...aggregate_bucket_value_timeseries_point.rs | 10 + .../model/model_ci_app_aggregate_sort.rs | 26 + src/datadogV2/model/model_ci_app_ci_error.rs | 20 + src/datadogV2/model/model_ci_app_compute.rs | 15 + ...el_ci_app_create_pipeline_event_request.rs | 10 +- ...reate_pipeline_event_request_attributes.rs | 14 +- ...eline_event_request_attributes_resource.rs | 8 +- ..._app_create_pipeline_event_request_data.rs | 18 +- .../model/model_ci_app_event_attributes.rs | 18 + src/datadogV2/model/model_ci_app_git_info.rs | 45 + src/datadogV2/model/model_ci_app_host_info.rs | 20 + .../model/model_ci_app_pipeline_event.rs | 23 +- .../model_ci_app_pipeline_event_attributes.rs | 21 + .../model/model_ci_app_pipeline_event_job.rs | 65 +- ...l_ci_app_pipeline_event_parent_pipeline.rs | 5 + .../model_ci_app_pipeline_event_pipeline.rs | 86 +- ...ci_app_pipeline_event_previous_pipeline.rs | 5 + .../model_ci_app_pipeline_event_stage.rs | 55 +- .../model/model_ci_app_pipeline_event_step.rs | 70 +- .../model_ci_app_pipeline_events_request.rs | 32 +- .../model_ci_app_pipeline_events_response.rs | 25 +- ...odel_ci_app_pipelines_aggregate_request.rs | 30 +- ..._pipelines_aggregation_buckets_response.rs | 8 + ..._pipelines_analytics_aggregate_response.rs | 27 +- .../model_ci_app_pipelines_bucket_response.rs | 19 + .../model/model_ci_app_pipelines_group_by.rs | 39 +- .../model_ci_app_pipelines_query_filter.rs | 15 + .../model/model_ci_app_query_options.rs | 10 + .../model/model_ci_app_query_page_options.rs | 10 + .../model/model_ci_app_response_links.rs | 5 + .../model/model_ci_app_response_metadata.rs | 26 + ...i_app_response_metadata_with_pagination.rs | 33 +- .../model/model_ci_app_response_page.rs | 5 + .../model/model_ci_app_test_event.rs | 23 +- .../model/model_ci_app_test_events_request.rs | 32 +- .../model_ci_app_test_events_response.rs | 22 +- .../model_ci_app_tests_aggregate_request.rs | 30 +- ..._app_tests_aggregation_buckets_response.rs | 8 + ..._app_tests_analytics_aggregate_response.rs | 27 +- .../model_ci_app_tests_bucket_response.rs | 19 + .../model/model_ci_app_tests_group_by.rs | 39 +- .../model/model_ci_app_tests_query_filter.rs | 15 + src/datadogV2/model/model_ci_app_warning.rs | 15 + ...d_configuration_compliance_rule_options.rs | 20 +- ...el_cloud_configuration_rule_case_create.rs | 5 + ...guration_rule_compliance_signal_options.rs | 20 + ...cloud_configuration_rule_create_payload.rs | 31 +- .../model_cloud_configuration_rule_options.rs | 7 +- .../model/model_cloud_cost_activity.rs | 4 +- .../model_cloud_cost_activity_response.rs | 7 +- ...workload_security_agent_rule_attributes.rs | 92 +- ...d_security_agent_rule_create_attributes.rs | 10 + ...orkload_security_agent_rule_create_data.rs | 4 +- ...load_security_agent_rule_create_request.rs | 4 +- ..._security_agent_rule_creator_attributes.rs | 10 + ...cloud_workload_security_agent_rule_data.rs | 23 +- ...d_workload_security_agent_rule_response.rs | 10 +- ...d_security_agent_rule_update_attributes.rs | 15 + ...orkload_security_agent_rule_update_data.rs | 4 +- ...load_security_agent_rule_update_request.rs | 4 +- ..._security_agent_rule_updater_attributes.rs | 10 + ...load_security_agent_rules_list_response.rs | 8 + ...model_cloudflare_account_create_request.rs | 4 +- ...flare_account_create_request_attributes.rs | 5 + ..._cloudflare_account_create_request_data.rs | 4 +- .../model_cloudflare_account_response.rs | 10 +- ..._cloudflare_account_response_attributes.rs | 5 + .../model_cloudflare_account_response_data.rs | 4 +- ...model_cloudflare_account_update_request.rs | 4 +- ...flare_account_update_request_attributes.rs | 5 + ..._cloudflare_account_update_request_data.rs | 18 +- .../model_cloudflare_accounts_response.rs | 8 + .../model_confluent_account_create_request.rs | 4 +- ...luent_account_create_request_attributes.rs | 13 + ...l_confluent_account_create_request_data.rs | 4 +- ...l_confluent_account_resource_attributes.rs | 15 + .../model/model_confluent_account_response.rs | 10 +- ...l_confluent_account_response_attributes.rs | 13 + .../model_confluent_account_response_data.rs | 4 +- .../model_confluent_account_update_request.rs | 4 +- ...luent_account_update_request_attributes.rs | 5 + ...l_confluent_account_update_request_data.rs | 4 +- .../model_confluent_accounts_response.rs | 8 + .../model/model_confluent_resource_request.rs | 4 +- ...l_confluent_resource_request_attributes.rs | 10 + .../model_confluent_resource_request_data.rs | 4 +- .../model_confluent_resource_response.rs | 10 +- ..._confluent_resource_response_attributes.rs | 15 + .../model_confluent_resource_response_data.rs | 4 +- .../model_confluent_resources_response.rs | 8 + src/datadogV2/model/model_container.rs | 20 +- .../model/model_container_attributes.rs | 50 + src/datadogV2/model/model_container_group.rs | 30 +- .../model/model_container_group_attributes.rs | 13 + .../model_container_group_relationships.rs | 10 +- ...odel_container_group_relationships_link.rs | 15 +- ...del_container_group_relationships_links.rs | 5 + src/datadogV2/model/model_container_image.rs | 20 +- .../model/model_container_image_attributes.rs | 93 +- .../model/model_container_image_flavor.rs | 25 + .../model/model_container_image_group.rs | 33 +- .../model_container_image_group_attributes.rs | 18 + ...r_image_group_images_relationships_link.rs | 15 +- ...del_container_image_group_relationships.rs | 10 +- ...ntainer_image_group_relationships_links.rs | 5 + .../model/model_container_image_item.rs | 4 +- .../model/model_container_image_meta.rs | 10 +- .../model/model_container_image_meta_page.rs | 33 + .../model_container_image_vulnerabilities.rs | 35 + .../model/model_container_images_response.rs | 25 +- .../model_container_images_response_links.rs | 25 + src/datadogV2/model/model_container_item.rs | 4 +- src/datadogV2/model/model_container_meta.rs | 10 +- .../model/model_container_meta_page.rs | 33 + .../model/model_containers_response.rs | 22 +- .../model/model_containers_response_links.rs | 25 + .../model_cost_attribution_aggregates_body.rs | 15 + src/datadogV2/model/model_cost_by_org.rs | 20 +- .../model/model_cost_by_org_attributes.rs | 33 + .../model/model_cost_by_org_response.rs | 5 + .../model/model_create_rule_request.rs | 10 +- .../model/model_create_rule_request_data.rs | 12 +- .../model/model_create_rule_response.rs | 10 +- .../model/model_create_rule_response_data.rs | 27 +- src/datadogV2/model/model_creator.rs | 15 + .../model_dashboard_list_add_items_request.rs | 8 + ...model_dashboard_list_add_items_response.rs | 8 + ...del_dashboard_list_delete_items_request.rs | 8 + ...el_dashboard_list_delete_items_response.rs | 8 + .../model/model_dashboard_list_item.rs | 62 +- .../model/model_dashboard_list_items.rs | 5 + ...del_dashboard_list_update_items_request.rs | 8 + ...el_dashboard_list_update_items_response.rs | 8 + .../model/model_data_scalar_column.rs | 25 +- src/datadogV2/model/model_detailed_finding.rs | 20 +- .../model_detailed_finding_attributes.rs | 65 +- .../model/model_dora_deployment_request.rs | 6 +- ...odel_dora_deployment_request_attributes.rs | 17 +- .../model_dora_deployment_request_data.rs | 4 +- .../model/model_dora_deployment_response.rs | 4 +- .../model_dora_deployment_response_data.rs | 5 + .../model/model_dora_incident_request.rs | 4 +- .../model_dora_incident_request_attributes.rs | 32 +- .../model/model_dora_incident_request_data.rs | 4 +- .../model/model_dora_incident_response.rs | 6 +- .../model_dora_incident_response_data.rs | 5 + .../model/model_downtime_create_request.rs | 6 +- ...odel_downtime_create_request_attributes.rs | 45 +- .../model_downtime_create_request_data.rs | 4 +- src/datadogV2/model/model_downtime_meta.rs | 7 +- .../model/model_downtime_meta_page.rs | 5 + .../model_downtime_monitor_identifier.rs | 4 +- ...el_downtime_monitor_included_attributes.rs | 5 + .../model_downtime_monitor_included_item.rs | 23 +- .../model/model_downtime_relationships.rs | 20 +- ...model_downtime_relationships_created_by.rs | 10 +- ..._downtime_relationships_created_by_data.rs | 10 + .../model_downtime_relationships_monitor.rs | 10 +- ...del_downtime_relationships_monitor_data.rs | 13 + .../model/model_downtime_response.rs | 15 +- .../model_downtime_response_attributes.rs | 76 +- .../model/model_downtime_response_data.rs | 33 +- .../model_downtime_response_included_item.rs | 4 +- .../model_downtime_schedule_create_request.rs | 4 +- ...time_schedule_current_downtime_response.rs | 10 + ...schedule_one_time_create_update_request.rs | 10 + ...del_downtime_schedule_one_time_response.rs | 5 + ...hedule_recurrence_create_update_request.rs | 5 + ...l_downtime_schedule_recurrence_response.rs | 15 + ...ime_schedule_recurrences_create_request.rs | 5 + ..._downtime_schedule_recurrences_response.rs | 16 +- ...ime_schedule_recurrences_update_request.rs | 13 + .../model/model_downtime_schedule_response.rs | 4 +- .../model_downtime_schedule_update_request.rs | 4 +- .../model/model_downtime_update_request.rs | 6 +- ...odel_downtime_update_request_attributes.rs | 56 +- .../model_downtime_update_request_data.rs | 4 +- src/datadogV2/model/model_event.rs | 20 + src/datadogV2/model/model_event_attributes.rs | 105 +- src/datadogV2/model/model_event_response.rs | 20 +- .../model/model_event_response_attributes.rs | 25 +- src/datadogV2/model/model_events_compute.rs | 10 + src/datadogV2/model/model_events_group_by.rs | 12 +- .../model/model_events_group_by_sort.rs | 15 + .../model/model_events_list_request.rs | 29 +- .../model/model_events_list_response.rs | 25 +- .../model/model_events_list_response_links.rs | 5 + .../model/model_events_query_filter.rs | 15 + .../model/model_events_query_options.rs | 10 + .../model/model_events_request_page.rs | 10 + .../model/model_events_response_metadata.rs | 33 +- .../model_events_response_metadata_page.rs | 5 + .../model/model_events_scalar_query.rs | 29 +- src/datadogV2/model/model_events_search.rs | 5 + .../model/model_events_timeseries_query.rs | 29 +- src/datadogV2/model/model_events_warning.rs | 15 + ...model_fastly_accoun_response_attributes.rs | 8 + .../model_fastly_account_create_request.rs | 4 +- ...astly_account_create_request_attributes.rs | 8 + ...odel_fastly_account_create_request_data.rs | 4 +- .../model/model_fastly_account_response.rs | 10 +- .../model_fastly_account_response_data.rs | 4 +- .../model_fastly_account_update_request.rs | 4 +- ...astly_account_update_request_attributes.rs | 5 + ...odel_fastly_account_update_request_data.rs | 15 +- .../model/model_fastly_accounts_response.rs | 8 + src/datadogV2/model/model_fastly_service.rs | 5 + .../model/model_fastly_service_attributes.rs | 5 + .../model/model_fastly_service_data.rs | 10 +- .../model/model_fastly_service_request.rs | 4 +- .../model/model_fastly_service_response.rs | 7 +- .../model/model_fastly_services_response.rs | 8 + src/datadogV2/model/model_finding.rs | 20 +- .../model/model_finding_attributes.rs | 52 +- src/datadogV2/model/model_finding_mute.rs | 30 + src/datadogV2/model/model_finding_rule.rs | 10 + src/datadogV2/model/model_formula_limit.rs | 10 + src/datadogV2/model/model_full_api_key.rs | 30 +- .../model/model_full_api_key_attributes.rs | 35 + .../model/model_full_application_key.rs | 30 +- .../model_full_application_key_attributes.rs | 25 + .../model/model_gcp_service_account_meta.rs | 5 + .../model/model_gcpsts_delegate_account.rs | 23 +- ...odel_gcpsts_delegate_account_attributes.rs | 5 + .../model_gcpsts_delegate_account_response.rs | 10 +- .../model/model_gcpsts_service_account.rs | 33 +- ...model_gcpsts_service_account_attributes.rs | 35 + ...l_gcpsts_service_account_create_request.rs | 10 +- .../model_gcpsts_service_account_data.rs | 18 +- .../model_gcpsts_service_account_response.rs | 7 +- ...l_gcpsts_service_account_update_request.rs | 10 +- ...sts_service_account_update_request_data.rs | 23 +- .../model_gcpsts_service_accounts_response.rs | 8 + .../model/model_get_finding_response.rs | 4 +- .../model/model_group_scalar_column.rs | 18 + src/datadogV2/model/model_hourly_usage.rs | 20 +- .../model/model_hourly_usage_attributes.rs | 33 + .../model/model_hourly_usage_measurement.rs | 10 + .../model/model_hourly_usage_metadata.rs | 10 +- .../model/model_hourly_usage_pagination.rs | 5 + .../model/model_hourly_usage_response.rs | 12 +- src/datadogV2/model/model_http_log_error.rs | 15 + src/datadogV2/model/model_http_log_errors.rs | 5 + src/datadogV2/model/model_http_log_item.rs | 20 + src/datadogV2/model/model_httpci_app_error.rs | 15 + .../model/model_httpci_app_errors.rs | 8 + .../model/model_id_p_metadata_form_data.rs | 5 + .../model_incident_attachment_attributes.rs | 6 +- .../model/model_incident_attachment_data.rs | 8 +- ...del_incident_attachment_link_attributes.rs | 9 +- ...cident_attachment_postmortem_attributes.rs | 6 +- ...model_incident_attachment_relationships.rs | 10 +- ...l_incident_attachment_update_attributes.rs | 6 +- .../model_incident_attachment_update_data.rs | 15 +- ...del_incident_attachment_update_response.rs | 8 + .../model_incident_attachments_response.rs | 8 + ...dent_attachments_response_included_item.rs | 2 +- .../model/model_incident_create_attributes.rs | 29 + .../model/model_incident_create_data.rs | 14 +- .../model_incident_create_relationships.rs | 4 +- .../model/model_incident_create_request.rs | 4 +- .../model/model_incident_field_attributes.rs | 6 +- ...ncident_field_attributes_multiple_value.rs | 13 + ..._incident_field_attributes_single_value.rs | 13 + ...ncident_integration_metadata_attributes.rs | 24 +- ...cident_integration_metadata_create_data.rs | 4 +- ...ent_integration_metadata_create_request.rs | 4 +- ...dent_integration_metadata_list_response.rs | 15 +- ..._incident_integration_metadata_metadata.rs | 4 +- ...ncident_integration_metadata_patch_data.rs | 4 +- ...dent_integration_metadata_patch_request.rs | 4 +- ..._incident_integration_metadata_response.rs | 12 +- ...dent_integration_metadata_response_data.rs | 20 +- ...gration_metadata_response_included_item.rs | 2 +- ...odel_incident_integration_relationships.rs | 20 +- .../model_incident_non_datadog_creator.rs | 10 + .../model_incident_notification_handle.rs | 10 + .../model/model_incident_response.rs | 12 +- .../model_incident_response_attributes.rs | 122 ++- .../model/model_incident_response_data.rs | 20 +- .../model_incident_response_included_item.rs | 4 +- .../model/model_incident_response_meta.rs | 10 +- ...model_incident_response_meta_pagination.rs | 15 + .../model_incident_response_relationships.rs | 81 +- .../model/model_incident_search_response.rs | 22 +- ...del_incident_search_response_attributes.rs | 4 +- .../model_incident_search_response_data.rs | 18 +- ...el_incident_search_response_facets_data.rs | 88 ++ ...cident_search_response_field_facet_data.rs | 10 + ...incident_search_response_incidents_data.rs | 4 +- .../model_incident_search_response_meta.rs | 10 +- ...dent_search_response_numeric_facet_data.rs | 4 +- ..._response_numeric_facet_data_aggregates.rs | 10 + ...arch_response_property_field_facet_data.rs | 10 +- ...ncident_search_response_user_facet_data.rs | 25 + .../model_incident_service_create_data.rs | 20 +- .../model_incident_service_create_request.rs | 4 +- .../model_incident_service_included_items.rs | 2 +- .../model_incident_service_relationships.rs | 20 +- .../model/model_incident_service_response.rs | 12 +- ...el_incident_service_response_attributes.rs | 15 + .../model_incident_service_response_data.rs | 20 +- .../model_incident_service_update_data.rs | 25 +- .../model_incident_service_update_request.rs | 4 +- .../model/model_incident_services_response.rs | 15 +- .../model/model_incident_team_create_data.rs | 20 +- .../model_incident_team_create_request.rs | 6 +- .../model_incident_team_included_items.rs | 2 +- .../model_incident_team_relationships.rs | 20 +- .../model/model_incident_team_response.rs | 14 +- ...model_incident_team_response_attributes.rs | 15 + .../model_incident_team_response_data.rs | 30 +- .../model/model_incident_team_update_data.rs | 25 +- .../model_incident_team_update_request.rs | 6 +- .../model/model_incident_teams_response.rs | 15 +- ...ncident_timeline_cell_create_attributes.rs | 2 +- ...imeline_cell_markdown_create_attributes.rs | 9 +- ...cell_markdown_create_attributes_content.rs | 5 + .../model/model_incident_todo_assignee.rs | 2 +- .../model/model_incident_todo_attributes.rs | 25 + .../model/model_incident_todo_create_data.rs | 4 +- .../model_incident_todo_create_request.rs | 6 +- .../model_incident_todo_list_response.rs | 15 +- .../model/model_incident_todo_patch_data.rs | 4 +- .../model_incident_todo_patch_request.rs | 6 +- .../model_incident_todo_relationships.rs | 20 +- .../model/model_incident_todo_response.rs | 14 +- .../model_incident_todo_response_data.rs | 20 +- ...el_incident_todo_response_included_item.rs | 2 +- .../model/model_incident_update_attributes.rs | 46 + .../model/model_incident_update_data.rs | 20 +- .../model_incident_update_relationships.rs | 31 +- .../model/model_incident_update_request.rs | 4 +- .../model/model_incidents_response.rs | 15 +- .../model/model_intake_payload_accepted.rs | 5 + .../model/model_ip_allowlist_attributes.rs | 13 + .../model/model_ip_allowlist_data.rs | 15 +- .../model/model_ip_allowlist_entry.rs | 4 +- .../model_ip_allowlist_entry_attributes.rs | 20 + .../model/model_ip_allowlist_entry_data.rs | 15 +- .../model/model_ip_allowlist_response.rs | 7 +- .../model_ip_allowlist_update_request.rs | 4 +- ...l_jira_integration_metadata_issues_item.rs | 15 + .../model/model_jsonapi_error_item.rs | 15 + .../model_list_application_keys_response.rs | 26 +- .../model/model_list_downtimes_response.rs | 23 +- .../model/model_list_findings_meta.rs | 12 +- .../model/model_list_findings_page.rs | 10 + .../model/model_list_findings_response.rs | 4 +- .../model/model_list_powerpacks_response.rs | 30 +- .../model/model_list_rules_response.rs | 18 +- .../model_list_rules_response_data_item.rs | 27 +- .../model/model_list_rules_response_links.rs | 5 + src/datadogV2/model/model_log.rs | 17 +- src/datadogV2/model/model_log_attributes.rs | 38 + .../model/model_logs_aggregate_bucket.rs | 19 + ...aggregate_bucket_value_timeseries_point.rs | 10 + .../model/model_logs_aggregate_request.rs | 34 +- .../model_logs_aggregate_request_page.rs | 5 + .../model/model_logs_aggregate_response.rs | 17 +- .../model_logs_aggregate_response_data.rs | 8 + .../model/model_logs_aggregate_sort.rs | 26 + src/datadogV2/model/model_logs_archive.rs | 10 +- .../model/model_logs_archive_attributes.rs | 24 +- .../model_logs_archive_create_request.rs | 10 +- ..._logs_archive_create_request_attributes.rs | 19 +- ..._logs_archive_create_request_definition.rs | 10 +- ...logs_archive_create_request_destination.rs | 6 +- .../model/model_logs_archive_definition.rs | 15 +- .../model/model_logs_archive_destination.rs | 6 +- .../model_logs_archive_destination_azure.rs | 14 +- .../model_logs_archive_destination_gcs.rs | 9 +- .../model_logs_archive_destination_s3.rs | 9 +- .../model/model_logs_archive_order.rs | 10 +- .../model_logs_archive_order_definition.rs | 4 +- src/datadogV2/model/model_logs_archives.rs | 8 + src/datadogV2/model/model_logs_compute.rs | 15 + src/datadogV2/model/model_logs_group_by.rs | 39 +- .../model/model_logs_list_request.rs | 26 +- .../model/model_logs_list_request_page.rs | 10 + .../model/model_logs_list_response.rs | 22 +- .../model/model_logs_list_response_links.rs | 5 + .../model/model_logs_metric_compute.rs | 10 + .../model_logs_metric_create_attributes.rs | 21 +- .../model/model_logs_metric_create_data.rs | 4 +- .../model/model_logs_metric_create_request.rs | 6 +- .../model/model_logs_metric_filter.rs | 5 + .../model/model_logs_metric_group_by.rs | 5 + .../model/model_logs_metric_response.rs | 10 +- .../model_logs_metric_response_attributes.rs | 28 +- .../model_logs_metric_response_compute.rs | 18 + .../model/model_logs_metric_response_data.rs | 20 +- .../model_logs_metric_response_filter.rs | 5 + .../model_logs_metric_response_group_by.rs | 10 + .../model_logs_metric_update_attributes.rs | 25 +- .../model/model_logs_metric_update_compute.rs | 5 + .../model/model_logs_metric_update_data.rs | 4 +- .../model/model_logs_metric_update_request.rs | 6 +- .../model/model_logs_metrics_response.rs | 8 + .../model/model_logs_query_filter.rs | 28 + .../model/model_logs_query_options.rs | 10 + .../model/model_logs_response_metadata.rs | 33 +- .../model_logs_response_metadata_page.rs | 5 + src/datadogV2/model/model_logs_warning.rs | 15 + src/datadogV2/model/model_metric.rs | 10 + src/datadogV2/model/model_metric_all_tags.rs | 20 +- .../model/model_metric_all_tags_attributes.rs | 5 + .../model/model_metric_all_tags_response.rs | 7 +- .../model_metric_bulk_tag_config_create.rs | 10 +- ...etric_bulk_tag_config_create_attributes.rs | 15 + ...l_metric_bulk_tag_config_create_request.rs | 4 +- .../model_metric_bulk_tag_config_delete.rs | 10 +- ...etric_bulk_tag_config_delete_attributes.rs | 5 + ...l_metric_bulk_tag_config_delete_request.rs | 4 +- .../model_metric_bulk_tag_config_response.rs | 10 +- .../model_metric_bulk_tag_config_status.rs | 10 +- ...etric_bulk_tag_config_status_attributes.rs | 20 + .../model/model_metric_distinct_volume.rs | 23 +- ...model_metric_distinct_volume_attributes.rs | 5 + src/datadogV2/model/model_metric_estimate.rs | 23 +- .../model/model_metric_estimate_attributes.rs | 18 + .../model/model_metric_estimate_response.rs | 7 +- .../model_metric_ingested_indexed_volume.rs | 23 +- ...tric_ingested_indexed_volume_attributes.rs | 10 + src/datadogV2/model/model_metric_metadata.rs | 7 +- src/datadogV2/model/model_metric_origin.rs | 15 + src/datadogV2/model/model_metric_point.rs | 10 + src/datadogV2/model/model_metric_resource.rs | 10 + src/datadogV2/model/model_metric_series.rs | 40 +- ..._metric_suggested_tags_and_aggregations.rs | 23 +- ...uggested_tags_and_aggregations_response.rs | 10 +- .../model_metric_suggested_tags_attributes.rs | 13 + .../model/model_metric_tag_configuration.rs | 23 +- ...del_metric_tag_configuration_attributes.rs | 41 + ...ric_tag_configuration_create_attributes.rs | 18 + ...el_metric_tag_configuration_create_data.rs | 10 +- ...metric_tag_configuration_create_request.rs | 4 +- ...model_metric_tag_configuration_response.rs | 10 +- ...ric_tag_configuration_update_attributes.rs | 23 + ...el_metric_tag_configuration_update_data.rs | 10 +- ...metric_tag_configuration_update_request.rs | 4 +- src/datadogV2/model/model_metric_volumes.rs | 4 +- .../model/model_metric_volumes_response.rs | 7 +- ...l_metrics_and_metric_tag_configurations.rs | 4 +- ..._and_metric_tag_configurations_response.rs | 8 + .../model/model_metrics_scalar_query.rs | 5 + .../model/model_metrics_timeseries_query.rs | 5 + ..._config_policy_attribute_create_request.rs | 4 +- ...or_config_policy_attribute_edit_request.rs | 4 +- ...onitor_config_policy_attribute_response.rs | 18 +- ...model_monitor_config_policy_create_data.rs | 4 +- ...el_monitor_config_policy_create_request.rs | 4 +- .../model_monitor_config_policy_edit_data.rs | 4 +- ...odel_monitor_config_policy_edit_request.rs | 4 +- ...del_monitor_config_policy_list_response.rs | 8 + .../model_monitor_config_policy_policy.rs | 2 +- ...tor_config_policy_policy_create_request.rs | 2 +- .../model_monitor_config_policy_response.rs | 10 +- ...del_monitor_config_policy_response_data.rs | 23 +- .../model_monitor_config_policy_tag_policy.rs | 15 + .../model_monitor_downtime_match_response.rs | 15 +- ...itor_downtime_match_response_attributes.rs | 20 + ...el_monitor_downtime_match_response_data.rs | 23 +- src/datadogV2/model/model_monitor_type.rs | 55 + ...del_monthly_cost_attribution_attributes.rs | 41 + .../model_monthly_cost_attribution_body.rs | 20 +- .../model_monthly_cost_attribution_meta.rs | 18 +- ...del_monthly_cost_attribution_pagination.rs | 5 + ...model_monthly_cost_attribution_response.rs | 18 +- .../model_nullable_relationship_to_user.rs | 4 +- src/datadogV2/model/model_okta_account.rs | 9 +- .../model/model_okta_account_attributes.rs | 15 + .../model/model_okta_account_request.rs | 4 +- .../model/model_okta_account_response.rs | 7 +- .../model/model_okta_account_response_data.rs | 4 +- .../model_okta_account_update_request.rs | 4 +- ..._okta_account_update_request_attributes.rs | 15 + .../model_okta_account_update_request_data.rs | 15 +- .../model/model_okta_accounts_response.rs | 8 + .../model/model_on_demand_concurrency_cap.rs | 18 +- ...el_on_demand_concurrency_cap_attributes.rs | 5 + ...odel_on_demand_concurrency_cap_response.rs | 10 +- ...odel_opsgenie_service_create_attributes.rs | 5 + .../model_opsgenie_service_create_data.rs | 4 +- .../model_opsgenie_service_create_request.rs | 4 +- .../model/model_opsgenie_service_response.rs | 4 +- ...el_opsgenie_service_response_attributes.rs | 18 + .../model_opsgenie_service_response_data.rs | 4 +- ...odel_opsgenie_service_update_attributes.rs | 23 + .../model_opsgenie_service_update_data.rs | 4 +- .../model_opsgenie_service_update_request.rs | 4 +- src/datadogV2/model/model_organization.rs | 15 +- .../model/model_organization_attributes.rs | 40 + .../model/model_outcomes_batch_attributes.rs | 8 + .../model/model_outcomes_batch_request.rs | 10 +- .../model_outcomes_batch_request_data.rs | 15 +- .../model_outcomes_batch_request_item.rs | 5 + .../model/model_outcomes_batch_response.rs | 4 +- ...odel_outcomes_batch_response_attributes.rs | 25 + .../model_outcomes_batch_response_meta.rs | 10 + .../model/model_outcomes_response.rs | 26 +- .../model_outcomes_response_data_item.rs | 30 +- .../model_outcomes_response_included_item.rs | 20 +- ...comes_response_included_rule_attributes.rs | 10 + .../model/model_outcomes_response_links.rs | 5 + src/datadogV2/model/model_pagination.rs | 10 + src/datadogV2/model/model_partial_api_key.rs | 30 +- .../model/model_partial_api_key_attributes.rs | 30 + .../model/model_partial_application_key.rs | 30 +- ...odel_partial_application_key_attributes.rs | 20 + .../model_partial_application_key_response.rs | 18 +- src/datadogV2/model/model_permission.rs | 15 +- .../model/model_permission_attributes.rs | 35 + .../model/model_permissions_response.rs | 5 + src/datadogV2/model/model_powerpack.rs | 7 +- .../model/model_powerpack_attributes.rs | 22 +- src/datadogV2/model/model_powerpack_data.rs | 30 +- .../model/model_powerpack_group_widget.rs | 19 +- ...model_powerpack_group_widget_definition.rs | 10 + .../model/model_powerpack_inner_widgets.rs | 10 +- .../model/model_powerpack_relationships.rs | 7 +- .../model/model_powerpack_response.rs | 12 +- .../model/model_powerpack_response_links.rs | 25 + .../model_powerpack_template_variable.rs | 5 + .../model/model_powerpacks_response_meta.rs | 10 +- ...del_powerpacks_response_meta_pagination.rs | 40 + .../model/model_process_summaries_meta.rs | 10 +- .../model_process_summaries_meta_page.rs | 10 + .../model/model_process_summaries_response.rs | 12 +- src/datadogV2/model/model_process_summary.rs | 20 +- .../model/model_process_summary_attributes.rs | 40 + src/datadogV2/model/model_projected_cost.rs | 20 +- .../model/model_projected_cost_attributes.rs | 33 + .../model/model_projected_cost_response.rs | 5 + src/datadogV2/model/model_query_formula.rs | 7 +- ...del_relationship_to_incident_postmortem.rs | 4 +- .../model_relationship_to_organization.rs | 4 +- .../model/model_relationship_to_outcome.rs | 10 +- .../model_relationship_to_outcome_data.rs | 10 + .../model/model_relationship_to_permission.rs | 10 +- .../model_relationship_to_permission_data.rs | 10 + .../model_relationship_to_permissions.rs | 8 + .../model/model_relationship_to_role.rs | 10 +- .../model/model_relationship_to_role_data.rs | 10 + .../model/model_relationship_to_roles.rs | 8 + .../model/model_relationship_to_rule.rs | 10 +- .../model/model_relationship_to_rule_data.rs | 10 +- .../model_relationship_to_rule_data_object.rs | 10 + ...elationship_to_saml_assertion_attribute.rs | 4 +- .../model/model_relationship_to_team_links.rs | 18 +- .../model/model_relationship_to_user.rs | 4 +- ...el_relationship_to_user_team_permission.rs | 20 +- .../model_relationship_to_user_team_team.rs | 4 +- .../model_relationship_to_user_team_user.rs | 4 +- .../model/model_response_meta_attributes.rs | 7 +- .../model/model_restriction_policy.rs | 4 +- .../model_restriction_policy_response.rs | 4 +- ...model_restriction_policy_update_request.rs | 6 +- src/datadogV2/model/model_retention_filter.rs | 4 +- .../model/model_retention_filter_all.rs | 4 +- .../model_retention_filter_all_attributes.rs | 60 +- .../model_retention_filter_attributes.rs | 60 +- ...odel_retention_filter_create_attributes.rs | 4 +- .../model_retention_filter_create_data.rs | 4 +- .../model_retention_filter_create_request.rs | 4 +- .../model/model_retention_filter_response.rs | 7 +- .../model_retention_filter_update_data.rs | 4 +- .../model_retention_filter_update_request.rs | 4 +- src/datadogV2/model/model_role.rs | 22 +- src/datadogV2/model/model_role_attributes.rs | 20 + src/datadogV2/model/model_role_clone.rs | 4 +- .../model/model_role_clone_request.rs | 4 +- .../model/model_role_create_attributes.rs | 10 + src/datadogV2/model/model_role_create_data.rs | 19 +- .../model/model_role_create_request.rs | 4 +- .../model/model_role_create_response.rs | 10 +- .../model/model_role_create_response_data.rs | 25 +- .../model/model_role_relationships.rs | 17 +- src/datadogV2/model/model_role_response.rs | 7 +- .../model_role_response_relationships.rs | 10 +- .../model/model_role_update_attributes.rs | 15 + src/datadogV2/model/model_role_update_data.rs | 14 +- .../model/model_role_update_request.rs | 4 +- .../model/model_role_update_response.rs | 10 +- .../model/model_role_update_response_data.rs | 25 +- src/datadogV2/model/model_roles_response.rs | 15 +- src/datadogV2/model/model_rule_attributes.rs | 54 + .../model/model_rule_outcome_relationships.rs | 10 +- ...aggregate_bucket_value_timeseries_point.rs | 10 + .../model/model_rum_aggregate_request.rs | 31 +- .../model/model_rum_aggregate_sort.rs | 26 + .../model_rum_aggregation_buckets_response.rs | 8 + .../model_rum_analytics_aggregate_response.rs | 24 +- src/datadogV2/model/model_rum_application.rs | 4 +- .../model/model_rum_application_attributes.rs | 10 + .../model/model_rum_application_create.rs | 4 +- ...model_rum_application_create_attributes.rs | 5 + .../model_rum_application_create_request.rs | 6 +- .../model/model_rum_application_list.rs | 9 +- .../model_rum_application_list_attributes.rs | 10 + .../model/model_rum_application_response.rs | 7 +- .../model/model_rum_application_update.rs | 10 +- ...model_rum_application_update_attributes.rs | 10 + .../model_rum_application_update_request.rs | 6 +- .../model/model_rum_applications_response.rs | 8 + .../model/model_rum_bucket_response.rs | 13 + src/datadogV2/model/model_rum_compute.rs | 15 + src/datadogV2/model/model_rum_event.rs | 20 +- .../model/model_rum_event_attributes.rs | 23 + .../model/model_rum_events_response.rs | 19 +- src/datadogV2/model/model_rum_group_by.rs | 36 +- src/datadogV2/model/model_rum_query_filter.rs | 15 + .../model/model_rum_query_options.rs | 10 + .../model/model_rum_query_page_options.rs | 10 + .../model/model_rum_response_links.rs | 5 + .../model/model_rum_response_metadata.rs | 27 +- .../model/model_rum_response_page.rs | 5 + .../model/model_rum_search_events_request.rs | 26 +- src/datadogV2/model/model_rum_warning.rs | 15 + .../model/model_saml_assertion_attribute.rs | 10 +- ...del_saml_assertion_attribute_attributes.rs | 10 + src/datadogV2/model/model_scalar_column.rs | 4 +- .../model_scalar_formula_query_request.rs | 6 +- .../model_scalar_formula_query_response.rs | 12 +- .../model/model_scalar_formula_request.rs | 4 +- ...model_scalar_formula_request_attributes.rs | 8 + ...odel_scalar_formula_response_atrributes.rs | 5 + src/datadogV2/model/model_scalar_meta.rs | 8 + src/datadogV2/model/model_scalar_query.rs | 4 +- src/datadogV2/model/model_scalar_response.rs | 18 +- src/datadogV2/model/model_security_filter.rs | 20 +- .../model/model_security_filter_attributes.rs | 41 + .../model_security_filter_create_data.rs | 4 +- .../model_security_filter_create_request.rs | 4 +- ...curity_filter_exclusion_filter_response.rs | 10 + .../model/model_security_filter_meta.rs | 5 + .../model/model_security_filter_response.rs | 14 +- ...model_security_filter_update_attributes.rs | 36 + .../model_security_filter_update_data.rs | 4 +- .../model_security_filter_update_request.rs | 4 +- .../model/model_security_filters_response.rs | 12 +- .../model/model_security_monitoring_filter.rs | 13 + ...security_monitoring_list_rules_response.rs | 18 +- .../model_security_monitoring_rule_case.rs | 23 + ...el_security_monitoring_rule_case_create.rs | 15 + ...security_monitoring_rule_create_payload.rs | 6 +- ...nitoring_rule_impossible_travel_options.rs | 5 + ...urity_monitoring_rule_new_value_options.rs | 32 + .../model_security_monitoring_rule_options.rs | 86 +- .../model_security_monitoring_rule_query.rs | 6 +- ...model_security_monitoring_rule_response.rs | 4 +- ...ity_monitoring_rule_third_party_options.rs | 26 + ...security_monitoring_rule_update_payload.rs | 82 +- .../model/model_security_monitoring_signal.rs | 23 +- ...oring_signal_assignee_update_attributes.rs | 9 +- ..._monitoring_signal_assignee_update_data.rs | 4 +- ...nitoring_signal_assignee_update_request.rs | 4 +- ...l_security_monitoring_signal_attributes.rs | 23 + ...ring_signal_incidents_update_attributes.rs | 5 + ...monitoring_signal_incidents_update_data.rs | 4 +- ...itoring_signal_incidents_update_request.rs | 4 +- ...security_monitoring_signal_list_request.rs | 28 +- ...y_monitoring_signal_list_request_filter.rs | 15 + ...ity_monitoring_signal_list_request_page.rs | 10 + ...del_security_monitoring_signal_response.rs | 10 +- ...y_monitoring_signal_rule_create_payload.rs | 30 +- ...l_security_monitoring_signal_rule_query.rs | 28 + ...ecurity_monitoring_signal_rule_response.rs | 107 +- ...y_monitoring_signal_rule_response_query.rs | 48 + ...nitoring_signal_state_update_attributes.rs | 18 + ...ity_monitoring_signal_state_update_data.rs | 17 +- ..._monitoring_signal_state_update_request.rs | 4 +- ...ity_monitoring_signal_triage_attributes.rs | 47 +- ...ty_monitoring_signal_triage_update_data.rs | 23 +- ...onitoring_signal_triage_update_response.rs | 4 +- ...curity_monitoring_signals_list_response.rs | 28 +- ..._monitoring_signals_list_response_links.rs | 5 + ...y_monitoring_signals_list_response_meta.rs | 10 +- ...itoring_signals_list_response_meta_page.rs | 5 + ...monitoring_standard_rule_create_payload.rs | 38 +- ...security_monitoring_standard_rule_query.rs | 51 + ...urity_monitoring_standard_rule_response.rs | 125 ++- ...urity_monitoring_third_party_root_query.rs | 10 + ...curity_monitoring_third_party_rule_case.rs | 23 + ...monitoring_third_party_rule_case_create.rs | 15 + .../model_security_monitoring_triage_user.rs | 20 + ...l_sensitive_data_scanner_config_request.rs | 8 +- ...el_sensitive_data_scanner_configuration.rs | 13 + ...nsitive_data_scanner_configuration_data.rs | 10 +- ...ata_scanner_configuration_relationships.rs | 10 +- ...tive_data_scanner_create_group_response.rs | 20 +- ...itive_data_scanner_create_rule_response.rs | 20 +- .../model_sensitive_data_scanner_filter.rs | 5 + ...e_data_scanner_get_config_included_item.rs | 4 +- ...sitive_data_scanner_get_config_response.rs | 28 +- ...e_data_scanner_get_config_response_data.rs | 31 +- .../model_sensitive_data_scanner_group.rs | 13 + ...sensitive_data_scanner_group_attributes.rs | 33 +- ...del_sensitive_data_scanner_group_create.rs | 14 +- ...itive_data_scanner_group_create_request.rs | 20 +- ...model_sensitive_data_scanner_group_data.rs | 10 +- ...itive_data_scanner_group_delete_request.rs | 4 +- ...tive_data_scanner_group_delete_response.rs | 10 +- ...sitive_data_scanner_group_included_item.rs | 33 +- ...model_sensitive_data_scanner_group_item.rs | 13 + ...model_sensitive_data_scanner_group_list.rs | 8 + ...sitive_data_scanner_group_relationships.rs | 20 +- ...l_sensitive_data_scanner_group_response.rs | 33 +- ...del_sensitive_data_scanner_group_update.rs | 33 +- ...itive_data_scanner_group_update_request.rs | 8 +- ...tive_data_scanner_group_update_response.rs | 10 +- .../model_sensitive_data_scanner_meta.rs | 30 + ...ensitive_data_scanner_meta_version_only.rs | 5 + ...l_sensitive_data_scanner_reorder_config.rs | 23 +- ...ve_data_scanner_reorder_groups_response.rs | 10 +- .../model_sensitive_data_scanner_rule.rs | 13 + ..._sensitive_data_scanner_rule_attributes.rs | 50 +- ...odel_sensitive_data_scanner_rule_create.rs | 8 +- ...sitive_data_scanner_rule_create_request.rs | 8 +- .../model_sensitive_data_scanner_rule_data.rs | 8 + ...sitive_data_scanner_rule_delete_request.rs | 4 +- ...itive_data_scanner_rule_delete_response.rs | 10 +- ...nsitive_data_scanner_rule_included_item.rs | 33 +- ...nsitive_data_scanner_rule_relationships.rs | 21 +- ...el_sensitive_data_scanner_rule_response.rs | 33 +- ...odel_sensitive_data_scanner_rule_update.rs | 33 +- ...sitive_data_scanner_rule_update_request.rs | 8 +- ...itive_data_scanner_rule_update_response.rs | 10 +- ...sensitive_data_scanner_standard_pattern.rs | 13 + ...ata_scanner_standard_pattern_attributes.rs | 30 + ...tive_data_scanner_standard_pattern_data.rs | 10 +- ...scanner_standard_patterns_response_data.rs | 8 + ...scanner_standard_patterns_response_item.rs | 24 +- ...sensitive_data_scanner_text_replacement.rs | 18 + ...model_service_account_create_attributes.rs | 10 + .../model_service_account_create_data.rs | 14 +- .../model_service_account_create_request.rs | 4 +- ...odel_service_definition_create_response.rs | 8 + .../model/model_service_definition_data.rs | 20 +- ...odel_service_definition_data_attributes.rs | 20 +- .../model_service_definition_get_response.rs | 10 +- .../model/model_service_definition_meta.rs | 38 + .../model_service_definition_meta_warnings.rs | 15 + .../model/model_service_definition_schema.rs | 8 +- .../model/model_service_definition_v1.rs | 55 +- .../model_service_definition_v1_contact.rs | 10 + .../model/model_service_definition_v1_info.rs | 15 + ...odel_service_definition_v1_integrations.rs | 5 + .../model/model_service_definition_v1_org.rs | 10 + .../model/model_service_definition_v2.rs | 65 +- .../model_service_definition_v2_contact.rs | 6 +- .../model/model_service_definition_v2_doc.rs | 5 + .../model/model_service_definition_v2_dot1.rs | 64 +- ...odel_service_definition_v2_dot1_contact.rs | 6 +- .../model_service_definition_v2_dot1_email.rs | 5 + ...service_definition_v2_dot1_integrations.rs | 20 +- .../model_service_definition_v2_dot1_link.rs | 5 + ...del_service_definition_v2_dot1_ms_teams.rs | 5 + ...del_service_definition_v2_dot1_opsgenie.rs | 8 + ...el_service_definition_v2_dot1_pagerduty.rs | 5 + .../model_service_definition_v2_dot1_slack.rs | 5 + .../model/model_service_definition_v2_dot2.rs | 77 +- ...odel_service_definition_v2_dot2_contact.rs | 5 + ...service_definition_v2_dot2_integrations.rs | 20 +- .../model_service_definition_v2_dot2_link.rs | 5 + ...del_service_definition_v2_dot2_opsgenie.rs | 8 + ...el_service_definition_v2_dot2_pagerduty.rs | 5 + .../model_service_definition_v2_email.rs | 5 + ...odel_service_definition_v2_integrations.rs | 15 +- .../model_service_definition_v2_ms_teams.rs | 5 + .../model_service_definition_v2_opsgenie.rs | 8 + .../model/model_service_definition_v2_repo.rs | 5 + .../model_service_definition_v2_slack.rs | 5 + ...odel_service_definitions_create_request.rs | 6 +- ...model_service_definitions_list_response.rs | 8 + ...slack_integration_metadata_channel_item.rs | 5 + src/datadogV2/model/model_span.rs | 20 +- .../model/model_spans_aggregate_bucket.rs | 23 +- ...model_spans_aggregate_bucket_attributes.rs | 27 + ...aggregate_bucket_value_timeseries_point.rs | 10 + .../model/model_spans_aggregate_data.rs | 18 +- .../model/model_spans_aggregate_request.rs | 7 +- ...odel_spans_aggregate_request_attributes.rs | 27 +- .../model/model_spans_aggregate_response.rs | 18 +- ...model_spans_aggregate_response_metadata.rs | 26 + .../model/model_spans_aggregate_sort.rs | 26 + src/datadogV2/model/model_spans_attributes.rs | 91 ++ src/datadogV2/model/model_spans_compute.rs | 15 + src/datadogV2/model/model_spans_filter.rs | 5 + src/datadogV2/model/model_spans_group_by.rs | 39 +- .../model/model_spans_list_request.rs | 7 +- .../model_spans_list_request_attributes.rs | 26 +- .../model/model_spans_list_request_data.rs | 18 +- .../model/model_spans_list_request_page.rs | 10 + .../model/model_spans_list_response.rs | 25 +- .../model/model_spans_list_response_links.rs | 5 + .../model_spans_list_response_metadata.rs | 36 +- .../model/model_spans_metric_compute.rs | 10 + .../model_spans_metric_create_attributes.rs | 19 +- .../model/model_spans_metric_create_data.rs | 4 +- .../model_spans_metric_create_request.rs | 6 +- .../model/model_spans_metric_filter.rs | 5 + .../model/model_spans_metric_group_by.rs | 5 + .../model/model_spans_metric_response.rs | 10 +- .../model_spans_metric_response_attributes.rs | 28 +- .../model_spans_metric_response_compute.rs | 18 + .../model/model_spans_metric_response_data.rs | 20 +- .../model_spans_metric_response_filter.rs | 5 + .../model_spans_metric_response_group_by.rs | 10 + .../model_spans_metric_update_attributes.rs | 25 +- .../model_spans_metric_update_compute.rs | 5 + .../model/model_spans_metric_update_data.rs | 4 +- .../model_spans_metric_update_request.rs | 6 +- .../model/model_spans_metrics_response.rs | 8 + .../model/model_spans_query_filter.rs | 15 + .../model/model_spans_query_options.rs | 10 + .../model_spans_response_metadata_page.rs | 5 + src/datadogV2/model/model_spans_warning.rs | 15 + src/datadogV2/model/model_team.rs | 14 +- src/datadogV2/model/model_team_attributes.rs | 50 + src/datadogV2/model/model_team_create.rs | 14 +- .../model/model_team_create_attributes.rs | 25 + .../model/model_team_create_relationships.rs | 7 +- .../model/model_team_create_request.rs | 4 +- src/datadogV2/model/model_team_included.rs | 6 +- src/datadogV2/model/model_team_link.rs | 4 +- .../model/model_team_link_attributes.rs | 10 + src/datadogV2/model/model_team_link_create.rs | 4 +- .../model/model_team_link_create_request.rs | 4 +- .../model/model_team_link_response.rs | 7 +- .../model/model_team_links_response.rs | 5 + .../model/model_team_permission_setting.rs | 10 +- ...odel_team_permission_setting_attributes.rs | 34 + .../model_team_permission_setting_response.rs | 10 +- .../model_team_permission_setting_update.rs | 10 +- ...am_permission_setting_update_attributes.rs | 8 + ..._team_permission_setting_update_request.rs | 4 +- ...model_team_permission_settings_response.rs | 8 + .../model/model_team_relationships.rs | 21 +- .../model/model_team_relationships_links.rs | 5 + src/datadogV2/model/model_team_response.rs | 7 +- src/datadogV2/model/model_team_update.rs | 14 +- .../model/model_team_update_attributes.rs | 30 + .../model/model_team_update_relationships.rs | 10 +- .../model/model_team_update_request.rs | 4 +- src/datadogV2/model/model_teams_response.rs | 27 +- .../model/model_teams_response_links.rs | 25 + .../model/model_teams_response_meta.rs | 10 +- .../model_teams_response_meta_pagination.rs | 40 + .../model_timeseries_formula_query_request.rs | 4 +- ...model_timeseries_formula_query_response.rs | 12 +- .../model/model_timeseries_formula_request.rs | 4 +- ...l_timeseries_formula_request_attributes.rs | 13 + src/datadogV2/model/model_timeseries_query.rs | 4 +- .../model/model_timeseries_response.rs | 18 +- .../model_timeseries_response_attributes.rs | 18 + .../model/model_timeseries_response_series.rs | 15 + src/datadogV2/model/model_unit.rs | 25 + ...pplication_security_monitoring_response.rs | 5 + .../model/model_usage_attributes_object.rs | 36 + .../model/model_usage_data_object.rs | 20 +- ...sage_lambda_traced_invocations_response.rs | 5 + ..._usage_observability_pipelines_response.rs | 5 + .../model/model_usage_time_series_object.rs | 10 + src/datadogV2/model/model_user.rs | 27 +- src/datadogV2/model/model_user_attributes.rs | 55 + .../model/model_user_create_attributes.rs | 10 + src/datadogV2/model/model_user_create_data.rs | 14 +- .../model/model_user_create_request.rs | 4 +- .../model/model_user_invitation_data.rs | 4 +- .../model_user_invitation_data_attributes.rs | 20 + .../model_user_invitation_relationships.rs | 6 +- .../model/model_user_invitation_response.rs | 10 +- .../model_user_invitation_response_data.rs | 30 +- .../model/model_user_invitations_response.rs | 8 + .../model/model_user_relationships.rs | 7 +- src/datadogV2/model/model_user_response.rs | 15 +- .../model_user_response_included_item.rs | 6 +- .../model_user_response_relationships.rs | 37 +- src/datadogV2/model/model_user_team.rs | 20 +- .../model/model_user_team_attributes.rs | 15 + src/datadogV2/model/model_user_team_create.rs | 20 +- .../model/model_user_team_permission.rs | 10 +- .../model_user_team_permission_attributes.rs | 8 + .../model/model_user_team_relationships.rs | 20 +- .../model/model_user_team_request.rs | 4 +- .../model/model_user_team_response.rs | 7 +- src/datadogV2/model/model_user_team_update.rs | 10 +- .../model/model_user_team_update_request.rs | 4 +- .../model/model_user_teams_response.rs | 19 +- .../model/model_user_update_attributes.rs | 15 + src/datadogV2/model/model_user_update_data.rs | 4 +- .../model/model_user_update_request.rs | 4 +- src/datadogV2/model/model_users_response.rs | 23 +- 1625 files changed, 34163 insertions(+), 8583 deletions(-) diff --git a/.generator/src/generator/cli.py b/.generator/src/generator/cli.py index 0bd37c1ae..01569f574 100644 --- a/.generator/src/generator/cli.py +++ b/.generator/src/generator/cli.py @@ -47,6 +47,8 @@ def cli(specs, output): env.filters["untitle_case"] = formatter.untitle_case env.filters["upperfirst"] = utils.upperfirst env.filters["variable_name"] = formatter.variable_name + env.filters["has_required"] = openapi.has_required + env.filters["has_optional"] = openapi.has_optional env.globals["enumerate"] = enumerate env.globals["responses_by_types"] = openapi.responses_by_types diff --git a/.generator/src/generator/openapi.py b/.generator/src/generator/openapi.py index 23f0ebffe..ef485493c 100644 --- a/.generator/src/generator/openapi.py +++ b/.generator/src/generator/openapi.py @@ -35,7 +35,7 @@ def option_wrapper(name, option, nullable): def type_to_rust(schema, alternative_name=None, render_nullable=False, render_option=True, render_box=False, version=None): """Return Rust type name for the type.""" - + render_box = False # special case for additionalProperties: true if schema is True or schema == {}: return "serde_json::Value" @@ -101,6 +101,17 @@ def get_type_for_parameter(parameter, version=None): return type_to_rust(content["schema"], version=version, render_option=render_option) return type_to_rust(parameter.get("schema"), version=version, render_option=render_option) +def has_required(operation): + for _, parameter in parameters(operation): + if parameter.get("required", False) == True: + return True + return False + +def has_optional(operation): + for _, parameter in parameters(operation): + if parameter.get("required", False) != True: + return True + return False def get_type_for_response(response, version): """Return Rust type name for the response.""" diff --git a/.generator/src/generator/templates/api.j2 b/.generator/src/generator/templates/api.j2 index 706e6a900..4faca48ed 100644 --- a/.generator/src/generator/templates/api.j2 +++ b/.generator/src/generator/templates/api.j2 @@ -10,20 +10,16 @@ use crate::datadog::*; {%- set formParameter = operation|form_parameter %} {%- set optionalBody = False if "required" in operation.requestBody and operation.requestBody.required else True %} -{%- for name, parameter in operation|parameters %} +{%- for name, parameter in operation|parameters if parameter.required != true %} {%- if loop.first %} -/// {{ operation.operationId }}Params is a struct for passing parameters to the method [`{{ structName }}::{{operation.operationId | snake_case}}`] +/// {{operation.operationId}}OptionalParams is a struct for passing parameters to the method [`{{ structName }}::{{operation.operationId | snake_case}}`] #[derive(Clone, Debug)] -pub struct {{operation.operationId}}Params { +pub struct {{operation.operationId}}OptionalParams { {%- endif %} {%- if parameter.description is defined %} {{parameter.description | block_comment}} {%- endif %} - {%- if optionalBody and name == operation.get("x-codegen-request-body-name", "body") %} - pub {{name|variable_name}}: Option<{{ get_type_for_parameter(parameter, version) }}>, - {%- else %} pub {{name|variable_name}}: {{ get_type_for_parameter(parameter, version) }}, - {%- endif %} {%- if loop.last %} } {% endif %} @@ -76,8 +72,8 @@ impl {{ structName }} { {% if operation.description is defined %} {{ operation.description | block_comment }} {%- endif %} - pub async fn {{operation.operationId | snake_case}}(&self{% for name, parameter in operation|parameters %}{% if loop.first %}, params: {{operation.operationId}}Params{% endif %}{% endfor %}) -> Result, Error<{{operation.operationId}}Error>> { - match self.{{operation.operationId | snake_case}}_with_http_info({% for name, parameter in operation|parameters %}{% if loop.first %}params{% endif %}{% endfor %}).await { + pub async fn {{operation.operationId | snake_case}}(&self{% for name, parameter in operation|parameters if parameter.required == true %}, {{name|variable_name}}: {{ get_type_for_parameter(parameter, version) }}{% endfor %}{% if operation|has_optional %}, params: {{operation.operationId}}OptionalParams{% endif %}) -> Result, Error<{{operation.operationId}}Error>> { + match self.{{operation.operationId | snake_case}}_with_http_info({% for name, parameter in operation|parameters if parameter.required == true %}{{name|variable_name}}{% if loop.last %}{% if operation|has_optional %}, {% endif %}{% else %}, {% endif %}{% endfor %}{% if operation|has_optional %} params{% endif %}).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -86,11 +82,13 @@ impl {{ structName }} { {% if operation.description is defined %} {{ operation.description | block_comment }} {%- endif %} - pub async fn {{operation.operationId | snake_case}}_with_http_info(&self{% for name, parameter in operation|parameters %}{% if loop.first %}, params: {{operation.operationId}}Params{% endif %}{% endfor %}) -> Result, Error<{{operation.operationId}}Error>> { + pub async fn {{operation.operationId | snake_case}}_with_http_info(&self{% for name, parameter in operation|parameters if parameter.required == true %}, {{name|variable_name}}: {{ get_type_for_parameter(parameter, version) }}{% endfor %}{% if operation|has_optional %}, params: {{operation.operationId}}OptionalParams{% endif %}) -> Result, Error<{{operation.operationId}}Error>> { let local_configuration = &self.config; - // unbox and build parameters - {%- for name, parameter in operation|parameters %} + {% for name, parameter in operation|parameters if parameter.required != true %} + {%- if loop.first %} + // unbox and build optional parameters + {%- endif %} let {{name|variable_name}} = params.{{name|variable_name}}; {%- endfor %} @@ -111,16 +109,16 @@ impl {{ structName }} { {% for name, parameter in operation|parameters if parameter.in == "query" %} {%- set schema = parameter | parameter_schema %} {%- if parameter.required and schema.type == "array" %} - local_req_builder = local_req_builder.query(&[("{{name}}", &{{name|variable_name}}.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]); + local_req_builder = local_req_builder.query(&[("{{name}}", &{{name|variable_name}}.iter().map(|p| p.to_string()).collect::>().join(",").to_string())]); {%- elif not parameter.required and schema.type == "array" %} if let Some(ref local) = {{name|variable_name}} { - local_req_builder = local_req_builder.query(&[("{{name}}", &local.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]); + local_req_builder = local_req_builder.query(&[("{{name}}", &local.iter().map(|p| p.to_string()).collect::>().join(",").to_string())]); }; {%- elif parameter.required %} local_req_builder = local_req_builder.query(&[("{{name}}", &{{name|variable_name}}.to_string())]); {%- else %} - if let Some(ref local_str) = {{name|variable_name}} { - local_req_builder = local_req_builder.query(&[("{{name}}", &local_str.to_string())]); + if let Some(ref local_query_param) = {{name|variable_name}} { + local_req_builder = local_req_builder.query(&[("{{name}}", &local_query_param.to_string())]); }; {%- endif %} {%- endfor %} diff --git a/.generator/src/generator/templates/model_oneof.j2 b/.generator/src/generator/templates/model_oneof.j2 index c4e59c7a8..15be938fa 100644 --- a/.generator/src/generator/templates/model_oneof.j2 +++ b/.generator/src/generator/templates/model_oneof.j2 @@ -5,12 +5,8 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum {{name}} { {%- for oneOf in model.oneOf %} - {%- set dataType = get_type(oneOf, render_nullable=False, render_option=False, version=version) %} + {%- set dataType = get_type(oneOf, render_nullable=False, render_option=False, render_box=oneOf|is_primitive or oneOf.type == "array", version=version) %} {%- set attributeName = (get_name(oneOf) or dataType)|upperfirst %} - {%- if oneOf | is_primitive or oneOf.type == "array" %} {{attributeName}}({{dataType}}), - {%- else %} - {{attributeName}}(Box<{{dataType}}>), - {%- endif %} {%- endfor%} } diff --git a/.generator/src/generator/templates/model_simple.j2 b/.generator/src/generator/templates/model_simple.j2 index 5a0c7265c..9f6510011 100644 --- a/.generator/src/generator/templates/model_simple.j2 +++ b/.generator/src/generator/templates/model_simple.j2 @@ -27,16 +27,15 @@ pub struct {{ name }} { } impl {{ name }} { - pub fn new({% for attr, schema in model.get("properties", {}).items() if attr in model.required %}{%- set nullable = schema.get("nullable", False)%}{%- set propertyName = attr|variable_name %}{%- set dataType = get_type(schema, alternative_name=name + propertyName, render_nullable=nullable, render_option=False, render_box=True, version=version) %}{{propertyName}}: {{ dataType }}{%- if not loop.last %}, {% endif %}{% endfor %}) -> {{ name }} { + pub fn new({% for attr, schema in model.get("properties", {}).items() if attr in model.required %}{%- set nullable = schema.get("nullable", False)%}{%- set dataType = get_type(schema, alternative_name=name + attr|variable_name, render_nullable=nullable, render_option=False, render_box=True, version=version) %}{{attr|variable_name}}: {{ dataType }}{%- if not loop.last %}, {% endif %}{% endfor %}) -> {{ name }} { {%- if get_deprecated(model) %} #[allow(deprecated)] {%- endif %} {{ name }} { {%- for attr, schema in model.get("properties", {}).items() %} - {%- set propertyName = attr|variable_name %} {%- set required = attr in model.required %} {%- set nullable = schema.get("nullable", False)%} - {%- set dataType = get_type(schema, alternative_name=name + propertyName, render_nullable=nullable, render_option=not required, render_box=True, version=version) %} + {%- set dataType = get_type(schema, alternative_name=name + attr|variable_name, render_nullable=nullable, render_option=not required, render_box=True, version=version) %} {%- if attr in model.get("required", []) %} {{ attr|variable_name }}, {%- else %} @@ -48,6 +47,17 @@ impl {{ name }} { {%- endif %} } } + {% for attr, schema in model.get("properties", {}).items() if attr not in model.required %} + {%- set nullable = schema.get("nullable", False)%} + {%- set dataType = get_type(schema, alternative_name=name + attr|variable_name, render_nullable=nullable, render_option=False, render_box=True, version=version) %} + {%- if get_deprecated(model) %} + #[allow(deprecated)] + {%- endif %} + pub fn with_{{attr|variable_name}}(&mut self, value: {{dataType}}) -> &mut Self { + self.{{attr|variable_name}} = Some(value); + self + } + {% endfor %} } {%- if not model.required %} diff --git a/src/datadogV1/api/api_authentication.rs b/src/datadogV1/api/api_authentication.rs index 33be420ee..e54b83ccd 100644 --- a/src/datadogV1/api/api_authentication.rs +++ b/src/datadogV1/api/api_authentication.rs @@ -57,8 +57,6 @@ impl AuthenticationAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/validate", local_configuration.base_path); diff --git a/src/datadogV1/api/api_aws_integration.rs b/src/datadogV1/api/api_aws_integration.rs index a9128a2c8..3748a0391 100644 --- a/src/datadogV1/api/api_aws_integration.rs +++ b/src/datadogV1/api/api_aws_integration.rs @@ -5,61 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateAWSAccountParams is a struct for passing parameters to the method [`AWSIntegrationAPI::create_aws_account`] +/// ListAWSAccountsOptionalParams is a struct for passing parameters to the method [`AWSIntegrationAPI::list_aws_accounts`] #[derive(Clone, Debug)] -pub struct CreateAWSAccountParams { - /// AWS Request Object - pub body: crate::datadogV1::model::AWSAccount, -} - -/// CreateAWSEventBridgeSourceParams is a struct for passing parameters to the method [`AWSIntegrationAPI::create_aws_event_bridge_source`] -#[derive(Clone, Debug)] -pub struct CreateAWSEventBridgeSourceParams { - /// Create an Amazon EventBridge source for an AWS account with a given name and region. - pub body: crate::datadogV1::model::AWSEventBridgeCreateRequest, -} - -/// CreateAWSTagFilterParams is a struct for passing parameters to the method [`AWSIntegrationAPI::create_aws_tag_filter`] -#[derive(Clone, Debug)] -pub struct CreateAWSTagFilterParams { - /// Set an AWS tag filter using an `aws_account_identifier`, `namespace`, and filtering string. - /// Namespace options are `application_elb`, `elb`, `lambda`, `network_elb`, `rds`, `sqs`, and `custom`. - pub body: crate::datadogV1::model::AWSTagFilterCreateRequest, -} - -/// CreateNewAWSExternalIDParams is a struct for passing parameters to the method [`AWSIntegrationAPI::create_new_aws_external_id`] -#[derive(Clone, Debug)] -pub struct CreateNewAWSExternalIDParams { - /// Your Datadog role delegation name. - /// For more information about your AWS account Role name, - /// see the [Datadog AWS integration configuration info](). - pub body: crate::datadogV1::model::AWSAccount, -} - -/// DeleteAWSAccountParams is a struct for passing parameters to the method [`AWSIntegrationAPI::delete_aws_account`] -#[derive(Clone, Debug)] -pub struct DeleteAWSAccountParams { - /// AWS request object - pub body: crate::datadogV1::model::AWSAccountDeleteRequest, -} - -/// DeleteAWSEventBridgeSourceParams is a struct for passing parameters to the method [`AWSIntegrationAPI::delete_aws_event_bridge_source`] -#[derive(Clone, Debug)] -pub struct DeleteAWSEventBridgeSourceParams { - /// Delete the Amazon EventBridge source with the given name, region, and associated AWS account. - pub body: crate::datadogV1::model::AWSEventBridgeDeleteRequest, -} - -/// DeleteAWSTagFilterParams is a struct for passing parameters to the method [`AWSIntegrationAPI::delete_aws_tag_filter`] -#[derive(Clone, Debug)] -pub struct DeleteAWSTagFilterParams { - /// Delete a tag filtering entry for a given AWS account and `dd-aws` namespace. - pub body: crate::datadogV1::model::AWSTagFilterDeleteRequest, -} - -/// ListAWSAccountsParams is a struct for passing parameters to the method [`AWSIntegrationAPI::list_aws_accounts`] -#[derive(Clone, Debug)] -pub struct ListAWSAccountsParams { +pub struct ListAWSAccountsOptionalParams { /// Only return AWS accounts that matches this `account_id`. pub account_id: Option, /// Only return AWS accounts that matches this role_name. @@ -68,18 +16,9 @@ pub struct ListAWSAccountsParams { pub access_key_id: Option, } -/// ListAWSTagFiltersParams is a struct for passing parameters to the method [`AWSIntegrationAPI::list_aws_tag_filters`] +/// UpdateAWSAccountOptionalParams is a struct for passing parameters to the method [`AWSIntegrationAPI::update_aws_account`] #[derive(Clone, Debug)] -pub struct ListAWSTagFiltersParams { - /// Only return AWS filters that matches this `account_id`. - pub account_id: String, -} - -/// UpdateAWSAccountParams is a struct for passing parameters to the method [`AWSIntegrationAPI::update_aws_account`] -#[derive(Clone, Debug)] -pub struct UpdateAWSAccountParams { - /// AWS request object - pub body: crate::datadogV1::model::AWSAccount, +pub struct UpdateAWSAccountOptionalParams { /// Only return AWS accounts that matches this `account_id`. pub account_id: Option, /// Only return AWS accounts that match this `role_name`. @@ -239,12 +178,12 @@ impl AWSIntegrationAPI { /// A unique AWS Account ID for role based authentication. pub async fn create_aws_account( &self, - params: CreateAWSAccountParams, + body: crate::datadogV1::model::AWSAccount, ) -> Result< Option, Error, > { - match self.create_aws_account_with_http_info(params).await { + match self.create_aws_account_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -256,16 +195,13 @@ impl AWSIntegrationAPI { /// A unique AWS Account ID for role based authentication. pub async fn create_aws_account_with_http_info( &self, - params: CreateAWSAccountParams, + body: crate::datadogV1::model::AWSAccount, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/integration/aws", local_configuration.base_path); @@ -322,13 +258,13 @@ impl AWSIntegrationAPI { /// Create an Amazon EventBridge source. pub async fn create_aws_event_bridge_source( &self, - params: CreateAWSEventBridgeSourceParams, + body: crate::datadogV1::model::AWSEventBridgeCreateRequest, ) -> Result< Option, Error, > { match self - .create_aws_event_bridge_source_with_http_info(params) + .create_aws_event_bridge_source_with_http_info(body) .await { Ok(response_content) => Ok(response_content.entity), @@ -339,16 +275,13 @@ impl AWSIntegrationAPI { /// Create an Amazon EventBridge source. pub async fn create_aws_event_bridge_source_with_http_info( &self, - params: CreateAWSEventBridgeSourceParams, + body: crate::datadogV1::model::AWSEventBridgeCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -408,12 +341,12 @@ impl AWSIntegrationAPI { /// Set an AWS tag filter. pub async fn create_aws_tag_filter( &self, - params: CreateAWSTagFilterParams, + body: crate::datadogV1::model::AWSTagFilterCreateRequest, ) -> Result< Option>, Error, > { - match self.create_aws_tag_filter_with_http_info(params).await { + match self.create_aws_tag_filter_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -422,16 +355,13 @@ impl AWSIntegrationAPI { /// Set an AWS tag filter. pub async fn create_aws_tag_filter_with_http_info( &self, - params: CreateAWSTagFilterParams, + body: crate::datadogV1::model::AWSTagFilterCreateRequest, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -491,12 +421,12 @@ impl AWSIntegrationAPI { /// Generate a new AWS external ID for a given AWS account ID and role name pair. pub async fn create_new_aws_external_id( &self, - params: CreateNewAWSExternalIDParams, + body: crate::datadogV1::model::AWSAccount, ) -> Result< Option, Error, > { - match self.create_new_aws_external_id_with_http_info(params).await { + match self.create_new_aws_external_id_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -505,16 +435,13 @@ impl AWSIntegrationAPI { /// Generate a new AWS external ID for a given AWS account ID and role name pair. pub async fn create_new_aws_external_id_with_http_info( &self, - params: CreateNewAWSExternalIDParams, + body: crate::datadogV1::model::AWSAccount, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -574,12 +501,12 @@ impl AWSIntegrationAPI { /// Delete a Datadog-AWS integration matching the specified `account_id` and `role_name parameters`. pub async fn delete_aws_account( &self, - params: DeleteAWSAccountParams, + body: crate::datadogV1::model::AWSAccountDeleteRequest, ) -> Result< Option>, Error, > { - match self.delete_aws_account_with_http_info(params).await { + match self.delete_aws_account_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -588,16 +515,13 @@ impl AWSIntegrationAPI { /// Delete a Datadog-AWS integration matching the specified `account_id` and `role_name parameters`. pub async fn delete_aws_account_with_http_info( &self, - params: DeleteAWSAccountParams, + body: crate::datadogV1::model::AWSAccountDeleteRequest, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/integration/aws", local_configuration.base_path); @@ -654,13 +578,13 @@ impl AWSIntegrationAPI { /// Delete an Amazon EventBridge source. pub async fn delete_aws_event_bridge_source( &self, - params: DeleteAWSEventBridgeSourceParams, + body: crate::datadogV1::model::AWSEventBridgeDeleteRequest, ) -> Result< Option, Error, > { match self - .delete_aws_event_bridge_source_with_http_info(params) + .delete_aws_event_bridge_source_with_http_info(body) .await { Ok(response_content) => Ok(response_content.entity), @@ -671,16 +595,13 @@ impl AWSIntegrationAPI { /// Delete an Amazon EventBridge source. pub async fn delete_aws_event_bridge_source_with_http_info( &self, - params: DeleteAWSEventBridgeSourceParams, + body: crate::datadogV1::model::AWSEventBridgeDeleteRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -740,12 +661,12 @@ impl AWSIntegrationAPI { /// Delete a tag filtering entry. pub async fn delete_aws_tag_filter( &self, - params: DeleteAWSTagFilterParams, + body: crate::datadogV1::model::AWSTagFilterDeleteRequest, ) -> Result< Option>, Error, > { - match self.delete_aws_tag_filter_with_http_info(params).await { + match self.delete_aws_tag_filter_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -754,16 +675,13 @@ impl AWSIntegrationAPI { /// Delete a tag filtering entry. pub async fn delete_aws_tag_filter_with_http_info( &self, - params: DeleteAWSTagFilterParams, + body: crate::datadogV1::model::AWSTagFilterDeleteRequest, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -823,7 +741,7 @@ impl AWSIntegrationAPI { /// List all Datadog-AWS integrations available in your Datadog organization. pub async fn list_aws_accounts( &self, - params: ListAWSAccountsParams, + params: ListAWSAccountsOptionalParams, ) -> Result, Error> { match self.list_aws_accounts_with_http_info(params).await { @@ -835,14 +753,14 @@ impl AWSIntegrationAPI { /// List all Datadog-AWS integrations available in your Datadog organization. pub async fn list_aws_accounts_with_http_info( &self, - params: ListAWSAccountsParams, + params: ListAWSAccountsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let account_id = params.account_id; let role_name = params.role_name; let access_key_id = params.access_key_id; @@ -853,15 +771,17 @@ impl AWSIntegrationAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = account_id { - local_req_builder = local_req_builder.query(&[("account_id", &local_str.to_string())]); + if let Some(ref local_query_param) = account_id { + local_req_builder = + local_req_builder.query(&[("account_id", &local_query_param.to_string())]); }; - if let Some(ref local_str) = role_name { - local_req_builder = local_req_builder.query(&[("role_name", &local_str.to_string())]); + if let Some(ref local_query_param) = role_name { + local_req_builder = + local_req_builder.query(&[("role_name", &local_query_param.to_string())]); }; - if let Some(ref local_str) = access_key_id { + if let Some(ref local_query_param) = access_key_id { local_req_builder = - local_req_builder.query(&[("access_key_id", &local_str.to_string())]); + local_req_builder.query(&[("access_key_id", &local_query_param.to_string())]); }; // build user agent @@ -926,8 +846,6 @@ impl AWSIntegrationAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -980,12 +898,12 @@ impl AWSIntegrationAPI { /// Get all AWS tag filters. pub async fn list_aws_tag_filters( &self, - params: ListAWSTagFiltersParams, + account_id: String, ) -> Result< Option, Error, > { - match self.list_aws_tag_filters_with_http_info(params).await { + match self.list_aws_tag_filters_with_http_info(account_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -994,16 +912,13 @@ impl AWSIntegrationAPI { /// Get all AWS tag filters. pub async fn list_aws_tag_filters_with_http_info( &self, - params: ListAWSTagFiltersParams, + account_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1071,8 +986,6 @@ impl AWSIntegrationAPI { ) -> Result>, Error> { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1124,12 +1037,13 @@ impl AWSIntegrationAPI { /// Update a Datadog-Amazon Web Services integration. pub async fn update_aws_account( &self, - params: UpdateAWSAccountParams, + body: crate::datadogV1::model::AWSAccount, + params: UpdateAWSAccountOptionalParams, ) -> Result< Option>, Error, > { - match self.update_aws_account_with_http_info(params).await { + match self.update_aws_account_with_http_info(body, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1138,15 +1052,15 @@ impl AWSIntegrationAPI { /// Update a Datadog-Amazon Web Services integration. pub async fn update_aws_account_with_http_info( &self, - params: UpdateAWSAccountParams, + body: crate::datadogV1::model::AWSAccount, + params: UpdateAWSAccountOptionalParams, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; + // unbox and build optional parameters let account_id = params.account_id; let role_name = params.role_name; let access_key_id = params.access_key_id; @@ -1157,15 +1071,17 @@ impl AWSIntegrationAPI { let mut local_req_builder = local_client.request(reqwest::Method::PUT, local_uri_str.as_str()); - if let Some(ref local_str) = account_id { - local_req_builder = local_req_builder.query(&[("account_id", &local_str.to_string())]); + if let Some(ref local_query_param) = account_id { + local_req_builder = + local_req_builder.query(&[("account_id", &local_query_param.to_string())]); }; - if let Some(ref local_str) = role_name { - local_req_builder = local_req_builder.query(&[("role_name", &local_str.to_string())]); + if let Some(ref local_query_param) = role_name { + local_req_builder = + local_req_builder.query(&[("role_name", &local_query_param.to_string())]); }; - if let Some(ref local_str) = access_key_id { + if let Some(ref local_query_param) = access_key_id { local_req_builder = - local_req_builder.query(&[("access_key_id", &local_str.to_string())]); + local_req_builder.query(&[("access_key_id", &local_query_param.to_string())]); }; // build user agent diff --git a/src/datadogV1/api/api_aws_logs_integration.rs b/src/datadogV1/api/api_aws_logs_integration.rs index 0dd334ad0..31c31610f 100644 --- a/src/datadogV1/api/api_aws_logs_integration.rs +++ b/src/datadogV1/api/api_aws_logs_integration.rs @@ -5,41 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CheckAWSLogsLambdaAsyncParams is a struct for passing parameters to the method [`AWSLogsIntegrationAPI::check_aws_logs_lambda_async`] -#[derive(Clone, Debug)] -pub struct CheckAWSLogsLambdaAsyncParams { - /// Check AWS Log Lambda Async request body. - pub body: crate::datadogV1::model::AWSAccountAndLambdaRequest, -} - -/// CheckAWSLogsServicesAsyncParams is a struct for passing parameters to the method [`AWSLogsIntegrationAPI::check_aws_logs_services_async`] -#[derive(Clone, Debug)] -pub struct CheckAWSLogsServicesAsyncParams { - /// Check AWS Logs Async Services request body. - pub body: crate::datadogV1::model::AWSLogsServicesRequest, -} - -/// CreateAWSLambdaARNParams is a struct for passing parameters to the method [`AWSLogsIntegrationAPI::create_aws_lambda_arn`] -#[derive(Clone, Debug)] -pub struct CreateAWSLambdaARNParams { - /// AWS Log Lambda Async request body. - pub body: crate::datadogV1::model::AWSAccountAndLambdaRequest, -} - -/// DeleteAWSLambdaARNParams is a struct for passing parameters to the method [`AWSLogsIntegrationAPI::delete_aws_lambda_arn`] -#[derive(Clone, Debug)] -pub struct DeleteAWSLambdaARNParams { - /// Delete AWS Lambda ARN request body. - pub body: crate::datadogV1::model::AWSAccountAndLambdaRequest, -} - -/// EnableAWSLogServicesParams is a struct for passing parameters to the method [`AWSLogsIntegrationAPI::enable_aws_log_services`] -#[derive(Clone, Debug)] -pub struct EnableAWSLogServicesParams { - /// Enable AWS Log Services request body. - pub body: crate::datadogV1::model::AWSLogsServicesRequest, -} - /// CheckAWSLogsLambdaAsyncError is a struct for typed errors of method [`AWSLogsIntegrationAPI::check_aws_logs_lambda_async`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -140,15 +105,12 @@ impl AWSLogsIntegrationAPI { /// - Returns a status of 'error' if the Lambda does not exist. pub async fn check_aws_logs_lambda_async( &self, - params: CheckAWSLogsLambdaAsyncParams, + body: crate::datadogV1::model::AWSAccountAndLambdaRequest, ) -> Result< Option, Error, > { - match self - .check_aws_logs_lambda_async_with_http_info(params) - .await - { + match self.check_aws_logs_lambda_async_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -164,16 +126,13 @@ impl AWSLogsIntegrationAPI { /// - Returns a status of 'error' if the Lambda does not exist. pub async fn check_aws_logs_lambda_async_with_http_info( &self, - params: CheckAWSLogsLambdaAsyncParams, + body: crate::datadogV1::model::AWSAccountAndLambdaRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -242,13 +201,13 @@ impl AWSLogsIntegrationAPI { /// - Returns a status of `error` if the Lambda does not exist. pub async fn check_aws_logs_services_async( &self, - params: CheckAWSLogsServicesAsyncParams, + body: crate::datadogV1::model::AWSLogsServicesRequest, ) -> Result< Option, Error, > { match self - .check_aws_logs_services_async_with_http_info(params) + .check_aws_logs_services_async_with_http_info(body) .await { Ok(response_content) => Ok(response_content.entity), @@ -268,16 +227,13 @@ impl AWSLogsIntegrationAPI { /// - Returns a status of `error` if the Lambda does not exist. pub async fn check_aws_logs_services_async_with_http_info( &self, - params: CheckAWSLogsServicesAsyncParams, + body: crate::datadogV1::model::AWSLogsServicesRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -337,12 +293,12 @@ impl AWSLogsIntegrationAPI { /// Attach the Lambda ARN of the Lambda created for the Datadog-AWS log collection to your AWS account ID to enable log collection. pub async fn create_aws_lambda_arn( &self, - params: CreateAWSLambdaARNParams, + body: crate::datadogV1::model::AWSAccountAndLambdaRequest, ) -> Result< Option>, Error, > { - match self.create_aws_lambda_arn_with_http_info(params).await { + match self.create_aws_lambda_arn_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -351,16 +307,13 @@ impl AWSLogsIntegrationAPI { /// Attach the Lambda ARN of the Lambda created for the Datadog-AWS log collection to your AWS account ID to enable log collection. pub async fn create_aws_lambda_arn_with_http_info( &self, - params: CreateAWSLambdaARNParams, + body: crate::datadogV1::model::AWSAccountAndLambdaRequest, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -420,12 +373,12 @@ impl AWSLogsIntegrationAPI { /// Delete a Datadog-AWS logs configuration by removing the specific Lambda ARN associated with a given AWS account. pub async fn delete_aws_lambda_arn( &self, - params: DeleteAWSLambdaARNParams, + body: crate::datadogV1::model::AWSAccountAndLambdaRequest, ) -> Result< Option>, Error, > { - match self.delete_aws_lambda_arn_with_http_info(params).await { + match self.delete_aws_lambda_arn_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -434,16 +387,13 @@ impl AWSLogsIntegrationAPI { /// Delete a Datadog-AWS logs configuration by removing the specific Lambda ARN associated with a given AWS account. pub async fn delete_aws_lambda_arn_with_http_info( &self, - params: DeleteAWSLambdaARNParams, + body: crate::datadogV1::model::AWSAccountAndLambdaRequest, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -503,12 +453,12 @@ impl AWSLogsIntegrationAPI { /// Enable automatic log collection for a list of services. This should be run after running `CreateAWSLambdaARN` to save the configuration. pub async fn enable_aws_log_services( &self, - params: EnableAWSLogServicesParams, + body: crate::datadogV1::model::AWSLogsServicesRequest, ) -> Result< Option>, Error, > { - match self.enable_aws_log_services_with_http_info(params).await { + match self.enable_aws_log_services_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -517,16 +467,13 @@ impl AWSLogsIntegrationAPI { /// Enable automatic log collection for a list of services. This should be run after running `CreateAWSLambdaARN` to save the configuration. pub async fn enable_aws_log_services_with_http_info( &self, - params: EnableAWSLogServicesParams, + body: crate::datadogV1::model::AWSLogsServicesRequest, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -605,8 +552,6 @@ impl AWSLogsIntegrationAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -678,8 +623,6 @@ impl AWSLogsIntegrationAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV1/api/api_azure_integration.rs b/src/datadogV1/api/api_azure_integration.rs index 398751eac..5eeb5b1df 100644 --- a/src/datadogV1/api/api_azure_integration.rs +++ b/src/datadogV1/api/api_azure_integration.rs @@ -5,34 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateAzureIntegrationParams is a struct for passing parameters to the method [`AzureIntegrationAPI::create_azure_integration`] -#[derive(Clone, Debug)] -pub struct CreateAzureIntegrationParams { - /// Create a Datadog-Azure integration for your Datadog account request body. - pub body: crate::datadogV1::model::AzureAccount, -} - -/// DeleteAzureIntegrationParams is a struct for passing parameters to the method [`AzureIntegrationAPI::delete_azure_integration`] -#[derive(Clone, Debug)] -pub struct DeleteAzureIntegrationParams { - /// Delete a given Datadog-Azure integration request body. - pub body: crate::datadogV1::model::AzureAccount, -} - -/// UpdateAzureHostFiltersParams is a struct for passing parameters to the method [`AzureIntegrationAPI::update_azure_host_filters`] -#[derive(Clone, Debug)] -pub struct UpdateAzureHostFiltersParams { - /// Update a Datadog-Azure integration's host filters request body. - pub body: crate::datadogV1::model::AzureAccount, -} - -/// UpdateAzureIntegrationParams is a struct for passing parameters to the method [`AzureIntegrationAPI::update_azure_integration`] -#[derive(Clone, Debug)] -pub struct UpdateAzureIntegrationParams { - /// Update a Datadog-Azure integration request body. - pub body: crate::datadogV1::model::AzureAccount, -} - /// CreateAzureIntegrationError is a struct for typed errors of method [`AzureIntegrationAPI::create_azure_integration`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -113,12 +85,12 @@ impl AzureIntegrationAPI { /// current configuration with the new one sent to your Datadog organization. pub async fn create_azure_integration( &self, - params: CreateAzureIntegrationParams, + body: crate::datadogV1::model::AzureAccount, ) -> Result< Option>, Error, > { - match self.create_azure_integration_with_http_info(params).await { + match self.create_azure_integration_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -133,16 +105,13 @@ impl AzureIntegrationAPI { /// current configuration with the new one sent to your Datadog organization. pub async fn create_azure_integration_with_http_info( &self, - params: CreateAzureIntegrationParams, + body: crate::datadogV1::model::AzureAccount, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/integration/azure", local_configuration.base_path); @@ -199,12 +168,12 @@ impl AzureIntegrationAPI { /// Delete a given Datadog-Azure integration from your Datadog account. pub async fn delete_azure_integration( &self, - params: DeleteAzureIntegrationParams, + body: crate::datadogV1::model::AzureAccount, ) -> Result< Option>, Error, > { - match self.delete_azure_integration_with_http_info(params).await { + match self.delete_azure_integration_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -213,16 +182,13 @@ impl AzureIntegrationAPI { /// Delete a given Datadog-Azure integration from your Datadog account. pub async fn delete_azure_integration_with_http_info( &self, - params: DeleteAzureIntegrationParams, + body: crate::datadogV1::model::AzureAccount, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/integration/azure", local_configuration.base_path); @@ -296,8 +262,6 @@ impl AzureIntegrationAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/integration/azure", local_configuration.base_path); @@ -347,12 +311,12 @@ impl AzureIntegrationAPI { /// Update the defined list of host filters for a given Datadog-Azure integration. pub async fn update_azure_host_filters( &self, - params: UpdateAzureHostFiltersParams, + body: crate::datadogV1::model::AzureAccount, ) -> Result< Option>, Error, > { - match self.update_azure_host_filters_with_http_info(params).await { + match self.update_azure_host_filters_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -361,16 +325,13 @@ impl AzureIntegrationAPI { /// Update the defined list of host filters for a given Datadog-Azure integration. pub async fn update_azure_host_filters_with_http_info( &self, - params: UpdateAzureHostFiltersParams, + body: crate::datadogV1::model::AzureAccount, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -432,12 +393,12 @@ impl AzureIntegrationAPI { /// use `new_tenant_name` and `new_client_id`. To leave a field unchanged, do not supply that field in the payload. pub async fn update_azure_integration( &self, - params: UpdateAzureIntegrationParams, + body: crate::datadogV1::model::AzureAccount, ) -> Result< Option>, Error, > { - match self.update_azure_integration_with_http_info(params).await { + match self.update_azure_integration_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -448,16 +409,13 @@ impl AzureIntegrationAPI { /// use `new_tenant_name` and `new_client_id`. To leave a field unchanged, do not supply that field in the payload. pub async fn update_azure_integration_with_http_info( &self, - params: UpdateAzureIntegrationParams, + body: crate::datadogV1::model::AzureAccount, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/integration/azure", local_configuration.base_path); diff --git a/src/datadogV1/api/api_dashboard_lists.rs b/src/datadogV1/api/api_dashboard_lists.rs index 14efc7666..e0c21aee3 100644 --- a/src/datadogV1/api/api_dashboard_lists.rs +++ b/src/datadogV1/api/api_dashboard_lists.rs @@ -5,36 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateDashboardListParams is a struct for passing parameters to the method [`DashboardListsAPI::create_dashboard_list`] -#[derive(Clone, Debug)] -pub struct CreateDashboardListParams { - /// Create a dashboard list request body. - pub body: crate::datadogV1::model::DashboardList, -} - -/// DeleteDashboardListParams is a struct for passing parameters to the method [`DashboardListsAPI::delete_dashboard_list`] -#[derive(Clone, Debug)] -pub struct DeleteDashboardListParams { - /// ID of the dashboard list to delete. - pub list_id: i64, -} - -/// GetDashboardListParams is a struct for passing parameters to the method [`DashboardListsAPI::get_dashboard_list`] -#[derive(Clone, Debug)] -pub struct GetDashboardListParams { - /// ID of the dashboard list to fetch. - pub list_id: i64, -} - -/// UpdateDashboardListParams is a struct for passing parameters to the method [`DashboardListsAPI::update_dashboard_list`] -#[derive(Clone, Debug)] -pub struct UpdateDashboardListParams { - /// ID of the dashboard list to update. - pub list_id: i64, - /// Update a dashboard list request body. - pub body: crate::datadogV1::model::DashboardList, -} - /// CreateDashboardListError is a struct for typed errors of method [`DashboardListsAPI::create_dashboard_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -109,10 +79,10 @@ impl DashboardListsAPI { /// Create an empty dashboard list. pub async fn create_dashboard_list( &self, - params: CreateDashboardListParams, + body: crate::datadogV1::model::DashboardList, ) -> Result, Error> { - match self.create_dashboard_list_with_http_info(params).await { + match self.create_dashboard_list_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -121,16 +91,13 @@ impl DashboardListsAPI { /// Create an empty dashboard list. pub async fn create_dashboard_list_with_http_info( &self, - params: CreateDashboardListParams, + body: crate::datadogV1::model::DashboardList, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -190,12 +157,12 @@ impl DashboardListsAPI { /// Delete a dashboard list. pub async fn delete_dashboard_list( &self, - params: DeleteDashboardListParams, + list_id: i64, ) -> Result< Option, Error, > { - match self.delete_dashboard_list_with_http_info(params).await { + match self.delete_dashboard_list_with_http_info(list_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -204,16 +171,13 @@ impl DashboardListsAPI { /// Delete a dashboard list. pub async fn delete_dashboard_list_with_http_info( &self, - params: DeleteDashboardListParams, + list_id: i64, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let list_id = params.list_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -267,9 +231,9 @@ impl DashboardListsAPI { /// Fetch an existing dashboard list's definition. pub async fn get_dashboard_list( &self, - params: GetDashboardListParams, + list_id: i64, ) -> Result, Error> { - match self.get_dashboard_list_with_http_info(params).await { + match self.get_dashboard_list_with_http_info(list_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -278,14 +242,11 @@ impl DashboardListsAPI { /// Fetch an existing dashboard list's definition. pub async fn get_dashboard_list_with_http_info( &self, - params: GetDashboardListParams, + list_id: i64, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let list_id = params.list_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -358,8 +319,6 @@ impl DashboardListsAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -412,10 +371,14 @@ impl DashboardListsAPI { /// Update the name of a dashboard list. pub async fn update_dashboard_list( &self, - params: UpdateDashboardListParams, + list_id: i64, + body: crate::datadogV1::model::DashboardList, ) -> Result, Error> { - match self.update_dashboard_list_with_http_info(params).await { + match self + .update_dashboard_list_with_http_info(list_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -424,17 +387,14 @@ impl DashboardListsAPI { /// Update the name of a dashboard list. pub async fn update_dashboard_list_with_http_info( &self, - params: UpdateDashboardListParams, + list_id: i64, + body: crate::datadogV1::model::DashboardList, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let list_id = params.list_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV1/api/api_dashboards.rs b/src/datadogV1/api/api_dashboards.rs index 1bb8e3871..d595c9971 100644 --- a/src/datadogV1/api/api_dashboards.rs +++ b/src/datadogV1/api/api_dashboards.rs @@ -5,78 +5,18 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateDashboardParams is a struct for passing parameters to the method [`DashboardsAPI::create_dashboard`] +/// GetPublicDashboardInvitationsOptionalParams is a struct for passing parameters to the method [`DashboardsAPI::get_public_dashboard_invitations`] #[derive(Clone, Debug)] -pub struct CreateDashboardParams { - /// Create a dashboard request body. - pub body: crate::datadogV1::model::Dashboard, -} - -/// CreatePublicDashboardParams is a struct for passing parameters to the method [`DashboardsAPI::create_public_dashboard`] -#[derive(Clone, Debug)] -pub struct CreatePublicDashboardParams { - /// Create a shared dashboard request body. - pub body: crate::datadogV1::model::SharedDashboard, -} - -/// DeleteDashboardParams is a struct for passing parameters to the method [`DashboardsAPI::delete_dashboard`] -#[derive(Clone, Debug)] -pub struct DeleteDashboardParams { - /// The ID of the dashboard. - pub dashboard_id: String, -} - -/// DeleteDashboardsParams is a struct for passing parameters to the method [`DashboardsAPI::delete_dashboards`] -#[derive(Clone, Debug)] -pub struct DeleteDashboardsParams { - /// Delete dashboards request body. - pub body: crate::datadogV1::model::DashboardBulkDeleteRequest, -} - -/// DeletePublicDashboardParams is a struct for passing parameters to the method [`DashboardsAPI::delete_public_dashboard`] -#[derive(Clone, Debug)] -pub struct DeletePublicDashboardParams { - /// The token of the shared dashboard. - pub token: String, -} - -/// DeletePublicDashboardInvitationParams is a struct for passing parameters to the method [`DashboardsAPI::delete_public_dashboard_invitation`] -#[derive(Clone, Debug)] -pub struct DeletePublicDashboardInvitationParams { - /// The token of the shared dashboard. - pub token: String, - /// Shared Dashboard Invitation deletion request body. - pub body: crate::datadogV1::model::SharedDashboardInvites, -} - -/// GetDashboardParams is a struct for passing parameters to the method [`DashboardsAPI::get_dashboard`] -#[derive(Clone, Debug)] -pub struct GetDashboardParams { - /// The ID of the dashboard. - pub dashboard_id: String, -} - -/// GetPublicDashboardParams is a struct for passing parameters to the method [`DashboardsAPI::get_public_dashboard`] -#[derive(Clone, Debug)] -pub struct GetPublicDashboardParams { - /// The token of the shared dashboard. Generated when a dashboard is shared. - pub token: String, -} - -/// GetPublicDashboardInvitationsParams is a struct for passing parameters to the method [`DashboardsAPI::get_public_dashboard_invitations`] -#[derive(Clone, Debug)] -pub struct GetPublicDashboardInvitationsParams { - /// Token of the shared dashboard for which to fetch invitations. - pub token: String, +pub struct GetPublicDashboardInvitationsOptionalParams { /// The number of records to return in a single request. pub page_size: Option, /// The page to access (base 0). pub page_number: Option, } -/// ListDashboardsParams is a struct for passing parameters to the method [`DashboardsAPI::list_dashboards`] +/// ListDashboardsOptionalParams is a struct for passing parameters to the method [`DashboardsAPI::list_dashboards`] #[derive(Clone, Debug)] -pub struct ListDashboardsParams { +pub struct ListDashboardsOptionalParams { /// When `true`, this query only returns shared custom created /// or cloned dashboards. pub filter_shared: Option, @@ -89,40 +29,6 @@ pub struct ListDashboardsParams { pub start: Option, } -/// RestoreDashboardsParams is a struct for passing parameters to the method [`DashboardsAPI::restore_dashboards`] -#[derive(Clone, Debug)] -pub struct RestoreDashboardsParams { - /// Restore dashboards request body. - pub body: crate::datadogV1::model::DashboardRestoreRequest, -} - -/// SendPublicDashboardInvitationParams is a struct for passing parameters to the method [`DashboardsAPI::send_public_dashboard_invitation`] -#[derive(Clone, Debug)] -pub struct SendPublicDashboardInvitationParams { - /// The token of the shared dashboard. - pub token: String, - /// Shared Dashboard Invitation request body. - pub body: crate::datadogV1::model::SharedDashboardInvites, -} - -/// UpdateDashboardParams is a struct for passing parameters to the method [`DashboardsAPI::update_dashboard`] -#[derive(Clone, Debug)] -pub struct UpdateDashboardParams { - /// The ID of the dashboard. - pub dashboard_id: String, - /// Update Dashboard request body. - pub body: crate::datadogV1::model::Dashboard, -} - -/// UpdatePublicDashboardParams is a struct for passing parameters to the method [`DashboardsAPI::update_public_dashboard`] -#[derive(Clone, Debug)] -pub struct UpdatePublicDashboardParams { - /// The token of the shared dashboard. - pub token: String, - /// Update Dashboard request body. - pub body: crate::datadogV1::model::SharedDashboardUpdateRequest, -} - /// CreateDashboardError is a struct for typed errors of method [`DashboardsAPI::create_dashboard`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -293,9 +199,9 @@ impl DashboardsAPI { /// Refer to the following [documentation]() for more information on these modifiers. pub async fn create_dashboard( &self, - params: CreateDashboardParams, + body: crate::datadogV1::model::Dashboard, ) -> Result, Error> { - match self.create_dashboard_with_http_info(params).await { + match self.create_dashboard_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -305,14 +211,11 @@ impl DashboardsAPI { /// Refer to the following [documentation]() for more information on these modifiers. pub async fn create_dashboard_with_http_info( &self, - params: CreateDashboardParams, + body: crate::datadogV1::model::Dashboard, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/dashboard", local_configuration.base_path); @@ -369,10 +272,10 @@ impl DashboardsAPI { /// Share a specified private dashboard, generating a URL at which it can be publicly viewed. pub async fn create_public_dashboard( &self, - params: CreatePublicDashboardParams, + body: crate::datadogV1::model::SharedDashboard, ) -> Result, Error> { - match self.create_public_dashboard_with_http_info(params).await { + match self.create_public_dashboard_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -381,16 +284,13 @@ impl DashboardsAPI { /// Share a specified private dashboard, generating a URL at which it can be publicly viewed. pub async fn create_public_dashboard_with_http_info( &self, - params: CreatePublicDashboardParams, + body: crate::datadogV1::model::SharedDashboard, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/dashboard/public", local_configuration.base_path); @@ -447,10 +347,10 @@ impl DashboardsAPI { /// Delete a dashboard using the specified ID. pub async fn delete_dashboard( &self, - params: DeleteDashboardParams, + dashboard_id: String, ) -> Result, Error> { - match self.delete_dashboard_with_http_info(params).await { + match self.delete_dashboard_with_http_info(dashboard_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -459,16 +359,13 @@ impl DashboardsAPI { /// Delete a dashboard using the specified ID. pub async fn delete_dashboard_with_http_info( &self, - params: DeleteDashboardParams, + dashboard_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let dashboard_id = params.dashboard_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -522,9 +419,9 @@ impl DashboardsAPI { /// Delete dashboards using the specified IDs. If there are any failures, no dashboards will be deleted (partial success is not allowed). pub async fn delete_dashboards( &self, - params: DeleteDashboardsParams, + body: crate::datadogV1::model::DashboardBulkDeleteRequest, ) -> Result, Error> { - match self.delete_dashboards_with_http_info(params).await { + match self.delete_dashboards_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -533,13 +430,10 @@ impl DashboardsAPI { /// Delete dashboards using the specified IDs. If there are any failures, no dashboards will be deleted (partial success is not allowed). pub async fn delete_dashboards_with_http_info( &self, - params: DeleteDashboardsParams, + body: crate::datadogV1::model::DashboardBulkDeleteRequest, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/dashboard", local_configuration.base_path); @@ -594,12 +488,12 @@ impl DashboardsAPI { /// Revoke the public URL for a dashboard (rendering it private) associated with the specified token. pub async fn delete_public_dashboard( &self, - params: DeletePublicDashboardParams, + token: String, ) -> Result< Option, Error, > { - match self.delete_public_dashboard_with_http_info(params).await { + match self.delete_public_dashboard_with_http_info(token).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -608,16 +502,13 @@ impl DashboardsAPI { /// Revoke the public URL for a dashboard (rendering it private) associated with the specified token. pub async fn delete_public_dashboard_with_http_info( &self, - params: DeletePublicDashboardParams, + token: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let token = params.token; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -671,10 +562,11 @@ impl DashboardsAPI { /// Revoke previously sent invitation emails and active sessions used to access a given shared dashboard for specific email addresses. pub async fn delete_public_dashboard_invitation( &self, - params: DeletePublicDashboardInvitationParams, + token: String, + body: crate::datadogV1::model::SharedDashboardInvites, ) -> Result, Error> { match self - .delete_public_dashboard_invitation_with_http_info(params) + .delete_public_dashboard_invitation_with_http_info(token, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -685,14 +577,11 @@ impl DashboardsAPI { /// Revoke previously sent invitation emails and active sessions used to access a given shared dashboard for specific email addresses. pub async fn delete_public_dashboard_invitation_with_http_info( &self, - params: DeletePublicDashboardInvitationParams, + token: String, + body: crate::datadogV1::model::SharedDashboardInvites, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let token = params.token; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -751,9 +640,9 @@ impl DashboardsAPI { /// Get a dashboard using the specified ID. pub async fn get_dashboard( &self, - params: GetDashboardParams, + dashboard_id: String, ) -> Result, Error> { - match self.get_dashboard_with_http_info(params).await { + match self.get_dashboard_with_http_info(dashboard_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -762,13 +651,10 @@ impl DashboardsAPI { /// Get a dashboard using the specified ID. pub async fn get_dashboard_with_http_info( &self, - params: GetDashboardParams, + dashboard_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let dashboard_id = params.dashboard_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -821,10 +707,10 @@ impl DashboardsAPI { /// Fetch an existing shared dashboard's sharing metadata associated with the specified token. pub async fn get_public_dashboard( &self, - params: GetPublicDashboardParams, + token: String, ) -> Result, Error> { - match self.get_public_dashboard_with_http_info(params).await { + match self.get_public_dashboard_with_http_info(token).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -833,16 +719,13 @@ impl DashboardsAPI { /// Fetch an existing shared dashboard's sharing metadata associated with the specified token. pub async fn get_public_dashboard_with_http_info( &self, - params: GetPublicDashboardParams, + token: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let token = params.token; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -896,13 +779,14 @@ impl DashboardsAPI { /// Describe the invitations that exist for the given shared dashboard (paginated). pub async fn get_public_dashboard_invitations( &self, - params: GetPublicDashboardInvitationsParams, + token: String, + params: GetPublicDashboardInvitationsOptionalParams, ) -> Result< Option, Error, > { match self - .get_public_dashboard_invitations_with_http_info(params) + .get_public_dashboard_invitations_with_http_info(token, params) .await { Ok(response_content) => Ok(response_content.entity), @@ -913,15 +797,15 @@ impl DashboardsAPI { /// Describe the invitations that exist for the given shared dashboard (paginated). pub async fn get_public_dashboard_invitations_with_http_info( &self, - params: GetPublicDashboardInvitationsParams, + token: String, + params: GetPublicDashboardInvitationsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let token = params.token; + // unbox and build optional parameters let page_size = params.page_size; let page_number = params.page_number; @@ -935,11 +819,13 @@ impl DashboardsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page_size", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page_size", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_number { - local_req_builder = local_req_builder.query(&[("page_number", &local_str.to_string())]); + if let Some(ref local_query_param) = page_number { + local_req_builder = + local_req_builder.query(&[("page_number", &local_query_param.to_string())]); }; // build user agent @@ -988,7 +874,7 @@ impl DashboardsAPI { /// This query will not return preset dashboards. pub async fn list_dashboards( &self, - params: ListDashboardsParams, + params: ListDashboardsOptionalParams, ) -> Result, Error> { match self.list_dashboards_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -1002,14 +888,14 @@ impl DashboardsAPI { /// This query will not return preset dashboards. pub async fn list_dashboards_with_http_info( &self, - params: ListDashboardsParams, + params: ListDashboardsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let filter_shared = params.filter_shared; let filter_deleted = params.filter_deleted; let count = params.count; @@ -1021,19 +907,21 @@ impl DashboardsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = filter_shared { + if let Some(ref local_query_param) = filter_shared { local_req_builder = - local_req_builder.query(&[("filter[shared]", &local_str.to_string())]); + local_req_builder.query(&[("filter[shared]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_deleted { + if let Some(ref local_query_param) = filter_deleted { local_req_builder = - local_req_builder.query(&[("filter[deleted]", &local_str.to_string())]); + local_req_builder.query(&[("filter[deleted]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = count { - local_req_builder = local_req_builder.query(&[("count", &local_str.to_string())]); + if let Some(ref local_query_param) = count { + local_req_builder = + local_req_builder.query(&[("count", &local_query_param.to_string())]); }; - if let Some(ref local_str) = start { - local_req_builder = local_req_builder.query(&[("start", &local_str.to_string())]); + if let Some(ref local_query_param) = start { + local_req_builder = + local_req_builder.query(&[("start", &local_query_param.to_string())]); }; // build user agent @@ -1079,9 +967,9 @@ impl DashboardsAPI { /// Restore dashboards using the specified IDs. If there are any failures, no dashboards will be restored (partial success is not allowed). pub async fn restore_dashboards( &self, - params: RestoreDashboardsParams, + body: crate::datadogV1::model::DashboardRestoreRequest, ) -> Result, Error> { - match self.restore_dashboards_with_http_info(params).await { + match self.restore_dashboards_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1090,13 +978,10 @@ impl DashboardsAPI { /// Restore dashboards using the specified IDs. If there are any failures, no dashboards will be restored (partial success is not allowed). pub async fn restore_dashboards_with_http_info( &self, - params: RestoreDashboardsParams, + body: crate::datadogV1::model::DashboardRestoreRequest, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/dashboard", local_configuration.base_path); @@ -1151,13 +1036,14 @@ impl DashboardsAPI { /// Send emails to specified email addresses containing links to access a given authenticated shared dashboard. Email addresses must already belong to the authenticated shared dashboard's share_list. pub async fn send_public_dashboard_invitation( &self, - params: SendPublicDashboardInvitationParams, + token: String, + body: crate::datadogV1::model::SharedDashboardInvites, ) -> Result< Option, Error, > { match self - .send_public_dashboard_invitation_with_http_info(params) + .send_public_dashboard_invitation_with_http_info(token, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -1168,17 +1054,14 @@ impl DashboardsAPI { /// Send emails to specified email addresses containing links to access a given authenticated shared dashboard. Email addresses must already belong to the authenticated shared dashboard's share_list. pub async fn send_public_dashboard_invitation_with_http_info( &self, - params: SendPublicDashboardInvitationParams, + token: String, + body: crate::datadogV1::model::SharedDashboardInvites, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let token = params.token; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1239,9 +1122,13 @@ impl DashboardsAPI { /// Update a dashboard using the specified ID. pub async fn update_dashboard( &self, - params: UpdateDashboardParams, + dashboard_id: String, + body: crate::datadogV1::model::Dashboard, ) -> Result, Error> { - match self.update_dashboard_with_http_info(params).await { + match self + .update_dashboard_with_http_info(dashboard_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1250,15 +1137,12 @@ impl DashboardsAPI { /// Update a dashboard using the specified ID. pub async fn update_dashboard_with_http_info( &self, - params: UpdateDashboardParams, + dashboard_id: String, + body: crate::datadogV1::model::Dashboard, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let dashboard_id = params.dashboard_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1319,10 +1203,14 @@ impl DashboardsAPI { /// Update a shared dashboard associated with the specified token. pub async fn update_public_dashboard( &self, - params: UpdatePublicDashboardParams, + token: String, + body: crate::datadogV1::model::SharedDashboardUpdateRequest, ) -> Result, Error> { - match self.update_public_dashboard_with_http_info(params).await { + match self + .update_public_dashboard_with_http_info(token, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1331,17 +1219,14 @@ impl DashboardsAPI { /// Update a shared dashboard associated with the specified token. pub async fn update_public_dashboard_with_http_info( &self, - params: UpdatePublicDashboardParams, + token: String, + body: crate::datadogV1::model::SharedDashboardUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let token = params.token; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV1/api/api_downtimes.rs b/src/datadogV1/api/api_downtimes.rs index 31eb33361..ff1fe24e1 100644 --- a/src/datadogV1/api/api_downtimes.rs +++ b/src/datadogV1/api/api_downtimes.rs @@ -5,59 +5,15 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CancelDowntimeParams is a struct for passing parameters to the method [`DowntimesAPI::cancel_downtime`] +/// ListDowntimesOptionalParams is a struct for passing parameters to the method [`DowntimesAPI::list_downtimes`] #[derive(Clone, Debug)] -pub struct CancelDowntimeParams { - /// ID of the downtime to cancel. - pub downtime_id: i64, -} - -/// CancelDowntimesByScopeParams is a struct for passing parameters to the method [`DowntimesAPI::cancel_downtimes_by_scope`] -#[derive(Clone, Debug)] -pub struct CancelDowntimesByScopeParams { - /// Scope to cancel downtimes for. - pub body: crate::datadogV1::model::CancelDowntimesByScopeRequest, -} - -/// CreateDowntimeParams is a struct for passing parameters to the method [`DowntimesAPI::create_downtime`] -#[derive(Clone, Debug)] -pub struct CreateDowntimeParams { - /// Schedule a downtime request body. - pub body: crate::datadogV1::model::Downtime, -} - -/// GetDowntimeParams is a struct for passing parameters to the method [`DowntimesAPI::get_downtime`] -#[derive(Clone, Debug)] -pub struct GetDowntimeParams { - /// ID of the downtime to fetch. - pub downtime_id: i64, -} - -/// ListDowntimesParams is a struct for passing parameters to the method [`DowntimesAPI::list_downtimes`] -#[derive(Clone, Debug)] -pub struct ListDowntimesParams { +pub struct ListDowntimesOptionalParams { /// Only return downtimes that are active when the request is made. pub current_only: Option, /// Return creator information. pub with_creator: Option, } -/// ListMonitorDowntimesParams is a struct for passing parameters to the method [`DowntimesAPI::list_monitor_downtimes`] -#[derive(Clone, Debug)] -pub struct ListMonitorDowntimesParams { - /// The id of the monitor - pub monitor_id: i64, -} - -/// UpdateDowntimeParams is a struct for passing parameters to the method [`DowntimesAPI::update_downtime`] -#[derive(Clone, Debug)] -pub struct UpdateDowntimeParams { - /// ID of the downtime to update. - pub downtime_id: i64, - /// Update a downtime request body. - pub body: crate::datadogV1::model::Downtime, -} - /// CancelDowntimeError is a struct for typed errors of method [`DowntimesAPI::cancel_downtime`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -153,9 +109,9 @@ impl DowntimesAPI { /// Cancel a downtime. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn cancel_downtime( &self, - params: CancelDowntimeParams, + downtime_id: i64, ) -> Result, Error> { - match self.cancel_downtime_with_http_info(params).await { + match self.cancel_downtime_with_http_info(downtime_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -164,13 +120,10 @@ impl DowntimesAPI { /// Cancel a downtime. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn cancel_downtime_with_http_info( &self, - params: CancelDowntimeParams, + downtime_id: i64, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let downtime_id = params.downtime_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -222,12 +175,12 @@ impl DowntimesAPI { /// Delete all downtimes that match the scope of `X`. **Note:** This only interacts with Downtimes created using v1 endpoints. This endpoint has been deprecated and will not be replaced. Please use v2 endpoints to find and cancel downtimes. pub async fn cancel_downtimes_by_scope( &self, - params: CancelDowntimesByScopeParams, + body: crate::datadogV1::model::CancelDowntimesByScopeRequest, ) -> Result< Option, Error, > { - match self.cancel_downtimes_by_scope_with_http_info(params).await { + match self.cancel_downtimes_by_scope_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -236,16 +189,13 @@ impl DowntimesAPI { /// Delete all downtimes that match the scope of `X`. **Note:** This only interacts with Downtimes created using v1 endpoints. This endpoint has been deprecated and will not be replaced. Please use v2 endpoints to find and cancel downtimes. pub async fn cancel_downtimes_by_scope_with_http_info( &self, - params: CancelDowntimesByScopeParams, + body: crate::datadogV1::model::CancelDowntimesByScopeRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -305,9 +255,9 @@ impl DowntimesAPI { /// Schedule a downtime. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn create_downtime( &self, - params: CreateDowntimeParams, + body: crate::datadogV1::model::Downtime, ) -> Result, Error> { - match self.create_downtime_with_http_info(params).await { + match self.create_downtime_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -316,14 +266,11 @@ impl DowntimesAPI { /// Schedule a downtime. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn create_downtime_with_http_info( &self, - params: CreateDowntimeParams, + body: crate::datadogV1::model::Downtime, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/downtime", local_configuration.base_path); @@ -380,9 +327,9 @@ impl DowntimesAPI { /// Get downtime detail by `downtime_id`. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn get_downtime( &self, - params: GetDowntimeParams, + downtime_id: i64, ) -> Result, Error> { - match self.get_downtime_with_http_info(params).await { + match self.get_downtime_with_http_info(downtime_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -391,13 +338,10 @@ impl DowntimesAPI { /// Get downtime detail by `downtime_id`. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn get_downtime_with_http_info( &self, - params: GetDowntimeParams, + downtime_id: i64, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let downtime_id = params.downtime_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -450,7 +394,7 @@ impl DowntimesAPI { /// Get all scheduled downtimes. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn list_downtimes( &self, - params: ListDowntimesParams, + params: ListDowntimesOptionalParams, ) -> Result>, Error> { match self.list_downtimes_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -461,12 +405,12 @@ impl DowntimesAPI { /// Get all scheduled downtimes. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn list_downtimes_with_http_info( &self, - params: ListDowntimesParams, + params: ListDowntimesOptionalParams, ) -> Result>, Error> { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let current_only = params.current_only; let with_creator = params.with_creator; @@ -476,13 +420,13 @@ impl DowntimesAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = current_only { + if let Some(ref local_query_param) = current_only { local_req_builder = - local_req_builder.query(&[("current_only", &local_str.to_string())]); + local_req_builder.query(&[("current_only", &local_query_param.to_string())]); }; - if let Some(ref local_str) = with_creator { + if let Some(ref local_query_param) = with_creator { local_req_builder = - local_req_builder.query(&[("with_creator", &local_str.to_string())]); + local_req_builder.query(&[("with_creator", &local_query_param.to_string())]); }; // build user agent @@ -528,10 +472,10 @@ impl DowntimesAPI { /// Get all active v1 downtimes for the specified monitor. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn list_monitor_downtimes( &self, - params: ListMonitorDowntimesParams, + monitor_id: i64, ) -> Result>, Error> { - match self.list_monitor_downtimes_with_http_info(params).await { + match self.list_monitor_downtimes_with_http_info(monitor_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -540,16 +484,13 @@ impl DowntimesAPI { /// Get all active v1 downtimes for the specified monitor. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn list_monitor_downtimes_with_http_info( &self, - params: ListMonitorDowntimesParams, + monitor_id: i64, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let monitor_id = params.monitor_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -603,9 +544,10 @@ impl DowntimesAPI { /// Update a single downtime by `downtime_id`. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn update_downtime( &self, - params: UpdateDowntimeParams, + downtime_id: i64, + body: crate::datadogV1::model::Downtime, ) -> Result, Error> { - match self.update_downtime_with_http_info(params).await { + match self.update_downtime_with_http_info(downtime_id, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -614,15 +556,12 @@ impl DowntimesAPI { /// Update a single downtime by `downtime_id`. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn update_downtime_with_http_info( &self, - params: UpdateDowntimeParams, + downtime_id: i64, + body: crate::datadogV1::model::Downtime, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let downtime_id = params.downtime_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV1/api/api_events.rs b/src/datadogV1/api/api_events.rs index 6d8580a52..ed47a8c88 100644 --- a/src/datadogV1/api/api_events.rs +++ b/src/datadogV1/api/api_events.rs @@ -5,27 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateEventParams is a struct for passing parameters to the method [`EventsAPI::create_event`] +/// ListEventsOptionalParams is a struct for passing parameters to the method [`EventsAPI::list_events`] #[derive(Clone, Debug)] -pub struct CreateEventParams { - /// Event request object - pub body: crate::datadogV1::model::EventCreateRequest, -} - -/// GetEventParams is a struct for passing parameters to the method [`EventsAPI::get_event`] -#[derive(Clone, Debug)] -pub struct GetEventParams { - /// The ID of the event. - pub event_id: i64, -} - -/// ListEventsParams is a struct for passing parameters to the method [`EventsAPI::list_events`] -#[derive(Clone, Debug)] -pub struct ListEventsParams { - /// POSIX timestamp. - pub start: i64, - /// POSIX timestamp. - pub end: i64, +pub struct ListEventsOptionalParams { /// Priority of your events, either `low` or `normal`. pub priority: Option, /// A comma separated string of sources. @@ -98,9 +80,9 @@ impl EventsAPI { /// Tag them, set priority and event aggregate them with other events. pub async fn create_event( &self, - params: CreateEventParams, + body: crate::datadogV1::model::EventCreateRequest, ) -> Result, Error> { - match self.create_event_with_http_info(params).await { + match self.create_event_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -110,16 +92,13 @@ impl EventsAPI { /// Tag them, set priority and event aggregate them with other events. pub async fn create_event_with_http_info( &self, - params: CreateEventParams, + body: crate::datadogV1::model::EventCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/events", local_configuration.base_path); @@ -175,9 +154,9 @@ impl EventsAPI { /// you may see characters such as `%`,`\`,`n` in your output. pub async fn get_event( &self, - params: GetEventParams, + event_id: i64, ) -> Result, Error> { - match self.get_event_with_http_info(params).await { + match self.get_event_with_http_info(event_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -189,13 +168,10 @@ impl EventsAPI { /// you may see characters such as `%`,`\`,`n` in your output. pub async fn get_event_with_http_info( &self, - params: GetEventParams, + event_id: i64, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let event_id = params.event_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -256,9 +232,11 @@ impl EventsAPI { /// paginate the results. You can also use the page parameter to specify which set of `1000` results to return. pub async fn list_events( &self, - params: ListEventsParams, + start: i64, + end: i64, + params: ListEventsOptionalParams, ) -> Result, Error> { - match self.list_events_with_http_info(params).await { + match self.list_events_with_http_info(start, end, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -275,14 +253,14 @@ impl EventsAPI { /// paginate the results. You can also use the page parameter to specify which set of `1000` results to return. pub async fn list_events_with_http_info( &self, - params: ListEventsParams, + start: i64, + end: i64, + params: ListEventsOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let start = params.start; - let end = params.end; + // unbox and build optional parameters let priority = params.priority; let sources = params.sources; let tags = params.tags; @@ -298,25 +276,29 @@ impl EventsAPI { local_req_builder = local_req_builder.query(&[("start", &start.to_string())]); local_req_builder = local_req_builder.query(&[("end", &end.to_string())]); - if let Some(ref local_str) = priority { - local_req_builder = local_req_builder.query(&[("priority", &local_str.to_string())]); + if let Some(ref local_query_param) = priority { + local_req_builder = + local_req_builder.query(&[("priority", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sources { - local_req_builder = local_req_builder.query(&[("sources", &local_str.to_string())]); + if let Some(ref local_query_param) = sources { + local_req_builder = + local_req_builder.query(&[("sources", &local_query_param.to_string())]); }; - if let Some(ref local_str) = tags { - local_req_builder = local_req_builder.query(&[("tags", &local_str.to_string())]); + if let Some(ref local_query_param) = tags { + local_req_builder = + local_req_builder.query(&[("tags", &local_query_param.to_string())]); }; - if let Some(ref local_str) = unaggregated { + if let Some(ref local_query_param) = unaggregated { local_req_builder = - local_req_builder.query(&[("unaggregated", &local_str.to_string())]); + local_req_builder.query(&[("unaggregated", &local_query_param.to_string())]); }; - if let Some(ref local_str) = exclude_aggregate { + if let Some(ref local_query_param) = exclude_aggregate { local_req_builder = - local_req_builder.query(&[("exclude_aggregate", &local_str.to_string())]); + local_req_builder.query(&[("exclude_aggregate", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page { - local_req_builder = local_req_builder.query(&[("page", &local_str.to_string())]); + if let Some(ref local_query_param) = page { + local_req_builder = + local_req_builder.query(&[("page", &local_query_param.to_string())]); }; // build user agent diff --git a/src/datadogV1/api/api_gcp_integration.rs b/src/datadogV1/api/api_gcp_integration.rs index 15baa82d7..cd5863009 100644 --- a/src/datadogV1/api/api_gcp_integration.rs +++ b/src/datadogV1/api/api_gcp_integration.rs @@ -5,27 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateGCPIntegrationParams is a struct for passing parameters to the method [`GCPIntegrationAPI::create_gcp_integration`] -#[derive(Clone, Debug)] -pub struct CreateGCPIntegrationParams { - /// Create a Datadog-GCP integration. - pub body: crate::datadogV1::model::GCPAccount, -} - -/// DeleteGCPIntegrationParams is a struct for passing parameters to the method [`GCPIntegrationAPI::delete_gcp_integration`] -#[derive(Clone, Debug)] -pub struct DeleteGCPIntegrationParams { - /// Delete a given Datadog-GCP integration. - pub body: crate::datadogV1::model::GCPAccount, -} - -/// UpdateGCPIntegrationParams is a struct for passing parameters to the method [`GCPIntegrationAPI::update_gcp_integration`] -#[derive(Clone, Debug)] -pub struct UpdateGCPIntegrationParams { - /// Update a Datadog-GCP integration. - pub body: crate::datadogV1::model::GCPAccount, -} - /// CreateGCPIntegrationError is a struct for typed errors of method [`GCPIntegrationAPI::create_gcp_integration`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -90,12 +69,12 @@ impl GCPIntegrationAPI { /// This endpoint is deprecated – use the V2 endpoints instead. Create a Datadog-GCP integration. pub async fn create_gcp_integration( &self, - params: CreateGCPIntegrationParams, + body: crate::datadogV1::model::GCPAccount, ) -> Result< Option>, Error, > { - match self.create_gcp_integration_with_http_info(params).await { + match self.create_gcp_integration_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -104,16 +83,13 @@ impl GCPIntegrationAPI { /// This endpoint is deprecated – use the V2 endpoints instead. Create a Datadog-GCP integration. pub async fn create_gcp_integration_with_http_info( &self, - params: CreateGCPIntegrationParams, + body: crate::datadogV1::model::GCPAccount, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/integration/gcp", local_configuration.base_path); @@ -170,12 +146,12 @@ impl GCPIntegrationAPI { /// This endpoint is deprecated – use the V2 endpoints instead. Delete a given Datadog-GCP integration. pub async fn delete_gcp_integration( &self, - params: DeleteGCPIntegrationParams, + body: crate::datadogV1::model::GCPAccount, ) -> Result< Option>, Error, > { - match self.delete_gcp_integration_with_http_info(params).await { + match self.delete_gcp_integration_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -184,16 +160,13 @@ impl GCPIntegrationAPI { /// This endpoint is deprecated – use the V2 endpoints instead. Delete a given Datadog-GCP integration. pub async fn delete_gcp_integration_with_http_info( &self, - params: DeleteGCPIntegrationParams, + body: crate::datadogV1::model::GCPAccount, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/integration/gcp", local_configuration.base_path); @@ -267,8 +240,6 @@ impl GCPIntegrationAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/integration/gcp", local_configuration.base_path); @@ -321,12 +292,12 @@ impl GCPIntegrationAPI { /// The unspecified fields will keep their original values. pub async fn update_gcp_integration( &self, - params: UpdateGCPIntegrationParams, + body: crate::datadogV1::model::GCPAccount, ) -> Result< Option>, Error, > { - match self.update_gcp_integration_with_http_info(params).await { + match self.update_gcp_integration_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -338,16 +309,13 @@ impl GCPIntegrationAPI { /// The unspecified fields will keep their original values. pub async fn update_gcp_integration_with_http_info( &self, - params: UpdateGCPIntegrationParams, + body: crate::datadogV1::model::GCPAccount, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/integration/gcp", local_configuration.base_path); diff --git a/src/datadogV1/api/api_hosts.rs b/src/datadogV1/api/api_hosts.rs index 9b82109a5..cd5e4c84e 100644 --- a/src/datadogV1/api/api_hosts.rs +++ b/src/datadogV1/api/api_hosts.rs @@ -5,16 +5,16 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// GetHostTotalsParams is a struct for passing parameters to the method [`HostsAPI::get_host_totals`] +/// GetHostTotalsOptionalParams is a struct for passing parameters to the method [`HostsAPI::get_host_totals`] #[derive(Clone, Debug)] -pub struct GetHostTotalsParams { +pub struct GetHostTotalsOptionalParams { /// Number of seconds from which you want to get total number of active hosts. pub from: Option, } -/// ListHostsParams is a struct for passing parameters to the method [`HostsAPI::list_hosts`] +/// ListHostsOptionalParams is a struct for passing parameters to the method [`HostsAPI::list_hosts`] #[derive(Clone, Debug)] -pub struct ListHostsParams { +pub struct ListHostsOptionalParams { /// String to filter search results. pub filter: Option, /// Sort hosts by this field. @@ -33,22 +33,6 @@ pub struct ListHostsParams { pub include_hosts_metadata: Option, } -/// MuteHostParams is a struct for passing parameters to the method [`HostsAPI::mute_host`] -#[derive(Clone, Debug)] -pub struct MuteHostParams { - /// Name of the host to mute. - pub host_name: String, - /// Mute a host request body. - pub body: crate::datadogV1::model::HostMuteSettings, -} - -/// UnmuteHostParams is a struct for passing parameters to the method [`HostsAPI::unmute_host`] -#[derive(Clone, Debug)] -pub struct UnmuteHostParams { - /// Name of the host to unmute. - pub host_name: String, -} - /// GetHostTotalsError is a struct for typed errors of method [`HostsAPI::get_host_totals`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -114,7 +98,7 @@ impl HostsAPI { /// Active means the host has reported in the past hour, and up means it has reported in the past two hours. pub async fn get_host_totals( &self, - params: GetHostTotalsParams, + params: GetHostTotalsOptionalParams, ) -> Result, Error> { match self.get_host_totals_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -126,12 +110,12 @@ impl HostsAPI { /// Active means the host has reported in the past hour, and up means it has reported in the past two hours. pub async fn get_host_totals_with_http_info( &self, - params: GetHostTotalsParams, + params: GetHostTotalsOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let from = params.from; let local_client = &local_configuration.client; @@ -140,8 +124,9 @@ impl HostsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = from { - local_req_builder = local_req_builder.query(&[("from", &local_str.to_string())]); + if let Some(ref local_query_param) = from { + local_req_builder = + local_req_builder.query(&[("from", &local_query_param.to_string())]); }; // build user agent @@ -190,7 +175,7 @@ impl HostsAPI { /// Results are paginated with a max of 1000 results at a time. pub async fn list_hosts( &self, - params: ListHostsParams, + params: ListHostsOptionalParams, ) -> Result, Error> { match self.list_hosts_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -204,12 +189,12 @@ impl HostsAPI { /// Results are paginated with a max of 1000 results at a time. pub async fn list_hosts_with_http_info( &self, - params: ListHostsParams, + params: ListHostsOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let filter = params.filter; let sort_field = params.sort_field; let sort_dir = params.sort_dir; @@ -225,31 +210,37 @@ impl HostsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = filter { - local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); - }; - if let Some(ref local_str) = sort_field { - local_req_builder = local_req_builder.query(&[("sort_field", &local_str.to_string())]); - }; - if let Some(ref local_str) = sort_dir { - local_req_builder = local_req_builder.query(&[("sort_dir", &local_str.to_string())]); + if let Some(ref local_query_param) = filter { + local_req_builder = + local_req_builder.query(&[("filter", &local_query_param.to_string())]); }; - if let Some(ref local_str) = start { - local_req_builder = local_req_builder.query(&[("start", &local_str.to_string())]); + if let Some(ref local_query_param) = sort_field { + local_req_builder = + local_req_builder.query(&[("sort_field", &local_query_param.to_string())]); }; - if let Some(ref local_str) = count { - local_req_builder = local_req_builder.query(&[("count", &local_str.to_string())]); + if let Some(ref local_query_param) = sort_dir { + local_req_builder = + local_req_builder.query(&[("sort_dir", &local_query_param.to_string())]); }; - if let Some(ref local_str) = from { - local_req_builder = local_req_builder.query(&[("from", &local_str.to_string())]); + if let Some(ref local_query_param) = start { + local_req_builder = + local_req_builder.query(&[("start", &local_query_param.to_string())]); }; - if let Some(ref local_str) = include_muted_hosts_data { + if let Some(ref local_query_param) = count { local_req_builder = - local_req_builder.query(&[("include_muted_hosts_data", &local_str.to_string())]); + local_req_builder.query(&[("count", &local_query_param.to_string())]); }; - if let Some(ref local_str) = include_hosts_metadata { + if let Some(ref local_query_param) = from { local_req_builder = - local_req_builder.query(&[("include_hosts_metadata", &local_str.to_string())]); + local_req_builder.query(&[("from", &local_query_param.to_string())]); + }; + if let Some(ref local_query_param) = include_muted_hosts_data { + local_req_builder = local_req_builder + .query(&[("include_muted_hosts_data", &local_query_param.to_string())]); + }; + if let Some(ref local_query_param) = include_hosts_metadata { + local_req_builder = local_req_builder + .query(&[("include_hosts_metadata", &local_query_param.to_string())]); }; // build user agent @@ -294,9 +285,10 @@ impl HostsAPI { /// Mute a host. **Note:** This creates a [Downtime V2]() for the host. pub async fn mute_host( &self, - params: MuteHostParams, + host_name: String, + body: crate::datadogV1::model::HostMuteSettings, ) -> Result, Error> { - match self.mute_host_with_http_info(params).await { + match self.mute_host_with_http_info(host_name, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -305,15 +297,12 @@ impl HostsAPI { /// Mute a host. **Note:** This creates a [Downtime V2]() for the host. pub async fn mute_host_with_http_info( &self, - params: MuteHostParams, + host_name: String, + body: crate::datadogV1::model::HostMuteSettings, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let host_name = params.host_name; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -373,9 +362,9 @@ impl HostsAPI { /// Unmutes a host. This endpoint takes no JSON arguments. pub async fn unmute_host( &self, - params: UnmuteHostParams, + host_name: String, ) -> Result, Error> { - match self.unmute_host_with_http_info(params).await { + match self.unmute_host_with_http_info(host_name).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -384,14 +373,11 @@ impl HostsAPI { /// Unmutes a host. This endpoint takes no JSON arguments. pub async fn unmute_host_with_http_info( &self, - params: UnmuteHostParams, + host_name: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let host_name = params.host_name; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV1/api/api_ip_ranges.rs b/src/datadogV1/api/api_ip_ranges.rs index 2fb42983c..d3817a912 100644 --- a/src/datadogV1/api/api_ip_ranges.rs +++ b/src/datadogV1/api/api_ip_ranges.rs @@ -50,8 +50,6 @@ impl IPRangesAPI { ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!("{}/", local_configuration.base_path); diff --git a/src/datadogV1/api/api_key_management.rs b/src/datadogV1/api/api_key_management.rs index a878a2422..660c4701b 100644 --- a/src/datadogV1/api/api_key_management.rs +++ b/src/datadogV1/api/api_key_management.rs @@ -5,62 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateAPIKeyParams is a struct for passing parameters to the method [`KeyManagementAPI::create_api_key`] -#[derive(Clone, Debug)] -pub struct CreateAPIKeyParams { - pub body: crate::datadogV1::model::ApiKey, -} - -/// CreateApplicationKeyParams is a struct for passing parameters to the method [`KeyManagementAPI::create_application_key`] -#[derive(Clone, Debug)] -pub struct CreateApplicationKeyParams { - pub body: crate::datadogV1::model::ApplicationKey, -} - -/// DeleteAPIKeyParams is a struct for passing parameters to the method [`KeyManagementAPI::delete_api_key`] -#[derive(Clone, Debug)] -pub struct DeleteAPIKeyParams { - /// The specific API key you are working with. - pub key: String, -} - -/// DeleteApplicationKeyParams is a struct for passing parameters to the method [`KeyManagementAPI::delete_application_key`] -#[derive(Clone, Debug)] -pub struct DeleteApplicationKeyParams { - /// The specific APP key you are working with. - pub key: String, -} - -/// GetAPIKeyParams is a struct for passing parameters to the method [`KeyManagementAPI::get_api_key`] -#[derive(Clone, Debug)] -pub struct GetAPIKeyParams { - /// The specific API key you are working with. - pub key: String, -} - -/// GetApplicationKeyParams is a struct for passing parameters to the method [`KeyManagementAPI::get_application_key`] -#[derive(Clone, Debug)] -pub struct GetApplicationKeyParams { - /// The specific APP key you are working with. - pub key: String, -} - -/// UpdateAPIKeyParams is a struct for passing parameters to the method [`KeyManagementAPI::update_api_key`] -#[derive(Clone, Debug)] -pub struct UpdateAPIKeyParams { - /// The specific API key you are working with. - pub key: String, - pub body: crate::datadogV1::model::ApiKey, -} - -/// UpdateApplicationKeyParams is a struct for passing parameters to the method [`KeyManagementAPI::update_application_key`] -#[derive(Clone, Debug)] -pub struct UpdateApplicationKeyParams { - /// The specific APP key you are working with. - pub key: String, - pub body: crate::datadogV1::model::ApplicationKey, -} - /// CreateAPIKeyError is a struct for typed errors of method [`KeyManagementAPI::create_api_key`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -188,9 +132,9 @@ impl KeyManagementAPI { /// Creates an API key with a given name. pub async fn create_api_key( &self, - params: CreateAPIKeyParams, + body: crate::datadogV1::model::ApiKey, ) -> Result, Error> { - match self.create_api_key_with_http_info(params).await { + match self.create_api_key_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -199,14 +143,11 @@ impl KeyManagementAPI { /// Creates an API key with a given name. pub async fn create_api_key_with_http_info( &self, - params: CreateAPIKeyParams, + body: crate::datadogV1::model::ApiKey, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/api_key", local_configuration.base_path); @@ -262,12 +203,12 @@ impl KeyManagementAPI { /// Create an application key with a given name. pub async fn create_application_key( &self, - params: CreateApplicationKeyParams, + body: crate::datadogV1::model::ApplicationKey, ) -> Result< Option, Error, > { - match self.create_application_key_with_http_info(params).await { + match self.create_application_key_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -276,16 +217,13 @@ impl KeyManagementAPI { /// Create an application key with a given name. pub async fn create_application_key_with_http_info( &self, - params: CreateApplicationKeyParams, + body: crate::datadogV1::model::ApplicationKey, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/application_key", local_configuration.base_path); @@ -342,9 +280,9 @@ impl KeyManagementAPI { /// Delete a given API key. pub async fn delete_api_key( &self, - params: DeleteAPIKeyParams, + key: String, ) -> Result, Error> { - match self.delete_api_key_with_http_info(params).await { + match self.delete_api_key_with_http_info(key).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -353,14 +291,11 @@ impl KeyManagementAPI { /// Delete a given API key. pub async fn delete_api_key_with_http_info( &self, - params: DeleteAPIKeyParams, + key: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let key = params.key; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -413,12 +348,12 @@ impl KeyManagementAPI { /// Delete a given application key. pub async fn delete_application_key( &self, - params: DeleteApplicationKeyParams, + key: String, ) -> Result< Option, Error, > { - match self.delete_application_key_with_http_info(params).await { + match self.delete_application_key_with_http_info(key).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -427,16 +362,13 @@ impl KeyManagementAPI { /// Delete a given application key. pub async fn delete_application_key_with_http_info( &self, - params: DeleteApplicationKeyParams, + key: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let key = params.key; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -490,9 +422,9 @@ impl KeyManagementAPI { /// Get a given API key. pub async fn get_api_key( &self, - params: GetAPIKeyParams, + key: String, ) -> Result, Error> { - match self.get_api_key_with_http_info(params).await { + match self.get_api_key_with_http_info(key).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -501,14 +433,11 @@ impl KeyManagementAPI { /// Get a given API key. pub async fn get_api_key_with_http_info( &self, - params: GetAPIKeyParams, + key: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let key = params.key; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -561,12 +490,12 @@ impl KeyManagementAPI { /// Get a given application key. pub async fn get_application_key( &self, - params: GetApplicationKeyParams, + key: String, ) -> Result< Option, Error, > { - match self.get_application_key_with_http_info(params).await { + match self.get_application_key_with_http_info(key).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -575,16 +504,13 @@ impl KeyManagementAPI { /// Get a given application key. pub async fn get_application_key_with_http_info( &self, - params: GetApplicationKeyParams, + key: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let key = params.key; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -652,8 +578,6 @@ impl KeyManagementAPI { { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/api_key", local_configuration.base_path); @@ -721,8 +645,6 @@ impl KeyManagementAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/application_key", local_configuration.base_path); @@ -772,9 +694,10 @@ impl KeyManagementAPI { /// Edit an API key name. pub async fn update_api_key( &self, - params: UpdateAPIKeyParams, + key: String, + body: crate::datadogV1::model::ApiKey, ) -> Result, Error> { - match self.update_api_key_with_http_info(params).await { + match self.update_api_key_with_http_info(key, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -783,15 +706,12 @@ impl KeyManagementAPI { /// Edit an API key name. pub async fn update_api_key_with_http_info( &self, - params: UpdateAPIKeyParams, + key: String, + body: crate::datadogV1::model::ApiKey, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let key = params.key; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -851,12 +771,13 @@ impl KeyManagementAPI { /// Edit an application key name. pub async fn update_application_key( &self, - params: UpdateApplicationKeyParams, + key: String, + body: crate::datadogV1::model::ApplicationKey, ) -> Result< Option, Error, > { - match self.update_application_key_with_http_info(params).await { + match self.update_application_key_with_http_info(key, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -865,17 +786,14 @@ impl KeyManagementAPI { /// Edit an application key name. pub async fn update_application_key_with_http_info( &self, - params: UpdateApplicationKeyParams, + key: String, + body: crate::datadogV1::model::ApplicationKey, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let key = params.key; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV1/api/api_logs.rs b/src/datadogV1/api/api_logs.rs index da18a3f1d..7b721d503 100644 --- a/src/datadogV1/api/api_logs.rs +++ b/src/datadogV1/api/api_logs.rs @@ -5,18 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// ListLogsParams is a struct for passing parameters to the method [`LogsAPI::list_logs`] +/// SubmitLogOptionalParams is a struct for passing parameters to the method [`LogsAPI::submit_log`] #[derive(Clone, Debug)] -pub struct ListLogsParams { - /// Logs filter - pub body: crate::datadogV1::model::LogsListRequest, -} - -/// SubmitLogParams is a struct for passing parameters to the method [`LogsAPI::submit_log`] -#[derive(Clone, Debug)] -pub struct SubmitLogParams { - /// Log to send (JSON format). - pub body: Vec, +pub struct SubmitLogOptionalParams { /// HTTP header used to compress the media-type. pub content_encoding: Option, /// Log tags can be passed as query parameters with `text/plain` content type. @@ -74,9 +65,9 @@ impl LogsAPI { /// [2]: pub async fn list_logs( &self, - params: ListLogsParams, + body: crate::datadogV1::model::LogsListRequest, ) -> Result, Error> { - match self.list_logs_with_http_info(params).await { + match self.list_logs_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -93,14 +84,11 @@ impl LogsAPI { /// [2]: pub async fn list_logs_with_http_info( &self, - params: ListLogsParams, + body: crate::datadogV1::model::LogsListRequest, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/logs-queries/list", local_configuration.base_path); @@ -174,10 +162,11 @@ impl LogsAPI { /// - 5xx: Internal error, request should be retried after some time pub async fn submit_log( &self, - params: SubmitLogParams, + body: Vec, + params: SubmitLogOptionalParams, ) -> Result>, Error> { - match self.submit_log_with_http_info(params).await { + match self.submit_log_with_http_info(body, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -204,15 +193,15 @@ impl LogsAPI { /// - 5xx: Internal error, request should be retried after some time pub async fn submit_log_with_http_info( &self, - params: SubmitLogParams, + body: Vec, + params: SubmitLogOptionalParams, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; + // unbox and build optional parameters let content_encoding = params.content_encoding; let ddtags = params.ddtags; @@ -222,8 +211,9 @@ impl LogsAPI { let mut local_req_builder = local_client.request(reqwest::Method::POST, local_uri_str.as_str()); - if let Some(ref local_str) = ddtags { - local_req_builder = local_req_builder.query(&[("ddtags", &local_str.to_string())]); + if let Some(ref local_query_param) = ddtags { + local_req_builder = + local_req_builder.query(&[("ddtags", &local_query_param.to_string())]); }; if let Some(ref local) = content_encoding { diff --git a/src/datadogV1/api/api_logs_indexes.rs b/src/datadogV1/api/api_logs_indexes.rs index 900b3a44b..829577013 100644 --- a/src/datadogV1/api/api_logs_indexes.rs +++ b/src/datadogV1/api/api_logs_indexes.rs @@ -5,36 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateLogsIndexParams is a struct for passing parameters to the method [`LogsIndexesAPI::create_logs_index`] -#[derive(Clone, Debug)] -pub struct CreateLogsIndexParams { - /// Object containing the new index. - pub body: crate::datadogV1::model::LogsIndex, -} - -/// GetLogsIndexParams is a struct for passing parameters to the method [`LogsIndexesAPI::get_logs_index`] -#[derive(Clone, Debug)] -pub struct GetLogsIndexParams { - /// Name of the log index. - pub name: String, -} - -/// UpdateLogsIndexParams is a struct for passing parameters to the method [`LogsIndexesAPI::update_logs_index`] -#[derive(Clone, Debug)] -pub struct UpdateLogsIndexParams { - /// Name of the log index. - pub name: String, - /// Object containing the new `LogsIndexUpdateRequest`. - pub body: crate::datadogV1::model::LogsIndexUpdateRequest, -} - -/// UpdateLogsIndexOrderParams is a struct for passing parameters to the method [`LogsIndexesAPI::update_logs_index_order`] -#[derive(Clone, Debug)] -pub struct UpdateLogsIndexOrderParams { - /// Object containing the new ordered list of index names - pub body: crate::datadogV1::model::LogsIndexesOrder, -} - /// CreateLogsIndexError is a struct for typed errors of method [`LogsIndexesAPI::create_logs_index`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -117,9 +87,9 @@ impl LogsIndexesAPI { /// Creates a new index. Returns the Index object passed in the request body when the request is successful. pub async fn create_logs_index( &self, - params: CreateLogsIndexParams, + body: crate::datadogV1::model::LogsIndex, ) -> Result, Error> { - match self.create_logs_index_with_http_info(params).await { + match self.create_logs_index_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -128,14 +98,11 @@ impl LogsIndexesAPI { /// Creates a new index. Returns the Index object passed in the request body when the request is successful. pub async fn create_logs_index_with_http_info( &self, - params: CreateLogsIndexParams, + body: crate::datadogV1::model::LogsIndex, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -195,9 +162,9 @@ impl LogsIndexesAPI { /// Get one log index from your organization. This endpoint takes no JSON arguments. pub async fn get_logs_index( &self, - params: GetLogsIndexParams, + name: String, ) -> Result, Error> { - match self.get_logs_index_with_http_info(params).await { + match self.get_logs_index_with_http_info(name).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -206,13 +173,10 @@ impl LogsIndexesAPI { /// Get one log index from your organization. This endpoint takes no JSON arguments. pub async fn get_logs_index_with_http_info( &self, - params: GetLogsIndexParams, + name: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let name = params.name; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -282,8 +246,6 @@ impl LogsIndexesAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -355,8 +317,6 @@ impl LogsIndexesAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -413,9 +373,10 @@ impl LogsIndexesAPI { /// your current configuration with the new one sent to your Datadog organization. pub async fn update_logs_index( &self, - params: UpdateLogsIndexParams, + name: String, + body: crate::datadogV1::model::LogsIndexUpdateRequest, ) -> Result, Error> { - match self.update_logs_index_with_http_info(params).await { + match self.update_logs_index_with_http_info(name, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -428,15 +389,12 @@ impl LogsIndexesAPI { /// your current configuration with the new one sent to your Datadog organization. pub async fn update_logs_index_with_http_info( &self, - params: UpdateLogsIndexParams, + name: String, + body: crate::datadogV1::model::LogsIndexUpdateRequest, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let name = params.name; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -498,10 +456,10 @@ impl LogsIndexesAPI { /// It returns the index order object passed in the request body when the request is successful. pub async fn update_logs_index_order( &self, - params: UpdateLogsIndexOrderParams, + body: crate::datadogV1::model::LogsIndexesOrder, ) -> Result, Error> { - match self.update_logs_index_order_with_http_info(params).await { + match self.update_logs_index_order_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -511,16 +469,13 @@ impl LogsIndexesAPI { /// It returns the index order object passed in the request body when the request is successful. pub async fn update_logs_index_order_with_http_info( &self, - params: UpdateLogsIndexOrderParams, + body: crate::datadogV1::model::LogsIndexesOrder, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV1/api/api_logs_pipelines.rs b/src/datadogV1/api/api_logs_pipelines.rs index b5469cf1c..9408c0b6c 100644 --- a/src/datadogV1/api/api_logs_pipelines.rs +++ b/src/datadogV1/api/api_logs_pipelines.rs @@ -5,43 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateLogsPipelineParams is a struct for passing parameters to the method [`LogsPipelinesAPI::create_logs_pipeline`] -#[derive(Clone, Debug)] -pub struct CreateLogsPipelineParams { - /// Definition of the new pipeline. - pub body: crate::datadogV1::model::LogsPipeline, -} - -/// DeleteLogsPipelineParams is a struct for passing parameters to the method [`LogsPipelinesAPI::delete_logs_pipeline`] -#[derive(Clone, Debug)] -pub struct DeleteLogsPipelineParams { - /// ID of the pipeline to delete. - pub pipeline_id: String, -} - -/// GetLogsPipelineParams is a struct for passing parameters to the method [`LogsPipelinesAPI::get_logs_pipeline`] -#[derive(Clone, Debug)] -pub struct GetLogsPipelineParams { - /// ID of the pipeline to get. - pub pipeline_id: String, -} - -/// UpdateLogsPipelineParams is a struct for passing parameters to the method [`LogsPipelinesAPI::update_logs_pipeline`] -#[derive(Clone, Debug)] -pub struct UpdateLogsPipelineParams { - /// ID of the pipeline to delete. - pub pipeline_id: String, - /// New definition of the pipeline. - pub body: crate::datadogV1::model::LogsPipeline, -} - -/// UpdateLogsPipelineOrderParams is a struct for passing parameters to the method [`LogsPipelinesAPI::update_logs_pipeline_order`] -#[derive(Clone, Debug)] -pub struct UpdateLogsPipelineOrderParams { - /// Object containing the new ordered list of pipeline IDs. - pub body: crate::datadogV1::model::LogsPipelinesOrder, -} - /// CreateLogsPipelineError is a struct for typed errors of method [`LogsPipelinesAPI::create_logs_pipeline`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -135,9 +98,9 @@ impl LogsPipelinesAPI { /// Create a pipeline in your organization. pub async fn create_logs_pipeline( &self, - params: CreateLogsPipelineParams, + body: crate::datadogV1::model::LogsPipeline, ) -> Result, Error> { - match self.create_logs_pipeline_with_http_info(params).await { + match self.create_logs_pipeline_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -146,16 +109,13 @@ impl LogsPipelinesAPI { /// Create a pipeline in your organization. pub async fn create_logs_pipeline_with_http_info( &self, - params: CreateLogsPipelineParams, + body: crate::datadogV1::model::LogsPipeline, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -216,9 +176,9 @@ impl LogsPipelinesAPI { /// This endpoint takes no JSON arguments. pub async fn delete_logs_pipeline( &self, - params: DeleteLogsPipelineParams, + pipeline_id: String, ) -> Result, Error> { - match self.delete_logs_pipeline_with_http_info(params).await { + match self.delete_logs_pipeline_with_http_info(pipeline_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -228,13 +188,10 @@ impl LogsPipelinesAPI { /// This endpoint takes no JSON arguments. pub async fn delete_logs_pipeline_with_http_info( &self, - params: DeleteLogsPipelineParams, + pipeline_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let pipeline_id = params.pipeline_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -287,9 +244,9 @@ impl LogsPipelinesAPI { /// This endpoint takes no JSON arguments. pub async fn get_logs_pipeline( &self, - params: GetLogsPipelineParams, + pipeline_id: String, ) -> Result, Error> { - match self.get_logs_pipeline_with_http_info(params).await { + match self.get_logs_pipeline_with_http_info(pipeline_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -299,14 +256,11 @@ impl LogsPipelinesAPI { /// This endpoint takes no JSON arguments. pub async fn get_logs_pipeline_with_http_info( &self, - params: GetLogsPipelineParams, + pipeline_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let pipeline_id = params.pipeline_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -379,8 +333,6 @@ impl LogsPipelinesAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -452,8 +404,6 @@ impl LogsPipelinesAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -509,9 +459,13 @@ impl LogsPipelinesAPI { /// your current configuration with the new one sent to your Datadog organization. pub async fn update_logs_pipeline( &self, - params: UpdateLogsPipelineParams, + pipeline_id: String, + body: crate::datadogV1::model::LogsPipeline, ) -> Result, Error> { - match self.update_logs_pipeline_with_http_info(params).await { + match self + .update_logs_pipeline_with_http_info(pipeline_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -523,17 +477,14 @@ impl LogsPipelinesAPI { /// your current configuration with the new one sent to your Datadog organization. pub async fn update_logs_pipeline_with_http_info( &self, - params: UpdateLogsPipelineParams, + pipeline_id: String, + body: crate::datadogV1::model::LogsPipeline, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let pipeline_id = params.pipeline_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -598,12 +549,12 @@ impl LogsPipelinesAPI { /// with the new one sent to your Datadog organization. pub async fn update_logs_pipeline_order( &self, - params: UpdateLogsPipelineOrderParams, + body: crate::datadogV1::model::LogsPipelinesOrder, ) -> Result< Option, Error, > { - match self.update_logs_pipeline_order_with_http_info(params).await { + match self.update_logs_pipeline_order_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -616,16 +567,13 @@ impl LogsPipelinesAPI { /// with the new one sent to your Datadog organization. pub async fn update_logs_pipeline_order_with_http_info( &self, - params: UpdateLogsPipelineOrderParams, + body: crate::datadogV1::model::LogsPipelinesOrder, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV1/api/api_metrics.rs b/src/datadogV1/api/api_metrics.rs index 39eea0216..052ea8488 100644 --- a/src/datadogV1/api/api_metrics.rs +++ b/src/datadogV1/api/api_metrics.rs @@ -5,18 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// GetMetricMetadataParams is a struct for passing parameters to the method [`MetricsAPI::get_metric_metadata`] +/// ListActiveMetricsOptionalParams is a struct for passing parameters to the method [`MetricsAPI::list_active_metrics`] #[derive(Clone, Debug)] -pub struct GetMetricMetadataParams { - /// Name of the metric for which to get metadata. - pub metric_name: String, -} - -/// ListActiveMetricsParams is a struct for passing parameters to the method [`MetricsAPI::list_active_metrics`] -#[derive(Clone, Debug)] -pub struct ListActiveMetricsParams { - /// Seconds since the Unix epoch. - pub from: i64, +pub struct ListActiveMetricsOptionalParams { /// Hostname for filtering the list of metrics returned. /// If set, metrics retrieved are those with the corresponding hostname tag. pub host: Option, @@ -25,49 +16,20 @@ pub struct ListActiveMetricsParams { pub tag_filter: Option, } -/// ListMetricsParams is a struct for passing parameters to the method [`MetricsAPI::list_metrics`] -#[derive(Clone, Debug)] -pub struct ListMetricsParams { - /// Query string to search metrics upon. Can optionally be prefixed with `metrics:`. - pub q: String, -} - -/// QueryMetricsParams is a struct for passing parameters to the method [`MetricsAPI::query_metrics`] -#[derive(Clone, Debug)] -pub struct QueryMetricsParams { - /// Start of the queried time period, seconds since the Unix epoch. - pub from: i64, - /// End of the queried time period, seconds since the Unix epoch. - pub to: i64, - /// Query string. - pub query: String, -} - -/// SubmitDistributionPointsParams is a struct for passing parameters to the method [`MetricsAPI::submit_distribution_points`] +/// SubmitDistributionPointsOptionalParams is a struct for passing parameters to the method [`MetricsAPI::submit_distribution_points`] #[derive(Clone, Debug)] -pub struct SubmitDistributionPointsParams { - pub body: crate::datadogV1::model::DistributionPointsPayload, +pub struct SubmitDistributionPointsOptionalParams { /// HTTP header used to compress the media-type. pub content_encoding: Option, } -/// SubmitMetricsParams is a struct for passing parameters to the method [`MetricsAPI::submit_metrics`] +/// SubmitMetricsOptionalParams is a struct for passing parameters to the method [`MetricsAPI::submit_metrics`] #[derive(Clone, Debug)] -pub struct SubmitMetricsParams { - pub body: crate::datadogV1::model::MetricsPayload, +pub struct SubmitMetricsOptionalParams { /// HTTP header used to compress the media-type. pub content_encoding: Option, } -/// UpdateMetricMetadataParams is a struct for passing parameters to the method [`MetricsAPI::update_metric_metadata`] -#[derive(Clone, Debug)] -pub struct UpdateMetricMetadataParams { - /// Name of the metric for which to edit metadata. - pub metric_name: String, - /// New metadata. - pub body: crate::datadogV1::model::MetricMetadata, -} - /// GetMetricMetadataError is a struct for typed errors of method [`MetricsAPI::get_metric_metadata`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -167,10 +129,10 @@ impl MetricsAPI { /// Get metadata about a specific metric. pub async fn get_metric_metadata( &self, - params: GetMetricMetadataParams, + metric_name: String, ) -> Result, Error> { - match self.get_metric_metadata_with_http_info(params).await { + match self.get_metric_metadata_with_http_info(metric_name).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -179,16 +141,13 @@ impl MetricsAPI { /// Get metadata about a specific metric. pub async fn get_metric_metadata_with_http_info( &self, - params: GetMetricMetadataParams, + metric_name: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let metric_name = params.metric_name; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -242,10 +201,11 @@ impl MetricsAPI { /// Get the list of actively reporting metrics from a given time until now. pub async fn list_active_metrics( &self, - params: ListActiveMetricsParams, + from: i64, + params: ListActiveMetricsOptionalParams, ) -> Result, Error> { - match self.list_active_metrics_with_http_info(params).await { + match self.list_active_metrics_with_http_info(from, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -254,15 +214,15 @@ impl MetricsAPI { /// Get the list of actively reporting metrics from a given time until now. pub async fn list_active_metrics_with_http_info( &self, - params: ListActiveMetricsParams, + from: i64, + params: ListActiveMetricsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let from = params.from; + // unbox and build optional parameters let host = params.host; let tag_filter = params.tag_filter; @@ -273,11 +233,13 @@ impl MetricsAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("from", &from.to_string())]); - if let Some(ref local_str) = host { - local_req_builder = local_req_builder.query(&[("host", &local_str.to_string())]); + if let Some(ref local_query_param) = host { + local_req_builder = + local_req_builder.query(&[("host", &local_query_param.to_string())]); }; - if let Some(ref local_str) = tag_filter { - local_req_builder = local_req_builder.query(&[("tag_filter", &local_str.to_string())]); + if let Some(ref local_query_param) = tag_filter { + local_req_builder = + local_req_builder.query(&[("tag_filter", &local_query_param.to_string())]); }; // build user agent @@ -323,10 +285,10 @@ impl MetricsAPI { /// Search for metrics from the last 24 hours in Datadog. pub async fn list_metrics( &self, - params: ListMetricsParams, + q: String, ) -> Result, Error> { - match self.list_metrics_with_http_info(params).await { + match self.list_metrics_with_http_info(q).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -335,16 +297,13 @@ impl MetricsAPI { /// Search for metrics from the last 24 hours in Datadog. pub async fn list_metrics_with_http_info( &self, - params: ListMetricsParams, + q: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let q = params.q; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/search", local_configuration.base_path); @@ -395,10 +354,12 @@ impl MetricsAPI { /// Query timeseries points. pub async fn query_metrics( &self, - params: QueryMetricsParams, + from: i64, + to: i64, + query: String, ) -> Result, Error> { - match self.query_metrics_with_http_info(params).await { + match self.query_metrics_with_http_info(from, to, query).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -407,18 +368,15 @@ impl MetricsAPI { /// Query timeseries points. pub async fn query_metrics_with_http_info( &self, - params: QueryMetricsParams, + from: i64, + to: i64, + query: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let from = params.from; - let to = params.to; - let query = params.query; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/query", local_configuration.base_path); @@ -471,12 +429,16 @@ impl MetricsAPI { /// The distribution points end-point allows you to post distribution data that can be graphed on Datadog’s dashboards. pub async fn submit_distribution_points( &self, - params: SubmitDistributionPointsParams, + body: crate::datadogV1::model::DistributionPointsPayload, + params: SubmitDistributionPointsOptionalParams, ) -> Result< Option, Error, > { - match self.submit_distribution_points_with_http_info(params).await { + match self + .submit_distribution_points_with_http_info(body, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -485,15 +447,15 @@ impl MetricsAPI { /// The distribution points end-point allows you to post distribution data that can be graphed on Datadog’s dashboards. pub async fn submit_distribution_points_with_http_info( &self, - params: SubmitDistributionPointsParams, + body: crate::datadogV1::model::DistributionPointsPayload, + params: SubmitDistributionPointsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; + // unbox and build optional parameters let content_encoding = params.content_encoding; let local_client = &local_configuration.client; @@ -566,10 +528,11 @@ impl MetricsAPI { /// compression is applied, which reduces the payload size. pub async fn submit_metrics( &self, - params: SubmitMetricsParams, + body: crate::datadogV1::model::MetricsPayload, + params: SubmitMetricsOptionalParams, ) -> Result, Error> { - match self.submit_metrics_with_http_info(params).await { + match self.submit_metrics_with_http_info(body, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -588,15 +551,15 @@ impl MetricsAPI { /// compression is applied, which reduces the payload size. pub async fn submit_metrics_with_http_info( &self, - params: SubmitMetricsParams, + body: crate::datadogV1::model::MetricsPayload, + params: SubmitMetricsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; + // unbox and build optional parameters let content_encoding = params.content_encoding; let local_client = &local_configuration.client; @@ -656,10 +619,14 @@ impl MetricsAPI { /// Edit metadata of a specific metric. Find out more about [supported types](). pub async fn update_metric_metadata( &self, - params: UpdateMetricMetadataParams, + metric_name: String, + body: crate::datadogV1::model::MetricMetadata, ) -> Result, Error> { - match self.update_metric_metadata_with_http_info(params).await { + match self + .update_metric_metadata_with_http_info(metric_name, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -668,17 +635,14 @@ impl MetricsAPI { /// Edit metadata of a specific metric. Find out more about [supported types](). pub async fn update_metric_metadata_with_http_info( &self, - params: UpdateMetricMetadataParams, + metric_name: String, + body: crate::datadogV1::model::MetricMetadata, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let metric_name = params.metric_name; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV1/api/api_monitors.rs b/src/datadogV1/api/api_monitors.rs index 1ca8953f3..a7c396138 100644 --- a/src/datadogV1/api/api_monitors.rs +++ b/src/datadogV1/api/api_monitors.rs @@ -5,43 +5,25 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CheckCanDeleteMonitorParams is a struct for passing parameters to the method [`MonitorsAPI::check_can_delete_monitor`] +/// DeleteMonitorOptionalParams is a struct for passing parameters to the method [`MonitorsAPI::delete_monitor`] #[derive(Clone, Debug)] -pub struct CheckCanDeleteMonitorParams { - /// The IDs of the monitor to check. - pub monitor_ids: Vec, -} - -/// CreateMonitorParams is a struct for passing parameters to the method [`MonitorsAPI::create_monitor`] -#[derive(Clone, Debug)] -pub struct CreateMonitorParams { - /// Create a monitor request body. - pub body: crate::datadogV1::model::Monitor, -} - -/// DeleteMonitorParams is a struct for passing parameters to the method [`MonitorsAPI::delete_monitor`] -#[derive(Clone, Debug)] -pub struct DeleteMonitorParams { - /// The ID of the monitor. - pub monitor_id: i64, +pub struct DeleteMonitorOptionalParams { /// Delete the monitor even if it's referenced by other resources (for example SLO, composite monitor). pub force: Option, } -/// GetMonitorParams is a struct for passing parameters to the method [`MonitorsAPI::get_monitor`] +/// GetMonitorOptionalParams is a struct for passing parameters to the method [`MonitorsAPI::get_monitor`] #[derive(Clone, Debug)] -pub struct GetMonitorParams { - /// The ID of the monitor - pub monitor_id: i64, +pub struct GetMonitorOptionalParams { /// When specified, shows additional information about the group states. Choose one or more from `all`, `alert`, `warn`, and `no data`. pub group_states: Option, /// If this argument is set to true, then the returned data includes all current active downtimes for the monitor. pub with_downtimes: Option, } -/// ListMonitorsParams is a struct for passing parameters to the method [`MonitorsAPI::list_monitors`] +/// ListMonitorsOptionalParams is a struct for passing parameters to the method [`MonitorsAPI::list_monitors`] #[derive(Clone, Debug)] -pub struct ListMonitorsParams { +pub struct ListMonitorsOptionalParams { /// When specified, shows additional information about the group states. /// Choose one or more from `all`, `alert`, `warn`, and `no data`. pub group_states: Option, @@ -63,9 +45,9 @@ pub struct ListMonitorsParams { pub page_size: Option, } -/// SearchMonitorGroupsParams is a struct for passing parameters to the method [`MonitorsAPI::search_monitor_groups`] +/// SearchMonitorGroupsOptionalParams is a struct for passing parameters to the method [`MonitorsAPI::search_monitor_groups`] #[derive(Clone, Debug)] -pub struct SearchMonitorGroupsParams { +pub struct SearchMonitorGroupsOptionalParams { /// After entering a search query in your [Manage Monitor page][1] use the query parameter value in the /// URL of the page as value for this parameter. Consult the dedicated [manage monitor documentation][2] /// page to learn more. @@ -87,9 +69,9 @@ pub struct SearchMonitorGroupsParams { pub sort: Option, } -/// SearchMonitorsParams is a struct for passing parameters to the method [`MonitorsAPI::search_monitors`] +/// SearchMonitorsOptionalParams is a struct for passing parameters to the method [`MonitorsAPI::search_monitors`] #[derive(Clone, Debug)] -pub struct SearchMonitorsParams { +pub struct SearchMonitorsOptionalParams { /// After entering a search query in your [Manage Monitor page][1] use the query parameter value in the /// URL of the page as value for this parameter. Consult the dedicated [manage monitor documentation][2] /// page to learn more. @@ -111,31 +93,6 @@ pub struct SearchMonitorsParams { pub sort: Option, } -/// UpdateMonitorParams is a struct for passing parameters to the method [`MonitorsAPI::update_monitor`] -#[derive(Clone, Debug)] -pub struct UpdateMonitorParams { - /// The ID of the monitor. - pub monitor_id: i64, - /// Edit a monitor request body. - pub body: crate::datadogV1::model::MonitorUpdateRequest, -} - -/// ValidateExistingMonitorParams is a struct for passing parameters to the method [`MonitorsAPI::validate_existing_monitor`] -#[derive(Clone, Debug)] -pub struct ValidateExistingMonitorParams { - /// The ID of the monitor - pub monitor_id: i64, - /// Monitor request object - pub body: crate::datadogV1::model::Monitor, -} - -/// ValidateMonitorParams is a struct for passing parameters to the method [`MonitorsAPI::validate_monitor`] -#[derive(Clone, Debug)] -pub struct ValidateMonitorParams { - /// Monitor request object - pub body: crate::datadogV1::model::Monitor, -} - /// CheckCanDeleteMonitorError is a struct for typed errors of method [`MonitorsAPI::check_can_delete_monitor`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -266,12 +223,15 @@ impl MonitorsAPI { /// Check if the given monitors can be deleted. pub async fn check_can_delete_monitor( &self, - params: CheckCanDeleteMonitorParams, + monitor_ids: Vec, ) -> Result< Option, Error, > { - match self.check_can_delete_monitor_with_http_info(params).await { + match self + .check_can_delete_monitor_with_http_info(monitor_ids) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -280,16 +240,13 @@ impl MonitorsAPI { /// Check if the given monitors can be deleted. pub async fn check_can_delete_monitor_with_http_info( &self, - params: CheckCanDeleteMonitorParams, + monitor_ids: Vec, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let monitor_ids = params.monitor_ids; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -302,7 +259,7 @@ impl MonitorsAPI { local_req_builder = local_req_builder.query(&[( "monitor_ids", &monitor_ids - .into_iter() + .iter() .map(|p| p.to_string()) .collect::>() .join(",") @@ -533,9 +490,9 @@ impl MonitorsAPI { /// **NOTE** Database Monitoring monitors are in alpha on US1. pub async fn create_monitor( &self, - params: CreateMonitorParams, + body: crate::datadogV1::model::Monitor, ) -> Result, Error> { - match self.create_monitor_with_http_info(params).await { + match self.create_monitor_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -725,13 +682,10 @@ impl MonitorsAPI { /// **NOTE** Database Monitoring monitors are in alpha on US1. pub async fn create_monitor_with_http_info( &self, - params: CreateMonitorParams, + body: crate::datadogV1::model::Monitor, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/monitor", local_configuration.base_path); @@ -788,9 +742,10 @@ impl MonitorsAPI { /// Delete the specified monitor pub async fn delete_monitor( &self, - params: DeleteMonitorParams, + monitor_id: i64, + params: DeleteMonitorOptionalParams, ) -> Result, Error> { - match self.delete_monitor_with_http_info(params).await { + match self.delete_monitor_with_http_info(monitor_id, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -799,13 +754,13 @@ impl MonitorsAPI { /// Delete the specified monitor pub async fn delete_monitor_with_http_info( &self, - params: DeleteMonitorParams, + monitor_id: i64, + params: DeleteMonitorOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let monitor_id = params.monitor_id; + // unbox and build optional parameters let force = params.force; let local_client = &local_configuration.client; @@ -818,8 +773,9 @@ impl MonitorsAPI { let mut local_req_builder = local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); - if let Some(ref local_str) = force { - local_req_builder = local_req_builder.query(&[("force", &local_str.to_string())]); + if let Some(ref local_query_param) = force { + local_req_builder = + local_req_builder.query(&[("force", &local_query_param.to_string())]); }; // build user agent @@ -865,9 +821,10 @@ impl MonitorsAPI { /// Get details about the specified monitor from your organization. pub async fn get_monitor( &self, - params: GetMonitorParams, + monitor_id: i64, + params: GetMonitorOptionalParams, ) -> Result, Error> { - match self.get_monitor_with_http_info(params).await { + match self.get_monitor_with_http_info(monitor_id, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -876,12 +833,12 @@ impl MonitorsAPI { /// Get details about the specified monitor from your organization. pub async fn get_monitor_with_http_info( &self, - params: GetMonitorParams, + monitor_id: i64, + params: GetMonitorOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let monitor_id = params.monitor_id; + // unbox and build optional parameters let group_states = params.group_states; let with_downtimes = params.with_downtimes; @@ -895,13 +852,13 @@ impl MonitorsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = group_states { + if let Some(ref local_query_param) = group_states { local_req_builder = - local_req_builder.query(&[("group_states", &local_str.to_string())]); + local_req_builder.query(&[("group_states", &local_query_param.to_string())]); }; - if let Some(ref local_str) = with_downtimes { + if let Some(ref local_query_param) = with_downtimes { local_req_builder = - local_req_builder.query(&[("with_downtimes", &local_str.to_string())]); + local_req_builder.query(&[("with_downtimes", &local_query_param.to_string())]); }; // build user agent @@ -946,7 +903,7 @@ impl MonitorsAPI { /// Get details about the specified monitor from your organization. pub async fn list_monitors( &self, - params: ListMonitorsParams, + params: ListMonitorsOptionalParams, ) -> Result>, Error> { match self.list_monitors_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -957,12 +914,12 @@ impl MonitorsAPI { /// Get details about the specified monitor from your organization. pub async fn list_monitors_with_http_info( &self, - params: ListMonitorsParams, + params: ListMonitorsOptionalParams, ) -> Result>, Error> { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let group_states = params.group_states; let name = params.name; let tags = params.tags; @@ -978,32 +935,37 @@ impl MonitorsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = group_states { + if let Some(ref local_query_param) = group_states { local_req_builder = - local_req_builder.query(&[("group_states", &local_str.to_string())]); + local_req_builder.query(&[("group_states", &local_query_param.to_string())]); }; - if let Some(ref local_str) = name { - local_req_builder = local_req_builder.query(&[("name", &local_str.to_string())]); + if let Some(ref local_query_param) = name { + local_req_builder = + local_req_builder.query(&[("name", &local_query_param.to_string())]); }; - if let Some(ref local_str) = tags { - local_req_builder = local_req_builder.query(&[("tags", &local_str.to_string())]); + if let Some(ref local_query_param) = tags { + local_req_builder = + local_req_builder.query(&[("tags", &local_query_param.to_string())]); }; - if let Some(ref local_str) = monitor_tags { + if let Some(ref local_query_param) = monitor_tags { local_req_builder = - local_req_builder.query(&[("monitor_tags", &local_str.to_string())]); + local_req_builder.query(&[("monitor_tags", &local_query_param.to_string())]); }; - if let Some(ref local_str) = with_downtimes { + if let Some(ref local_query_param) = with_downtimes { local_req_builder = - local_req_builder.query(&[("with_downtimes", &local_str.to_string())]); + local_req_builder.query(&[("with_downtimes", &local_query_param.to_string())]); }; - if let Some(ref local_str) = id_offset { - local_req_builder = local_req_builder.query(&[("id_offset", &local_str.to_string())]); + if let Some(ref local_query_param) = id_offset { + local_req_builder = + local_req_builder.query(&[("id_offset", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page { - local_req_builder = local_req_builder.query(&[("page", &local_str.to_string())]); + if let Some(ref local_query_param) = page { + local_req_builder = + local_req_builder.query(&[("page", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page_size", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page_size", &local_query_param.to_string())]); }; // build user agent @@ -1048,7 +1010,7 @@ impl MonitorsAPI { /// Search and filter your monitor groups details. pub async fn search_monitor_groups( &self, - params: SearchMonitorGroupsParams, + params: SearchMonitorGroupsOptionalParams, ) -> Result< Option, Error, @@ -1062,14 +1024,14 @@ impl MonitorsAPI { /// Search and filter your monitor groups details. pub async fn search_monitor_groups_with_http_info( &self, - params: SearchMonitorGroupsParams, + params: SearchMonitorGroupsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let query = params.query; let page = params.page; let per_page = params.per_page; @@ -1084,17 +1046,21 @@ impl MonitorsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = query { - local_req_builder = local_req_builder.query(&[("query", &local_str.to_string())]); + if let Some(ref local_query_param) = query { + local_req_builder = + local_req_builder.query(&[("query", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page { - local_req_builder = local_req_builder.query(&[("page", &local_str.to_string())]); + if let Some(ref local_query_param) = page { + local_req_builder = + local_req_builder.query(&[("page", &local_query_param.to_string())]); }; - if let Some(ref local_str) = per_page { - local_req_builder = local_req_builder.query(&[("per_page", &local_str.to_string())]); + if let Some(ref local_query_param) = per_page { + local_req_builder = + local_req_builder.query(&[("per_page", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; // build user agent @@ -1140,7 +1106,7 @@ impl MonitorsAPI { /// Search and filter your monitors details. pub async fn search_monitors( &self, - params: SearchMonitorsParams, + params: SearchMonitorsOptionalParams, ) -> Result, Error> { match self.search_monitors_with_http_info(params).await { @@ -1152,14 +1118,14 @@ impl MonitorsAPI { /// Search and filter your monitors details. pub async fn search_monitors_with_http_info( &self, - params: SearchMonitorsParams, + params: SearchMonitorsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let query = params.query; let page = params.page; let per_page = params.per_page; @@ -1171,17 +1137,21 @@ impl MonitorsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = query { - local_req_builder = local_req_builder.query(&[("query", &local_str.to_string())]); + if let Some(ref local_query_param) = query { + local_req_builder = + local_req_builder.query(&[("query", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page { - local_req_builder = local_req_builder.query(&[("page", &local_str.to_string())]); + if let Some(ref local_query_param) = page { + local_req_builder = + local_req_builder.query(&[("page", &local_query_param.to_string())]); }; - if let Some(ref local_str) = per_page { - local_req_builder = local_req_builder.query(&[("per_page", &local_str.to_string())]); + if let Some(ref local_query_param) = per_page { + local_req_builder = + local_req_builder.query(&[("per_page", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; // build user agent @@ -1227,9 +1197,10 @@ impl MonitorsAPI { /// Edit the specified monitor. pub async fn update_monitor( &self, - params: UpdateMonitorParams, + monitor_id: i64, + body: crate::datadogV1::model::MonitorUpdateRequest, ) -> Result, Error> { - match self.update_monitor_with_http_info(params).await { + match self.update_monitor_with_http_info(monitor_id, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1238,14 +1209,11 @@ impl MonitorsAPI { /// Edit the specified monitor. pub async fn update_monitor_with_http_info( &self, - params: UpdateMonitorParams, + monitor_id: i64, + body: crate::datadogV1::model::MonitorUpdateRequest, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let monitor_id = params.monitor_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1306,12 +1274,16 @@ impl MonitorsAPI { /// Validate the monitor provided in the request. pub async fn validate_existing_monitor( &self, - params: ValidateExistingMonitorParams, + monitor_id: i64, + body: crate::datadogV1::model::Monitor, ) -> Result< Option>, Error, > { - match self.validate_existing_monitor_with_http_info(params).await { + match self + .validate_existing_monitor_with_http_info(monitor_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1320,17 +1292,14 @@ impl MonitorsAPI { /// Validate the monitor provided in the request. pub async fn validate_existing_monitor_with_http_info( &self, - params: ValidateExistingMonitorParams, + monitor_id: i64, + body: crate::datadogV1::model::Monitor, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let monitor_id = params.monitor_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1393,12 +1362,12 @@ impl MonitorsAPI { /// **Note**: Log monitors require an unscoped App Key. pub async fn validate_monitor( &self, - params: ValidateMonitorParams, + body: crate::datadogV1::model::Monitor, ) -> Result< Option>, Error, > { - match self.validate_monitor_with_http_info(params).await { + match self.validate_monitor_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1409,16 +1378,13 @@ impl MonitorsAPI { /// **Note**: Log monitors require an unscoped App Key. pub async fn validate_monitor_with_http_info( &self, - params: ValidateMonitorParams, + body: crate::datadogV1::model::Monitor, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/monitor/validate", local_configuration.base_path); diff --git a/src/datadogV1/api/api_notebooks.rs b/src/datadogV1/api/api_notebooks.rs index 39bc75cd9..daddff68b 100644 --- a/src/datadogV1/api/api_notebooks.rs +++ b/src/datadogV1/api/api_notebooks.rs @@ -5,30 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateNotebookParams is a struct for passing parameters to the method [`NotebooksAPI::create_notebook`] +/// ListNotebooksOptionalParams is a struct for passing parameters to the method [`NotebooksAPI::list_notebooks`] #[derive(Clone, Debug)] -pub struct CreateNotebookParams { - /// The JSON description of the notebook you want to create. - pub body: crate::datadogV1::model::NotebookCreateRequest, -} - -/// DeleteNotebookParams is a struct for passing parameters to the method [`NotebooksAPI::delete_notebook`] -#[derive(Clone, Debug)] -pub struct DeleteNotebookParams { - /// Unique ID, assigned when you create the notebook. - pub notebook_id: i64, -} - -/// GetNotebookParams is a struct for passing parameters to the method [`NotebooksAPI::get_notebook`] -#[derive(Clone, Debug)] -pub struct GetNotebookParams { - /// Unique ID, assigned when you create the notebook. - pub notebook_id: i64, -} - -/// ListNotebooksParams is a struct for passing parameters to the method [`NotebooksAPI::list_notebooks`] -#[derive(Clone, Debug)] -pub struct ListNotebooksParams { +pub struct ListNotebooksOptionalParams { /// Return notebooks created by the given `author_handle`. pub author_handle: Option, /// Return notebooks not created by the given `author_handle`. @@ -51,15 +30,6 @@ pub struct ListNotebooksParams { pub type_: Option, } -/// UpdateNotebookParams is a struct for passing parameters to the method [`NotebooksAPI::update_notebook`] -#[derive(Clone, Debug)] -pub struct UpdateNotebookParams { - /// Unique ID, assigned when you create the notebook. - pub notebook_id: i64, - /// Update notebook request body. - pub body: crate::datadogV1::model::NotebookUpdateRequest, -} - /// CreateNotebookError is a struct for typed errors of method [`NotebooksAPI::create_notebook`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -138,9 +108,9 @@ impl NotebooksAPI { /// Create a notebook using the specified options. pub async fn create_notebook( &self, - params: CreateNotebookParams, + body: crate::datadogV1::model::NotebookCreateRequest, ) -> Result, Error> { - match self.create_notebook_with_http_info(params).await { + match self.create_notebook_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -149,16 +119,13 @@ impl NotebooksAPI { /// Create a notebook using the specified options. pub async fn create_notebook_with_http_info( &self, - params: CreateNotebookParams, + body: crate::datadogV1::model::NotebookCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/notebooks", local_configuration.base_path); @@ -215,9 +182,9 @@ impl NotebooksAPI { /// Delete a notebook using the specified ID. pub async fn delete_notebook( &self, - params: DeleteNotebookParams, + notebook_id: i64, ) -> Result, Error> { - match self.delete_notebook_with_http_info(params).await { + match self.delete_notebook_with_http_info(notebook_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -226,13 +193,10 @@ impl NotebooksAPI { /// Delete a notebook using the specified ID. pub async fn delete_notebook_with_http_info( &self, - params: DeleteNotebookParams, + notebook_id: i64, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let notebook_id = params.notebook_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -284,9 +248,9 @@ impl NotebooksAPI { /// Get a notebook using the specified notebook ID. pub async fn get_notebook( &self, - params: GetNotebookParams, + notebook_id: i64, ) -> Result, Error> { - match self.get_notebook_with_http_info(params).await { + match self.get_notebook_with_http_info(notebook_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -295,14 +259,11 @@ impl NotebooksAPI { /// Get a notebook using the specified notebook ID. pub async fn get_notebook_with_http_info( &self, - params: GetNotebookParams, + notebook_id: i64, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let notebook_id = params.notebook_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -356,7 +317,7 @@ impl NotebooksAPI { /// `name` or author `handle`. pub async fn list_notebooks( &self, - params: ListNotebooksParams, + params: ListNotebooksOptionalParams, ) -> Result, Error> { match self.list_notebooks_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -368,14 +329,14 @@ impl NotebooksAPI { /// `name` or author `handle`. pub async fn list_notebooks_with_http_info( &self, - params: ListNotebooksParams, + params: ListNotebooksOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let author_handle = params.author_handle; let exclude_author_handle = params.exclude_author_handle; let start = params.start; @@ -393,38 +354,45 @@ impl NotebooksAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = author_handle { + if let Some(ref local_query_param) = author_handle { local_req_builder = - local_req_builder.query(&[("author_handle", &local_str.to_string())]); + local_req_builder.query(&[("author_handle", &local_query_param.to_string())]); }; - if let Some(ref local_str) = exclude_author_handle { - local_req_builder = - local_req_builder.query(&[("exclude_author_handle", &local_str.to_string())]); + if let Some(ref local_query_param) = exclude_author_handle { + local_req_builder = local_req_builder + .query(&[("exclude_author_handle", &local_query_param.to_string())]); }; - if let Some(ref local_str) = start { - local_req_builder = local_req_builder.query(&[("start", &local_str.to_string())]); + if let Some(ref local_query_param) = start { + local_req_builder = + local_req_builder.query(&[("start", &local_query_param.to_string())]); }; - if let Some(ref local_str) = count { - local_req_builder = local_req_builder.query(&[("count", &local_str.to_string())]); + if let Some(ref local_query_param) = count { + local_req_builder = + local_req_builder.query(&[("count", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort_field { - local_req_builder = local_req_builder.query(&[("sort_field", &local_str.to_string())]); + if let Some(ref local_query_param) = sort_field { + local_req_builder = + local_req_builder.query(&[("sort_field", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort_dir { - local_req_builder = local_req_builder.query(&[("sort_dir", &local_str.to_string())]); + if let Some(ref local_query_param) = sort_dir { + local_req_builder = + local_req_builder.query(&[("sort_dir", &local_query_param.to_string())]); }; - if let Some(ref local_str) = query { - local_req_builder = local_req_builder.query(&[("query", &local_str.to_string())]); + if let Some(ref local_query_param) = query { + local_req_builder = + local_req_builder.query(&[("query", &local_query_param.to_string())]); }; - if let Some(ref local_str) = include_cells { + if let Some(ref local_query_param) = include_cells { local_req_builder = - local_req_builder.query(&[("include_cells", &local_str.to_string())]); + local_req_builder.query(&[("include_cells", &local_query_param.to_string())]); }; - if let Some(ref local_str) = is_template { - local_req_builder = local_req_builder.query(&[("is_template", &local_str.to_string())]); + if let Some(ref local_query_param) = is_template { + local_req_builder = + local_req_builder.query(&[("is_template", &local_query_param.to_string())]); }; - if let Some(ref local_str) = type_ { - local_req_builder = local_req_builder.query(&[("type", &local_str.to_string())]); + if let Some(ref local_query_param) = type_ { + local_req_builder = + local_req_builder.query(&[("type", &local_query_param.to_string())]); }; // build user agent @@ -470,9 +438,10 @@ impl NotebooksAPI { /// Update a notebook using the specified ID. pub async fn update_notebook( &self, - params: UpdateNotebookParams, + notebook_id: i64, + body: crate::datadogV1::model::NotebookUpdateRequest, ) -> Result, Error> { - match self.update_notebook_with_http_info(params).await { + match self.update_notebook_with_http_info(notebook_id, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -481,17 +450,14 @@ impl NotebooksAPI { /// Update a notebook using the specified ID. pub async fn update_notebook_with_http_info( &self, - params: UpdateNotebookParams, + notebook_id: i64, + body: crate::datadogV1::model::NotebookUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let notebook_id = params.notebook_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV1/api/api_organizations.rs b/src/datadogV1/api/api_organizations.rs index e0afd0616..629723dfa 100644 --- a/src/datadogV1/api/api_organizations.rs +++ b/src/datadogV1/api/api_organizations.rs @@ -5,44 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateChildOrgParams is a struct for passing parameters to the method [`OrganizationsAPI::create_child_org`] -#[derive(Clone, Debug)] -pub struct CreateChildOrgParams { - /// Organization object that needs to be created - pub body: crate::datadogV1::model::OrganizationCreateBody, -} - -/// DowngradeOrgParams is a struct for passing parameters to the method [`OrganizationsAPI::downgrade_org`] -#[derive(Clone, Debug)] -pub struct DowngradeOrgParams { - /// The `public_id` of the organization you are operating within. - pub public_id: String, -} - -/// GetOrgParams is a struct for passing parameters to the method [`OrganizationsAPI::get_org`] -#[derive(Clone, Debug)] -pub struct GetOrgParams { - /// The `public_id` of the organization you are operating within. - pub public_id: String, -} - -/// UpdateOrgParams is a struct for passing parameters to the method [`OrganizationsAPI::update_org`] -#[derive(Clone, Debug)] -pub struct UpdateOrgParams { - /// The `public_id` of the organization you are operating within. - pub public_id: String, - pub body: crate::datadogV1::model::Organization, -} - -/// UploadIdPForOrgParams is a struct for passing parameters to the method [`OrganizationsAPI::upload_id_p_for_org`] -#[derive(Clone, Debug)] -pub struct UploadIdPForOrgParams { - /// The `public_id` of the organization you are operating with - pub public_id: String, - /// The path to the XML metadata file you wish to upload. - pub idp_file: Vec, -} - /// CreateChildOrgError is a struct for typed errors of method [`OrganizationsAPI::create_child_org`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -136,12 +98,12 @@ impl OrganizationsAPI { /// `application_key.hash` provided in the response. pub async fn create_child_org( &self, - params: CreateChildOrgParams, + body: crate::datadogV1::model::OrganizationCreateBody, ) -> Result< Option, Error, > { - match self.create_child_org_with_http_info(params).await { + match self.create_child_org_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -159,16 +121,13 @@ impl OrganizationsAPI { /// `application_key.hash` provided in the response. pub async fn create_child_org_with_http_info( &self, - params: CreateChildOrgParams, + body: crate::datadogV1::model::OrganizationCreateBody, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/org", local_configuration.base_path); @@ -225,10 +184,10 @@ impl OrganizationsAPI { /// Only available for MSP customers. Removes a child organization from the hierarchy of the master organization and places the child organization on a 30-day trial. pub async fn downgrade_org( &self, - params: DowngradeOrgParams, + public_id: String, ) -> Result, Error> { - match self.downgrade_org_with_http_info(params).await { + match self.downgrade_org_with_http_info(public_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -237,16 +196,13 @@ impl OrganizationsAPI { /// Only available for MSP customers. Removes a child organization from the hierarchy of the master organization and places the child organization on a 30-day trial. pub async fn downgrade_org_with_http_info( &self, - params: DowngradeOrgParams, + public_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let public_id = params.public_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -299,9 +255,9 @@ impl OrganizationsAPI { /// Get organization information. pub async fn get_org( &self, - params: GetOrgParams, + public_id: String, ) -> Result, Error> { - match self.get_org_with_http_info(params).await { + match self.get_org_with_http_info(public_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -310,14 +266,11 @@ impl OrganizationsAPI { /// Get organization information. pub async fn get_org_with_http_info( &self, - params: GetOrgParams, + public_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let public_id = params.public_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -387,8 +340,6 @@ impl OrganizationsAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/org", local_configuration.base_path); @@ -437,9 +388,10 @@ impl OrganizationsAPI { /// Update your organization. pub async fn update_org( &self, - params: UpdateOrgParams, + public_id: String, + body: crate::datadogV1::model::Organization, ) -> Result, Error> { - match self.update_org_with_http_info(params).await { + match self.update_org_with_http_info(public_id, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -448,15 +400,12 @@ impl OrganizationsAPI { /// Update your organization. pub async fn update_org_with_http_info( &self, - params: UpdateOrgParams, + public_id: String, + body: crate::datadogV1::model::Organization, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let public_id = params.public_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -521,9 +470,13 @@ impl OrganizationsAPI { /// * **XML Body:** Post the IdP metadata file as the body of the request. pub async fn upload_id_p_for_org( &self, - params: UploadIdPForOrgParams, + public_id: String, + idp_file: Vec, ) -> Result, Error> { - match self.upload_id_p_for_org_with_http_info(params).await { + match self + .upload_id_p_for_org_with_http_info(public_id, idp_file) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -537,15 +490,12 @@ impl OrganizationsAPI { /// * **XML Body:** Post the IdP metadata file as the body of the request. pub async fn upload_id_p_for_org_with_http_info( &self, - params: UploadIdPForOrgParams, + public_id: String, + idp_file: Vec, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let public_id = params.public_id; - let idp_file = params.idp_file; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV1/api/api_pager_duty_integration.rs b/src/datadogV1/api/api_pager_duty_integration.rs index a6fec61f7..02402dc84 100644 --- a/src/datadogV1/api/api_pager_duty_integration.rs +++ b/src/datadogV1/api/api_pager_duty_integration.rs @@ -5,36 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreatePagerDutyIntegrationServiceParams is a struct for passing parameters to the method [`PagerDutyIntegrationAPI::create_pager_duty_integration_service`] -#[derive(Clone, Debug)] -pub struct CreatePagerDutyIntegrationServiceParams { - /// Create a new service object request body. - pub body: crate::datadogV1::model::PagerDutyService, -} - -/// DeletePagerDutyIntegrationServiceParams is a struct for passing parameters to the method [`PagerDutyIntegrationAPI::delete_pager_duty_integration_service`] -#[derive(Clone, Debug)] -pub struct DeletePagerDutyIntegrationServiceParams { - /// The service name - pub service_name: String, -} - -/// GetPagerDutyIntegrationServiceParams is a struct for passing parameters to the method [`PagerDutyIntegrationAPI::get_pager_duty_integration_service`] -#[derive(Clone, Debug)] -pub struct GetPagerDutyIntegrationServiceParams { - /// The service name. - pub service_name: String, -} - -/// UpdatePagerDutyIntegrationServiceParams is a struct for passing parameters to the method [`PagerDutyIntegrationAPI::update_pager_duty_integration_service`] -#[derive(Clone, Debug)] -pub struct UpdatePagerDutyIntegrationServiceParams { - /// The service name - pub service_name: String, - /// Update an existing service object request body. - pub body: crate::datadogV1::model::PagerDutyServiceKey, -} - /// CreatePagerDutyIntegrationServiceError is a struct for typed errors of method [`PagerDutyIntegrationAPI::create_pager_duty_integration_service`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -100,13 +70,13 @@ impl PagerDutyIntegrationAPI { /// Create a new service object in the PagerDuty integration. pub async fn create_pager_duty_integration_service( &self, - params: CreatePagerDutyIntegrationServiceParams, + body: crate::datadogV1::model::PagerDutyService, ) -> Result< Option, Error, > { match self - .create_pager_duty_integration_service_with_http_info(params) + .create_pager_duty_integration_service_with_http_info(body) .await { Ok(response_content) => Ok(response_content.entity), @@ -117,16 +87,13 @@ impl PagerDutyIntegrationAPI { /// Create a new service object in the PagerDuty integration. pub async fn create_pager_duty_integration_service_with_http_info( &self, - params: CreatePagerDutyIntegrationServiceParams, + body: crate::datadogV1::model::PagerDutyService, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -186,10 +153,10 @@ impl PagerDutyIntegrationAPI { /// Delete a single service object in the Datadog-PagerDuty integration. pub async fn delete_pager_duty_integration_service( &self, - params: DeletePagerDutyIntegrationServiceParams, + service_name: String, ) -> Result, Error> { match self - .delete_pager_duty_integration_service_with_http_info(params) + .delete_pager_duty_integration_service_with_http_info(service_name) .await { Ok(response_content) => Ok(response_content.entity), @@ -200,13 +167,10 @@ impl PagerDutyIntegrationAPI { /// Delete a single service object in the Datadog-PagerDuty integration. pub async fn delete_pager_duty_integration_service_with_http_info( &self, - params: DeletePagerDutyIntegrationServiceParams, + service_name: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let service_name = params.service_name; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -258,13 +222,13 @@ impl PagerDutyIntegrationAPI { /// Get service name in the Datadog-PagerDuty integration. pub async fn get_pager_duty_integration_service( &self, - params: GetPagerDutyIntegrationServiceParams, + service_name: String, ) -> Result< Option, Error, > { match self - .get_pager_duty_integration_service_with_http_info(params) + .get_pager_duty_integration_service_with_http_info(service_name) .await { Ok(response_content) => Ok(response_content.entity), @@ -275,16 +239,13 @@ impl PagerDutyIntegrationAPI { /// Get service name in the Datadog-PagerDuty integration. pub async fn get_pager_duty_integration_service_with_http_info( &self, - params: GetPagerDutyIntegrationServiceParams, + service_name: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let service_name = params.service_name; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -338,10 +299,11 @@ impl PagerDutyIntegrationAPI { /// Update a single service object in the Datadog-PagerDuty integration. pub async fn update_pager_duty_integration_service( &self, - params: UpdatePagerDutyIntegrationServiceParams, + service_name: String, + body: crate::datadogV1::model::PagerDutyServiceKey, ) -> Result, Error> { match self - .update_pager_duty_integration_service_with_http_info(params) + .update_pager_duty_integration_service_with_http_info(service_name, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -352,14 +314,11 @@ impl PagerDutyIntegrationAPI { /// Update a single service object in the Datadog-PagerDuty integration. pub async fn update_pager_duty_integration_service_with_http_info( &self, - params: UpdatePagerDutyIntegrationServiceParams, + service_name: String, + body: crate::datadogV1::model::PagerDutyServiceKey, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let service_name = params.service_name; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV1/api/api_security_monitoring.rs b/src/datadogV1/api/api_security_monitoring.rs index d561d66e1..1700cdddd 100644 --- a/src/datadogV1/api/api_security_monitoring.rs +++ b/src/datadogV1/api/api_security_monitoring.rs @@ -5,33 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// AddSecurityMonitoringSignalToIncidentParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::add_security_monitoring_signal_to_incident`] -#[derive(Clone, Debug)] -pub struct AddSecurityMonitoringSignalToIncidentParams { - /// The ID of the signal. - pub signal_id: String, - /// Attributes describing the signal update. - pub body: crate::datadogV1::model::AddSignalToIncidentRequest, -} - -/// EditSecurityMonitoringSignalAssigneeParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::edit_security_monitoring_signal_assignee`] -#[derive(Clone, Debug)] -pub struct EditSecurityMonitoringSignalAssigneeParams { - /// The ID of the signal. - pub signal_id: String, - /// Attributes describing the signal update. - pub body: crate::datadogV1::model::SignalAssigneeUpdateRequest, -} - -/// EditSecurityMonitoringSignalStateParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::edit_security_monitoring_signal_state`] -#[derive(Clone, Debug)] -pub struct EditSecurityMonitoringSignalStateParams { - /// The ID of the signal. - pub signal_id: String, - /// Attributes describing the signal update. - pub body: crate::datadogV1::model::SignalStateUpdateRequest, -} - /// AddSecurityMonitoringSignalToIncidentError is a struct for typed errors of method [`SecurityMonitoringAPI::add_security_monitoring_signal_to_incident`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -89,13 +62,14 @@ impl SecurityMonitoringAPI { /// Add a security signal to an incident. This makes it possible to search for signals by incident within the signal explorer and to view the signals on the incident timeline. pub async fn add_security_monitoring_signal_to_incident( &self, - params: AddSecurityMonitoringSignalToIncidentParams, + signal_id: String, + body: crate::datadogV1::model::AddSignalToIncidentRequest, ) -> Result< Option, Error, > { match self - .add_security_monitoring_signal_to_incident_with_http_info(params) + .add_security_monitoring_signal_to_incident_with_http_info(signal_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -106,17 +80,14 @@ impl SecurityMonitoringAPI { /// Add a security signal to an incident. This makes it possible to search for signals by incident within the signal explorer and to view the signals on the incident timeline. pub async fn add_security_monitoring_signal_to_incident_with_http_info( &self, - params: AddSecurityMonitoringSignalToIncidentParams, + signal_id: String, + body: crate::datadogV1::model::AddSignalToIncidentRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let signal_id = params.signal_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -177,13 +148,14 @@ impl SecurityMonitoringAPI { /// Modify the triage assignee of a security signal. pub async fn edit_security_monitoring_signal_assignee( &self, - params: EditSecurityMonitoringSignalAssigneeParams, + signal_id: String, + body: crate::datadogV1::model::SignalAssigneeUpdateRequest, ) -> Result< Option, Error, > { match self - .edit_security_monitoring_signal_assignee_with_http_info(params) + .edit_security_monitoring_signal_assignee_with_http_info(signal_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -194,17 +166,14 @@ impl SecurityMonitoringAPI { /// Modify the triage assignee of a security signal. pub async fn edit_security_monitoring_signal_assignee_with_http_info( &self, - params: EditSecurityMonitoringSignalAssigneeParams, + signal_id: String, + body: crate::datadogV1::model::SignalAssigneeUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let signal_id = params.signal_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -265,13 +234,14 @@ impl SecurityMonitoringAPI { /// Change the triage state of a security signal. pub async fn edit_security_monitoring_signal_state( &self, - params: EditSecurityMonitoringSignalStateParams, + signal_id: String, + body: crate::datadogV1::model::SignalStateUpdateRequest, ) -> Result< Option, Error, > { match self - .edit_security_monitoring_signal_state_with_http_info(params) + .edit_security_monitoring_signal_state_with_http_info(signal_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -282,17 +252,14 @@ impl SecurityMonitoringAPI { /// Change the triage state of a security signal. pub async fn edit_security_monitoring_signal_state_with_http_info( &self, - params: EditSecurityMonitoringSignalStateParams, + signal_id: String, + body: crate::datadogV1::model::SignalStateUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let signal_id = params.signal_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV1/api/api_service_checks.rs b/src/datadogV1/api/api_service_checks.rs index a771c096d..0de99830d 100644 --- a/src/datadogV1/api/api_service_checks.rs +++ b/src/datadogV1/api/api_service_checks.rs @@ -5,13 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// SubmitServiceCheckParams is a struct for passing parameters to the method [`ServiceChecksAPI::submit_service_check`] -#[derive(Clone, Debug)] -pub struct SubmitServiceCheckParams { - /// Service Check request body. - pub body: Vec, -} - /// SubmitServiceCheckError is a struct for typed errors of method [`ServiceChecksAPI::submit_service_check`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -52,12 +45,12 @@ impl ServiceChecksAPI { /// - Service checks can be submitted up to 10 minutes in the past. pub async fn submit_service_check( &self, - params: SubmitServiceCheckParams, + body: Vec, ) -> Result< Option, Error, > { - match self.submit_service_check_with_http_info(params).await { + match self.submit_service_check_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -70,16 +63,13 @@ impl ServiceChecksAPI { /// - Service checks can be submitted up to 10 minutes in the past. pub async fn submit_service_check_with_http_info( &self, - params: SubmitServiceCheckParams, + body: Vec, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/check_run", local_configuration.base_path); diff --git a/src/datadogV1/api/api_service_level_objective_corrections.rs b/src/datadogV1/api/api_service_level_objective_corrections.rs index 3a5a5596e..11937bfd1 100644 --- a/src/datadogV1/api/api_service_level_objective_corrections.rs +++ b/src/datadogV1/api/api_service_level_objective_corrections.rs @@ -5,45 +5,15 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateSLOCorrectionParams is a struct for passing parameters to the method [`ServiceLevelObjectiveCorrectionsAPI::create_slo_correction`] +/// ListSLOCorrectionOptionalParams is a struct for passing parameters to the method [`ServiceLevelObjectiveCorrectionsAPI::list_slo_correction`] #[derive(Clone, Debug)] -pub struct CreateSLOCorrectionParams { - /// Create an SLO Correction - pub body: crate::datadogV1::model::SLOCorrectionCreateRequest, -} - -/// DeleteSLOCorrectionParams is a struct for passing parameters to the method [`ServiceLevelObjectiveCorrectionsAPI::delete_slo_correction`] -#[derive(Clone, Debug)] -pub struct DeleteSLOCorrectionParams { - /// The ID of the SLO correction object. - pub slo_correction_id: String, -} - -/// GetSLOCorrectionParams is a struct for passing parameters to the method [`ServiceLevelObjectiveCorrectionsAPI::get_slo_correction`] -#[derive(Clone, Debug)] -pub struct GetSLOCorrectionParams { - /// The ID of the SLO correction object. - pub slo_correction_id: String, -} - -/// ListSLOCorrectionParams is a struct for passing parameters to the method [`ServiceLevelObjectiveCorrectionsAPI::list_slo_correction`] -#[derive(Clone, Debug)] -pub struct ListSLOCorrectionParams { +pub struct ListSLOCorrectionOptionalParams { /// The specific offset to use as the beginning of the returned response. pub offset: Option, /// The number of SLO corrections to return in the response. Default is 25. pub limit: Option, } -/// UpdateSLOCorrectionParams is a struct for passing parameters to the method [`ServiceLevelObjectiveCorrectionsAPI::update_slo_correction`] -#[derive(Clone, Debug)] -pub struct UpdateSLOCorrectionParams { - /// The ID of the SLO correction object. - pub slo_correction_id: String, - /// The edited SLO correction object. - pub body: crate::datadogV1::model::SLOCorrectionUpdateRequest, -} - /// CreateSLOCorrectionError is a struct for typed errors of method [`ServiceLevelObjectiveCorrectionsAPI::create_slo_correction`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -119,12 +89,12 @@ impl ServiceLevelObjectiveCorrectionsAPI { /// Create an SLO Correction. pub async fn create_slo_correction( &self, - params: CreateSLOCorrectionParams, + body: crate::datadogV1::model::SLOCorrectionCreateRequest, ) -> Result< Option, Error, > { - match self.create_slo_correction_with_http_info(params).await { + match self.create_slo_correction_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -133,16 +103,13 @@ impl ServiceLevelObjectiveCorrectionsAPI { /// Create an SLO Correction. pub async fn create_slo_correction_with_http_info( &self, - params: CreateSLOCorrectionParams, + body: crate::datadogV1::model::SLOCorrectionCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/slo/correction", local_configuration.base_path); @@ -199,9 +166,12 @@ impl ServiceLevelObjectiveCorrectionsAPI { /// Permanently delete the specified SLO correction object. pub async fn delete_slo_correction( &self, - params: DeleteSLOCorrectionParams, + slo_correction_id: String, ) -> Result, Error> { - match self.delete_slo_correction_with_http_info(params).await { + match self + .delete_slo_correction_with_http_info(slo_correction_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -210,13 +180,10 @@ impl ServiceLevelObjectiveCorrectionsAPI { /// Permanently delete the specified SLO correction object. pub async fn delete_slo_correction_with_http_info( &self, - params: DeleteSLOCorrectionParams, + slo_correction_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let slo_correction_id = params.slo_correction_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -268,10 +235,13 @@ impl ServiceLevelObjectiveCorrectionsAPI { /// Get an SLO correction. pub async fn get_slo_correction( &self, - params: GetSLOCorrectionParams, + slo_correction_id: String, ) -> Result, Error> { - match self.get_slo_correction_with_http_info(params).await { + match self + .get_slo_correction_with_http_info(slo_correction_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -280,16 +250,13 @@ impl ServiceLevelObjectiveCorrectionsAPI { /// Get an SLO correction. pub async fn get_slo_correction_with_http_info( &self, - params: GetSLOCorrectionParams, + slo_correction_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let slo_correction_id = params.slo_correction_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -343,7 +310,7 @@ impl ServiceLevelObjectiveCorrectionsAPI { /// Get all Service Level Objective corrections. pub async fn list_slo_correction( &self, - params: ListSLOCorrectionParams, + params: ListSLOCorrectionOptionalParams, ) -> Result< Option, Error, @@ -357,14 +324,14 @@ impl ServiceLevelObjectiveCorrectionsAPI { /// Get all Service Level Objective corrections. pub async fn list_slo_correction_with_http_info( &self, - params: ListSLOCorrectionParams, + params: ListSLOCorrectionOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let offset = params.offset; let limit = params.limit; @@ -374,11 +341,13 @@ impl ServiceLevelObjectiveCorrectionsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = offset { - local_req_builder = local_req_builder.query(&[("offset", &local_str.to_string())]); + if let Some(ref local_query_param) = offset { + local_req_builder = + local_req_builder.query(&[("offset", &local_query_param.to_string())]); }; - if let Some(ref local_str) = limit { - local_req_builder = local_req_builder.query(&[("limit", &local_str.to_string())]); + if let Some(ref local_query_param) = limit { + local_req_builder = + local_req_builder.query(&[("limit", &local_query_param.to_string())]); }; // build user agent @@ -424,12 +393,16 @@ impl ServiceLevelObjectiveCorrectionsAPI { /// Update the specified SLO correction object. pub async fn update_slo_correction( &self, - params: UpdateSLOCorrectionParams, + slo_correction_id: String, + body: crate::datadogV1::model::SLOCorrectionUpdateRequest, ) -> Result< Option, Error, > { - match self.update_slo_correction_with_http_info(params).await { + match self + .update_slo_correction_with_http_info(slo_correction_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -438,17 +411,14 @@ impl ServiceLevelObjectiveCorrectionsAPI { /// Update the specified SLO correction object. pub async fn update_slo_correction_with_http_info( &self, - params: UpdateSLOCorrectionParams, + slo_correction_id: String, + body: crate::datadogV1::model::SLOCorrectionUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let slo_correction_id = params.slo_correction_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV1/api/api_service_level_objectives.rs b/src/datadogV1/api/api_service_level_objectives.rs index b79c48a9f..02c8bf73d 100644 --- a/src/datadogV1/api/api_service_level_objectives.rs +++ b/src/datadogV1/api/api_service_level_objectives.rs @@ -5,61 +5,23 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CheckCanDeleteSLOParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::check_can_delete_slo`] +/// DeleteSLOOptionalParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::delete_slo`] #[derive(Clone, Debug)] -pub struct CheckCanDeleteSLOParams { - /// A comma separated list of the IDs of the service level objectives objects. - pub ids: String, -} - -/// CreateSLOParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::create_slo`] -#[derive(Clone, Debug)] -pub struct CreateSLOParams { - /// Service level objective request object. - pub body: crate::datadogV1::model::ServiceLevelObjectiveRequest, -} - -/// DeleteSLOParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::delete_slo`] -#[derive(Clone, Debug)] -pub struct DeleteSLOParams { - /// The ID of the service level objective. - pub slo_id: String, +pub struct DeleteSLOOptionalParams { /// Delete the monitor even if it's referenced by other resources (for example SLO, composite monitor). pub force: Option, } -/// DeleteSLOTimeframeInBulkParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::delete_slo_timeframe_in_bulk`] -#[derive(Clone, Debug)] -pub struct DeleteSLOTimeframeInBulkParams { - /// Delete multiple service level objective objects request body. - pub body: std::collections::BTreeMap>, -} - -/// GetSLOParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::get_slo`] +/// GetSLOOptionalParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::get_slo`] #[derive(Clone, Debug)] -pub struct GetSLOParams { - /// The ID of the service level objective object. - pub slo_id: String, +pub struct GetSLOOptionalParams { /// Get the IDs of SLO monitors that reference this SLO. pub with_configured_alert_ids: Option, } -/// GetSLOCorrectionsParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::get_slo_corrections`] +/// GetSLOHistoryOptionalParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::get_slo_history`] #[derive(Clone, Debug)] -pub struct GetSLOCorrectionsParams { - /// The ID of the service level objective object. - pub slo_id: String, -} - -/// GetSLOHistoryParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::get_slo_history`] -#[derive(Clone, Debug)] -pub struct GetSLOHistoryParams { - /// The ID of the service level objective object. - pub slo_id: String, - /// The `from` timestamp for the query window in epoch seconds. - pub from_ts: i64, - /// The `to` timestamp for the query window in epoch seconds. - pub to_ts: i64, +pub struct GetSLOHistoryOptionalParams { /// The SLO target. If `target` is passed in, the response will include the remaining error budget and a timeframe value of `custom`. pub target: Option, /// Defaults to `true`. If any SLO corrections are applied and this parameter is set to `false`, @@ -67,9 +29,9 @@ pub struct GetSLOHistoryParams { pub apply_correction: Option, } -/// ListSLOsParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::list_sl_os`] +/// ListSLOsOptionalParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::list_sl_os`] #[derive(Clone, Debug)] -pub struct ListSLOsParams { +pub struct ListSLOsOptionalParams { /// A comma separated list of the IDs of the service level objectives objects. pub ids: Option, /// The query string to filter results based on SLO names. @@ -84,9 +46,9 @@ pub struct ListSLOsParams { pub offset: Option, } -/// SearchSLOParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::search_slo`] +/// SearchSLOOptionalParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::search_slo`] #[derive(Clone, Debug)] -pub struct SearchSLOParams { +pub struct SearchSLOOptionalParams { /// The query string to filter results based on SLO names. /// Some examples of queries include `service:` /// and ``. @@ -99,15 +61,6 @@ pub struct SearchSLOParams { pub include_facets: Option, } -/// UpdateSLOParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::update_slo`] -#[derive(Clone, Debug)] -pub struct UpdateSLOParams { - /// The ID of the service level objective object. - pub slo_id: String, - /// The edited service level objective request object. - pub body: crate::datadogV1::model::ServiceLevelObjective, -} - /// CheckCanDeleteSLOError is a struct for typed errors of method [`ServiceLevelObjectivesAPI::check_can_delete_slo`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -239,12 +192,12 @@ impl ServiceLevelObjectivesAPI { /// assure an SLO can be deleted without disrupting a dashboard. pub async fn check_can_delete_slo( &self, - params: CheckCanDeleteSLOParams, + ids: String, ) -> Result< Option, Error, > { - match self.check_can_delete_slo_with_http_info(params).await { + match self.check_can_delete_slo_with_http_info(ids).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -254,16 +207,13 @@ impl ServiceLevelObjectivesAPI { /// assure an SLO can be deleted without disrupting a dashboard. pub async fn check_can_delete_slo_with_http_info( &self, - params: CheckCanDeleteSLOParams, + ids: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let ids = params.ids; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/slo/can_delete", local_configuration.base_path); @@ -315,9 +265,9 @@ impl ServiceLevelObjectivesAPI { /// Create a service level objective object. pub async fn create_slo( &self, - params: CreateSLOParams, + body: crate::datadogV1::model::ServiceLevelObjectiveRequest, ) -> Result, Error> { - match self.create_slo_with_http_info(params).await { + match self.create_slo_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -326,14 +276,11 @@ impl ServiceLevelObjectivesAPI { /// Create a service level objective object. pub async fn create_slo_with_http_info( &self, - params: CreateSLOParams, + body: crate::datadogV1::model::ServiceLevelObjectiveRequest, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/slo", local_configuration.base_path); @@ -392,9 +339,10 @@ impl ServiceLevelObjectivesAPI { /// a 409 conflict error because the SLO is referenced in a dashboard. pub async fn delete_slo( &self, - params: DeleteSLOParams, + slo_id: String, + params: DeleteSLOOptionalParams, ) -> Result, Error> { - match self.delete_slo_with_http_info(params).await { + match self.delete_slo_with_http_info(slo_id, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -406,13 +354,13 @@ impl ServiceLevelObjectivesAPI { /// a 409 conflict error because the SLO is referenced in a dashboard. pub async fn delete_slo_with_http_info( &self, - params: DeleteSLOParams, + slo_id: String, + params: DeleteSLOOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let slo_id = params.slo_id; + // unbox and build optional parameters let force = params.force; let local_client = &local_configuration.client; @@ -425,8 +373,9 @@ impl ServiceLevelObjectivesAPI { let mut local_req_builder = local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); - if let Some(ref local_str) = force { - local_req_builder = local_req_builder.query(&[("force", &local_str.to_string())]); + if let Some(ref local_query_param) = force { + local_req_builder = + local_req_builder.query(&[("force", &local_query_param.to_string())]); }; // build user agent @@ -475,15 +424,12 @@ impl ServiceLevelObjectivesAPI { /// objective object is deleted as well. pub async fn delete_slo_timeframe_in_bulk( &self, - params: DeleteSLOTimeframeInBulkParams, + body: std::collections::BTreeMap>, ) -> Result< Option, Error, > { - match self - .delete_slo_timeframe_in_bulk_with_http_info(params) - .await - { + match self.delete_slo_timeframe_in_bulk_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -496,16 +442,13 @@ impl ServiceLevelObjectivesAPI { /// objective object is deleted as well. pub async fn delete_slo_timeframe_in_bulk_with_http_info( &self, - params: DeleteSLOTimeframeInBulkParams, + body: std::collections::BTreeMap>, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/slo/bulk_delete", local_configuration.base_path); @@ -562,9 +505,10 @@ impl ServiceLevelObjectivesAPI { /// Get a service level objective object. pub async fn get_slo( &self, - params: GetSLOParams, + slo_id: String, + params: GetSLOOptionalParams, ) -> Result, Error> { - match self.get_slo_with_http_info(params).await { + match self.get_slo_with_http_info(slo_id, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -573,12 +517,12 @@ impl ServiceLevelObjectivesAPI { /// Get a service level objective object. pub async fn get_slo_with_http_info( &self, - params: GetSLOParams, + slo_id: String, + params: GetSLOOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let slo_id = params.slo_id; + // unbox and build optional parameters let with_configured_alert_ids = params.with_configured_alert_ids; let local_client = &local_configuration.client; @@ -591,9 +535,9 @@ impl ServiceLevelObjectivesAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = with_configured_alert_ids { - local_req_builder = - local_req_builder.query(&[("with_configured_alert_ids", &local_str.to_string())]); + if let Some(ref local_query_param) = with_configured_alert_ids { + local_req_builder = local_req_builder + .query(&[("with_configured_alert_ids", &local_query_param.to_string())]); }; // build user agent @@ -638,12 +582,12 @@ impl ServiceLevelObjectivesAPI { /// Get corrections applied to an SLO pub async fn get_slo_corrections( &self, - params: GetSLOCorrectionsParams, + slo_id: String, ) -> Result< Option, Error, > { - match self.get_slo_corrections_with_http_info(params).await { + match self.get_slo_corrections_with_http_info(slo_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -652,16 +596,13 @@ impl ServiceLevelObjectivesAPI { /// Get corrections applied to an SLO pub async fn get_slo_corrections_with_http_info( &self, - params: GetSLOCorrectionsParams, + slo_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let slo_id = params.slo_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -722,10 +663,16 @@ impl ServiceLevelObjectivesAPI { /// Examples of both are shown. pub async fn get_slo_history( &self, - params: GetSLOHistoryParams, + slo_id: String, + from_ts: i64, + to_ts: i64, + params: GetSLOHistoryOptionalParams, ) -> Result, Error> { - match self.get_slo_history_with_http_info(params).await { + match self + .get_slo_history_with_http_info(slo_id, from_ts, to_ts, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -741,17 +688,17 @@ impl ServiceLevelObjectivesAPI { /// Examples of both are shown. pub async fn get_slo_history_with_http_info( &self, - params: GetSLOHistoryParams, + slo_id: String, + from_ts: i64, + to_ts: i64, + params: GetSLOHistoryOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let slo_id = params.slo_id; - let from_ts = params.from_ts; - let to_ts = params.to_ts; + // unbox and build optional parameters let target = params.target; let apply_correction = params.apply_correction; @@ -767,12 +714,13 @@ impl ServiceLevelObjectivesAPI { local_req_builder = local_req_builder.query(&[("from_ts", &from_ts.to_string())]); local_req_builder = local_req_builder.query(&[("to_ts", &to_ts.to_string())]); - if let Some(ref local_str) = target { - local_req_builder = local_req_builder.query(&[("target", &local_str.to_string())]); + if let Some(ref local_query_param) = target { + local_req_builder = + local_req_builder.query(&[("target", &local_query_param.to_string())]); }; - if let Some(ref local_str) = apply_correction { + if let Some(ref local_query_param) = apply_correction { local_req_builder = - local_req_builder.query(&[("apply_correction", &local_str.to_string())]); + local_req_builder.query(&[("apply_correction", &local_query_param.to_string())]); }; // build user agent @@ -818,7 +766,7 @@ impl ServiceLevelObjectivesAPI { /// Get a list of service level objective objects for your organization. pub async fn list_sl_os( &self, - params: ListSLOsParams, + params: ListSLOsOptionalParams, ) -> Result, Error> { match self.list_sl_os_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -829,12 +777,12 @@ impl ServiceLevelObjectivesAPI { /// Get a list of service level objective objects for your organization. pub async fn list_sl_os_with_http_info( &self, - params: ListSLOsParams, + params: ListSLOsOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let ids = params.ids; let query = params.query; let tags_query = params.tags_query; @@ -848,24 +796,28 @@ impl ServiceLevelObjectivesAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = ids { - local_req_builder = local_req_builder.query(&[("ids", &local_str.to_string())]); + if let Some(ref local_query_param) = ids { + local_req_builder = local_req_builder.query(&[("ids", &local_query_param.to_string())]); }; - if let Some(ref local_str) = query { - local_req_builder = local_req_builder.query(&[("query", &local_str.to_string())]); + if let Some(ref local_query_param) = query { + local_req_builder = + local_req_builder.query(&[("query", &local_query_param.to_string())]); }; - if let Some(ref local_str) = tags_query { - local_req_builder = local_req_builder.query(&[("tags_query", &local_str.to_string())]); + if let Some(ref local_query_param) = tags_query { + local_req_builder = + local_req_builder.query(&[("tags_query", &local_query_param.to_string())]); }; - if let Some(ref local_str) = metrics_query { + if let Some(ref local_query_param) = metrics_query { local_req_builder = - local_req_builder.query(&[("metrics_query", &local_str.to_string())]); + local_req_builder.query(&[("metrics_query", &local_query_param.to_string())]); }; - if let Some(ref local_str) = limit { - local_req_builder = local_req_builder.query(&[("limit", &local_str.to_string())]); + if let Some(ref local_query_param) = limit { + local_req_builder = + local_req_builder.query(&[("limit", &local_query_param.to_string())]); }; - if let Some(ref local_str) = offset { - local_req_builder = local_req_builder.query(&[("offset", &local_str.to_string())]); + if let Some(ref local_query_param) = offset { + local_req_builder = + local_req_builder.query(&[("offset", &local_query_param.to_string())]); }; // build user agent @@ -910,7 +862,7 @@ impl ServiceLevelObjectivesAPI { /// Get a list of service level objective objects for your organization. pub async fn search_slo( &self, - params: SearchSLOParams, + params: SearchSLOOptionalParams, ) -> Result, Error> { match self.search_slo_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -921,12 +873,12 @@ impl ServiceLevelObjectivesAPI { /// Get a list of service level objective objects for your organization. pub async fn search_slo_with_http_info( &self, - params: SearchSLOParams, + params: SearchSLOOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let query = params.query; let page_size = params.page_size; let page_number = params.page_number; @@ -938,19 +890,21 @@ impl ServiceLevelObjectivesAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = query { - local_req_builder = local_req_builder.query(&[("query", &local_str.to_string())]); + if let Some(ref local_query_param) = query { + local_req_builder = + local_req_builder.query(&[("query", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_number { + if let Some(ref local_query_param) = page_number { local_req_builder = - local_req_builder.query(&[("page[number]", &local_str.to_string())]); + local_req_builder.query(&[("page[number]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = include_facets { + if let Some(ref local_query_param) = include_facets { local_req_builder = - local_req_builder.query(&[("include_facets", &local_str.to_string())]); + local_req_builder.query(&[("include_facets", &local_query_param.to_string())]); }; // build user agent @@ -995,9 +949,10 @@ impl ServiceLevelObjectivesAPI { /// Update the specified service level objective object. pub async fn update_slo( &self, - params: UpdateSLOParams, + slo_id: String, + body: crate::datadogV1::model::ServiceLevelObjective, ) -> Result, Error> { - match self.update_slo_with_http_info(params).await { + match self.update_slo_with_http_info(slo_id, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1006,15 +961,12 @@ impl ServiceLevelObjectivesAPI { /// Update the specified service level objective object. pub async fn update_slo_with_http_info( &self, - params: UpdateSLOParams, + slo_id: String, + body: crate::datadogV1::model::ServiceLevelObjective, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let slo_id = params.slo_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV1/api/api_slack_integration.rs b/src/datadogV1/api/api_slack_integration.rs index 027a0430e..986cfbbb7 100644 --- a/src/datadogV1/api/api_slack_integration.rs +++ b/src/datadogV1/api/api_slack_integration.rs @@ -5,51 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateSlackIntegrationChannelParams is a struct for passing parameters to the method [`SlackIntegrationAPI::create_slack_integration_channel`] -#[derive(Clone, Debug)] -pub struct CreateSlackIntegrationChannelParams { - /// Your Slack account name. - pub account_name: String, - /// Payload describing Slack channel to be created - pub body: crate::datadogV1::model::SlackIntegrationChannel, -} - -/// GetSlackIntegrationChannelParams is a struct for passing parameters to the method [`SlackIntegrationAPI::get_slack_integration_channel`] -#[derive(Clone, Debug)] -pub struct GetSlackIntegrationChannelParams { - /// Your Slack account name. - pub account_name: String, - /// The name of the Slack channel being operated on. - pub channel_name: String, -} - -/// GetSlackIntegrationChannelsParams is a struct for passing parameters to the method [`SlackIntegrationAPI::get_slack_integration_channels`] -#[derive(Clone, Debug)] -pub struct GetSlackIntegrationChannelsParams { - /// Your Slack account name. - pub account_name: String, -} - -/// RemoveSlackIntegrationChannelParams is a struct for passing parameters to the method [`SlackIntegrationAPI::remove_slack_integration_channel`] -#[derive(Clone, Debug)] -pub struct RemoveSlackIntegrationChannelParams { - /// Your Slack account name. - pub account_name: String, - /// The name of the Slack channel being operated on. - pub channel_name: String, -} - -/// UpdateSlackIntegrationChannelParams is a struct for passing parameters to the method [`SlackIntegrationAPI::update_slack_integration_channel`] -#[derive(Clone, Debug)] -pub struct UpdateSlackIntegrationChannelParams { - /// Your Slack account name. - pub account_name: String, - /// The name of the Slack channel being operated on. - pub channel_name: String, - /// Payload describing fields and values to be updated. - pub body: crate::datadogV1::model::SlackIntegrationChannel, -} - /// CreateSlackIntegrationChannelError is a struct for typed errors of method [`SlackIntegrationAPI::create_slack_integration_channel`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -129,13 +84,14 @@ impl SlackIntegrationAPI { /// Add a channel to your Datadog-Slack integration. pub async fn create_slack_integration_channel( &self, - params: CreateSlackIntegrationChannelParams, + account_name: String, + body: crate::datadogV1::model::SlackIntegrationChannel, ) -> Result< Option, Error, > { match self - .create_slack_integration_channel_with_http_info(params) + .create_slack_integration_channel_with_http_info(account_name, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -146,17 +102,14 @@ impl SlackIntegrationAPI { /// Add a channel to your Datadog-Slack integration. pub async fn create_slack_integration_channel_with_http_info( &self, - params: CreateSlackIntegrationChannelParams, + account_name: String, + body: crate::datadogV1::model::SlackIntegrationChannel, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_name = params.account_name; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -217,13 +170,14 @@ impl SlackIntegrationAPI { /// Get a channel configured for your Datadog-Slack integration. pub async fn get_slack_integration_channel( &self, - params: GetSlackIntegrationChannelParams, + account_name: String, + channel_name: String, ) -> Result< Option, Error, > { match self - .get_slack_integration_channel_with_http_info(params) + .get_slack_integration_channel_with_http_info(account_name, channel_name) .await { Ok(response_content) => Ok(response_content.entity), @@ -234,17 +188,14 @@ impl SlackIntegrationAPI { /// Get a channel configured for your Datadog-Slack integration. pub async fn get_slack_integration_channel_with_http_info( &self, - params: GetSlackIntegrationChannelParams, + account_name: String, + channel_name: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_name = params.account_name; - let channel_name = params.channel_name; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -300,13 +251,13 @@ impl SlackIntegrationAPI { /// Get a list of all channels configured for your Datadog-Slack integration. pub async fn get_slack_integration_channels( &self, - params: GetSlackIntegrationChannelsParams, + account_name: String, ) -> Result< Option>, Error, > { match self - .get_slack_integration_channels_with_http_info(params) + .get_slack_integration_channels_with_http_info(account_name) .await { Ok(response_content) => Ok(response_content.entity), @@ -317,16 +268,13 @@ impl SlackIntegrationAPI { /// Get a list of all channels configured for your Datadog-Slack integration. pub async fn get_slack_integration_channels_with_http_info( &self, - params: GetSlackIntegrationChannelsParams, + account_name: String, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_name = params.account_name; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -380,10 +328,11 @@ impl SlackIntegrationAPI { /// Remove a channel from your Datadog-Slack integration. pub async fn remove_slack_integration_channel( &self, - params: RemoveSlackIntegrationChannelParams, + account_name: String, + channel_name: String, ) -> Result, Error> { match self - .remove_slack_integration_channel_with_http_info(params) + .remove_slack_integration_channel_with_http_info(account_name, channel_name) .await { Ok(response_content) => Ok(response_content.entity), @@ -394,14 +343,11 @@ impl SlackIntegrationAPI { /// Remove a channel from your Datadog-Slack integration. pub async fn remove_slack_integration_channel_with_http_info( &self, - params: RemoveSlackIntegrationChannelParams, + account_name: String, + channel_name: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let account_name = params.account_name; - let channel_name = params.channel_name; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -455,13 +401,15 @@ impl SlackIntegrationAPI { /// Update a channel used in your Datadog-Slack integration. pub async fn update_slack_integration_channel( &self, - params: UpdateSlackIntegrationChannelParams, + account_name: String, + channel_name: String, + body: crate::datadogV1::model::SlackIntegrationChannel, ) -> Result< Option, Error, > { match self - .update_slack_integration_channel_with_http_info(params) + .update_slack_integration_channel_with_http_info(account_name, channel_name, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -472,18 +420,15 @@ impl SlackIntegrationAPI { /// Update a channel used in your Datadog-Slack integration. pub async fn update_slack_integration_channel_with_http_info( &self, - params: UpdateSlackIntegrationChannelParams, + account_name: String, + channel_name: String, + body: crate::datadogV1::model::SlackIntegrationChannel, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_name = params.account_name; - let channel_name = params.channel_name; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV1/api/api_snapshots.rs b/src/datadogV1/api/api_snapshots.rs index daed23ed5..41809d66b 100644 --- a/src/datadogV1/api/api_snapshots.rs +++ b/src/datadogV1/api/api_snapshots.rs @@ -5,13 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// GetGraphSnapshotParams is a struct for passing parameters to the method [`SnapshotsAPI::get_graph_snapshot`] +/// GetGraphSnapshotOptionalParams is a struct for passing parameters to the method [`SnapshotsAPI::get_graph_snapshot`] #[derive(Clone, Debug)] -pub struct GetGraphSnapshotParams { - /// The POSIX timestamp of the start of the query in seconds. - pub start: i64, - /// The POSIX timestamp of the end of the query in seconds. - pub end: i64, +pub struct GetGraphSnapshotOptionalParams { /// The metric query. pub metric_query: Option, /// A query that adds event bands to the graph. @@ -63,9 +59,14 @@ impl SnapshotsAPI { /// **Note**: When a snapshot is created, there is some delay before it is available. pub async fn get_graph_snapshot( &self, - params: GetGraphSnapshotParams, + start: i64, + end: i64, + params: GetGraphSnapshotOptionalParams, ) -> Result, Error> { - match self.get_graph_snapshot_with_http_info(params).await { + match self + .get_graph_snapshot_with_http_info(start, end, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -75,14 +76,14 @@ impl SnapshotsAPI { /// **Note**: When a snapshot is created, there is some delay before it is available. pub async fn get_graph_snapshot_with_http_info( &self, - params: GetGraphSnapshotParams, + start: i64, + end: i64, + params: GetGraphSnapshotOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let start = params.start; - let end = params.end; + // unbox and build optional parameters let metric_query = params.metric_query; let event_query = params.event_query; let graph_def = params.graph_def; @@ -98,24 +99,29 @@ impl SnapshotsAPI { local_req_builder = local_req_builder.query(&[("start", &start.to_string())]); local_req_builder = local_req_builder.query(&[("end", &end.to_string())]); - if let Some(ref local_str) = metric_query { + if let Some(ref local_query_param) = metric_query { local_req_builder = - local_req_builder.query(&[("metric_query", &local_str.to_string())]); + local_req_builder.query(&[("metric_query", &local_query_param.to_string())]); }; - if let Some(ref local_str) = event_query { - local_req_builder = local_req_builder.query(&[("event_query", &local_str.to_string())]); + if let Some(ref local_query_param) = event_query { + local_req_builder = + local_req_builder.query(&[("event_query", &local_query_param.to_string())]); }; - if let Some(ref local_str) = graph_def { - local_req_builder = local_req_builder.query(&[("graph_def", &local_str.to_string())]); + if let Some(ref local_query_param) = graph_def { + local_req_builder = + local_req_builder.query(&[("graph_def", &local_query_param.to_string())]); }; - if let Some(ref local_str) = title { - local_req_builder = local_req_builder.query(&[("title", &local_str.to_string())]); + if let Some(ref local_query_param) = title { + local_req_builder = + local_req_builder.query(&[("title", &local_query_param.to_string())]); }; - if let Some(ref local_str) = height { - local_req_builder = local_req_builder.query(&[("height", &local_str.to_string())]); + if let Some(ref local_query_param) = height { + local_req_builder = + local_req_builder.query(&[("height", &local_query_param.to_string())]); }; - if let Some(ref local_str) = width { - local_req_builder = local_req_builder.query(&[("width", &local_str.to_string())]); + if let Some(ref local_query_param) = width { + local_req_builder = + local_req_builder.query(&[("width", &local_query_param.to_string())]); }; // build user agent diff --git a/src/datadogV1/api/api_synthetics.rs b/src/datadogV1/api/api_synthetics.rs index aa272035d..b03e52435 100644 --- a/src/datadogV1/api/api_synthetics.rs +++ b/src/datadogV1/api/api_synthetics.rs @@ -5,76 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateGlobalVariableParams is a struct for passing parameters to the method [`SyntheticsAPI::create_global_variable`] +/// GetAPITestLatestResultsOptionalParams is a struct for passing parameters to the method [`SyntheticsAPI::get_api_test_latest_results`] #[derive(Clone, Debug)] -pub struct CreateGlobalVariableParams { - /// Details of the global variable to create. - pub body: crate::datadogV1::model::SyntheticsGlobalVariable, -} - -/// CreatePrivateLocationParams is a struct for passing parameters to the method [`SyntheticsAPI::create_private_location`] -#[derive(Clone, Debug)] -pub struct CreatePrivateLocationParams { - /// Details of the private location to create. - pub body: crate::datadogV1::model::SyntheticsPrivateLocation, -} - -/// CreateSyntheticsAPITestParams is a struct for passing parameters to the method [`SyntheticsAPI::create_synthetics_api_test`] -#[derive(Clone, Debug)] -pub struct CreateSyntheticsAPITestParams { - /// Details of the test to create. - pub body: crate::datadogV1::model::SyntheticsAPITest, -} - -/// CreateSyntheticsBrowserTestParams is a struct for passing parameters to the method [`SyntheticsAPI::create_synthetics_browser_test`] -#[derive(Clone, Debug)] -pub struct CreateSyntheticsBrowserTestParams { - /// Details of the test to create. - pub body: crate::datadogV1::model::SyntheticsBrowserTest, -} - -/// DeleteGlobalVariableParams is a struct for passing parameters to the method [`SyntheticsAPI::delete_global_variable`] -#[derive(Clone, Debug)] -pub struct DeleteGlobalVariableParams { - /// The ID of the global variable. - pub variable_id: String, -} - -/// DeletePrivateLocationParams is a struct for passing parameters to the method [`SyntheticsAPI::delete_private_location`] -#[derive(Clone, Debug)] -pub struct DeletePrivateLocationParams { - /// The ID of the private location. - pub location_id: String, -} - -/// DeleteTestsParams is a struct for passing parameters to the method [`SyntheticsAPI::delete_tests`] -#[derive(Clone, Debug)] -pub struct DeleteTestsParams { - /// Public ID list of the Synthetic tests to be deleted. - pub body: crate::datadogV1::model::SyntheticsDeleteTestsPayload, -} - -/// EditGlobalVariableParams is a struct for passing parameters to the method [`SyntheticsAPI::edit_global_variable`] -#[derive(Clone, Debug)] -pub struct EditGlobalVariableParams { - /// The ID of the global variable. - pub variable_id: String, - /// Details of the global variable to update. - pub body: crate::datadogV1::model::SyntheticsGlobalVariable, -} - -/// GetAPITestParams is a struct for passing parameters to the method [`SyntheticsAPI::get_api_test`] -#[derive(Clone, Debug)] -pub struct GetAPITestParams { - /// The public ID of the test to get details from. - pub public_id: String, -} - -/// GetAPITestLatestResultsParams is a struct for passing parameters to the method [`SyntheticsAPI::get_api_test_latest_results`] -#[derive(Clone, Debug)] -pub struct GetAPITestLatestResultsParams { - /// The public ID of the test for which to search results for. - pub public_id: String, +pub struct GetAPITestLatestResultsOptionalParams { /// Timestamp in milliseconds from which to start querying results. pub from_ts: Option, /// Timestamp in milliseconds up to which to query results. @@ -83,28 +16,9 @@ pub struct GetAPITestLatestResultsParams { pub probe_dc: Option>, } -/// GetAPITestResultParams is a struct for passing parameters to the method [`SyntheticsAPI::get_api_test_result`] -#[derive(Clone, Debug)] -pub struct GetAPITestResultParams { - /// The public ID of the API test to which the target result belongs. - pub public_id: String, - /// The ID of the result to get. - pub result_id: String, -} - -/// GetBrowserTestParams is a struct for passing parameters to the method [`SyntheticsAPI::get_browser_test`] +/// GetBrowserTestLatestResultsOptionalParams is a struct for passing parameters to the method [`SyntheticsAPI::get_browser_test_latest_results`] #[derive(Clone, Debug)] -pub struct GetBrowserTestParams { - /// The public ID of the test to get details from. - pub public_id: String, -} - -/// GetBrowserTestLatestResultsParams is a struct for passing parameters to the method [`SyntheticsAPI::get_browser_test_latest_results`] -#[derive(Clone, Debug)] -pub struct GetBrowserTestLatestResultsParams { - /// The public ID of the browser test for which to search results - /// for. - pub public_id: String, +pub struct GetBrowserTestLatestResultsOptionalParams { /// Timestamp in milliseconds from which to start querying results. pub from_ts: Option, /// Timestamp in milliseconds up to which to query results. @@ -113,112 +27,15 @@ pub struct GetBrowserTestLatestResultsParams { pub probe_dc: Option>, } -/// GetBrowserTestResultParams is a struct for passing parameters to the method [`SyntheticsAPI::get_browser_test_result`] -#[derive(Clone, Debug)] -pub struct GetBrowserTestResultParams { - /// The public ID of the browser test to which the target result - /// belongs. - pub public_id: String, - /// The ID of the result to get. - pub result_id: String, -} - -/// GetGlobalVariableParams is a struct for passing parameters to the method [`SyntheticsAPI::get_global_variable`] -#[derive(Clone, Debug)] -pub struct GetGlobalVariableParams { - /// The ID of the global variable. - pub variable_id: String, -} - -/// GetPrivateLocationParams is a struct for passing parameters to the method [`SyntheticsAPI::get_private_location`] -#[derive(Clone, Debug)] -pub struct GetPrivateLocationParams { - /// The ID of the private location. - pub location_id: String, -} - -/// GetSyntheticsCIBatchParams is a struct for passing parameters to the method [`SyntheticsAPI::get_synthetics_ci_batch`] -#[derive(Clone, Debug)] -pub struct GetSyntheticsCIBatchParams { - /// The ID of the batch. - pub batch_id: String, -} - -/// GetTestParams is a struct for passing parameters to the method [`SyntheticsAPI::get_test`] -#[derive(Clone, Debug)] -pub struct GetTestParams { - /// The public ID of the test to get details from. - pub public_id: String, -} - -/// ListTestsParams is a struct for passing parameters to the method [`SyntheticsAPI::list_tests`] +/// ListTestsOptionalParams is a struct for passing parameters to the method [`SyntheticsAPI::list_tests`] #[derive(Clone, Debug)] -pub struct ListTestsParams { +pub struct ListTestsOptionalParams { /// Used for pagination. The number of tests returned in the page. pub page_size: Option, /// Used for pagination. Which page you want to retrieve. Starts at zero. pub page_number: Option, } -/// PatchTestParams is a struct for passing parameters to the method [`SyntheticsAPI::patch_test`] -#[derive(Clone, Debug)] -pub struct PatchTestParams { - /// The public ID of the test to patch. - pub public_id: String, - /// [JSON Patch]() compliant list of operations - pub body: crate::datadogV1::model::SyntheticsPatchTestBody, -} - -/// TriggerCITestsParams is a struct for passing parameters to the method [`SyntheticsAPI::trigger_ci_tests`] -#[derive(Clone, Debug)] -pub struct TriggerCITestsParams { - /// Details of the test to trigger. - pub body: crate::datadogV1::model::SyntheticsCITestBody, -} - -/// TriggerTestsParams is a struct for passing parameters to the method [`SyntheticsAPI::trigger_tests`] -#[derive(Clone, Debug)] -pub struct TriggerTestsParams { - /// The identifiers of the tests to trigger. - pub body: crate::datadogV1::model::SyntheticsTriggerBody, -} - -/// UpdateAPITestParams is a struct for passing parameters to the method [`SyntheticsAPI::update_api_test`] -#[derive(Clone, Debug)] -pub struct UpdateAPITestParams { - /// The public ID of the test to get details from. - pub public_id: String, - /// New test details to be saved. - pub body: crate::datadogV1::model::SyntheticsAPITest, -} - -/// UpdateBrowserTestParams is a struct for passing parameters to the method [`SyntheticsAPI::update_browser_test`] -#[derive(Clone, Debug)] -pub struct UpdateBrowserTestParams { - /// The public ID of the test to edit. - pub public_id: String, - /// New test details to be saved. - pub body: crate::datadogV1::model::SyntheticsBrowserTest, -} - -/// UpdatePrivateLocationParams is a struct for passing parameters to the method [`SyntheticsAPI::update_private_location`] -#[derive(Clone, Debug)] -pub struct UpdatePrivateLocationParams { - /// The ID of the private location. - pub location_id: String, - /// Details of the private location to be updated. - pub body: crate::datadogV1::model::SyntheticsPrivateLocation, -} - -/// UpdateTestPauseStatusParams is a struct for passing parameters to the method [`SyntheticsAPI::update_test_pause_status`] -#[derive(Clone, Debug)] -pub struct UpdateTestPauseStatusParams { - /// The public ID of the Synthetic test to update. - pub public_id: String, - /// Status to set the given Synthetic test to. - pub body: crate::datadogV1::model::SyntheticsUpdateTestPauseStatusPayload, -} - /// CreateGlobalVariableError is a struct for typed errors of method [`SyntheticsAPI::create_global_variable`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -530,12 +347,12 @@ impl SyntheticsAPI { /// Create a Synthetic global variable. pub async fn create_global_variable( &self, - params: CreateGlobalVariableParams, + body: crate::datadogV1::model::SyntheticsGlobalVariable, ) -> Result< Option, Error, > { - match self.create_global_variable_with_http_info(params).await { + match self.create_global_variable_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -544,16 +361,13 @@ impl SyntheticsAPI { /// Create a Synthetic global variable. pub async fn create_global_variable_with_http_info( &self, - params: CreateGlobalVariableParams, + body: crate::datadogV1::model::SyntheticsGlobalVariable, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -613,12 +427,12 @@ impl SyntheticsAPI { /// Create a new Synthetic private location. pub async fn create_private_location( &self, - params: CreatePrivateLocationParams, + body: crate::datadogV1::model::SyntheticsPrivateLocation, ) -> Result< Option, Error, > { - match self.create_private_location_with_http_info(params).await { + match self.create_private_location_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -627,16 +441,13 @@ impl SyntheticsAPI { /// Create a new Synthetic private location. pub async fn create_private_location_with_http_info( &self, - params: CreatePrivateLocationParams, + body: crate::datadogV1::model::SyntheticsPrivateLocation, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -697,12 +508,12 @@ impl SyntheticsAPI { /// Create a Synthetic API test. pub async fn create_synthetics_api_test( &self, - params: CreateSyntheticsAPITestParams, + body: crate::datadogV1::model::SyntheticsAPITest, ) -> Result< Option, Error, > { - match self.create_synthetics_api_test_with_http_info(params).await { + match self.create_synthetics_api_test_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -711,16 +522,13 @@ impl SyntheticsAPI { /// Create a Synthetic API test. pub async fn create_synthetics_api_test_with_http_info( &self, - params: CreateSyntheticsAPITestParams, + body: crate::datadogV1::model::SyntheticsAPITest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -780,13 +588,13 @@ impl SyntheticsAPI { /// Create a Synthetic browser test. pub async fn create_synthetics_browser_test( &self, - params: CreateSyntheticsBrowserTestParams, + body: crate::datadogV1::model::SyntheticsBrowserTest, ) -> Result< Option, Error, > { match self - .create_synthetics_browser_test_with_http_info(params) + .create_synthetics_browser_test_with_http_info(body) .await { Ok(response_content) => Ok(response_content.entity), @@ -797,16 +605,13 @@ impl SyntheticsAPI { /// Create a Synthetic browser test. pub async fn create_synthetics_browser_test_with_http_info( &self, - params: CreateSyntheticsBrowserTestParams, + body: crate::datadogV1::model::SyntheticsBrowserTest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -866,9 +671,12 @@ impl SyntheticsAPI { /// Delete a Synthetic global variable. pub async fn delete_global_variable( &self, - params: DeleteGlobalVariableParams, + variable_id: String, ) -> Result, Error> { - match self.delete_global_variable_with_http_info(params).await { + match self + .delete_global_variable_with_http_info(variable_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -877,13 +685,10 @@ impl SyntheticsAPI { /// Delete a Synthetic global variable. pub async fn delete_global_variable_with_http_info( &self, - params: DeleteGlobalVariableParams, + variable_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let variable_id = params.variable_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -935,9 +740,12 @@ impl SyntheticsAPI { /// Delete a Synthetic private location. pub async fn delete_private_location( &self, - params: DeletePrivateLocationParams, + location_id: String, ) -> Result, Error> { - match self.delete_private_location_with_http_info(params).await { + match self + .delete_private_location_with_http_info(location_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -946,13 +754,10 @@ impl SyntheticsAPI { /// Delete a Synthetic private location. pub async fn delete_private_location_with_http_info( &self, - params: DeletePrivateLocationParams, + location_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let location_id = params.location_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1004,12 +809,12 @@ impl SyntheticsAPI { /// Delete multiple Synthetic tests by ID. pub async fn delete_tests( &self, - params: DeleteTestsParams, + body: crate::datadogV1::model::SyntheticsDeleteTestsPayload, ) -> Result< Option, Error, > { - match self.delete_tests_with_http_info(params).await { + match self.delete_tests_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1018,16 +823,13 @@ impl SyntheticsAPI { /// Delete multiple Synthetic tests by ID. pub async fn delete_tests_with_http_info( &self, - params: DeleteTestsParams, + body: crate::datadogV1::model::SyntheticsDeleteTestsPayload, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1086,12 +888,16 @@ impl SyntheticsAPI { /// Edit a Synthetic global variable. pub async fn edit_global_variable( &self, - params: EditGlobalVariableParams, + variable_id: String, + body: crate::datadogV1::model::SyntheticsGlobalVariable, ) -> Result< Option, Error, > { - match self.edit_global_variable_with_http_info(params).await { + match self + .edit_global_variable_with_http_info(variable_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1100,17 +906,14 @@ impl SyntheticsAPI { /// Edit a Synthetic global variable. pub async fn edit_global_variable_with_http_info( &self, - params: EditGlobalVariableParams, + variable_id: String, + body: crate::datadogV1::model::SyntheticsGlobalVariable, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let variable_id = params.variable_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1172,9 +975,9 @@ impl SyntheticsAPI { /// a Synthetic API test. pub async fn get_api_test( &self, - params: GetAPITestParams, + public_id: String, ) -> Result, Error> { - match self.get_api_test_with_http_info(params).await { + match self.get_api_test_with_http_info(public_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1184,14 +987,11 @@ impl SyntheticsAPI { /// a Synthetic API test. pub async fn get_api_test_with_http_info( &self, - params: GetAPITestParams, + public_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let public_id = params.public_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1244,13 +1044,14 @@ impl SyntheticsAPI { /// Get the last 150 test results summaries for a given Synthetic API test. pub async fn get_api_test_latest_results( &self, - params: GetAPITestLatestResultsParams, + public_id: String, + params: GetAPITestLatestResultsOptionalParams, ) -> Result< Option, Error, > { match self - .get_api_test_latest_results_with_http_info(params) + .get_api_test_latest_results_with_http_info(public_id, params) .await { Ok(response_content) => Ok(response_content.entity), @@ -1261,15 +1062,15 @@ impl SyntheticsAPI { /// Get the last 150 test results summaries for a given Synthetic API test. pub async fn get_api_test_latest_results_with_http_info( &self, - params: GetAPITestLatestResultsParams, + public_id: String, + params: GetAPITestLatestResultsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let public_id = params.public_id; + // unbox and build optional parameters let from_ts = params.from_ts; let to_ts = params.to_ts; let probe_dc = params.probe_dc; @@ -1284,17 +1085,19 @@ impl SyntheticsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = from_ts { - local_req_builder = local_req_builder.query(&[("from_ts", &local_str.to_string())]); + if let Some(ref local_query_param) = from_ts { + local_req_builder = + local_req_builder.query(&[("from_ts", &local_query_param.to_string())]); }; - if let Some(ref local_str) = to_ts { - local_req_builder = local_req_builder.query(&[("to_ts", &local_str.to_string())]); + if let Some(ref local_query_param) = to_ts { + local_req_builder = + local_req_builder.query(&[("to_ts", &local_query_param.to_string())]); }; if let Some(ref local) = probe_dc { local_req_builder = local_req_builder.query(&[( "probe_dc", &local - .into_iter() + .iter() .map(|p| p.to_string()) .collect::>() .join(",") @@ -1346,12 +1149,16 @@ impl SyntheticsAPI { /// Get a specific full result from a given Synthetic API test. pub async fn get_api_test_result( &self, - params: GetAPITestResultParams, + public_id: String, + result_id: String, ) -> Result< Option, Error, > { - match self.get_api_test_result_with_http_info(params).await { + match self + .get_api_test_result_with_http_info(public_id, result_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1360,17 +1167,14 @@ impl SyntheticsAPI { /// Get a specific full result from a given Synthetic API test. pub async fn get_api_test_result_with_http_info( &self, - params: GetAPITestResultParams, + public_id: String, + result_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let public_id = params.public_id; - let result_id = params.result_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1426,10 +1230,10 @@ impl SyntheticsAPI { /// a Synthetic browser test. pub async fn get_browser_test( &self, - params: GetBrowserTestParams, + public_id: String, ) -> Result, Error> { - match self.get_browser_test_with_http_info(params).await { + match self.get_browser_test_with_http_info(public_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1439,16 +1243,13 @@ impl SyntheticsAPI { /// a Synthetic browser test. pub async fn get_browser_test_with_http_info( &self, - params: GetBrowserTestParams, + public_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let public_id = params.public_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1502,13 +1303,14 @@ impl SyntheticsAPI { /// Get the last 150 test results summaries for a given Synthetic browser test. pub async fn get_browser_test_latest_results( &self, - params: GetBrowserTestLatestResultsParams, + public_id: String, + params: GetBrowserTestLatestResultsOptionalParams, ) -> Result< Option, Error, > { match self - .get_browser_test_latest_results_with_http_info(params) + .get_browser_test_latest_results_with_http_info(public_id, params) .await { Ok(response_content) => Ok(response_content.entity), @@ -1519,15 +1321,15 @@ impl SyntheticsAPI { /// Get the last 150 test results summaries for a given Synthetic browser test. pub async fn get_browser_test_latest_results_with_http_info( &self, - params: GetBrowserTestLatestResultsParams, + public_id: String, + params: GetBrowserTestLatestResultsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let public_id = params.public_id; + // unbox and build optional parameters let from_ts = params.from_ts; let to_ts = params.to_ts; let probe_dc = params.probe_dc; @@ -1542,17 +1344,19 @@ impl SyntheticsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = from_ts { - local_req_builder = local_req_builder.query(&[("from_ts", &local_str.to_string())]); + if let Some(ref local_query_param) = from_ts { + local_req_builder = + local_req_builder.query(&[("from_ts", &local_query_param.to_string())]); }; - if let Some(ref local_str) = to_ts { - local_req_builder = local_req_builder.query(&[("to_ts", &local_str.to_string())]); + if let Some(ref local_query_param) = to_ts { + local_req_builder = + local_req_builder.query(&[("to_ts", &local_query_param.to_string())]); }; if let Some(ref local) = probe_dc { local_req_builder = local_req_builder.query(&[( "probe_dc", &local - .into_iter() + .iter() .map(|p| p.to_string()) .collect::>() .join(",") @@ -1604,12 +1408,16 @@ impl SyntheticsAPI { /// Get a specific full result from a given Synthetic browser test. pub async fn get_browser_test_result( &self, - params: GetBrowserTestResultParams, + public_id: String, + result_id: String, ) -> Result< Option, Error, > { - match self.get_browser_test_result_with_http_info(params).await { + match self + .get_browser_test_result_with_http_info(public_id, result_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1618,17 +1426,14 @@ impl SyntheticsAPI { /// Get a specific full result from a given Synthetic browser test. pub async fn get_browser_test_result_with_http_info( &self, - params: GetBrowserTestResultParams, + public_id: String, + result_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let public_id = params.public_id; - let result_id = params.result_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1683,12 +1488,12 @@ impl SyntheticsAPI { /// Get the detailed configuration of a global variable. pub async fn get_global_variable( &self, - params: GetGlobalVariableParams, + variable_id: String, ) -> Result< Option, Error, > { - match self.get_global_variable_with_http_info(params).await { + match self.get_global_variable_with_http_info(variable_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1697,16 +1502,13 @@ impl SyntheticsAPI { /// Get the detailed configuration of a global variable. pub async fn get_global_variable_with_http_info( &self, - params: GetGlobalVariableParams, + variable_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let variable_id = params.variable_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1760,12 +1562,12 @@ impl SyntheticsAPI { /// Get a Synthetic private location. pub async fn get_private_location( &self, - params: GetPrivateLocationParams, + location_id: String, ) -> Result< Option, Error, > { - match self.get_private_location_with_http_info(params).await { + match self.get_private_location_with_http_info(location_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1774,16 +1576,13 @@ impl SyntheticsAPI { /// Get a Synthetic private location. pub async fn get_private_location_with_http_info( &self, - params: GetPrivateLocationParams, + location_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let location_id = params.location_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1837,12 +1636,12 @@ impl SyntheticsAPI { /// Get a batch's updated details. pub async fn get_synthetics_ci_batch( &self, - params: GetSyntheticsCIBatchParams, + batch_id: String, ) -> Result< Option, Error, > { - match self.get_synthetics_ci_batch_with_http_info(params).await { + match self.get_synthetics_ci_batch_with_http_info(batch_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1851,16 +1650,13 @@ impl SyntheticsAPI { /// Get a batch's updated details. pub async fn get_synthetics_ci_batch_with_http_info( &self, - params: GetSyntheticsCIBatchParams, + batch_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let batch_id = params.batch_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1927,8 +1723,6 @@ impl SyntheticsAPI { ) -> Result>, Error> { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1980,9 +1774,9 @@ impl SyntheticsAPI { /// Get the detailed configuration associated with a Synthetic test. pub async fn get_test( &self, - params: GetTestParams, + public_id: String, ) -> Result, Error> { - match self.get_test_with_http_info(params).await { + match self.get_test_with_http_info(public_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1991,14 +1785,11 @@ impl SyntheticsAPI { /// Get the detailed configuration associated with a Synthetic test. pub async fn get_test_with_http_info( &self, - params: GetTestParams, + public_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let public_id = params.public_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -2070,8 +1861,6 @@ impl SyntheticsAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -2144,8 +1933,6 @@ impl SyntheticsAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -2198,7 +1985,7 @@ impl SyntheticsAPI { /// Get the list of all Synthetic tests. pub async fn list_tests( &self, - params: ListTestsParams, + params: ListTestsOptionalParams, ) -> Result, Error> { match self.list_tests_with_http_info(params).await { @@ -2210,14 +1997,14 @@ impl SyntheticsAPI { /// Get the list of all Synthetic tests. pub async fn list_tests_with_http_info( &self, - params: ListTestsParams, + params: ListTestsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let page_size = params.page_size; let page_number = params.page_number; @@ -2227,11 +2014,13 @@ impl SyntheticsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page_size", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page_size", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_number { - local_req_builder = local_req_builder.query(&[("page_number", &local_str.to_string())]); + if let Some(ref local_query_param) = page_number { + local_req_builder = + local_req_builder.query(&[("page_number", &local_query_param.to_string())]); }; // build user agent @@ -2276,9 +2065,10 @@ impl SyntheticsAPI { /// Patch the configuration of a Synthetic test with partial data. pub async fn patch_test( &self, - params: PatchTestParams, + public_id: String, + body: crate::datadogV1::model::SyntheticsPatchTestBody, ) -> Result, Error> { - match self.patch_test_with_http_info(params).await { + match self.patch_test_with_http_info(public_id, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -2287,17 +2077,14 @@ impl SyntheticsAPI { /// Patch the configuration of a Synthetic test with partial data. pub async fn patch_test_with_http_info( &self, - params: PatchTestParams, + public_id: String, + body: crate::datadogV1::model::SyntheticsPatchTestBody, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let public_id = params.public_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -2357,12 +2144,12 @@ impl SyntheticsAPI { /// Trigger a set of Synthetic tests for continuous integration. pub async fn trigger_ci_tests( &self, - params: TriggerCITestsParams, + body: crate::datadogV1::model::SyntheticsCITestBody, ) -> Result< Option, Error, > { - match self.trigger_ci_tests_with_http_info(params).await { + match self.trigger_ci_tests_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -2371,16 +2158,13 @@ impl SyntheticsAPI { /// Trigger a set of Synthetic tests for continuous integration. pub async fn trigger_ci_tests_with_http_info( &self, - params: TriggerCITestsParams, + body: crate::datadogV1::model::SyntheticsCITestBody, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -2440,12 +2224,12 @@ impl SyntheticsAPI { /// Trigger a set of Synthetic tests. pub async fn trigger_tests( &self, - params: TriggerTestsParams, + body: crate::datadogV1::model::SyntheticsTriggerBody, ) -> Result< Option, Error, > { - match self.trigger_tests_with_http_info(params).await { + match self.trigger_tests_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -2454,16 +2238,13 @@ impl SyntheticsAPI { /// Trigger a set of Synthetic tests. pub async fn trigger_tests_with_http_info( &self, - params: TriggerTestsParams, + body: crate::datadogV1::model::SyntheticsTriggerBody, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -2522,9 +2303,10 @@ impl SyntheticsAPI { /// Edit the configuration of a Synthetic API test. pub async fn update_api_test( &self, - params: UpdateAPITestParams, + public_id: String, + body: crate::datadogV1::model::SyntheticsAPITest, ) -> Result, Error> { - match self.update_api_test_with_http_info(params).await { + match self.update_api_test_with_http_info(public_id, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -2533,17 +2315,14 @@ impl SyntheticsAPI { /// Edit the configuration of a Synthetic API test. pub async fn update_api_test_with_http_info( &self, - params: UpdateAPITestParams, + public_id: String, + body: crate::datadogV1::model::SyntheticsAPITest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let public_id = params.public_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -2604,10 +2383,14 @@ impl SyntheticsAPI { /// Edit the configuration of a Synthetic browser test. pub async fn update_browser_test( &self, - params: UpdateBrowserTestParams, + public_id: String, + body: crate::datadogV1::model::SyntheticsBrowserTest, ) -> Result, Error> { - match self.update_browser_test_with_http_info(params).await { + match self + .update_browser_test_with_http_info(public_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -2616,17 +2399,14 @@ impl SyntheticsAPI { /// Edit the configuration of a Synthetic browser test. pub async fn update_browser_test_with_http_info( &self, - params: UpdateBrowserTestParams, + public_id: String, + body: crate::datadogV1::model::SyntheticsBrowserTest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let public_id = params.public_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -2687,12 +2467,16 @@ impl SyntheticsAPI { /// Edit a Synthetic private location. pub async fn update_private_location( &self, - params: UpdatePrivateLocationParams, + location_id: String, + body: crate::datadogV1::model::SyntheticsPrivateLocation, ) -> Result< Option, Error, > { - match self.update_private_location_with_http_info(params).await { + match self + .update_private_location_with_http_info(location_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -2701,17 +2485,14 @@ impl SyntheticsAPI { /// Edit a Synthetic private location. pub async fn update_private_location_with_http_info( &self, - params: UpdatePrivateLocationParams, + location_id: String, + body: crate::datadogV1::model::SyntheticsPrivateLocation, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let location_id = params.location_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -2772,9 +2553,13 @@ impl SyntheticsAPI { /// Pause or start a Synthetic test by changing the status. pub async fn update_test_pause_status( &self, - params: UpdateTestPauseStatusParams, + public_id: String, + body: crate::datadogV1::model::SyntheticsUpdateTestPauseStatusPayload, ) -> Result, Error> { - match self.update_test_pause_status_with_http_info(params).await { + match self + .update_test_pause_status_with_http_info(public_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -2783,14 +2568,11 @@ impl SyntheticsAPI { /// Pause or start a Synthetic test by changing the status. pub async fn update_test_pause_status_with_http_info( &self, - params: UpdateTestPauseStatusParams, + public_id: String, + body: crate::datadogV1::model::SyntheticsUpdateTestPauseStatusPayload, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let public_id = params.public_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV1/api/api_tags.rs b/src/datadogV1/api/api_tags.rs index 2ae4b8c9a..3ace8e465 100644 --- a/src/datadogV1/api/api_tags.rs +++ b/src/datadogV1/api/api_tags.rs @@ -5,51 +5,39 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateHostTagsParams is a struct for passing parameters to the method [`TagsAPI::create_host_tags`] +/// CreateHostTagsOptionalParams is a struct for passing parameters to the method [`TagsAPI::create_host_tags`] #[derive(Clone, Debug)] -pub struct CreateHostTagsParams { - /// This endpoint allows you to add new tags to a host, optionally specifying where the tags came from. - pub host_name: String, - /// Update host tags request body. - pub body: crate::datadogV1::model::HostTags, +pub struct CreateHostTagsOptionalParams { /// The source of the tags. /// [Complete list of source attribute values](). pub source: Option, } -/// DeleteHostTagsParams is a struct for passing parameters to the method [`TagsAPI::delete_host_tags`] +/// DeleteHostTagsOptionalParams is a struct for passing parameters to the method [`TagsAPI::delete_host_tags`] #[derive(Clone, Debug)] -pub struct DeleteHostTagsParams { - /// This endpoint allows you to remove all user-assigned tags for a single host. - pub host_name: String, +pub struct DeleteHostTagsOptionalParams { /// The source of the tags (for example chef, puppet). /// [Complete list of source attribute values](). pub source: Option, } -/// GetHostTagsParams is a struct for passing parameters to the method [`TagsAPI::get_host_tags`] +/// GetHostTagsOptionalParams is a struct for passing parameters to the method [`TagsAPI::get_host_tags`] #[derive(Clone, Debug)] -pub struct GetHostTagsParams { - /// When specified, filters list of tags to those tags with the specified source. - pub host_name: String, +pub struct GetHostTagsOptionalParams { /// Source to filter. pub source: Option, } -/// ListHostTagsParams is a struct for passing parameters to the method [`TagsAPI::list_host_tags`] +/// ListHostTagsOptionalParams is a struct for passing parameters to the method [`TagsAPI::list_host_tags`] #[derive(Clone, Debug)] -pub struct ListHostTagsParams { +pub struct ListHostTagsOptionalParams { /// When specified, filters host list to those tags with the specified source. pub source: Option, } -/// UpdateHostTagsParams is a struct for passing parameters to the method [`TagsAPI::update_host_tags`] +/// UpdateHostTagsOptionalParams is a struct for passing parameters to the method [`TagsAPI::update_host_tags`] #[derive(Clone, Debug)] -pub struct UpdateHostTagsParams { - /// This endpoint allows you to update/replace all in an integration source with those supplied in the request. - pub host_name: String, - /// Add tags to host - pub body: crate::datadogV1::model::HostTags, +pub struct UpdateHostTagsOptionalParams { /// The source of the tags (for example chef, puppet). /// [Complete list of source attribute values]() pub source: Option, @@ -130,9 +118,14 @@ impl TagsAPI { /// optionally specifying where these tags come from. pub async fn create_host_tags( &self, - params: CreateHostTagsParams, + host_name: String, + body: crate::datadogV1::model::HostTags, + params: CreateHostTagsOptionalParams, ) -> Result, Error> { - match self.create_host_tags_with_http_info(params).await { + match self + .create_host_tags_with_http_info(host_name, body, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -142,14 +135,14 @@ impl TagsAPI { /// optionally specifying where these tags come from. pub async fn create_host_tags_with_http_info( &self, - params: CreateHostTagsParams, + host_name: String, + body: crate::datadogV1::model::HostTags, + params: CreateHostTagsOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let host_name = params.host_name; - let body = params.body; + // unbox and build optional parameters let source = params.source; let local_client = &local_configuration.client; @@ -162,8 +155,9 @@ impl TagsAPI { let mut local_req_builder = local_client.request(reqwest::Method::POST, local_uri_str.as_str()); - if let Some(ref local_str) = source { - local_req_builder = local_req_builder.query(&[("source", &local_str.to_string())]); + if let Some(ref local_query_param) = source { + local_req_builder = + local_req_builder.query(&[("source", &local_query_param.to_string())]); }; // build user agent @@ -217,9 +211,13 @@ impl TagsAPI { /// for a single host. pub async fn delete_host_tags( &self, - params: DeleteHostTagsParams, + host_name: String, + params: DeleteHostTagsOptionalParams, ) -> Result, Error> { - match self.delete_host_tags_with_http_info(params).await { + match self + .delete_host_tags_with_http_info(host_name, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -229,12 +227,12 @@ impl TagsAPI { /// for a single host. pub async fn delete_host_tags_with_http_info( &self, - params: DeleteHostTagsParams, + host_name: String, + params: DeleteHostTagsOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let host_name = params.host_name; + // unbox and build optional parameters let source = params.source; let local_client = &local_configuration.client; @@ -247,8 +245,9 @@ impl TagsAPI { let mut local_req_builder = local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); - if let Some(ref local_str) = source { - local_req_builder = local_req_builder.query(&[("source", &local_str.to_string())]); + if let Some(ref local_query_param) = source { + local_req_builder = + local_req_builder.query(&[("source", &local_query_param.to_string())]); }; // build user agent @@ -292,9 +291,10 @@ impl TagsAPI { /// Return the list of tags that apply to a given host. pub async fn get_host_tags( &self, - params: GetHostTagsParams, + host_name: String, + params: GetHostTagsOptionalParams, ) -> Result, Error> { - match self.get_host_tags_with_http_info(params).await { + match self.get_host_tags_with_http_info(host_name, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -303,12 +303,12 @@ impl TagsAPI { /// Return the list of tags that apply to a given host. pub async fn get_host_tags_with_http_info( &self, - params: GetHostTagsParams, + host_name: String, + params: GetHostTagsOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let host_name = params.host_name; + // unbox and build optional parameters let source = params.source; let local_client = &local_configuration.client; @@ -321,8 +321,9 @@ impl TagsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = source { - local_req_builder = local_req_builder.query(&[("source", &local_str.to_string())]); + if let Some(ref local_query_param) = source { + local_req_builder = + local_req_builder.query(&[("source", &local_query_param.to_string())]); }; // build user agent @@ -367,7 +368,7 @@ impl TagsAPI { /// Return a mapping of tags to hosts for your whole infrastructure. pub async fn list_host_tags( &self, - params: ListHostTagsParams, + params: ListHostTagsOptionalParams, ) -> Result, Error> { match self.list_host_tags_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -378,12 +379,12 @@ impl TagsAPI { /// Return a mapping of tags to hosts for your whole infrastructure. pub async fn list_host_tags_with_http_info( &self, - params: ListHostTagsParams, + params: ListHostTagsOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let source = params.source; let local_client = &local_configuration.client; @@ -392,8 +393,9 @@ impl TagsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = source { - local_req_builder = local_req_builder.query(&[("source", &local_str.to_string())]); + if let Some(ref local_query_param) = source { + local_req_builder = + local_req_builder.query(&[("source", &local_query_param.to_string())]); }; // build user agent @@ -439,9 +441,14 @@ impl TagsAPI { /// an integration source with those supplied in the request. pub async fn update_host_tags( &self, - params: UpdateHostTagsParams, + host_name: String, + body: crate::datadogV1::model::HostTags, + params: UpdateHostTagsOptionalParams, ) -> Result, Error> { - match self.update_host_tags_with_http_info(params).await { + match self + .update_host_tags_with_http_info(host_name, body, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -451,14 +458,14 @@ impl TagsAPI { /// an integration source with those supplied in the request. pub async fn update_host_tags_with_http_info( &self, - params: UpdateHostTagsParams, + host_name: String, + body: crate::datadogV1::model::HostTags, + params: UpdateHostTagsOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let host_name = params.host_name; - let body = params.body; + // unbox and build optional parameters let source = params.source; let local_client = &local_configuration.client; @@ -471,8 +478,9 @@ impl TagsAPI { let mut local_req_builder = local_client.request(reqwest::Method::PUT, local_uri_str.as_str()); - if let Some(ref local_str) = source { - local_req_builder = local_req_builder.query(&[("source", &local_str.to_string())]); + if let Some(ref local_query_param) = source { + local_req_builder = + local_req_builder.query(&[("source", &local_query_param.to_string())]); }; // build user agent diff --git a/src/datadogV1/api/api_usage_metering.rs b/src/datadogV1/api/api_usage_metering.rs index a2c152ca7..fd7c231be 100644 --- a/src/datadogV1/api/api_usage_metering.rs +++ b/src/datadogV1/api/api_usage_metering.rs @@ -5,9 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// GetDailyCustomReportsParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_daily_custom_reports`] +/// GetDailyCustomReportsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_daily_custom_reports`] #[derive(Clone, Debug)] -pub struct GetDailyCustomReportsParams { +pub struct GetDailyCustomReportsOptionalParams { /// The number of files to return in the response. `[default=60]`. pub page_size: Option, /// The identifier of the first page to return. This parameter is used for the pagination feature `[default=0]`. @@ -18,13 +18,9 @@ pub struct GetDailyCustomReportsParams { pub sort: Option, } -/// GetHourlyUsageAttributionParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_hourly_usage_attribution`] +/// GetHourlyUsageAttributionOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_hourly_usage_attribution`] #[derive(Clone, Debug)] -pub struct GetHourlyUsageAttributionParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, - /// Usage type to retrieve. - pub usage_type: crate::datadogV1::model::HourlyUsageAttributionUsageType, +pub struct GetHourlyUsageAttributionOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, @@ -38,29 +34,25 @@ pub struct GetHourlyUsageAttributionParams { pub include_descendants: Option, } -/// GetIncidentManagementParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_incident_management`] +/// GetIncidentManagementOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_incident_management`] #[derive(Clone, Debug)] -pub struct GetIncidentManagementParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, +pub struct GetIncidentManagementOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } -/// GetIngestedSpansParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_ingested_spans`] +/// GetIngestedSpansOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_ingested_spans`] #[derive(Clone, Debug)] -pub struct GetIngestedSpansParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, +pub struct GetIngestedSpansOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } -/// GetMonthlyCustomReportsParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_monthly_custom_reports`] +/// GetMonthlyCustomReportsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_monthly_custom_reports`] #[derive(Clone, Debug)] -pub struct GetMonthlyCustomReportsParams { +pub struct GetMonthlyCustomReportsOptionalParams { /// The number of files to return in the response `[default=60].` pub page_size: Option, /// The identifier of the first page to return. This parameter is used for the pagination feature `[default=0]`. @@ -71,14 +63,9 @@ pub struct GetMonthlyCustomReportsParams { pub sort: Option, } -/// GetMonthlyUsageAttributionParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_monthly_usage_attribution`] +/// GetMonthlyUsageAttributionOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_monthly_usage_attribution`] #[derive(Clone, Debug)] -pub struct GetMonthlyUsageAttributionParams { - /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month. - /// Maximum of 15 months ago. - pub start_month: String, - /// Comma-separated list of usage types to return, or `*` for all usage types. - pub fields: crate::datadogV1::model::MonthlyUsageAttributionSupportedMetrics, +pub struct GetMonthlyUsageAttributionOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month. pub end_month: Option, /// The direction to sort by: `[desc, asc]`. @@ -95,38 +82,17 @@ pub struct GetMonthlyUsageAttributionParams { pub include_descendants: Option, } -/// GetSpecifiedDailyCustomReportsParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_specified_daily_custom_reports`] +/// GetUsageAnalyzedLogsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_analyzed_logs`] #[derive(Clone, Debug)] -pub struct GetSpecifiedDailyCustomReportsParams { - /// Date of the report in the format `YYYY-MM-DD`. - pub report_id: String, -} - -/// GetSpecifiedMonthlyCustomReportsParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_specified_monthly_custom_reports`] -#[derive(Clone, Debug)] -pub struct GetSpecifiedMonthlyCustomReportsParams { - /// Date of the report in the format `YYYY-MM-DD`. - pub report_id: String, -} - -/// GetUsageAnalyzedLogsParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_analyzed_logs`] -#[derive(Clone, Debug)] -pub struct GetUsageAnalyzedLogsParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageAnalyzedLogsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } -/// GetUsageAttributionParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_attribution`] +/// GetUsageAttributionOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_attribution`] #[derive(Clone, Debug)] -pub struct GetUsageAttributionParams { - /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month. - /// Maximum of 15 months ago. - pub start_month: String, - /// Comma-separated list of usage types to return, or `*` for all usage types. - pub fields: crate::datadogV1::model::UsageAttributionSupportedMetrics, +pub struct GetUsageAttributionOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month. pub end_month: Option, /// The direction to sort by: `[desc, asc]`. @@ -141,269 +107,216 @@ pub struct GetUsageAttributionParams { pub limit: Option, } -/// GetUsageAuditLogsParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_audit_logs`] +/// GetUsageAuditLogsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_audit_logs`] #[derive(Clone, Debug)] -pub struct GetUsageAuditLogsParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageAuditLogsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } -/// GetUsageBillableSummaryParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_billable_summary`] +/// GetUsageBillableSummaryOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_billable_summary`] #[derive(Clone, Debug)] -pub struct GetUsageBillableSummaryParams { +pub struct GetUsageBillableSummaryOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage starting this month. pub month: Option, } -/// GetUsageCIAppParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_ci_app`] +/// GetUsageCIAppOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_ci_app`] #[derive(Clone, Debug)] -pub struct GetUsageCIAppParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageCIAppOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } -/// GetUsageCWSParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_cws`] +/// GetUsageCWSOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_cws`] #[derive(Clone, Debug)] -pub struct GetUsageCWSParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageCWSOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } -/// GetUsageCloudSecurityPostureManagementParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_cloud_security_posture_management`] +/// GetUsageCloudSecurityPostureManagementOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_cloud_security_posture_management`] #[derive(Clone, Debug)] -pub struct GetUsageCloudSecurityPostureManagementParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageCloudSecurityPostureManagementOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } -/// GetUsageDBMParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_dbm`] +/// GetUsageDBMOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_dbm`] #[derive(Clone, Debug)] -pub struct GetUsageDBMParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageDBMOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } -/// GetUsageFargateParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_fargate`] +/// GetUsageFargateOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_fargate`] #[derive(Clone, Debug)] -pub struct GetUsageFargateParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageFargateOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } -/// GetUsageHostsParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_hosts`] +/// GetUsageHostsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_hosts`] #[derive(Clone, Debug)] -pub struct GetUsageHostsParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageHostsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } -/// GetUsageIndexedSpansParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_indexed_spans`] +/// GetUsageIndexedSpansOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_indexed_spans`] #[derive(Clone, Debug)] -pub struct GetUsageIndexedSpansParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageIndexedSpansOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. pub end_hr: Option, } -/// GetUsageInternetOfThingsParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_internet_of_things`] +/// GetUsageInternetOfThingsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_internet_of_things`] #[derive(Clone, Debug)] -pub struct GetUsageInternetOfThingsParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageInternetOfThingsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } -/// GetUsageLambdaParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_lambda`] +/// GetUsageLambdaOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_lambda`] #[derive(Clone, Debug)] -pub struct GetUsageLambdaParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageLambdaOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } -/// GetUsageLogsParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_logs`] +/// GetUsageLogsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_logs`] #[derive(Clone, Debug)] -pub struct GetUsageLogsParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageLogsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } -/// GetUsageLogsByIndexParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_logs_by_index`] +/// GetUsageLogsByIndexOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_logs_by_index`] #[derive(Clone, Debug)] -pub struct GetUsageLogsByIndexParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageLogsByIndexOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, /// Comma-separated list of log index names. pub index_name: Option>, } -/// GetUsageLogsByRetentionParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_logs_by_retention`] +/// GetUsageLogsByRetentionOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_logs_by_retention`] #[derive(Clone, Debug)] -pub struct GetUsageLogsByRetentionParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageLogsByRetentionOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } -/// GetUsageNetworkFlowsParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_network_flows`] +/// GetUsageNetworkFlowsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_network_flows`] #[derive(Clone, Debug)] -pub struct GetUsageNetworkFlowsParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageNetworkFlowsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } -/// GetUsageNetworkHostsParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_network_hosts`] +/// GetUsageNetworkHostsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_network_hosts`] #[derive(Clone, Debug)] -pub struct GetUsageNetworkHostsParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageNetworkHostsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } -/// GetUsageOnlineArchiveParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_online_archive`] +/// GetUsageOnlineArchiveOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_online_archive`] #[derive(Clone, Debug)] -pub struct GetUsageOnlineArchiveParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageOnlineArchiveOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } -/// GetUsageProfilingParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_profiling`] +/// GetUsageProfilingOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_profiling`] #[derive(Clone, Debug)] -pub struct GetUsageProfilingParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageProfilingOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } -/// GetUsageRumSessionsParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_rum_sessions`] +/// GetUsageRumSessionsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_rum_sessions`] #[derive(Clone, Debug)] -pub struct GetUsageRumSessionsParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageRumSessionsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, /// RUM type: `[browser, mobile]`. Defaults to `browser`. pub type_: Option, } -/// GetUsageRumUnitsParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_rum_units`] +/// GetUsageRumUnitsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_rum_units`] #[derive(Clone, Debug)] -pub struct GetUsageRumUnitsParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageRumUnitsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } -/// GetUsageSDSParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_sds`] +/// GetUsageSDSOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_sds`] #[derive(Clone, Debug)] -pub struct GetUsageSDSParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageSDSOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } -/// GetUsageSNMPParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_snmp`] +/// GetUsageSNMPOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_snmp`] #[derive(Clone, Debug)] -pub struct GetUsageSNMPParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageSNMPOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } -/// GetUsageSummaryParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_summary`] +/// GetUsageSummaryOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_summary`] #[derive(Clone, Debug)] -pub struct GetUsageSummaryParams { - /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month. - /// Maximum of 15 months ago. - pub start_month: String, +pub struct GetUsageSummaryOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month. pub end_month: Option, /// Include usage summaries for each sub-org. pub include_org_details: Option, } -/// GetUsageSyntheticsParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_synthetics`] +/// GetUsageSyntheticsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_synthetics`] #[derive(Clone, Debug)] -pub struct GetUsageSyntheticsParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageSyntheticsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } -/// GetUsageSyntheticsAPIParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_synthetics_api`] +/// GetUsageSyntheticsAPIOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_synthetics_api`] #[derive(Clone, Debug)] -pub struct GetUsageSyntheticsAPIParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageSyntheticsAPIOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } -/// GetUsageSyntheticsBrowserParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_synthetics_browser`] +/// GetUsageSyntheticsBrowserOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_synthetics_browser`] #[derive(Clone, Debug)] -pub struct GetUsageSyntheticsBrowserParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageSyntheticsBrowserOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } -/// GetUsageTimeseriesParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_timeseries`] +/// GetUsageTimeseriesOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_timeseries`] #[derive(Clone, Debug)] -pub struct GetUsageTimeseriesParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageTimeseriesOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } -/// GetUsageTopAvgMetricsParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_top_avg_metrics`] +/// GetUsageTopAvgMetricsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_top_avg_metrics`] #[derive(Clone, Debug)] -pub struct GetUsageTopAvgMetricsParams { +pub struct GetUsageTopAvgMetricsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning at this hour. (Either month or day should be specified, but not both) pub month: Option, /// Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for usage beginning at this hour. (Either month or day should be specified, but not both) @@ -818,7 +731,7 @@ impl UsageMeteringAPI { /// Refer to [Migrating from v1 to v2 of the Usage Attribution API]() for the associated migration guide. pub async fn get_daily_custom_reports( &self, - params: GetDailyCustomReportsParams, + params: GetDailyCustomReportsOptionalParams, ) -> Result< Option, Error, @@ -834,14 +747,14 @@ impl UsageMeteringAPI { /// Refer to [Migrating from v1 to v2 of the Usage Attribution API]() for the associated migration guide. pub async fn get_daily_custom_reports_with_http_info( &self, - params: GetDailyCustomReportsParams, + params: GetDailyCustomReportsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let page_size = params.page_size; let page_number = params.page_number; let sort_dir = params.sort_dir; @@ -856,18 +769,21 @@ impl UsageMeteringAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_number { + if let Some(ref local_query_param) = page_number { local_req_builder = - local_req_builder.query(&[("page[number]", &local_str.to_string())]); + local_req_builder.query(&[("page[number]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort_dir { - local_req_builder = local_req_builder.query(&[("sort_dir", &local_str.to_string())]); + if let Some(ref local_query_param) = sort_dir { + local_req_builder = + local_req_builder.query(&[("sort_dir", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; // build user agent @@ -927,13 +843,15 @@ impl UsageMeteringAPI { /// ``` pub async fn get_hourly_usage_attribution( &self, - params: GetHourlyUsageAttributionParams, + start_hr: String, + usage_type: crate::datadogV1::model::HourlyUsageAttributionUsageType, + params: GetHourlyUsageAttributionOptionalParams, ) -> Result< Option, Error, > { match self - .get_hourly_usage_attribution_with_http_info(params) + .get_hourly_usage_attribution_with_http_info(start_hr, usage_type, params) .await { Ok(response_content) => Ok(response_content.entity), @@ -958,16 +876,16 @@ impl UsageMeteringAPI { /// ``` pub async fn get_hourly_usage_attribution_with_http_info( &self, - params: GetHourlyUsageAttributionParams, + start_hr: String, + usage_type: crate::datadogV1::model::HourlyUsageAttributionUsageType, + params: GetHourlyUsageAttributionOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; - let usage_type = params.usage_type; + // unbox and build optional parameters let end_hr = params.end_hr; let next_record_id = params.next_record_id; let tag_breakdown_keys = params.tag_breakdown_keys; @@ -984,20 +902,21 @@ impl UsageMeteringAPI { local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); local_req_builder = local_req_builder.query(&[("usage_type", &usage_type.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; - if let Some(ref local_str) = next_record_id { + if let Some(ref local_query_param) = next_record_id { local_req_builder = - local_req_builder.query(&[("next_record_id", &local_str.to_string())]); + local_req_builder.query(&[("next_record_id", &local_query_param.to_string())]); }; - if let Some(ref local_str) = tag_breakdown_keys { + if let Some(ref local_query_param) = tag_breakdown_keys { local_req_builder = - local_req_builder.query(&[("tag_breakdown_keys", &local_str.to_string())]); + local_req_builder.query(&[("tag_breakdown_keys", &local_query_param.to_string())]); }; - if let Some(ref local_str) = include_descendants { + if let Some(ref local_query_param) = include_descendants { local_req_builder = - local_req_builder.query(&[("include_descendants", &local_str.to_string())]); + local_req_builder.query(&[("include_descendants", &local_query_param.to_string())]); }; // build user agent @@ -1044,12 +963,16 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_incident_management( &self, - params: GetIncidentManagementParams, + start_hr: String, + params: GetIncidentManagementOptionalParams, ) -> Result< Option, Error, > { - match self.get_incident_management_with_http_info(params).await { + match self + .get_incident_management_with_http_info(start_hr, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1059,15 +982,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_incident_management_with_http_info( &self, - params: GetIncidentManagementParams, + start_hr: String, + params: GetIncidentManagementOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -1080,8 +1003,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -1128,12 +1052,16 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_ingested_spans( &self, - params: GetIngestedSpansParams, + start_hr: String, + params: GetIngestedSpansOptionalParams, ) -> Result< Option, Error, > { - match self.get_ingested_spans_with_http_info(params).await { + match self + .get_ingested_spans_with_http_info(start_hr, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1143,15 +1071,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_ingested_spans_with_http_info( &self, - params: GetIngestedSpansParams, + start_hr: String, + params: GetIngestedSpansOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -1164,8 +1092,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -1213,7 +1142,7 @@ impl UsageMeteringAPI { /// Refer to [Migrating from v1 to v2 of the Usage Attribution API]() for the associated migration guide. pub async fn get_monthly_custom_reports( &self, - params: GetMonthlyCustomReportsParams, + params: GetMonthlyCustomReportsOptionalParams, ) -> Result< Option, Error, @@ -1229,14 +1158,14 @@ impl UsageMeteringAPI { /// Refer to [Migrating from v1 to v2 of the Usage Attribution API]() for the associated migration guide. pub async fn get_monthly_custom_reports_with_http_info( &self, - params: GetMonthlyCustomReportsParams, + params: GetMonthlyCustomReportsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let page_size = params.page_size; let page_number = params.page_number; let sort_dir = params.sort_dir; @@ -1251,18 +1180,21 @@ impl UsageMeteringAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_number { + if let Some(ref local_query_param) = page_number { local_req_builder = - local_req_builder.query(&[("page[number]", &local_str.to_string())]); + local_req_builder.query(&[("page[number]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort_dir { - local_req_builder = local_req_builder.query(&[("sort_dir", &local_str.to_string())]); + if let Some(ref local_query_param) = sort_dir { + local_req_builder = + local_req_builder.query(&[("sort_dir", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; // build user agent @@ -1322,13 +1254,15 @@ impl UsageMeteringAPI { /// ``` pub async fn get_monthly_usage_attribution( &self, - params: GetMonthlyUsageAttributionParams, + start_month: String, + fields: crate::datadogV1::model::MonthlyUsageAttributionSupportedMetrics, + params: GetMonthlyUsageAttributionOptionalParams, ) -> Result< Option, Error, > { match self - .get_monthly_usage_attribution_with_http_info(params) + .get_monthly_usage_attribution_with_http_info(start_month, fields, params) .await { Ok(response_content) => Ok(response_content.entity), @@ -1353,16 +1287,16 @@ impl UsageMeteringAPI { /// ``` pub async fn get_monthly_usage_attribution_with_http_info( &self, - params: GetMonthlyUsageAttributionParams, + start_month: String, + fields: crate::datadogV1::model::MonthlyUsageAttributionSupportedMetrics, + params: GetMonthlyUsageAttributionOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_month = params.start_month; - let fields = params.fields; + // unbox and build optional parameters let end_month = params.end_month; let sort_direction = params.sort_direction; let sort_name = params.sort_name; @@ -1381,27 +1315,29 @@ impl UsageMeteringAPI { local_req_builder = local_req_builder.query(&[("start_month", &start_month.to_string())]); local_req_builder = local_req_builder.query(&[("fields", &fields.to_string())]); - if let Some(ref local_str) = end_month { - local_req_builder = local_req_builder.query(&[("end_month", &local_str.to_string())]); + if let Some(ref local_query_param) = end_month { + local_req_builder = + local_req_builder.query(&[("end_month", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort_direction { + if let Some(ref local_query_param) = sort_direction { local_req_builder = - local_req_builder.query(&[("sort_direction", &local_str.to_string())]); + local_req_builder.query(&[("sort_direction", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort_name { - local_req_builder = local_req_builder.query(&[("sort_name", &local_str.to_string())]); + if let Some(ref local_query_param) = sort_name { + local_req_builder = + local_req_builder.query(&[("sort_name", &local_query_param.to_string())]); }; - if let Some(ref local_str) = tag_breakdown_keys { + if let Some(ref local_query_param) = tag_breakdown_keys { local_req_builder = - local_req_builder.query(&[("tag_breakdown_keys", &local_str.to_string())]); + local_req_builder.query(&[("tag_breakdown_keys", &local_query_param.to_string())]); }; - if let Some(ref local_str) = next_record_id { + if let Some(ref local_query_param) = next_record_id { local_req_builder = - local_req_builder.query(&[("next_record_id", &local_str.to_string())]); + local_req_builder.query(&[("next_record_id", &local_query_param.to_string())]); }; - if let Some(ref local_str) = include_descendants { + if let Some(ref local_query_param) = include_descendants { local_req_builder = - local_req_builder.query(&[("include_descendants", &local_str.to_string())]); + local_req_builder.query(&[("include_descendants", &local_query_param.to_string())]); }; // build user agent @@ -1449,13 +1385,13 @@ impl UsageMeteringAPI { /// Refer to [Migrating from v1 to v2 of the Usage Attribution API]() for the associated migration guide. pub async fn get_specified_daily_custom_reports( &self, - params: GetSpecifiedDailyCustomReportsParams, + report_id: String, ) -> Result< Option, Error, > { match self - .get_specified_daily_custom_reports_with_http_info(params) + .get_specified_daily_custom_reports_with_http_info(report_id) .await { Ok(response_content) => Ok(response_content.entity), @@ -1468,16 +1404,13 @@ impl UsageMeteringAPI { /// Refer to [Migrating from v1 to v2 of the Usage Attribution API]() for the associated migration guide. pub async fn get_specified_daily_custom_reports_with_http_info( &self, - params: GetSpecifiedDailyCustomReportsParams, + report_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let report_id = params.report_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1533,13 +1466,13 @@ impl UsageMeteringAPI { /// Refer to [Migrating from v1 to v2 of the Usage Attribution API]() for the associated migration guide. pub async fn get_specified_monthly_custom_reports( &self, - params: GetSpecifiedMonthlyCustomReportsParams, + report_id: String, ) -> Result< Option, Error, > { match self - .get_specified_monthly_custom_reports_with_http_info(params) + .get_specified_monthly_custom_reports_with_http_info(report_id) .await { Ok(response_content) => Ok(response_content.entity), @@ -1552,16 +1485,13 @@ impl UsageMeteringAPI { /// Refer to [Migrating from v1 to v2 of the Usage Attribution API]() for the associated migration guide. pub async fn get_specified_monthly_custom_reports_with_http_info( &self, - params: GetSpecifiedMonthlyCustomReportsParams, + report_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let report_id = params.report_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1616,12 +1546,16 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_analyzed_logs( &self, - params: GetUsageAnalyzedLogsParams, + start_hr: String, + params: GetUsageAnalyzedLogsOptionalParams, ) -> Result< Option, Error, > { - match self.get_usage_analyzed_logs_with_http_info(params).await { + match self + .get_usage_analyzed_logs_with_http_info(start_hr, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1631,15 +1565,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_analyzed_logs_with_http_info( &self, - params: GetUsageAnalyzedLogsParams, + start_hr: String, + params: GetUsageAnalyzedLogsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -1652,8 +1586,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -1701,12 +1636,17 @@ impl UsageMeteringAPI { /// Refer to [Migrating from v1 to v2 of the Usage Attribution API]() for the associated migration guide. pub async fn get_usage_attribution( &self, - params: GetUsageAttributionParams, + start_month: String, + fields: crate::datadogV1::model::UsageAttributionSupportedMetrics, + params: GetUsageAttributionOptionalParams, ) -> Result< Option, Error, > { - match self.get_usage_attribution_with_http_info(params).await { + match self + .get_usage_attribution_with_http_info(start_month, fields, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1717,16 +1657,16 @@ impl UsageMeteringAPI { /// Refer to [Migrating from v1 to v2 of the Usage Attribution API]() for the associated migration guide. pub async fn get_usage_attribution_with_http_info( &self, - params: GetUsageAttributionParams, + start_month: String, + fields: crate::datadogV1::model::UsageAttributionSupportedMetrics, + params: GetUsageAttributionOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_month = params.start_month; - let fields = params.fields; + // unbox and build optional parameters let end_month = params.end_month; let sort_direction = params.sort_direction; let sort_name = params.sort_name; @@ -1742,25 +1682,29 @@ impl UsageMeteringAPI { local_req_builder = local_req_builder.query(&[("start_month", &start_month.to_string())]); local_req_builder = local_req_builder.query(&[("fields", &fields.to_string())]); - if let Some(ref local_str) = end_month { - local_req_builder = local_req_builder.query(&[("end_month", &local_str.to_string())]); + if let Some(ref local_query_param) = end_month { + local_req_builder = + local_req_builder.query(&[("end_month", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort_direction { + if let Some(ref local_query_param) = sort_direction { local_req_builder = - local_req_builder.query(&[("sort_direction", &local_str.to_string())]); + local_req_builder.query(&[("sort_direction", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort_name { - local_req_builder = local_req_builder.query(&[("sort_name", &local_str.to_string())]); + if let Some(ref local_query_param) = sort_name { + local_req_builder = + local_req_builder.query(&[("sort_name", &local_query_param.to_string())]); }; - if let Some(ref local_str) = include_descendants { + if let Some(ref local_query_param) = include_descendants { local_req_builder = - local_req_builder.query(&[("include_descendants", &local_str.to_string())]); + local_req_builder.query(&[("include_descendants", &local_query_param.to_string())]); }; - if let Some(ref local_str) = offset { - local_req_builder = local_req_builder.query(&[("offset", &local_str.to_string())]); + if let Some(ref local_query_param) = offset { + local_req_builder = + local_req_builder.query(&[("offset", &local_query_param.to_string())]); }; - if let Some(ref local_str) = limit { - local_req_builder = local_req_builder.query(&[("limit", &local_str.to_string())]); + if let Some(ref local_query_param) = limit { + local_req_builder = + local_req_builder.query(&[("limit", &local_query_param.to_string())]); }; // build user agent @@ -1807,12 +1751,16 @@ impl UsageMeteringAPI { /// **Note:** This endpoint has been deprecated. pub async fn get_usage_audit_logs( &self, - params: GetUsageAuditLogsParams, + start_hr: String, + params: GetUsageAuditLogsOptionalParams, ) -> Result< Option, Error, > { - match self.get_usage_audit_logs_with_http_info(params).await { + match self + .get_usage_audit_logs_with_http_info(start_hr, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1822,15 +1770,15 @@ impl UsageMeteringAPI { /// **Note:** This endpoint has been deprecated. pub async fn get_usage_audit_logs_with_http_info( &self, - params: GetUsageAuditLogsParams, + start_hr: String, + params: GetUsageAuditLogsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -1840,8 +1788,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -1887,7 +1836,7 @@ impl UsageMeteringAPI { /// Get billable usage across your account. pub async fn get_usage_billable_summary( &self, - params: GetUsageBillableSummaryParams, + params: GetUsageBillableSummaryOptionalParams, ) -> Result< Option, Error, @@ -1901,14 +1850,14 @@ impl UsageMeteringAPI { /// Get billable usage across your account. pub async fn get_usage_billable_summary_with_http_info( &self, - params: GetUsageBillableSummaryParams, + params: GetUsageBillableSummaryOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let month = params.month; let local_client = &local_configuration.client; @@ -1920,8 +1869,9 @@ impl UsageMeteringAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = month { - local_req_builder = local_req_builder.query(&[("month", &local_str.to_string())]); + if let Some(ref local_query_param) = month { + local_req_builder = + local_req_builder.query(&[("month", &local_query_param.to_string())]); }; // build user agent @@ -1968,10 +1918,11 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_ci_app( &self, - params: GetUsageCIAppParams, + start_hr: String, + params: GetUsageCIAppOptionalParams, ) -> Result, Error> { - match self.get_usage_ci_app_with_http_info(params).await { + match self.get_usage_ci_app_with_http_info(start_hr, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1981,15 +1932,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_ci_app_with_http_info( &self, - params: GetUsageCIAppParams, + start_hr: String, + params: GetUsageCIAppOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -1999,8 +1950,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -2047,9 +1999,10 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_cws( &self, - params: GetUsageCWSParams, + start_hr: String, + params: GetUsageCWSOptionalParams, ) -> Result, Error> { - match self.get_usage_cws_with_http_info(params).await { + match self.get_usage_cws_with_http_info(start_hr, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -2059,13 +2012,13 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_cws_with_http_info( &self, - params: GetUsageCWSParams, + start_hr: String, + params: GetUsageCWSOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -2075,8 +2028,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -2122,13 +2076,14 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_cloud_security_posture_management( &self, - params: GetUsageCloudSecurityPostureManagementParams, + start_hr: String, + params: GetUsageCloudSecurityPostureManagementOptionalParams, ) -> Result< Option, Error, > { match self - .get_usage_cloud_security_posture_management_with_http_info(params) + .get_usage_cloud_security_posture_management_with_http_info(start_hr, params) .await { Ok(response_content) => Ok(response_content.entity), @@ -2140,15 +2095,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_cloud_security_posture_management_with_http_info( &self, - params: GetUsageCloudSecurityPostureManagementParams, + start_hr: String, + params: GetUsageCloudSecurityPostureManagementOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -2158,8 +2113,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -2207,9 +2163,10 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_dbm( &self, - params: GetUsageDBMParams, + start_hr: String, + params: GetUsageDBMOptionalParams, ) -> Result, Error> { - match self.get_usage_dbm_with_http_info(params).await { + match self.get_usage_dbm_with_http_info(start_hr, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -2219,13 +2176,13 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_dbm_with_http_info( &self, - params: GetUsageDBMParams, + start_hr: String, + params: GetUsageDBMOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -2235,8 +2192,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -2282,10 +2240,14 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_fargate( &self, - params: GetUsageFargateParams, + start_hr: String, + params: GetUsageFargateOptionalParams, ) -> Result, Error> { - match self.get_usage_fargate_with_http_info(params).await { + match self + .get_usage_fargate_with_http_info(start_hr, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -2295,15 +2257,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_fargate_with_http_info( &self, - params: GetUsageFargateParams, + start_hr: String, + params: GetUsageFargateOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -2313,8 +2275,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -2361,10 +2324,11 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_hosts( &self, - params: GetUsageHostsParams, + start_hr: String, + params: GetUsageHostsOptionalParams, ) -> Result, Error> { - match self.get_usage_hosts_with_http_info(params).await { + match self.get_usage_hosts_with_http_info(start_hr, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -2374,15 +2338,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_hosts_with_http_info( &self, - params: GetUsageHostsParams, + start_hr: String, + params: GetUsageHostsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -2392,8 +2356,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -2440,12 +2405,16 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_indexed_spans( &self, - params: GetUsageIndexedSpansParams, + start_hr: String, + params: GetUsageIndexedSpansOptionalParams, ) -> Result< Option, Error, > { - match self.get_usage_indexed_spans_with_http_info(params).await { + match self + .get_usage_indexed_spans_with_http_info(start_hr, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -2455,15 +2424,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_indexed_spans_with_http_info( &self, - params: GetUsageIndexedSpansParams, + start_hr: String, + params: GetUsageIndexedSpansOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -2476,8 +2445,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -2524,13 +2494,14 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_internet_of_things( &self, - params: GetUsageInternetOfThingsParams, + start_hr: String, + params: GetUsageInternetOfThingsOptionalParams, ) -> Result< Option, Error, > { match self - .get_usage_internet_of_things_with_http_info(params) + .get_usage_internet_of_things_with_http_info(start_hr, params) .await { Ok(response_content) => Ok(response_content.entity), @@ -2542,15 +2513,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_internet_of_things_with_http_info( &self, - params: GetUsageInternetOfThingsParams, + start_hr: String, + params: GetUsageInternetOfThingsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -2560,8 +2531,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -2608,10 +2580,11 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_lambda( &self, - params: GetUsageLambdaParams, + start_hr: String, + params: GetUsageLambdaOptionalParams, ) -> Result, Error> { - match self.get_usage_lambda_with_http_info(params).await { + match self.get_usage_lambda_with_http_info(start_hr, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -2621,15 +2594,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_lambda_with_http_info( &self, - params: GetUsageLambdaParams, + start_hr: String, + params: GetUsageLambdaOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -2639,8 +2612,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -2687,9 +2661,10 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_logs( &self, - params: GetUsageLogsParams, + start_hr: String, + params: GetUsageLogsOptionalParams, ) -> Result, Error> { - match self.get_usage_logs_with_http_info(params).await { + match self.get_usage_logs_with_http_info(start_hr, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -2699,13 +2674,13 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_logs_with_http_info( &self, - params: GetUsageLogsParams, + start_hr: String, + params: GetUsageLogsOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -2715,8 +2690,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -2761,12 +2737,16 @@ impl UsageMeteringAPI { /// Get hourly usage for logs by index. pub async fn get_usage_logs_by_index( &self, - params: GetUsageLogsByIndexParams, + start_hr: String, + params: GetUsageLogsByIndexOptionalParams, ) -> Result< Option, Error, > { - match self.get_usage_logs_by_index_with_http_info(params).await { + match self + .get_usage_logs_by_index_with_http_info(start_hr, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -2775,15 +2755,15 @@ impl UsageMeteringAPI { /// Get hourly usage for logs by index. pub async fn get_usage_logs_by_index_with_http_info( &self, - params: GetUsageLogsByIndexParams, + start_hr: String, + params: GetUsageLogsByIndexOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let index_name = params.index_name; @@ -2797,14 +2777,15 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; if let Some(ref local) = index_name { local_req_builder = local_req_builder.query(&[( "index_name", &local - .into_iter() + .iter() .map(|p| p.to_string()) .collect::>() .join(",") @@ -2856,13 +2837,14 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_logs_by_retention( &self, - params: GetUsageLogsByRetentionParams, + start_hr: String, + params: GetUsageLogsByRetentionOptionalParams, ) -> Result< Option, Error, > { match self - .get_usage_logs_by_retention_with_http_info(params) + .get_usage_logs_by_retention_with_http_info(start_hr, params) .await { Ok(response_content) => Ok(response_content.entity), @@ -2874,15 +2856,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_logs_by_retention_with_http_info( &self, - params: GetUsageLogsByRetentionParams, + start_hr: String, + params: GetUsageLogsByRetentionOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -2895,8 +2877,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -2943,12 +2926,16 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_network_flows( &self, - params: GetUsageNetworkFlowsParams, + start_hr: String, + params: GetUsageNetworkFlowsOptionalParams, ) -> Result< Option, Error, > { - match self.get_usage_network_flows_with_http_info(params).await { + match self + .get_usage_network_flows_with_http_info(start_hr, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -2958,15 +2945,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_network_flows_with_http_info( &self, - params: GetUsageNetworkFlowsParams, + start_hr: String, + params: GetUsageNetworkFlowsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -2979,8 +2966,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -3027,12 +3015,16 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_network_hosts( &self, - params: GetUsageNetworkHostsParams, + start_hr: String, + params: GetUsageNetworkHostsOptionalParams, ) -> Result< Option, Error, > { - match self.get_usage_network_hosts_with_http_info(params).await { + match self + .get_usage_network_hosts_with_http_info(start_hr, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -3042,15 +3034,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_network_hosts_with_http_info( &self, - params: GetUsageNetworkHostsParams, + start_hr: String, + params: GetUsageNetworkHostsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -3063,8 +3055,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -3111,12 +3104,16 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_online_archive( &self, - params: GetUsageOnlineArchiveParams, + start_hr: String, + params: GetUsageOnlineArchiveOptionalParams, ) -> Result< Option, Error, > { - match self.get_usage_online_archive_with_http_info(params).await { + match self + .get_usage_online_archive_with_http_info(start_hr, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -3126,15 +3123,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_online_archive_with_http_info( &self, - params: GetUsageOnlineArchiveParams, + start_hr: String, + params: GetUsageOnlineArchiveOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -3147,8 +3144,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -3195,12 +3193,16 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_profiling( &self, - params: GetUsageProfilingParams, + start_hr: String, + params: GetUsageProfilingOptionalParams, ) -> Result< Option, Error, > { - match self.get_usage_profiling_with_http_info(params).await { + match self + .get_usage_profiling_with_http_info(start_hr, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -3210,15 +3212,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_profiling_with_http_info( &self, - params: GetUsageProfilingParams, + start_hr: String, + params: GetUsageProfilingOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -3228,8 +3230,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -3276,12 +3279,16 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_rum_sessions( &self, - params: GetUsageRumSessionsParams, + start_hr: String, + params: GetUsageRumSessionsOptionalParams, ) -> Result< Option, Error, > { - match self.get_usage_rum_sessions_with_http_info(params).await { + match self + .get_usage_rum_sessions_with_http_info(start_hr, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -3291,15 +3298,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_rum_sessions_with_http_info( &self, - params: GetUsageRumSessionsParams, + start_hr: String, + params: GetUsageRumSessionsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let type_ = params.type_; @@ -3313,11 +3320,13 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; - if let Some(ref local_str) = type_ { - local_req_builder = local_req_builder.query(&[("type", &local_str.to_string())]); + if let Some(ref local_query_param) = type_ { + local_req_builder = + local_req_builder.query(&[("type", &local_query_param.to_string())]); }; // build user agent @@ -3364,10 +3373,14 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_rum_units( &self, - params: GetUsageRumUnitsParams, + start_hr: String, + params: GetUsageRumUnitsOptionalParams, ) -> Result, Error> { - match self.get_usage_rum_units_with_http_info(params).await { + match self + .get_usage_rum_units_with_http_info(start_hr, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -3377,15 +3390,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_rum_units_with_http_info( &self, - params: GetUsageRumUnitsParams, + start_hr: String, + params: GetUsageRumUnitsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -3395,8 +3408,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -3443,9 +3457,10 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_sds( &self, - params: GetUsageSDSParams, + start_hr: String, + params: GetUsageSDSOptionalParams, ) -> Result, Error> { - match self.get_usage_sds_with_http_info(params).await { + match self.get_usage_sds_with_http_info(start_hr, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -3455,13 +3470,13 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_sds_with_http_info( &self, - params: GetUsageSDSParams, + start_hr: String, + params: GetUsageSDSOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -3471,8 +3486,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -3518,9 +3534,10 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_snmp( &self, - params: GetUsageSNMPParams, + start_hr: String, + params: GetUsageSNMPOptionalParams, ) -> Result, Error> { - match self.get_usage_snmp_with_http_info(params).await { + match self.get_usage_snmp_with_http_info(start_hr, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -3530,13 +3547,13 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_snmp_with_http_info( &self, - params: GetUsageSNMPParams, + start_hr: String, + params: GetUsageSNMPOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -3546,8 +3563,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -3592,10 +3610,14 @@ impl UsageMeteringAPI { /// Get all usage across your account. pub async fn get_usage_summary( &self, - params: GetUsageSummaryParams, + start_month: String, + params: GetUsageSummaryOptionalParams, ) -> Result, Error> { - match self.get_usage_summary_with_http_info(params).await { + match self + .get_usage_summary_with_http_info(start_month, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -3604,15 +3626,15 @@ impl UsageMeteringAPI { /// Get all usage across your account. pub async fn get_usage_summary_with_http_info( &self, - params: GetUsageSummaryParams, + start_month: String, + params: GetUsageSummaryOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_month = params.start_month; + // unbox and build optional parameters let end_month = params.end_month; let include_org_details = params.include_org_details; @@ -3623,12 +3645,13 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_month", &start_month.to_string())]); - if let Some(ref local_str) = end_month { - local_req_builder = local_req_builder.query(&[("end_month", &local_str.to_string())]); + if let Some(ref local_query_param) = end_month { + local_req_builder = + local_req_builder.query(&[("end_month", &local_query_param.to_string())]); }; - if let Some(ref local_str) = include_org_details { + if let Some(ref local_query_param) = include_org_details { local_req_builder = - local_req_builder.query(&[("include_org_details", &local_str.to_string())]); + local_req_builder.query(&[("include_org_details", &local_query_param.to_string())]); }; // build user agent @@ -3675,12 +3698,16 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_synthetics( &self, - params: GetUsageSyntheticsParams, + start_hr: String, + params: GetUsageSyntheticsOptionalParams, ) -> Result< Option, Error, > { - match self.get_usage_synthetics_with_http_info(params).await { + match self + .get_usage_synthetics_with_http_info(start_hr, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -3690,15 +3717,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_synthetics_with_http_info( &self, - params: GetUsageSyntheticsParams, + start_hr: String, + params: GetUsageSyntheticsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -3708,8 +3735,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -3756,12 +3784,16 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_synthetics_api( &self, - params: GetUsageSyntheticsAPIParams, + start_hr: String, + params: GetUsageSyntheticsAPIOptionalParams, ) -> Result< Option, Error, > { - match self.get_usage_synthetics_api_with_http_info(params).await { + match self + .get_usage_synthetics_api_with_http_info(start_hr, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -3771,15 +3803,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_synthetics_api_with_http_info( &self, - params: GetUsageSyntheticsAPIParams, + start_hr: String, + params: GetUsageSyntheticsAPIOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -3792,8 +3824,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -3840,13 +3873,14 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_synthetics_browser( &self, - params: GetUsageSyntheticsBrowserParams, + start_hr: String, + params: GetUsageSyntheticsBrowserOptionalParams, ) -> Result< Option, Error, > { match self - .get_usage_synthetics_browser_with_http_info(params) + .get_usage_synthetics_browser_with_http_info(start_hr, params) .await { Ok(response_content) => Ok(response_content.entity), @@ -3858,15 +3892,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_synthetics_browser_with_http_info( &self, - params: GetUsageSyntheticsBrowserParams, + start_hr: String, + params: GetUsageSyntheticsBrowserOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -3879,8 +3913,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -3927,12 +3962,16 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_timeseries( &self, - params: GetUsageTimeseriesParams, + start_hr: String, + params: GetUsageTimeseriesOptionalParams, ) -> Result< Option, Error, > { - match self.get_usage_timeseries_with_http_info(params).await { + match self + .get_usage_timeseries_with_http_info(start_hr, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -3942,15 +3981,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](). Refer to [Migrating from the V1 Hourly Usage APIs to V2]() for the associated migration guide. pub async fn get_usage_timeseries_with_http_info( &self, - params: GetUsageTimeseriesParams, + start_hr: String, + params: GetUsageTimeseriesOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -3960,8 +3999,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -4007,7 +4047,7 @@ impl UsageMeteringAPI { /// Get all [custom metrics]() by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed. pub async fn get_usage_top_avg_metrics( &self, - params: GetUsageTopAvgMetricsParams, + params: GetUsageTopAvgMetricsOptionalParams, ) -> Result< Option, Error, @@ -4021,14 +4061,14 @@ impl UsageMeteringAPI { /// Get all [custom metrics]() by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed. pub async fn get_usage_top_avg_metrics_with_http_info( &self, - params: GetUsageTopAvgMetricsParams, + params: GetUsageTopAvgMetricsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let month = params.month; let day = params.day; let names = params.names; @@ -4044,29 +4084,31 @@ impl UsageMeteringAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = month { - local_req_builder = local_req_builder.query(&[("month", &local_str.to_string())]); + if let Some(ref local_query_param) = month { + local_req_builder = + local_req_builder.query(&[("month", &local_query_param.to_string())]); }; - if let Some(ref local_str) = day { - local_req_builder = local_req_builder.query(&[("day", &local_str.to_string())]); + if let Some(ref local_query_param) = day { + local_req_builder = local_req_builder.query(&[("day", &local_query_param.to_string())]); }; if let Some(ref local) = names { local_req_builder = local_req_builder.query(&[( "names", &local - .into_iter() + .iter() .map(|p| p.to_string()) .collect::>() .join(",") .to_string(), )]); }; - if let Some(ref local_str) = limit { - local_req_builder = local_req_builder.query(&[("limit", &local_str.to_string())]); + if let Some(ref local_query_param) = limit { + local_req_builder = + local_req_builder.query(&[("limit", &local_query_param.to_string())]); }; - if let Some(ref local_str) = next_record_id { + if let Some(ref local_query_param) = next_record_id { local_req_builder = - local_req_builder.query(&[("next_record_id", &local_str.to_string())]); + local_req_builder.query(&[("next_record_id", &local_query_param.to_string())]); }; // build user agent diff --git a/src/datadogV1/api/api_users.rs b/src/datadogV1/api/api_users.rs index f30b0eccd..335234736 100644 --- a/src/datadogV1/api/api_users.rs +++ b/src/datadogV1/api/api_users.rs @@ -5,36 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateUserParams is a struct for passing parameters to the method [`UsersAPI::create_user`] -#[derive(Clone, Debug)] -pub struct CreateUserParams { - /// User object that needs to be created. - pub body: crate::datadogV1::model::User, -} - -/// DisableUserParams is a struct for passing parameters to the method [`UsersAPI::disable_user`] -#[derive(Clone, Debug)] -pub struct DisableUserParams { - /// The handle of the user. - pub user_handle: String, -} - -/// GetUserParams is a struct for passing parameters to the method [`UsersAPI::get_user`] -#[derive(Clone, Debug)] -pub struct GetUserParams { - /// The ID of the user. - pub user_handle: String, -} - -/// UpdateUserParams is a struct for passing parameters to the method [`UsersAPI::update_user`] -#[derive(Clone, Debug)] -pub struct UpdateUserParams { - /// The ID of the user. - pub user_handle: String, - /// Description of the update. - pub body: crate::datadogV1::model::User, -} - /// CreateUserError is a struct for typed errors of method [`UsersAPI::create_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -114,9 +84,9 @@ impl UsersAPI { /// if application keys belong to administrators. pub async fn create_user( &self, - params: CreateUserParams, + body: crate::datadogV1::model::User, ) -> Result, Error> { - match self.create_user_with_http_info(params).await { + match self.create_user_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -128,14 +98,11 @@ impl UsersAPI { /// if application keys belong to administrators. pub async fn create_user_with_http_info( &self, - params: CreateUserParams, + body: crate::datadogV1::model::User, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/user", local_configuration.base_path); @@ -194,9 +161,9 @@ impl UsersAPI { /// administrators. pub async fn disable_user( &self, - params: DisableUserParams, + user_handle: String, ) -> Result, Error> { - match self.disable_user_with_http_info(params).await { + match self.disable_user_with_http_info(user_handle).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -208,16 +175,13 @@ impl UsersAPI { /// administrators. pub async fn disable_user_with_http_info( &self, - params: DisableUserParams, + user_handle: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let user_handle = params.user_handle; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -270,9 +234,9 @@ impl UsersAPI { /// Get a user's details. pub async fn get_user( &self, - params: GetUserParams, + user_handle: String, ) -> Result, Error> { - match self.get_user_with_http_info(params).await { + match self.get_user_with_http_info(user_handle).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -281,13 +245,10 @@ impl UsersAPI { /// Get a user's details. pub async fn get_user_with_http_info( &self, - params: GetUserParams, + user_handle: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let user_handle = params.user_handle; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -354,8 +315,6 @@ impl UsersAPI { { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v1/user", local_configuration.base_path); @@ -406,9 +365,10 @@ impl UsersAPI { /// **Note**: It can only be used with application keys belonging to administrators. pub async fn update_user( &self, - params: UpdateUserParams, + user_handle: String, + body: crate::datadogV1::model::User, ) -> Result, Error> { - match self.update_user_with_http_info(params).await { + match self.update_user_with_http_info(user_handle, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -419,15 +379,12 @@ impl UsersAPI { /// **Note**: It can only be used with application keys belonging to administrators. pub async fn update_user_with_http_info( &self, - params: UpdateUserParams, + user_handle: String, + body: crate::datadogV1::model::User, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let user_handle = params.user_handle; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV1/api/api_webhooks_integration.rs b/src/datadogV1/api/api_webhooks_integration.rs index e0bfb976d..084d75408 100644 --- a/src/datadogV1/api/api_webhooks_integration.rs +++ b/src/datadogV1/api/api_webhooks_integration.rs @@ -5,66 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateWebhooksIntegrationParams is a struct for passing parameters to the method [`WebhooksIntegrationAPI::create_webhooks_integration`] -#[derive(Clone, Debug)] -pub struct CreateWebhooksIntegrationParams { - /// Create a webhooks integration request body. - pub body: crate::datadogV1::model::WebhooksIntegration, -} - -/// CreateWebhooksIntegrationCustomVariableParams is a struct for passing parameters to the method [`WebhooksIntegrationAPI::create_webhooks_integration_custom_variable`] -#[derive(Clone, Debug)] -pub struct CreateWebhooksIntegrationCustomVariableParams { - /// Define a custom variable request body. - pub body: crate::datadogV1::model::WebhooksIntegrationCustomVariable, -} - -/// DeleteWebhooksIntegrationParams is a struct for passing parameters to the method [`WebhooksIntegrationAPI::delete_webhooks_integration`] -#[derive(Clone, Debug)] -pub struct DeleteWebhooksIntegrationParams { - /// The name of the webhook. - pub webhook_name: String, -} - -/// DeleteWebhooksIntegrationCustomVariableParams is a struct for passing parameters to the method [`WebhooksIntegrationAPI::delete_webhooks_integration_custom_variable`] -#[derive(Clone, Debug)] -pub struct DeleteWebhooksIntegrationCustomVariableParams { - /// The name of the custom variable. - pub custom_variable_name: String, -} - -/// GetWebhooksIntegrationParams is a struct for passing parameters to the method [`WebhooksIntegrationAPI::get_webhooks_integration`] -#[derive(Clone, Debug)] -pub struct GetWebhooksIntegrationParams { - /// The name of the webhook. - pub webhook_name: String, -} - -/// GetWebhooksIntegrationCustomVariableParams is a struct for passing parameters to the method [`WebhooksIntegrationAPI::get_webhooks_integration_custom_variable`] -#[derive(Clone, Debug)] -pub struct GetWebhooksIntegrationCustomVariableParams { - /// The name of the custom variable. - pub custom_variable_name: String, -} - -/// UpdateWebhooksIntegrationParams is a struct for passing parameters to the method [`WebhooksIntegrationAPI::update_webhooks_integration`] -#[derive(Clone, Debug)] -pub struct UpdateWebhooksIntegrationParams { - /// The name of the webhook. - pub webhook_name: String, - /// Update an existing Datadog-Webhooks integration. - pub body: crate::datadogV1::model::WebhooksIntegrationUpdateRequest, -} - -/// UpdateWebhooksIntegrationCustomVariableParams is a struct for passing parameters to the method [`WebhooksIntegrationAPI::update_webhooks_integration_custom_variable`] -#[derive(Clone, Debug)] -pub struct UpdateWebhooksIntegrationCustomVariableParams { - /// The name of the custom variable. - pub custom_variable_name: String, - /// Update an existing custom variable request body. - pub body: crate::datadogV1::model::WebhooksIntegrationCustomVariableUpdateRequest, -} - /// CreateWebhooksIntegrationError is a struct for typed errors of method [`WebhooksIntegrationAPI::create_webhooks_integration`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -173,15 +113,12 @@ impl WebhooksIntegrationAPI { /// Creates an endpoint with the name ``. pub async fn create_webhooks_integration( &self, - params: CreateWebhooksIntegrationParams, + body: crate::datadogV1::model::WebhooksIntegration, ) -> Result< Option, Error, > { - match self - .create_webhooks_integration_with_http_info(params) - .await - { + match self.create_webhooks_integration_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -190,16 +127,13 @@ impl WebhooksIntegrationAPI { /// Creates an endpoint with the name ``. pub async fn create_webhooks_integration_with_http_info( &self, - params: CreateWebhooksIntegrationParams, + body: crate::datadogV1::model::WebhooksIntegration, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -259,13 +193,13 @@ impl WebhooksIntegrationAPI { /// Creates an endpoint with the name ``. pub async fn create_webhooks_integration_custom_variable( &self, - params: CreateWebhooksIntegrationCustomVariableParams, + body: crate::datadogV1::model::WebhooksIntegrationCustomVariable, ) -> Result< Option, Error, > { match self - .create_webhooks_integration_custom_variable_with_http_info(params) + .create_webhooks_integration_custom_variable_with_http_info(body) .await { Ok(response_content) => Ok(response_content.entity), @@ -276,16 +210,13 @@ impl WebhooksIntegrationAPI { /// Creates an endpoint with the name ``. pub async fn create_webhooks_integration_custom_variable_with_http_info( &self, - params: CreateWebhooksIntegrationCustomVariableParams, + body: crate::datadogV1::model::WebhooksIntegrationCustomVariable, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -346,10 +277,10 @@ impl WebhooksIntegrationAPI { /// Deletes the endpoint with the name ``. pub async fn delete_webhooks_integration( &self, - params: DeleteWebhooksIntegrationParams, + webhook_name: String, ) -> Result, Error> { match self - .delete_webhooks_integration_with_http_info(params) + .delete_webhooks_integration_with_http_info(webhook_name) .await { Ok(response_content) => Ok(response_content.entity), @@ -360,13 +291,10 @@ impl WebhooksIntegrationAPI { /// Deletes the endpoint with the name ``. pub async fn delete_webhooks_integration_with_http_info( &self, - params: DeleteWebhooksIntegrationParams, + webhook_name: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let webhook_name = params.webhook_name; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -418,10 +346,10 @@ impl WebhooksIntegrationAPI { /// Deletes the endpoint with the name ``. pub async fn delete_webhooks_integration_custom_variable( &self, - params: DeleteWebhooksIntegrationCustomVariableParams, + custom_variable_name: String, ) -> Result, Error> { match self - .delete_webhooks_integration_custom_variable_with_http_info(params) + .delete_webhooks_integration_custom_variable_with_http_info(custom_variable_name) .await { Ok(response_content) => Ok(response_content.entity), @@ -432,13 +360,10 @@ impl WebhooksIntegrationAPI { /// Deletes the endpoint with the name ``. pub async fn delete_webhooks_integration_custom_variable_with_http_info( &self, - params: DeleteWebhooksIntegrationCustomVariableParams, + custom_variable_name: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let custom_variable_name = params.custom_variable_name; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -490,12 +415,15 @@ impl WebhooksIntegrationAPI { /// Gets the content of the webhook with the name ``. pub async fn get_webhooks_integration( &self, - params: GetWebhooksIntegrationParams, + webhook_name: String, ) -> Result< Option, Error, > { - match self.get_webhooks_integration_with_http_info(params).await { + match self + .get_webhooks_integration_with_http_info(webhook_name) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -504,16 +432,13 @@ impl WebhooksIntegrationAPI { /// Gets the content of the webhook with the name ``. pub async fn get_webhooks_integration_with_http_info( &self, - params: GetWebhooksIntegrationParams, + webhook_name: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let webhook_name = params.webhook_name; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -570,13 +495,13 @@ impl WebhooksIntegrationAPI { /// response payload. pub async fn get_webhooks_integration_custom_variable( &self, - params: GetWebhooksIntegrationCustomVariableParams, + custom_variable_name: String, ) -> Result< Option, Error, > { match self - .get_webhooks_integration_custom_variable_with_http_info(params) + .get_webhooks_integration_custom_variable_with_http_info(custom_variable_name) .await { Ok(response_content) => Ok(response_content.entity), @@ -590,16 +515,13 @@ impl WebhooksIntegrationAPI { /// response payload. pub async fn get_webhooks_integration_custom_variable_with_http_info( &self, - params: GetWebhooksIntegrationCustomVariableParams, + custom_variable_name: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let custom_variable_name = params.custom_variable_name; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -654,13 +576,14 @@ impl WebhooksIntegrationAPI { /// Updates the endpoint with the name ``. pub async fn update_webhooks_integration( &self, - params: UpdateWebhooksIntegrationParams, + webhook_name: String, + body: crate::datadogV1::model::WebhooksIntegrationUpdateRequest, ) -> Result< Option, Error, > { match self - .update_webhooks_integration_with_http_info(params) + .update_webhooks_integration_with_http_info(webhook_name, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -671,17 +594,14 @@ impl WebhooksIntegrationAPI { /// Updates the endpoint with the name ``. pub async fn update_webhooks_integration_with_http_info( &self, - params: UpdateWebhooksIntegrationParams, + webhook_name: String, + body: crate::datadogV1::model::WebhooksIntegrationUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let webhook_name = params.webhook_name; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -742,13 +662,14 @@ impl WebhooksIntegrationAPI { /// Updates the endpoint with the name ``. pub async fn update_webhooks_integration_custom_variable( &self, - params: UpdateWebhooksIntegrationCustomVariableParams, + custom_variable_name: String, + body: crate::datadogV1::model::WebhooksIntegrationCustomVariableUpdateRequest, ) -> Result< Option, Error, > { match self - .update_webhooks_integration_custom_variable_with_http_info(params) + .update_webhooks_integration_custom_variable_with_http_info(custom_variable_name, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -759,17 +680,14 @@ impl WebhooksIntegrationAPI { /// Updates the endpoint with the name ``. pub async fn update_webhooks_integration_custom_variable_with_http_info( &self, - params: UpdateWebhooksIntegrationCustomVariableParams, + custom_variable_name: String, + body: crate::datadogV1::model::WebhooksIntegrationCustomVariableUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let custom_variable_name = params.custom_variable_name; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV1/model/model_add_signal_to_incident_request.rs b/src/datadogV1/model/model_add_signal_to_incident_request.rs index dd2368fcf..b74539b61 100644 --- a/src/datadogV1/model/model_add_signal_to_incident_request.rs +++ b/src/datadogV1/model/model_add_signal_to_incident_request.rs @@ -27,4 +27,14 @@ impl AddSignalToIncidentRequest { version: None, } } + + pub fn with_add_to_signal_timeline(&mut self, value: bool) -> &mut Self { + self.add_to_signal_timeline = Some(value); + self + } + + pub fn with_version(&mut self, value: i64) -> &mut Self { + self.version = Some(value); + self + } } diff --git a/src/datadogV1/model/model_alert_graph_widget_definition.rs b/src/datadogV1/model/model_alert_graph_widget_definition.rs index ab7fd5bc0..79ff2a93f 100644 --- a/src/datadogV1/model/model_alert_graph_widget_definition.rs +++ b/src/datadogV1/model/model_alert_graph_widget_definition.rs @@ -13,7 +13,7 @@ pub struct AlertGraphWidgetDefinition { pub alert_id: String, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// The title of the widget. #[serde(rename = "title")] pub title: Option, @@ -47,4 +47,27 @@ impl AlertGraphWidgetDefinition { viz_type, } } + + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_alert_value_widget_definition.rs b/src/datadogV1/model/model_alert_value_widget_definition.rs index ddd4c46fd..bf2e78a2d 100644 --- a/src/datadogV1/model/model_alert_value_widget_definition.rs +++ b/src/datadogV1/model/model_alert_value_widget_definition.rs @@ -50,4 +50,40 @@ impl AlertValueWidgetDefinition { unit: None, } } + + pub fn with_precision(&mut self, value: i64) -> &mut Self { + self.precision = Some(value); + self + } + + pub fn with_text_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.text_align = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } + + pub fn with_unit(&mut self, value: String) -> &mut Self { + self.unit = Some(value); + self + } } diff --git a/src/datadogV1/model/model_api_key.rs b/src/datadogV1/model/model_api_key.rs index 584c824d4..6272368d6 100644 --- a/src/datadogV1/model/model_api_key.rs +++ b/src/datadogV1/model/model_api_key.rs @@ -31,6 +31,26 @@ impl ApiKey { name: None, } } + + pub fn with_created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn with_created_by(&mut self, value: String) -> &mut Self { + self.created_by = Some(value); + self + } + + pub fn with_key(&mut self, value: String) -> &mut Self { + self.key = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } impl Default for ApiKey { fn default() -> Self { diff --git a/src/datadogV1/model/model_api_key_list_response.rs b/src/datadogV1/model/model_api_key_list_response.rs index b34cf01a5..17070392f 100644 --- a/src/datadogV1/model/model_api_key_list_response.rs +++ b/src/datadogV1/model/model_api_key_list_response.rs @@ -17,6 +17,11 @@ impl ApiKeyListResponse { pub fn new() -> ApiKeyListResponse { ApiKeyListResponse { api_keys: None } } + + pub fn with_api_keys(&mut self, value: Vec) -> &mut Self { + self.api_keys = Some(value); + self + } } impl Default for ApiKeyListResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_api_key_response.rs b/src/datadogV1/model/model_api_key_response.rs index 78968703f..9e5b5d4e5 100644 --- a/src/datadogV1/model/model_api_key_response.rs +++ b/src/datadogV1/model/model_api_key_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct ApiKeyResponse { /// Datadog API key. #[serde(rename = "api_key")] - pub api_key: Option>, + pub api_key: Option, } impl ApiKeyResponse { pub fn new() -> ApiKeyResponse { ApiKeyResponse { api_key: None } } + + pub fn with_api_key(&mut self, value: crate::datadogV1::model::ApiKey) -> &mut Self { + self.api_key = Some(value); + self + } } impl Default for ApiKeyResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_apm_stats_query_column_type.rs b/src/datadogV1/model/model_apm_stats_query_column_type.rs index ac66ec4b8..e7dabd778 100644 --- a/src/datadogV1/model/model_apm_stats_query_column_type.rs +++ b/src/datadogV1/model/model_apm_stats_query_column_type.rs @@ -31,4 +31,22 @@ impl ApmStatsQueryColumnType { order: None, } } + + pub fn with_alias(&mut self, value: String) -> &mut Self { + self.alias = Some(value); + self + } + + pub fn with_cell_display_mode( + &mut self, + value: crate::datadogV1::model::TableWidgetCellDisplayMode, + ) -> &mut Self { + self.cell_display_mode = Some(value); + self + } + + pub fn with_order(&mut self, value: crate::datadogV1::model::WidgetSort) -> &mut Self { + self.order = Some(value); + self + } } diff --git a/src/datadogV1/model/model_apm_stats_query_definition.rs b/src/datadogV1/model/model_apm_stats_query_definition.rs index 849c401a2..3c296b4f7 100644 --- a/src/datadogV1/model/model_apm_stats_query_definition.rs +++ b/src/datadogV1/model/model_apm_stats_query_definition.rs @@ -49,4 +49,17 @@ impl ApmStatsQueryDefinition { service, } } + + pub fn with_columns( + &mut self, + value: Vec, + ) -> &mut Self { + self.columns = Some(value); + self + } + + pub fn with_resource(&mut self, value: String) -> &mut Self { + self.resource = Some(value); + self + } } diff --git a/src/datadogV1/model/model_application_key.rs b/src/datadogV1/model/model_application_key.rs index 8940b0d85..107d4b31a 100644 --- a/src/datadogV1/model/model_application_key.rs +++ b/src/datadogV1/model/model_application_key.rs @@ -27,6 +27,21 @@ impl ApplicationKey { owner: None, } } + + pub fn with_hash(&mut self, value: String) -> &mut Self { + self.hash = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_owner(&mut self, value: String) -> &mut Self { + self.owner = Some(value); + self + } } impl Default for ApplicationKey { fn default() -> Self { diff --git a/src/datadogV1/model/model_application_key_list_response.rs b/src/datadogV1/model/model_application_key_list_response.rs index 9efcf07b0..5eba71212 100644 --- a/src/datadogV1/model/model_application_key_list_response.rs +++ b/src/datadogV1/model/model_application_key_list_response.rs @@ -19,6 +19,14 @@ impl ApplicationKeyListResponse { application_keys: None, } } + + pub fn with_application_keys( + &mut self, + value: Vec, + ) -> &mut Self { + self.application_keys = Some(value); + self + } } impl Default for ApplicationKeyListResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_application_key_response.rs b/src/datadogV1/model/model_application_key_response.rs index 132b471ee..88ff5ae76 100644 --- a/src/datadogV1/model/model_application_key_response.rs +++ b/src/datadogV1/model/model_application_key_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ApplicationKeyResponse { /// An application key with its associated metadata. #[serde(rename = "application_key")] - pub application_key: Option>, + pub application_key: Option, } impl ApplicationKeyResponse { @@ -19,6 +19,14 @@ impl ApplicationKeyResponse { application_key: None, } } + + pub fn with_application_key( + &mut self, + value: crate::datadogV1::model::ApplicationKey, + ) -> &mut Self { + self.application_key = Some(value); + self + } } impl Default for ApplicationKeyResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_authentication_validation_response.rs b/src/datadogV1/model/model_authentication_validation_response.rs index 21d85c108..df063d421 100644 --- a/src/datadogV1/model/model_authentication_validation_response.rs +++ b/src/datadogV1/model/model_authentication_validation_response.rs @@ -17,6 +17,11 @@ impl AuthenticationValidationResponse { pub fn new() -> AuthenticationValidationResponse { AuthenticationValidationResponse { valid: None } } + + pub fn with_valid(&mut self, value: bool) -> &mut Self { + self.valid = Some(value); + self + } } impl Default for AuthenticationValidationResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_account.rs b/src/datadogV1/model/model_aws_account.rs index 7b4b249ba..453c91cf3 100644 --- a/src/datadogV1/model/model_aws_account.rs +++ b/src/datadogV1/model/model_aws_account.rs @@ -68,6 +68,64 @@ impl AWSAccount { secret_access_key: None, } } + + pub fn with_access_key_id(&mut self, value: String) -> &mut Self { + self.access_key_id = Some(value); + self + } + + pub fn with_account_id(&mut self, value: String) -> &mut Self { + self.account_id = Some(value); + self + } + + pub fn with_account_specific_namespace_rules( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.account_specific_namespace_rules = Some(value); + self + } + + pub fn with_cspm_resource_collection_enabled(&mut self, value: bool) -> &mut Self { + self.cspm_resource_collection_enabled = Some(value); + self + } + + pub fn with_excluded_regions(&mut self, value: Vec) -> &mut Self { + self.excluded_regions = Some(value); + self + } + + pub fn with_filter_tags(&mut self, value: Vec) -> &mut Self { + self.filter_tags = Some(value); + self + } + + pub fn with_host_tags(&mut self, value: Vec) -> &mut Self { + self.host_tags = Some(value); + self + } + + pub fn with_metrics_collection_enabled(&mut self, value: bool) -> &mut Self { + self.metrics_collection_enabled = Some(value); + self + } + + pub fn with_resource_collection_enabled(&mut self, value: bool) -> &mut Self { + self.resource_collection_enabled = Some(value); + self + } + + pub fn with_role_name(&mut self, value: String) -> &mut Self { + self.role_name = Some(value); + self + } + + pub fn with_secret_access_key(&mut self, value: String) -> &mut Self { + self.secret_access_key = Some(value); + self + } } impl Default for AWSAccount { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_account_create_response.rs b/src/datadogV1/model/model_aws_account_create_response.rs index cb48527ae..64c008158 100644 --- a/src/datadogV1/model/model_aws_account_create_response.rs +++ b/src/datadogV1/model/model_aws_account_create_response.rs @@ -17,6 +17,11 @@ impl AWSAccountCreateResponse { pub fn new() -> AWSAccountCreateResponse { AWSAccountCreateResponse { external_id: None } } + + pub fn with_external_id(&mut self, value: String) -> &mut Self { + self.external_id = Some(value); + self + } } impl Default for AWSAccountCreateResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_account_delete_request.rs b/src/datadogV1/model/model_aws_account_delete_request.rs index cde343f29..2729981be 100644 --- a/src/datadogV1/model/model_aws_account_delete_request.rs +++ b/src/datadogV1/model/model_aws_account_delete_request.rs @@ -27,6 +27,21 @@ impl AWSAccountDeleteRequest { role_name: None, } } + + pub fn with_access_key_id(&mut self, value: String) -> &mut Self { + self.access_key_id = Some(value); + self + } + + pub fn with_account_id(&mut self, value: String) -> &mut Self { + self.account_id = Some(value); + self + } + + pub fn with_role_name(&mut self, value: String) -> &mut Self { + self.role_name = Some(value); + self + } } impl Default for AWSAccountDeleteRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_account_list_response.rs b/src/datadogV1/model/model_aws_account_list_response.rs index c7a42700e..e1e7735e1 100644 --- a/src/datadogV1/model/model_aws_account_list_response.rs +++ b/src/datadogV1/model/model_aws_account_list_response.rs @@ -17,6 +17,11 @@ impl AWSAccountListResponse { pub fn new() -> AWSAccountListResponse { AWSAccountListResponse { accounts: None } } + + pub fn with_accounts(&mut self, value: Vec) -> &mut Self { + self.accounts = Some(value); + self + } } impl Default for AWSAccountListResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_event_bridge_account_configuration.rs b/src/datadogV1/model/model_aws_event_bridge_account_configuration.rs index cc35b9ff6..89ef46083 100644 --- a/src/datadogV1/model/model_aws_event_bridge_account_configuration.rs +++ b/src/datadogV1/model/model_aws_event_bridge_account_configuration.rs @@ -28,6 +28,24 @@ impl AWSEventBridgeAccountConfiguration { tags: None, } } + + pub fn with_account_id(&mut self, value: String) -> &mut Self { + self.account_id = Some(value); + self + } + + pub fn with_event_hubs( + &mut self, + value: Vec, + ) -> &mut Self { + self.event_hubs = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } impl Default for AWSEventBridgeAccountConfiguration { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_event_bridge_create_request.rs b/src/datadogV1/model/model_aws_event_bridge_create_request.rs index a743b7b37..a85e6f4ed 100644 --- a/src/datadogV1/model/model_aws_event_bridge_create_request.rs +++ b/src/datadogV1/model/model_aws_event_bridge_create_request.rs @@ -33,6 +33,26 @@ impl AWSEventBridgeCreateRequest { region: None, } } + + pub fn with_account_id(&mut self, value: String) -> &mut Self { + self.account_id = Some(value); + self + } + + pub fn with_create_event_bus(&mut self, value: bool) -> &mut Self { + self.create_event_bus = Some(value); + self + } + + pub fn with_event_generator_name(&mut self, value: String) -> &mut Self { + self.event_generator_name = Some(value); + self + } + + pub fn with_region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } } impl Default for AWSEventBridgeCreateRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_event_bridge_create_response.rs b/src/datadogV1/model/model_aws_event_bridge_create_response.rs index 4339c5058..53c07120c 100644 --- a/src/datadogV1/model/model_aws_event_bridge_create_response.rs +++ b/src/datadogV1/model/model_aws_event_bridge_create_response.rs @@ -31,6 +31,29 @@ impl AWSEventBridgeCreateResponse { status: None, } } + + pub fn with_event_source_name(&mut self, value: String) -> &mut Self { + self.event_source_name = Some(value); + self + } + + pub fn with_has_bus(&mut self, value: bool) -> &mut Self { + self.has_bus = Some(value); + self + } + + pub fn with_region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } + + pub fn with_status( + &mut self, + value: crate::datadogV1::model::AWSEventBridgeCreateStatus, + ) -> &mut Self { + self.status = Some(value); + self + } } impl Default for AWSEventBridgeCreateResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_event_bridge_delete_request.rs b/src/datadogV1/model/model_aws_event_bridge_delete_request.rs index 2c7b8942b..4dc4057f5 100644 --- a/src/datadogV1/model/model_aws_event_bridge_delete_request.rs +++ b/src/datadogV1/model/model_aws_event_bridge_delete_request.rs @@ -27,6 +27,21 @@ impl AWSEventBridgeDeleteRequest { region: None, } } + + pub fn with_account_id(&mut self, value: String) -> &mut Self { + self.account_id = Some(value); + self + } + + pub fn with_event_generator_name(&mut self, value: String) -> &mut Self { + self.event_generator_name = Some(value); + self + } + + pub fn with_region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } } impl Default for AWSEventBridgeDeleteRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_event_bridge_delete_response.rs b/src/datadogV1/model/model_aws_event_bridge_delete_response.rs index 2762ba3ff..436853f18 100644 --- a/src/datadogV1/model/model_aws_event_bridge_delete_response.rs +++ b/src/datadogV1/model/model_aws_event_bridge_delete_response.rs @@ -17,6 +17,14 @@ impl AWSEventBridgeDeleteResponse { pub fn new() -> AWSEventBridgeDeleteResponse { AWSEventBridgeDeleteResponse { status: None } } + + pub fn with_status( + &mut self, + value: crate::datadogV1::model::AWSEventBridgeDeleteStatus, + ) -> &mut Self { + self.status = Some(value); + self + } } impl Default for AWSEventBridgeDeleteResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_event_bridge_list_response.rs b/src/datadogV1/model/model_aws_event_bridge_list_response.rs index d9451f69f..f6db520b8 100644 --- a/src/datadogV1/model/model_aws_event_bridge_list_response.rs +++ b/src/datadogV1/model/model_aws_event_bridge_list_response.rs @@ -23,6 +23,19 @@ impl AWSEventBridgeListResponse { is_installed: None, } } + + pub fn with_accounts( + &mut self, + value: Vec, + ) -> &mut Self { + self.accounts = Some(value); + self + } + + pub fn with_is_installed(&mut self, value: bool) -> &mut Self { + self.is_installed = Some(value); + self + } } impl Default for AWSEventBridgeListResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_event_bridge_source.rs b/src/datadogV1/model/model_aws_event_bridge_source.rs index 51bca6639..cdbd17b33 100644 --- a/src/datadogV1/model/model_aws_event_bridge_source.rs +++ b/src/datadogV1/model/model_aws_event_bridge_source.rs @@ -23,6 +23,16 @@ impl AWSEventBridgeSource { region: None, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } } impl Default for AWSEventBridgeSource { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_logs_async_error.rs b/src/datadogV1/model/model_aws_logs_async_error.rs index ce2222f5c..50da05234 100644 --- a/src/datadogV1/model/model_aws_logs_async_error.rs +++ b/src/datadogV1/model/model_aws_logs_async_error.rs @@ -23,6 +23,16 @@ impl AWSLogsAsyncError { message: None, } } + + pub fn with_code(&mut self, value: String) -> &mut Self { + self.code = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } } impl Default for AWSLogsAsyncError { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_logs_async_response.rs b/src/datadogV1/model/model_aws_logs_async_response.rs index 0dd8bb6f4..527f89906 100644 --- a/src/datadogV1/model/model_aws_logs_async_response.rs +++ b/src/datadogV1/model/model_aws_logs_async_response.rs @@ -23,6 +23,19 @@ impl AWSLogsAsyncResponse { status: None, } } + + pub fn with_errors( + &mut self, + value: Vec, + ) -> &mut Self { + self.errors = Some(value); + self + } + + pub fn with_status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + self + } } impl Default for AWSLogsAsyncResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_logs_lambda.rs b/src/datadogV1/model/model_aws_logs_lambda.rs index f77b85fe0..fe488d4b1 100644 --- a/src/datadogV1/model/model_aws_logs_lambda.rs +++ b/src/datadogV1/model/model_aws_logs_lambda.rs @@ -17,6 +17,11 @@ impl AWSLogsLambda { pub fn new() -> AWSLogsLambda { AWSLogsLambda { arn: None } } + + pub fn with_arn(&mut self, value: String) -> &mut Self { + self.arn = Some(value); + self + } } impl Default for AWSLogsLambda { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_logs_list_response.rs b/src/datadogV1/model/model_aws_logs_list_response.rs index 1ecc3b9ec..7abcef187 100644 --- a/src/datadogV1/model/model_aws_logs_list_response.rs +++ b/src/datadogV1/model/model_aws_logs_list_response.rs @@ -27,6 +27,24 @@ impl AWSLogsListResponse { services: None, } } + + pub fn with_account_id(&mut self, value: String) -> &mut Self { + self.account_id = Some(value); + self + } + + pub fn with_lambdas( + &mut self, + value: Vec, + ) -> &mut Self { + self.lambdas = Some(value); + self + } + + pub fn with_services(&mut self, value: Vec) -> &mut Self { + self.services = Some(value); + self + } } impl Default for AWSLogsListResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_logs_list_services_response.rs b/src/datadogV1/model/model_aws_logs_list_services_response.rs index 8ac1dcbc5..3fefc06bd 100644 --- a/src/datadogV1/model/model_aws_logs_list_services_response.rs +++ b/src/datadogV1/model/model_aws_logs_list_services_response.rs @@ -23,6 +23,16 @@ impl AWSLogsListServicesResponse { label: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_label(&mut self, value: String) -> &mut Self { + self.label = Some(value); + self + } } impl Default for AWSLogsListServicesResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_tag_filter.rs b/src/datadogV1/model/model_aws_tag_filter.rs index 06c4b039d..c11622955 100644 --- a/src/datadogV1/model/model_aws_tag_filter.rs +++ b/src/datadogV1/model/model_aws_tag_filter.rs @@ -23,6 +23,16 @@ impl AWSTagFilter { tag_filter_str: None, } } + + pub fn with_namespace(&mut self, value: crate::datadogV1::model::AWSNamespace) -> &mut Self { + self.namespace = Some(value); + self + } + + pub fn with_tag_filter_str(&mut self, value: String) -> &mut Self { + self.tag_filter_str = Some(value); + self + } } impl Default for AWSTagFilter { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_tag_filter_create_request.rs b/src/datadogV1/model/model_aws_tag_filter_create_request.rs index 51504ddec..a54d46251 100644 --- a/src/datadogV1/model/model_aws_tag_filter_create_request.rs +++ b/src/datadogV1/model/model_aws_tag_filter_create_request.rs @@ -27,6 +27,21 @@ impl AWSTagFilterCreateRequest { tag_filter_str: None, } } + + pub fn with_account_id(&mut self, value: String) -> &mut Self { + self.account_id = Some(value); + self + } + + pub fn with_namespace(&mut self, value: crate::datadogV1::model::AWSNamespace) -> &mut Self { + self.namespace = Some(value); + self + } + + pub fn with_tag_filter_str(&mut self, value: String) -> &mut Self { + self.tag_filter_str = Some(value); + self + } } impl Default for AWSTagFilterCreateRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_tag_filter_delete_request.rs b/src/datadogV1/model/model_aws_tag_filter_delete_request.rs index 61592164c..770cf5f92 100644 --- a/src/datadogV1/model/model_aws_tag_filter_delete_request.rs +++ b/src/datadogV1/model/model_aws_tag_filter_delete_request.rs @@ -23,6 +23,16 @@ impl AWSTagFilterDeleteRequest { namespace: None, } } + + pub fn with_account_id(&mut self, value: String) -> &mut Self { + self.account_id = Some(value); + self + } + + pub fn with_namespace(&mut self, value: crate::datadogV1::model::AWSNamespace) -> &mut Self { + self.namespace = Some(value); + self + } } impl Default for AWSTagFilterDeleteRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_aws_tag_filter_list_response.rs b/src/datadogV1/model/model_aws_tag_filter_list_response.rs index 6ba618ee6..7bd5c5107 100644 --- a/src/datadogV1/model/model_aws_tag_filter_list_response.rs +++ b/src/datadogV1/model/model_aws_tag_filter_list_response.rs @@ -17,6 +17,11 @@ impl AWSTagFilterListResponse { pub fn new() -> AWSTagFilterListResponse { AWSTagFilterListResponse { filters: None } } + + pub fn with_filters(&mut self, value: Vec) -> &mut Self { + self.filters = Some(value); + self + } } impl Default for AWSTagFilterListResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_azure_account.rs b/src/datadogV1/model/model_azure_account.rs index aa2f9f6e6..ab896dca4 100644 --- a/src/datadogV1/model/model_azure_account.rs +++ b/src/datadogV1/model/model_azure_account.rs @@ -71,6 +71,71 @@ impl AzureAccount { tenant_name: None, } } + + pub fn with_app_service_plan_filters(&mut self, value: String) -> &mut Self { + self.app_service_plan_filters = Some(value); + self + } + + pub fn with_automute(&mut self, value: bool) -> &mut Self { + self.automute = Some(value); + self + } + + pub fn with_client_id(&mut self, value: String) -> &mut Self { + self.client_id = Some(value); + self + } + + pub fn with_client_secret(&mut self, value: String) -> &mut Self { + self.client_secret = Some(value); + self + } + + pub fn with_container_app_filters(&mut self, value: String) -> &mut Self { + self.container_app_filters = Some(value); + self + } + + pub fn with_cspm_enabled(&mut self, value: bool) -> &mut Self { + self.cspm_enabled = Some(value); + self + } + + pub fn with_custom_metrics_enabled(&mut self, value: bool) -> &mut Self { + self.custom_metrics_enabled = Some(value); + self + } + + pub fn with_errors(&mut self, value: Vec) -> &mut Self { + self.errors = Some(value); + self + } + + pub fn with_host_filters(&mut self, value: String) -> &mut Self { + self.host_filters = Some(value); + self + } + + pub fn with_new_client_id(&mut self, value: String) -> &mut Self { + self.new_client_id = Some(value); + self + } + + pub fn with_new_tenant_name(&mut self, value: String) -> &mut Self { + self.new_tenant_name = Some(value); + self + } + + pub fn with_resource_collection_enabled(&mut self, value: bool) -> &mut Self { + self.resource_collection_enabled = Some(value); + self + } + + pub fn with_tenant_name(&mut self, value: String) -> &mut Self { + self.tenant_name = Some(value); + self + } } impl Default for AzureAccount { fn default() -> Self { diff --git a/src/datadogV1/model/model_canceled_downtimes_ids.rs b/src/datadogV1/model/model_canceled_downtimes_ids.rs index fe38eb4b2..6405c5798 100644 --- a/src/datadogV1/model/model_canceled_downtimes_ids.rs +++ b/src/datadogV1/model/model_canceled_downtimes_ids.rs @@ -19,6 +19,11 @@ impl CanceledDowntimesIds { cancelled_ids: None, } } + + pub fn with_cancelled_ids(&mut self, value: Vec) -> &mut Self { + self.cancelled_ids = Some(value); + self + } } impl Default for CanceledDowntimesIds { fn default() -> Self { diff --git a/src/datadogV1/model/model_change_widget_definition.rs b/src/datadogV1/model/model_change_widget_definition.rs index a95781343..3765eb8df 100644 --- a/src/datadogV1/model/model_change_widget_definition.rs +++ b/src/datadogV1/model/model_change_widget_definition.rs @@ -19,7 +19,7 @@ pub struct ChangeWidgetDefinition { pub requests: Vec, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// Title of the widget. #[serde(rename = "title")] pub title: Option, @@ -49,4 +49,35 @@ impl ChangeWidgetDefinition { type_, } } + + pub fn with_custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_change_widget_request.rs b/src/datadogV1/model/model_change_widget_request.rs index 5263858f5..c3367057a 100644 --- a/src/datadogV1/model/model_change_widget_request.rs +++ b/src/datadogV1/model/model_change_widget_request.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ChangeWidgetRequest { /// The log query. #[serde(rename = "apm_query")] - pub apm_query: Option>, + pub apm_query: Option, /// Show the absolute or the relative change. #[serde(rename = "change_type")] pub change_type: Option, @@ -19,7 +19,7 @@ pub struct ChangeWidgetRequest { pub compare_to: Option, /// The log query. #[serde(rename = "event_query")] - pub event_query: Option>, + pub event_query: Option, /// List of formulas that operate on queries. #[serde(rename = "formulas")] pub formulas: Option>, @@ -28,10 +28,10 @@ pub struct ChangeWidgetRequest { pub increase_good: Option, /// The log query. #[serde(rename = "log_query")] - pub log_query: Option>, + pub log_query: Option, /// The log query. #[serde(rename = "network_query")] - pub network_query: Option>, + pub network_query: Option, /// What to order by. #[serde(rename = "order_by")] pub order_by: Option, @@ -40,10 +40,10 @@ pub struct ChangeWidgetRequest { pub order_dir: Option, /// The process query to use in the widget. #[serde(rename = "process_query")] - pub process_query: Option>, + pub process_query: Option, /// The log query. #[serde(rename = "profile_metrics_query")] - pub profile_metrics_query: Option>, + pub profile_metrics_query: Option, /// Query definition. #[serde(rename = "q")] pub q: Option, @@ -55,10 +55,10 @@ pub struct ChangeWidgetRequest { pub response_format: Option, /// The log query. #[serde(rename = "rum_query")] - pub rum_query: Option>, + pub rum_query: Option, /// The log query. #[serde(rename = "security_query")] - pub security_query: Option>, + pub security_query: Option, /// Whether to show the present value. #[serde(rename = "show_present")] pub show_present: Option, @@ -87,6 +87,135 @@ impl ChangeWidgetRequest { show_present: None, } } + + pub fn with_apm_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn with_change_type( + &mut self, + value: crate::datadogV1::model::WidgetChangeType, + ) -> &mut Self { + self.change_type = Some(value); + self + } + + pub fn with_compare_to( + &mut self, + value: crate::datadogV1::model::WidgetCompareTo, + ) -> &mut Self { + self.compare_to = Some(value); + self + } + + pub fn with_event_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn with_formulas( + &mut self, + value: Vec, + ) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn with_increase_good(&mut self, value: bool) -> &mut Self { + self.increase_good = Some(value); + self + } + + pub fn with_log_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn with_network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn with_order_by(&mut self, value: crate::datadogV1::model::WidgetOrderBy) -> &mut Self { + self.order_by = Some(value); + self + } + + pub fn with_order_dir(&mut self, value: crate::datadogV1::model::WidgetSort) -> &mut Self { + self.order_dir = Some(value); + self + } + + pub fn with_process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn with_profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn with_q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn with_queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn with_response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + self + } + + pub fn with_rum_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn with_security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + self + } + + pub fn with_show_present(&mut self, value: bool) -> &mut Self { + self.show_present = Some(value); + self + } } impl Default for ChangeWidgetRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_check_can_delete_monitor_response.rs b/src/datadogV1/model/model_check_can_delete_monitor_response.rs index deecd9c82..75ddd81a0 100644 --- a/src/datadogV1/model/model_check_can_delete_monitor_response.rs +++ b/src/datadogV1/model/model_check_can_delete_monitor_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct CheckCanDeleteMonitorResponse { /// Wrapper object with the list of monitor IDs. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV1::model::CheckCanDeleteMonitorResponseData, /// A mapping of Monitor ID to strings denoting where it's used. #[serde(rename = "errors", default, with = "::serde_with::rust::double_option")] pub errors: Option>>>>, @@ -18,8 +18,16 @@ pub struct CheckCanDeleteMonitorResponse { impl CheckCanDeleteMonitorResponse { pub fn new( - data: Box, + data: crate::datadogV1::model::CheckCanDeleteMonitorResponseData, ) -> CheckCanDeleteMonitorResponse { CheckCanDeleteMonitorResponse { data, errors: None } } + + pub fn with_errors( + &mut self, + value: Option>>>, + ) -> &mut Self { + self.errors = Some(value); + self + } } diff --git a/src/datadogV1/model/model_check_can_delete_monitor_response_data.rs b/src/datadogV1/model/model_check_can_delete_monitor_response_data.rs index abafaef12..44647d754 100644 --- a/src/datadogV1/model/model_check_can_delete_monitor_response_data.rs +++ b/src/datadogV1/model/model_check_can_delete_monitor_response_data.rs @@ -17,6 +17,11 @@ impl CheckCanDeleteMonitorResponseData { pub fn new() -> CheckCanDeleteMonitorResponseData { CheckCanDeleteMonitorResponseData { ok: None } } + + pub fn with_ok(&mut self, value: Vec) -> &mut Self { + self.ok = Some(value); + self + } } impl Default for CheckCanDeleteMonitorResponseData { fn default() -> Self { diff --git a/src/datadogV1/model/model_check_can_delete_slo_response.rs b/src/datadogV1/model/model_check_can_delete_slo_response.rs index bc0062f36..409f15597 100644 --- a/src/datadogV1/model/model_check_can_delete_slo_response.rs +++ b/src/datadogV1/model/model_check_can_delete_slo_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct CheckCanDeleteSLOResponse { /// An array of service level objective objects. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// A mapping of SLO id to it's current usages. #[serde(rename = "errors")] pub errors: Option>, @@ -23,6 +23,19 @@ impl CheckCanDeleteSLOResponse { errors: None, } } + + pub fn with_data( + &mut self, + value: crate::datadogV1::model::CheckCanDeleteSLOResponseData, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_errors(&mut self, value: std::collections::BTreeMap) -> &mut Self { + self.errors = Some(value); + self + } } impl Default for CheckCanDeleteSLOResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_check_can_delete_slo_response_data.rs b/src/datadogV1/model/model_check_can_delete_slo_response_data.rs index b62509387..2f3313c7b 100644 --- a/src/datadogV1/model/model_check_can_delete_slo_response_data.rs +++ b/src/datadogV1/model/model_check_can_delete_slo_response_data.rs @@ -17,6 +17,11 @@ impl CheckCanDeleteSLOResponseData { pub fn new() -> CheckCanDeleteSLOResponseData { CheckCanDeleteSLOResponseData { ok: None } } + + pub fn with_ok(&mut self, value: Vec) -> &mut Self { + self.ok = Some(value); + self + } } impl Default for CheckCanDeleteSLOResponseData { fn default() -> Self { diff --git a/src/datadogV1/model/model_check_status_widget_definition.rs b/src/datadogV1/model/model_check_status_widget_definition.rs index f21e2f667..02679baa4 100644 --- a/src/datadogV1/model/model_check_status_widget_definition.rs +++ b/src/datadogV1/model/model_check_status_widget_definition.rs @@ -25,7 +25,7 @@ pub struct CheckStatusWidgetDefinition { pub tags: Option>, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// Title of the widget. #[serde(rename = "title")] pub title: Option, @@ -59,4 +59,42 @@ impl CheckStatusWidgetDefinition { type_, } } + + pub fn with_group(&mut self, value: String) -> &mut Self { + self.group = Some(value); + self + } + + pub fn with_group_by(&mut self, value: Vec) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_creator.rs b/src/datadogV1/model/model_creator.rs index 43073f4a0..58436a283 100644 --- a/src/datadogV1/model/model_creator.rs +++ b/src/datadogV1/model/model_creator.rs @@ -27,6 +27,21 @@ impl Creator { name: None, } } + + pub fn with_email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn with_handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + self + } + + pub fn with_name(&mut self, value: Option) -> &mut Self { + self.name = Some(value); + self + } } impl Default for Creator { fn default() -> Self { diff --git a/src/datadogV1/model/model_dashboard.rs b/src/datadogV1/model/model_dashboard.rs index 8cc5e1432..05dd92cf3 100644 --- a/src/datadogV1/model/model_dashboard.rs +++ b/src/datadogV1/model/model_dashboard.rs @@ -113,4 +113,97 @@ impl Dashboard { widgets, } } + + #[allow(deprecated)] + pub fn with_author_handle(&mut self, value: String) -> &mut Self { + self.author_handle = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_author_name(&mut self, value: Option) -> &mut Self { + self.author_name = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_description(&mut self, value: Option) -> &mut Self { + self.description = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_is_read_only(&mut self, value: bool) -> &mut Self { + self.is_read_only = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_notify_list(&mut self, value: Option>) -> &mut Self { + self.notify_list = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_reflow_type( + &mut self, + value: crate::datadogV1::model::DashboardReflowType, + ) -> &mut Self { + self.reflow_type = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_restricted_roles(&mut self, value: Vec) -> &mut Self { + self.restricted_roles = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_tags(&mut self, value: Option>) -> &mut Self { + self.tags = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_template_variable_presets( + &mut self, + value: Option>, + ) -> &mut Self { + self.template_variable_presets = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_template_variables( + &mut self, + value: Option>, + ) -> &mut Self { + self.template_variables = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_url(&mut self, value: String) -> &mut Self { + self.url = Some(value); + self + } } diff --git a/src/datadogV1/model/model_dashboard_delete_response.rs b/src/datadogV1/model/model_dashboard_delete_response.rs index 7d8b79f39..d0d60e3b8 100644 --- a/src/datadogV1/model/model_dashboard_delete_response.rs +++ b/src/datadogV1/model/model_dashboard_delete_response.rs @@ -19,6 +19,11 @@ impl DashboardDeleteResponse { deleted_dashboard_id: None, } } + + pub fn with_deleted_dashboard_id(&mut self, value: String) -> &mut Self { + self.deleted_dashboard_id = Some(value); + self + } } impl Default for DashboardDeleteResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_dashboard_global_time.rs b/src/datadogV1/model/model_dashboard_global_time.rs index 65f8a44fd..350dc91ef 100644 --- a/src/datadogV1/model/model_dashboard_global_time.rs +++ b/src/datadogV1/model/model_dashboard_global_time.rs @@ -17,6 +17,14 @@ impl DashboardGlobalTime { pub fn new() -> DashboardGlobalTime { DashboardGlobalTime { live_span: None } } + + pub fn with_live_span( + &mut self, + value: crate::datadogV1::model::DashboardGlobalTimeLiveSpan, + ) -> &mut Self { + self.live_span = Some(value); + self + } } impl Default for DashboardGlobalTime { fn default() -> Self { diff --git a/src/datadogV1/model/model_dashboard_list.rs b/src/datadogV1/model/model_dashboard_list.rs index 3743e2a44..c063e66ae 100644 --- a/src/datadogV1/model/model_dashboard_list.rs +++ b/src/datadogV1/model/model_dashboard_list.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct DashboardList { /// Object describing the creator of the shared element. #[serde(rename = "author")] - pub author: Option>, + pub author: Option, /// Date of creation of the dashboard list. #[serde(rename = "created")] pub created: Option, @@ -47,4 +47,39 @@ impl DashboardList { type_: None, } } + + pub fn with_author(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + self.author = Some(value); + self + } + + pub fn with_created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn with_dashboard_count(&mut self, value: i64) -> &mut Self { + self.dashboard_count = Some(value); + self + } + + pub fn with_id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_is_favorite(&mut self, value: bool) -> &mut Self { + self.is_favorite = Some(value); + self + } + + pub fn with_modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV1/model/model_dashboard_list_delete_response.rs b/src/datadogV1/model/model_dashboard_list_delete_response.rs index 0a80b31b3..0aaeaa906 100644 --- a/src/datadogV1/model/model_dashboard_list_delete_response.rs +++ b/src/datadogV1/model/model_dashboard_list_delete_response.rs @@ -19,6 +19,11 @@ impl DashboardListDeleteResponse { deleted_dashboard_list_id: None, } } + + pub fn with_deleted_dashboard_list_id(&mut self, value: i64) -> &mut Self { + self.deleted_dashboard_list_id = Some(value); + self + } } impl Default for DashboardListDeleteResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_dashboard_list_list_response.rs b/src/datadogV1/model/model_dashboard_list_list_response.rs index ff027009e..20f21d9fe 100644 --- a/src/datadogV1/model/model_dashboard_list_list_response.rs +++ b/src/datadogV1/model/model_dashboard_list_list_response.rs @@ -19,6 +19,14 @@ impl DashboardListListResponse { dashboard_lists: None, } } + + pub fn with_dashboard_lists( + &mut self, + value: Vec, + ) -> &mut Self { + self.dashboard_lists = Some(value); + self + } } impl Default for DashboardListListResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_dashboard_summary.rs b/src/datadogV1/model/model_dashboard_summary.rs index 304b9ddeb..7d74c70dc 100644 --- a/src/datadogV1/model/model_dashboard_summary.rs +++ b/src/datadogV1/model/model_dashboard_summary.rs @@ -17,6 +17,14 @@ impl DashboardSummary { pub fn new() -> DashboardSummary { DashboardSummary { dashboards: None } } + + pub fn with_dashboards( + &mut self, + value: Vec, + ) -> &mut Self { + self.dashboards = Some(value); + self + } } impl Default for DashboardSummary { fn default() -> Self { diff --git a/src/datadogV1/model/model_dashboard_summary_definition.rs b/src/datadogV1/model/model_dashboard_summary_definition.rs index 08f2e021f..a8266f3c1 100644 --- a/src/datadogV1/model/model_dashboard_summary_definition.rs +++ b/src/datadogV1/model/model_dashboard_summary_definition.rs @@ -55,6 +55,54 @@ impl DashboardSummaryDefinition { url: None, } } + + pub fn with_author_handle(&mut self, value: String) -> &mut Self { + self.author_handle = Some(value); + self + } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_description(&mut self, value: Option) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_is_read_only(&mut self, value: bool) -> &mut Self { + self.is_read_only = Some(value); + self + } + + pub fn with_layout_type( + &mut self, + value: crate::datadogV1::model::DashboardLayoutType, + ) -> &mut Self { + self.layout_type = Some(value); + self + } + + pub fn with_modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_url(&mut self, value: String) -> &mut Self { + self.url = Some(value); + self + } } impl Default for DashboardSummaryDefinition { fn default() -> Self { diff --git a/src/datadogV1/model/model_dashboard_template_variable.rs b/src/datadogV1/model/model_dashboard_template_variable.rs index eb961e796..9a38de8d0 100644 --- a/src/datadogV1/model/model_dashboard_template_variable.rs +++ b/src/datadogV1/model/model_dashboard_template_variable.rs @@ -45,4 +45,28 @@ impl DashboardTemplateVariable { prefix: None, } } + + #[allow(deprecated)] + pub fn with_available_values(&mut self, value: Option>) -> &mut Self { + self.available_values = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_default(&mut self, value: Option) -> &mut Self { + self.default = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_defaults(&mut self, value: Vec) -> &mut Self { + self.defaults = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_prefix(&mut self, value: Option) -> &mut Self { + self.prefix = Some(value); + self + } } diff --git a/src/datadogV1/model/model_dashboard_template_variable_preset.rs b/src/datadogV1/model/model_dashboard_template_variable_preset.rs index 83f93e5ff..7d3c21de6 100644 --- a/src/datadogV1/model/model_dashboard_template_variable_preset.rs +++ b/src/datadogV1/model/model_dashboard_template_variable_preset.rs @@ -24,6 +24,19 @@ impl DashboardTemplateVariablePreset { template_variables: None, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_template_variables( + &mut self, + value: Vec, + ) -> &mut Self { + self.template_variables = Some(value); + self + } } impl Default for DashboardTemplateVariablePreset { fn default() -> Self { diff --git a/src/datadogV1/model/model_dashboard_template_variable_preset_value.rs b/src/datadogV1/model/model_dashboard_template_variable_preset_value.rs index 500d9f4d6..3a89d88be 100644 --- a/src/datadogV1/model/model_dashboard_template_variable_preset_value.rs +++ b/src/datadogV1/model/model_dashboard_template_variable_preset_value.rs @@ -29,6 +29,24 @@ impl DashboardTemplateVariablePresetValue { values: None, } } + + #[allow(deprecated)] + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_value(&mut self, value: String) -> &mut Self { + self.value = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_values(&mut self, value: Vec) -> &mut Self { + self.values = Some(value); + self + } } impl Default for DashboardTemplateVariablePresetValue { fn default() -> Self { diff --git a/src/datadogV1/model/model_delete_shared_dashboard_response.rs b/src/datadogV1/model/model_delete_shared_dashboard_response.rs index 7ab4b9a5d..330c30aea 100644 --- a/src/datadogV1/model/model_delete_shared_dashboard_response.rs +++ b/src/datadogV1/model/model_delete_shared_dashboard_response.rs @@ -19,6 +19,11 @@ impl DeleteSharedDashboardResponse { deleted_public_dashboard_token: None, } } + + pub fn with_deleted_public_dashboard_token(&mut self, value: String) -> &mut Self { + self.deleted_public_dashboard_token = Some(value); + self + } } impl Default for DeleteSharedDashboardResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_deleted_monitor.rs b/src/datadogV1/model/model_deleted_monitor.rs index b5bc43016..db013f97f 100644 --- a/src/datadogV1/model/model_deleted_monitor.rs +++ b/src/datadogV1/model/model_deleted_monitor.rs @@ -19,6 +19,11 @@ impl DeletedMonitor { deleted_monitor_id: None, } } + + pub fn with_deleted_monitor_id(&mut self, value: i64) -> &mut Self { + self.deleted_monitor_id = Some(value); + self + } } impl Default for DeletedMonitor { fn default() -> Self { diff --git a/src/datadogV1/model/model_distribution_points_series.rs b/src/datadogV1/model/model_distribution_points_series.rs index 4aced3d91..92c352dcd 100644 --- a/src/datadogV1/model/model_distribution_points_series.rs +++ b/src/datadogV1/model/model_distribution_points_series.rs @@ -38,4 +38,22 @@ impl DistributionPointsSeries { type_: None, } } + + pub fn with_host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV1::model::DistributionPointsType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV1/model/model_distribution_widget_definition.rs b/src/datadogV1/model/model_distribution_widget_definition.rs index bebd08e92..a460d3a24 100644 --- a/src/datadogV1/model/model_distribution_widget_definition.rs +++ b/src/datadogV1/model/model_distribution_widget_definition.rs @@ -32,7 +32,7 @@ pub struct DistributionWidgetDefinition { pub show_legend: Option, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// Title of the widget. #[serde(rename = "title")] pub title: Option, @@ -47,10 +47,10 @@ pub struct DistributionWidgetDefinition { pub type_: crate::datadogV1::model::DistributionWidgetDefinitionType, /// X Axis controls for the distribution widget. #[serde(rename = "xaxis")] - pub xaxis: Option>, + pub xaxis: Option, /// Y Axis controls for the distribution widget. #[serde(rename = "yaxis")] - pub yaxis: Option>, + pub yaxis: Option, } impl DistributionWidgetDefinition { @@ -74,4 +74,76 @@ impl DistributionWidgetDefinition { yaxis: None, } } + + #[allow(deprecated)] + pub fn with_custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_legend_size(&mut self, value: String) -> &mut Self { + self.legend_size = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_markers(&mut self, value: Vec) -> &mut Self { + self.markers = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_show_legend(&mut self, value: bool) -> &mut Self { + self.show_legend = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_xaxis( + &mut self, + value: crate::datadogV1::model::DistributionWidgetXAxis, + ) -> &mut Self { + self.xaxis = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_yaxis( + &mut self, + value: crate::datadogV1::model::DistributionWidgetYAxis, + ) -> &mut Self { + self.yaxis = Some(value); + self + } } diff --git a/src/datadogV1/model/model_distribution_widget_histogram_request_query.rs b/src/datadogV1/model/model_distribution_widget_histogram_request_query.rs index 04ef7e8ee..b7ea134a4 100644 --- a/src/datadogV1/model/model_distribution_widget_histogram_request_query.rs +++ b/src/datadogV1/model/model_distribution_widget_histogram_request_query.rs @@ -8,12 +8,12 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum DistributionWidgetHistogramRequestQuery { FormulaAndFunctionMetricQueryDefinition( - Box, + crate::datadogV1::model::FormulaAndFunctionMetricQueryDefinition, ), FormulaAndFunctionEventQueryDefinition( - Box, + crate::datadogV1::model::FormulaAndFunctionEventQueryDefinition, ), FormulaAndFunctionApmResourceStatsQueryDefinition( - Box, + crate::datadogV1::model::FormulaAndFunctionApmResourceStatsQueryDefinition, ), } diff --git a/src/datadogV1/model/model_distribution_widget_request.rs b/src/datadogV1/model/model_distribution_widget_request.rs index 9c3b72570..d8b2abf07 100644 --- a/src/datadogV1/model/model_distribution_widget_request.rs +++ b/src/datadogV1/model/model_distribution_widget_request.rs @@ -10,43 +10,43 @@ use serde_with::skip_serializing_none; pub struct DistributionWidgetRequest { /// The log query. #[serde(rename = "apm_query")] - pub apm_query: Option>, + pub apm_query: Option, /// The APM stats query for table and distributions widgets. #[serde(rename = "apm_stats_query")] - pub apm_stats_query: Option>, + pub apm_stats_query: Option, /// The log query. #[serde(rename = "event_query")] - pub event_query: Option>, + pub event_query: Option, /// The log query. #[serde(rename = "log_query")] - pub log_query: Option>, + pub log_query: Option, /// The log query. #[serde(rename = "network_query")] - pub network_query: Option>, + pub network_query: Option, /// The process query to use in the widget. #[serde(rename = "process_query")] - pub process_query: Option>, + pub process_query: Option, /// The log query. #[serde(rename = "profile_metrics_query")] - pub profile_metrics_query: Option>, + pub profile_metrics_query: Option, /// Widget query. #[serde(rename = "q")] pub q: Option, /// Query definition for Distribution Widget Histogram Request #[serde(rename = "query")] - pub query: Option>, + pub query: Option, /// Request type for the histogram request. #[serde(rename = "request_type")] pub request_type: Option, /// The log query. #[serde(rename = "rum_query")] - pub rum_query: Option>, + pub rum_query: Option, /// The log query. #[serde(rename = "security_query")] - pub security_query: Option>, + pub security_query: Option, /// Widget style definition. #[serde(rename = "style")] - pub style: Option>, + pub style: Option, } impl DistributionWidgetRequest { @@ -67,6 +67,104 @@ impl DistributionWidgetRequest { style: None, } } + + pub fn with_apm_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn with_apm_stats_query( + &mut self, + value: crate::datadogV1::model::ApmStatsQueryDefinition, + ) -> &mut Self { + self.apm_stats_query = Some(value); + self + } + + pub fn with_event_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn with_log_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn with_network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn with_process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn with_profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn with_q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn with_query( + &mut self, + value: crate::datadogV1::model::DistributionWidgetHistogramRequestQuery, + ) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_request_type( + &mut self, + value: crate::datadogV1::model::DistributionWidgetHistogramRequestType, + ) -> &mut Self { + self.request_type = Some(value); + self + } + + pub fn with_rum_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn with_security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + self + } + + pub fn with_style(&mut self, value: crate::datadogV1::model::WidgetStyle) -> &mut Self { + self.style = Some(value); + self + } } impl Default for DistributionWidgetRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_distribution_widget_x_axis.rs b/src/datadogV1/model/model_distribution_widget_x_axis.rs index 4e25e5333..0915df028 100644 --- a/src/datadogV1/model/model_distribution_widget_x_axis.rs +++ b/src/datadogV1/model/model_distribution_widget_x_axis.rs @@ -31,6 +31,26 @@ impl DistributionWidgetXAxis { scale: None, } } + + pub fn with_include_zero(&mut self, value: bool) -> &mut Self { + self.include_zero = Some(value); + self + } + + pub fn with_max(&mut self, value: String) -> &mut Self { + self.max = Some(value); + self + } + + pub fn with_min(&mut self, value: String) -> &mut Self { + self.min = Some(value); + self + } + + pub fn with_scale(&mut self, value: String) -> &mut Self { + self.scale = Some(value); + self + } } impl Default for DistributionWidgetXAxis { fn default() -> Self { diff --git a/src/datadogV1/model/model_distribution_widget_y_axis.rs b/src/datadogV1/model/model_distribution_widget_y_axis.rs index 083a4b38e..e7a2ada87 100644 --- a/src/datadogV1/model/model_distribution_widget_y_axis.rs +++ b/src/datadogV1/model/model_distribution_widget_y_axis.rs @@ -35,6 +35,31 @@ impl DistributionWidgetYAxis { scale: None, } } + + pub fn with_include_zero(&mut self, value: bool) -> &mut Self { + self.include_zero = Some(value); + self + } + + pub fn with_label(&mut self, value: String) -> &mut Self { + self.label = Some(value); + self + } + + pub fn with_max(&mut self, value: String) -> &mut Self { + self.max = Some(value); + self + } + + pub fn with_min(&mut self, value: String) -> &mut Self { + self.min = Some(value); + self + } + + pub fn with_scale(&mut self, value: String) -> &mut Self { + self.scale = Some(value); + self + } } impl Default for DistributionWidgetYAxis { fn default() -> Self { diff --git a/src/datadogV1/model/model_downtime.rs b/src/datadogV1/model/model_downtime.rs index 0e9f9ca68..dff4fddf4 100644 --- a/src/datadogV1/model/model_downtime.rs +++ b/src/datadogV1/model/model_downtime.rs @@ -21,7 +21,7 @@ pub struct Downtime { default, with = "::serde_with::rust::double_option" )] - pub active_child: Option>>, + pub active_child: Option>, /// If a scheduled downtime is canceled. #[serde( rename = "canceled", @@ -94,7 +94,7 @@ pub struct Downtime { default, with = "::serde_with::rust::double_option" )] - pub recurrence: Option>>, + pub recurrence: Option>, /// The scope(s) to which the downtime applies and must be in `key:value` format. For example, `host:app2`. /// Provide multiple scopes as a comma-separated list like `env:dev,env:prod`. /// The resulting downtime applies to sources that matches ALL provided scopes (`env:dev` **AND** `env:prod`). @@ -141,6 +141,118 @@ impl Downtime { updater_id: None, } } + + pub fn with_active(&mut self, value: bool) -> &mut Self { + self.active = Some(value); + self + } + + pub fn with_active_child( + &mut self, + value: Option, + ) -> &mut Self { + self.active_child = Some(value); + self + } + + pub fn with_canceled(&mut self, value: Option) -> &mut Self { + self.canceled = Some(value); + self + } + + pub fn with_creator_id(&mut self, value: i32) -> &mut Self { + self.creator_id = Some(value); + self + } + + pub fn with_disabled(&mut self, value: bool) -> &mut Self { + self.disabled = Some(value); + self + } + + pub fn with_downtime_type(&mut self, value: i32) -> &mut Self { + self.downtime_type = Some(value); + self + } + + pub fn with_end(&mut self, value: Option) -> &mut Self { + self.end = Some(value); + self + } + + pub fn with_id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_message(&mut self, value: Option) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_monitor_id(&mut self, value: Option) -> &mut Self { + self.monitor_id = Some(value); + self + } + + pub fn with_monitor_tags(&mut self, value: Vec) -> &mut Self { + self.monitor_tags = Some(value); + self + } + + pub fn with_mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { + self.mute_first_recovery_notification = Some(value); + self + } + + pub fn with_notify_end_states( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_states = Some(value); + self + } + + pub fn with_notify_end_types( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_types = Some(value); + self + } + + pub fn with_parent_id(&mut self, value: Option) -> &mut Self { + self.parent_id = Some(value); + self + } + + pub fn with_recurrence( + &mut self, + value: Option, + ) -> &mut Self { + self.recurrence = Some(value); + self + } + + pub fn with_scope(&mut self, value: Vec) -> &mut Self { + self.scope = Some(value); + self + } + + pub fn with_start(&mut self, value: i64) -> &mut Self { + self.start = Some(value); + self + } + + pub fn with_timezone(&mut self, value: String) -> &mut Self { + self.timezone = Some(value); + self + } + + pub fn with_updater_id(&mut self, value: Option) -> &mut Self { + self.updater_id = Some(value); + self + } } impl Default for Downtime { fn default() -> Self { diff --git a/src/datadogV1/model/model_downtime_child.rs b/src/datadogV1/model/model_downtime_child.rs index 74b9ec986..2a1b2ef8a 100644 --- a/src/datadogV1/model/model_downtime_child.rs +++ b/src/datadogV1/model/model_downtime_child.rs @@ -84,7 +84,7 @@ pub struct DowntimeChild { default, with = "::serde_with::rust::double_option" )] - pub recurrence: Option>>, + pub recurrence: Option>, /// The scope(s) to which the downtime applies and must be in `key:value` format. For example, `host:app2`. /// Provide multiple scopes as a comma-separated list like `env:dev,env:prod`. /// The resulting downtime applies to sources that matches ALL provided scopes (`env:dev` **AND** `env:prod`). @@ -130,6 +130,110 @@ impl DowntimeChild { updater_id: None, } } + + pub fn with_active(&mut self, value: bool) -> &mut Self { + self.active = Some(value); + self + } + + pub fn with_canceled(&mut self, value: Option) -> &mut Self { + self.canceled = Some(value); + self + } + + pub fn with_creator_id(&mut self, value: i32) -> &mut Self { + self.creator_id = Some(value); + self + } + + pub fn with_disabled(&mut self, value: bool) -> &mut Self { + self.disabled = Some(value); + self + } + + pub fn with_downtime_type(&mut self, value: i32) -> &mut Self { + self.downtime_type = Some(value); + self + } + + pub fn with_end(&mut self, value: Option) -> &mut Self { + self.end = Some(value); + self + } + + pub fn with_id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_message(&mut self, value: Option) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_monitor_id(&mut self, value: Option) -> &mut Self { + self.monitor_id = Some(value); + self + } + + pub fn with_monitor_tags(&mut self, value: Vec) -> &mut Self { + self.monitor_tags = Some(value); + self + } + + pub fn with_mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { + self.mute_first_recovery_notification = Some(value); + self + } + + pub fn with_notify_end_states( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_states = Some(value); + self + } + + pub fn with_notify_end_types( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_types = Some(value); + self + } + + pub fn with_parent_id(&mut self, value: Option) -> &mut Self { + self.parent_id = Some(value); + self + } + + pub fn with_recurrence( + &mut self, + value: Option, + ) -> &mut Self { + self.recurrence = Some(value); + self + } + + pub fn with_scope(&mut self, value: Vec) -> &mut Self { + self.scope = Some(value); + self + } + + pub fn with_start(&mut self, value: i64) -> &mut Self { + self.start = Some(value); + self + } + + pub fn with_timezone(&mut self, value: String) -> &mut Self { + self.timezone = Some(value); + self + } + + pub fn with_updater_id(&mut self, value: Option) -> &mut Self { + self.updater_id = Some(value); + self + } } impl Default for DowntimeChild { fn default() -> Self { diff --git a/src/datadogV1/model/model_downtime_recurrence.rs b/src/datadogV1/model/model_downtime_recurrence.rs index a39bd07d5..c34a0f061 100644 --- a/src/datadogV1/model/model_downtime_recurrence.rs +++ b/src/datadogV1/model/model_downtime_recurrence.rs @@ -60,6 +60,36 @@ impl DowntimeRecurrence { week_days: None, } } + + pub fn with_period(&mut self, value: i32) -> &mut Self { + self.period = Some(value); + self + } + + pub fn with_rrule(&mut self, value: String) -> &mut Self { + self.rrule = Some(value); + self + } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } + + pub fn with_until_date(&mut self, value: Option) -> &mut Self { + self.until_date = Some(value); + self + } + + pub fn with_until_occurrences(&mut self, value: Option) -> &mut Self { + self.until_occurrences = Some(value); + self + } + + pub fn with_week_days(&mut self, value: Option>) -> &mut Self { + self.week_days = Some(value); + self + } } impl Default for DowntimeRecurrence { fn default() -> Self { diff --git a/src/datadogV1/model/model_event.rs b/src/datadogV1/model/model_event.rs index 81b96ad81..facb8472c 100644 --- a/src/datadogV1/model/model_event.rs +++ b/src/datadogV1/model/model_event.rs @@ -79,6 +79,74 @@ impl Event { url: None, } } + + pub fn with_alert_type(&mut self, value: crate::datadogV1::model::EventAlertType) -> &mut Self { + self.alert_type = Some(value); + self + } + + pub fn with_date_happened(&mut self, value: i64) -> &mut Self { + self.date_happened = Some(value); + self + } + + pub fn with_device_name(&mut self, value: String) -> &mut Self { + self.device_name = Some(value); + self + } + + pub fn with_host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn with_id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_id_str(&mut self, value: String) -> &mut Self { + self.id_str = Some(value); + self + } + + pub fn with_payload(&mut self, value: String) -> &mut Self { + self.payload = Some(value); + self + } + + pub fn with_priority( + &mut self, + value: Option, + ) -> &mut Self { + self.priority = Some(value); + self + } + + pub fn with_source_type_name(&mut self, value: String) -> &mut Self { + self.source_type_name = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_text(&mut self, value: String) -> &mut Self { + self.text = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_url(&mut self, value: String) -> &mut Self { + self.url = Some(value); + self + } } impl Default for Event { fn default() -> Self { diff --git a/src/datadogV1/model/model_event_create_request.rs b/src/datadogV1/model/model_event_create_request.rs index 4507bf35c..1bb3ef35c 100644 --- a/src/datadogV1/model/model_event_create_request.rs +++ b/src/datadogV1/model/model_event_create_request.rs @@ -71,4 +71,52 @@ impl EventCreateRequest { title, } } + + pub fn with_aggregation_key(&mut self, value: String) -> &mut Self { + self.aggregation_key = Some(value); + self + } + + pub fn with_alert_type(&mut self, value: crate::datadogV1::model::EventAlertType) -> &mut Self { + self.alert_type = Some(value); + self + } + + pub fn with_date_happened(&mut self, value: i64) -> &mut Self { + self.date_happened = Some(value); + self + } + + pub fn with_device_name(&mut self, value: String) -> &mut Self { + self.device_name = Some(value); + self + } + + pub fn with_host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn with_priority( + &mut self, + value: Option, + ) -> &mut Self { + self.priority = Some(value); + self + } + + pub fn with_related_event_id(&mut self, value: i64) -> &mut Self { + self.related_event_id = Some(value); + self + } + + pub fn with_source_type_name(&mut self, value: String) -> &mut Self { + self.source_type_name = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } diff --git a/src/datadogV1/model/model_event_create_response.rs b/src/datadogV1/model/model_event_create_response.rs index 18a04bd03..579ba359a 100644 --- a/src/datadogV1/model/model_event_create_response.rs +++ b/src/datadogV1/model/model_event_create_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct EventCreateResponse { /// Object representing an event. #[serde(rename = "event")] - pub event: Option>, + pub event: Option, /// A status. #[serde(rename = "status")] pub status: Option, @@ -23,6 +23,16 @@ impl EventCreateResponse { status: None, } } + + pub fn with_event(&mut self, value: crate::datadogV1::model::Event) -> &mut Self { + self.event = Some(value); + self + } + + pub fn with_status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + self + } } impl Default for EventCreateResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_event_list_response.rs b/src/datadogV1/model/model_event_list_response.rs index 7f661d536..3c27f9bd3 100644 --- a/src/datadogV1/model/model_event_list_response.rs +++ b/src/datadogV1/model/model_event_list_response.rs @@ -23,6 +23,16 @@ impl EventListResponse { status: None, } } + + pub fn with_events(&mut self, value: Vec) -> &mut Self { + self.events = Some(value); + self + } + + pub fn with_status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + self + } } impl Default for EventListResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_event_response.rs b/src/datadogV1/model/model_event_response.rs index 7e23977bb..edd4b26c8 100644 --- a/src/datadogV1/model/model_event_response.rs +++ b/src/datadogV1/model/model_event_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct EventResponse { /// Object representing an event. #[serde(rename = "event")] - pub event: Option>, + pub event: Option, /// A status. #[serde(rename = "status")] pub status: Option, @@ -23,6 +23,16 @@ impl EventResponse { status: None, } } + + pub fn with_event(&mut self, value: crate::datadogV1::model::Event) -> &mut Self { + self.event = Some(value); + self + } + + pub fn with_status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + self + } } impl Default for EventResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_event_stream_widget_definition.rs b/src/datadogV1/model/model_event_stream_widget_definition.rs index 3fbab8588..6a39aefef 100644 --- a/src/datadogV1/model/model_event_stream_widget_definition.rs +++ b/src/datadogV1/model/model_event_stream_widget_definition.rs @@ -20,7 +20,7 @@ pub struct EventStreamWidgetDefinition { pub tags_execution: Option, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// Title of the widget. #[serde(rename = "title")] pub title: Option, @@ -51,4 +51,40 @@ impl EventStreamWidgetDefinition { type_, } } + + pub fn with_event_size( + &mut self, + value: crate::datadogV1::model::WidgetEventSize, + ) -> &mut Self { + self.event_size = Some(value); + self + } + + pub fn with_tags_execution(&mut self, value: String) -> &mut Self { + self.tags_execution = Some(value); + self + } + + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_event_timeline_widget_definition.rs b/src/datadogV1/model/model_event_timeline_widget_definition.rs index 57a927087..3eb2b492c 100644 --- a/src/datadogV1/model/model_event_timeline_widget_definition.rs +++ b/src/datadogV1/model/model_event_timeline_widget_definition.rs @@ -16,7 +16,7 @@ pub struct EventTimelineWidgetDefinition { pub tags_execution: Option, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// Title of the widget. #[serde(rename = "title")] pub title: Option, @@ -46,4 +46,32 @@ impl EventTimelineWidgetDefinition { type_, } } + + pub fn with_tags_execution(&mut self, value: String) -> &mut Self { + self.tags_execution = Some(value); + self + } + + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_formula_and_function_apm_dependency_stats_query_definition.rs b/src/datadogV1/model/model_formula_and_function_apm_dependency_stats_query_definition.rs index 4bcbed5a3..0aff6729b 100644 --- a/src/datadogV1/model/model_formula_and_function_apm_dependency_stats_query_definition.rs +++ b/src/datadogV1/model/model_formula_and_function_apm_dependency_stats_query_definition.rs @@ -63,4 +63,19 @@ impl FormulaAndFunctionApmDependencyStatsQueryDefinition { stat, } } + + pub fn with_is_upstream(&mut self, value: bool) -> &mut Self { + self.is_upstream = Some(value); + self + } + + pub fn with_primary_tag_name(&mut self, value: String) -> &mut Self { + self.primary_tag_name = Some(value); + self + } + + pub fn with_primary_tag_value(&mut self, value: String) -> &mut Self { + self.primary_tag_value = Some(value); + self + } } diff --git a/src/datadogV1/model/model_formula_and_function_apm_resource_stats_query_definition.rs b/src/datadogV1/model/model_formula_and_function_apm_resource_stats_query_definition.rs index ad5fa0b72..62a41087a 100644 --- a/src/datadogV1/model/model_formula_and_function_apm_resource_stats_query_definition.rs +++ b/src/datadogV1/model/model_formula_and_function_apm_resource_stats_query_definition.rs @@ -61,4 +61,29 @@ impl FormulaAndFunctionApmResourceStatsQueryDefinition { stat, } } + + pub fn with_group_by(&mut self, value: Vec) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn with_operation_name(&mut self, value: String) -> &mut Self { + self.operation_name = Some(value); + self + } + + pub fn with_primary_tag_name(&mut self, value: String) -> &mut Self { + self.primary_tag_name = Some(value); + self + } + + pub fn with_primary_tag_value(&mut self, value: String) -> &mut Self { + self.primary_tag_value = Some(value); + self + } + + pub fn with_resource_name(&mut self, value: String) -> &mut Self { + self.resource_name = Some(value); + self + } } diff --git a/src/datadogV1/model/model_formula_and_function_cloud_cost_query_definition.rs b/src/datadogV1/model/model_formula_and_function_cloud_cost_query_definition.rs index b4ed6928f..5f639a83d 100644 --- a/src/datadogV1/model/model_formula_and_function_cloud_cost_query_definition.rs +++ b/src/datadogV1/model/model_formula_and_function_cloud_cost_query_definition.rs @@ -35,4 +35,12 @@ impl FormulaAndFunctionCloudCostQueryDefinition { query, } } + + pub fn with_aggregator( + &mut self, + value: crate::datadogV1::model::WidgetAggregator, + ) -> &mut Self { + self.aggregator = Some(value); + self + } } diff --git a/src/datadogV1/model/model_formula_and_function_event_query_definition.rs b/src/datadogV1/model/model_formula_and_function_event_query_definition.rs index 3d986f0ed..e3eafdda0 100644 --- a/src/datadogV1/model/model_formula_and_function_event_query_definition.rs +++ b/src/datadogV1/model/model_formula_and_function_event_query_definition.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct FormulaAndFunctionEventQueryDefinition { /// Compute options. #[serde(rename = "compute")] - pub compute: Box, + pub compute: crate::datadogV1::model::FormulaAndFunctionEventQueryDefinitionCompute, /// Data source for event platform-based queries. #[serde(rename = "data_source")] pub data_source: crate::datadogV1::model::FormulaAndFunctionEventsDataSource, @@ -25,7 +25,7 @@ pub struct FormulaAndFunctionEventQueryDefinition { pub name: String, /// Search options. #[serde(rename = "search")] - pub search: Option>, + pub search: Option, /// Option for storage location. Feature in Private Beta. #[serde(rename = "storage")] pub storage: Option, @@ -33,7 +33,7 @@ pub struct FormulaAndFunctionEventQueryDefinition { impl FormulaAndFunctionEventQueryDefinition { pub fn new( - compute: Box, + compute: crate::datadogV1::model::FormulaAndFunctionEventQueryDefinitionCompute, data_source: crate::datadogV1::model::FormulaAndFunctionEventsDataSource, name: String, ) -> FormulaAndFunctionEventQueryDefinition { @@ -47,4 +47,30 @@ impl FormulaAndFunctionEventQueryDefinition { storage: None, } } + + pub fn with_group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn with_indexes(&mut self, value: Vec) -> &mut Self { + self.indexes = Some(value); + self + } + + pub fn with_search( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionEventQueryDefinitionSearch, + ) -> &mut Self { + self.search = Some(value); + self + } + + pub fn with_storage(&mut self, value: String) -> &mut Self { + self.storage = Some(value); + self + } } diff --git a/src/datadogV1/model/model_formula_and_function_event_query_definition_compute.rs b/src/datadogV1/model/model_formula_and_function_event_query_definition_compute.rs index 29efe3fb4..d385f857b 100644 --- a/src/datadogV1/model/model_formula_and_function_event_query_definition_compute.rs +++ b/src/datadogV1/model/model_formula_and_function_event_query_definition_compute.rs @@ -29,4 +29,14 @@ impl FormulaAndFunctionEventQueryDefinitionCompute { metric: None, } } + + pub fn with_interval(&mut self, value: i64) -> &mut Self { + self.interval = Some(value); + self + } + + pub fn with_metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } } diff --git a/src/datadogV1/model/model_formula_and_function_event_query_group_by.rs b/src/datadogV1/model/model_formula_and_function_event_query_group_by.rs index 17c4af0ee..f8ca18dea 100644 --- a/src/datadogV1/model/model_formula_and_function_event_query_group_by.rs +++ b/src/datadogV1/model/model_formula_and_function_event_query_group_by.rs @@ -16,7 +16,7 @@ pub struct FormulaAndFunctionEventQueryGroupBy { pub limit: Option, /// Options for sorting group by results. #[serde(rename = "sort")] - pub sort: Option>, + pub sort: Option, } impl FormulaAndFunctionEventQueryGroupBy { @@ -27,4 +27,17 @@ impl FormulaAndFunctionEventQueryGroupBy { sort: None, } } + + pub fn with_limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_sort( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionEventQueryGroupBySort, + ) -> &mut Self { + self.sort = Some(value); + self + } } diff --git a/src/datadogV1/model/model_formula_and_function_event_query_group_by_sort.rs b/src/datadogV1/model/model_formula_and_function_event_query_group_by_sort.rs index d05b1520b..b39bdb81d 100644 --- a/src/datadogV1/model/model_formula_and_function_event_query_group_by_sort.rs +++ b/src/datadogV1/model/model_formula_and_function_event_query_group_by_sort.rs @@ -29,4 +29,14 @@ impl FormulaAndFunctionEventQueryGroupBySort { order: None, } } + + pub fn with_metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn with_order(&mut self, value: crate::datadogV1::model::QuerySortOrder) -> &mut Self { + self.order = Some(value); + self + } } diff --git a/src/datadogV1/model/model_formula_and_function_metric_query_definition.rs b/src/datadogV1/model/model_formula_and_function_metric_query_definition.rs index 5404e3ffa..b26d94ca0 100644 --- a/src/datadogV1/model/model_formula_and_function_metric_query_definition.rs +++ b/src/datadogV1/model/model_formula_and_function_metric_query_definition.rs @@ -35,4 +35,12 @@ impl FormulaAndFunctionMetricQueryDefinition { query, } } + + pub fn with_aggregator( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionMetricAggregation, + ) -> &mut Self { + self.aggregator = Some(value); + self + } } diff --git a/src/datadogV1/model/model_formula_and_function_process_query_definition.rs b/src/datadogV1/model/model_formula_and_function_process_query_definition.rs index 7b7f53649..f7605d15a 100644 --- a/src/datadogV1/model/model_formula_and_function_process_query_definition.rs +++ b/src/datadogV1/model/model_formula_and_function_process_query_definition.rs @@ -55,4 +55,37 @@ impl FormulaAndFunctionProcessQueryDefinition { text_filter: None, } } + + pub fn with_aggregator( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionMetricAggregation, + ) -> &mut Self { + self.aggregator = Some(value); + self + } + + pub fn with_is_normalized_cpu(&mut self, value: bool) -> &mut Self { + self.is_normalized_cpu = Some(value); + self + } + + pub fn with_limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_sort(&mut self, value: crate::datadogV1::model::QuerySortOrder) -> &mut Self { + self.sort = Some(value); + self + } + + pub fn with_tag_filters(&mut self, value: Vec) -> &mut Self { + self.tag_filters = Some(value); + self + } + + pub fn with_text_filter(&mut self, value: String) -> &mut Self { + self.text_filter = Some(value); + self + } } diff --git a/src/datadogV1/model/model_formula_and_function_query_definition.rs b/src/datadogV1/model/model_formula_and_function_query_definition.rs index 9a921427d..bbe33f2f6 100644 --- a/src/datadogV1/model/model_formula_and_function_query_definition.rs +++ b/src/datadogV1/model/model_formula_and_function_query_definition.rs @@ -8,24 +8,24 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum FormulaAndFunctionQueryDefinition { FormulaAndFunctionMetricQueryDefinition( - Box, + crate::datadogV1::model::FormulaAndFunctionMetricQueryDefinition, ), FormulaAndFunctionEventQueryDefinition( - Box, + crate::datadogV1::model::FormulaAndFunctionEventQueryDefinition, ), FormulaAndFunctionProcessQueryDefinition( - Box, + crate::datadogV1::model::FormulaAndFunctionProcessQueryDefinition, ), FormulaAndFunctionApmDependencyStatsQueryDefinition( - Box, + crate::datadogV1::model::FormulaAndFunctionApmDependencyStatsQueryDefinition, ), FormulaAndFunctionApmResourceStatsQueryDefinition( - Box, + crate::datadogV1::model::FormulaAndFunctionApmResourceStatsQueryDefinition, ), FormulaAndFunctionSLOQueryDefinition( - Box, + crate::datadogV1::model::FormulaAndFunctionSLOQueryDefinition, ), FormulaAndFunctionCloudCostQueryDefinition( - Box, + crate::datadogV1::model::FormulaAndFunctionCloudCostQueryDefinition, ), } diff --git a/src/datadogV1/model/model_formula_and_function_slo_query_definition.rs b/src/datadogV1/model/model_formula_and_function_slo_query_definition.rs index f9d3144d2..942421a47 100644 --- a/src/datadogV1/model/model_formula_and_function_slo_query_definition.rs +++ b/src/datadogV1/model/model_formula_and_function_slo_query_definition.rs @@ -47,4 +47,30 @@ impl FormulaAndFunctionSLOQueryDefinition { slo_query_type: None, } } + + pub fn with_additional_query_filters(&mut self, value: String) -> &mut Self { + self.additional_query_filters = Some(value); + self + } + + pub fn with_group_mode( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionSLOGroupMode, + ) -> &mut Self { + self.group_mode = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_slo_query_type( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionSLOQueryType, + ) -> &mut Self { + self.slo_query_type = Some(value); + self + } } diff --git a/src/datadogV1/model/model_free_text_widget_definition.rs b/src/datadogV1/model/model_free_text_widget_definition.rs index b1ce50f82..c23de4ce5 100644 --- a/src/datadogV1/model/model_free_text_widget_definition.rs +++ b/src/datadogV1/model/model_free_text_widget_definition.rs @@ -38,4 +38,22 @@ impl FreeTextWidgetDefinition { type_, } } + + pub fn with_color(&mut self, value: String) -> &mut Self { + self.color = Some(value); + self + } + + pub fn with_font_size(&mut self, value: String) -> &mut Self { + self.font_size = Some(value); + self + } + + pub fn with_text_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.text_align = Some(value); + self + } } diff --git a/src/datadogV1/model/model_funnel_widget_definition.rs b/src/datadogV1/model/model_funnel_widget_definition.rs index 3b6d60f09..d3b6f31a7 100644 --- a/src/datadogV1/model/model_funnel_widget_definition.rs +++ b/src/datadogV1/model/model_funnel_widget_definition.rs @@ -14,7 +14,7 @@ pub struct FunnelWidgetDefinition { pub requests: Vec, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// The title of the widget. #[serde(rename = "title")] pub title: Option, @@ -43,4 +43,27 @@ impl FunnelWidgetDefinition { type_, } } + + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_funnel_widget_request.rs b/src/datadogV1/model/model_funnel_widget_request.rs index 080b3a8df..67f7b682c 100644 --- a/src/datadogV1/model/model_funnel_widget_request.rs +++ b/src/datadogV1/model/model_funnel_widget_request.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct FunnelWidgetRequest { /// Updated funnel widget. #[serde(rename = "query")] - pub query: Box, + pub query: crate::datadogV1::model::FunnelQuery, /// Widget request type. #[serde(rename = "request_type")] pub request_type: crate::datadogV1::model::FunnelRequestType, @@ -18,7 +18,7 @@ pub struct FunnelWidgetRequest { impl FunnelWidgetRequest { pub fn new( - query: Box, + query: crate::datadogV1::model::FunnelQuery, request_type: crate::datadogV1::model::FunnelRequestType, ) -> FunnelWidgetRequest { FunnelWidgetRequest { diff --git a/src/datadogV1/model/model_gcp_account.rs b/src/datadogV1/model/model_gcp_account.rs index 90fbafb64..5668f522a 100644 --- a/src/datadogV1/model/model_gcp_account.rs +++ b/src/datadogV1/model/model_gcp_account.rs @@ -81,6 +81,86 @@ impl GCPAccount { type_: None, } } + + pub fn with_auth_provider_x509_cert_url(&mut self, value: String) -> &mut Self { + self.auth_provider_x509_cert_url = Some(value); + self + } + + pub fn with_auth_uri(&mut self, value: String) -> &mut Self { + self.auth_uri = Some(value); + self + } + + pub fn with_automute(&mut self, value: bool) -> &mut Self { + self.automute = Some(value); + self + } + + pub fn with_client_email(&mut self, value: String) -> &mut Self { + self.client_email = Some(value); + self + } + + pub fn with_client_id(&mut self, value: String) -> &mut Self { + self.client_id = Some(value); + self + } + + pub fn with_client_x509_cert_url(&mut self, value: String) -> &mut Self { + self.client_x509_cert_url = Some(value); + self + } + + pub fn with_errors(&mut self, value: Vec) -> &mut Self { + self.errors = Some(value); + self + } + + pub fn with_host_filters(&mut self, value: String) -> &mut Self { + self.host_filters = Some(value); + self + } + + pub fn with_is_cspm_enabled(&mut self, value: bool) -> &mut Self { + self.is_cspm_enabled = Some(value); + self + } + + pub fn with_is_security_command_center_enabled(&mut self, value: bool) -> &mut Self { + self.is_security_command_center_enabled = Some(value); + self + } + + pub fn with_private_key(&mut self, value: String) -> &mut Self { + self.private_key = Some(value); + self + } + + pub fn with_private_key_id(&mut self, value: String) -> &mut Self { + self.private_key_id = Some(value); + self + } + + pub fn with_project_id(&mut self, value: String) -> &mut Self { + self.project_id = Some(value); + self + } + + pub fn with_resource_collection_enabled(&mut self, value: bool) -> &mut Self { + self.resource_collection_enabled = Some(value); + self + } + + pub fn with_token_uri(&mut self, value: String) -> &mut Self { + self.token_uri = Some(value); + self + } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for GCPAccount { fn default() -> Self { diff --git a/src/datadogV1/model/model_geomap_widget_definition.rs b/src/datadogV1/model/model_geomap_widget_definition.rs index b626fff5b..e169cbd19 100644 --- a/src/datadogV1/model/model_geomap_widget_definition.rs +++ b/src/datadogV1/model/model_geomap_widget_definition.rs @@ -19,10 +19,10 @@ pub struct GeomapWidgetDefinition { pub requests: Vec, /// The style to apply to the widget. #[serde(rename = "style")] - pub style: Box, + pub style: crate::datadogV1::model::GeomapWidgetDefinitionStyle, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// The title of your widget. #[serde(rename = "title")] pub title: Option, @@ -37,15 +37,15 @@ pub struct GeomapWidgetDefinition { pub type_: crate::datadogV1::model::GeomapWidgetDefinitionType, /// The view of the world that the map should render. #[serde(rename = "view")] - pub view: Box, + pub view: crate::datadogV1::model::GeomapWidgetDefinitionView, } impl GeomapWidgetDefinition { pub fn new( requests: Vec, - style: Box, + style: crate::datadogV1::model::GeomapWidgetDefinitionStyle, type_: crate::datadogV1::model::GeomapWidgetDefinitionType, - view: Box, + view: crate::datadogV1::model::GeomapWidgetDefinitionView, ) -> GeomapWidgetDefinition { GeomapWidgetDefinition { custom_links: None, @@ -59,4 +59,35 @@ impl GeomapWidgetDefinition { view, } } + + pub fn with_custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_geomap_widget_request.rs b/src/datadogV1/model/model_geomap_widget_request.rs index b22b02cc4..3fe9d12ec 100644 --- a/src/datadogV1/model/model_geomap_widget_request.rs +++ b/src/datadogV1/model/model_geomap_widget_request.rs @@ -16,7 +16,7 @@ pub struct GeomapWidgetRequest { pub formulas: Option>, /// The log query. #[serde(rename = "log_query")] - pub log_query: Option>, + pub log_query: Option, /// The widget metrics query. #[serde(rename = "q")] pub q: Option, @@ -25,16 +25,16 @@ pub struct GeomapWidgetRequest { pub queries: Option>, /// Updated list stream widget. #[serde(rename = "query")] - pub query: Option>, + pub query: Option, /// Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. #[serde(rename = "response_format")] pub response_format: Option, /// The log query. #[serde(rename = "rum_query")] - pub rum_query: Option>, + pub rum_query: Option, /// The log query. #[serde(rename = "security_query")] - pub security_query: Option>, + pub security_query: Option, } impl GeomapWidgetRequest { @@ -51,6 +51,72 @@ impl GeomapWidgetRequest { security_query: None, } } + + pub fn with_columns( + &mut self, + value: Vec, + ) -> &mut Self { + self.columns = Some(value); + self + } + + pub fn with_formulas( + &mut self, + value: Vec, + ) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn with_log_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn with_q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn with_queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn with_query(&mut self, value: crate::datadogV1::model::ListStreamQuery) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + self + } + + pub fn with_rum_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn with_security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + self + } } impl Default for GeomapWidgetRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_graph_snapshot.rs b/src/datadogV1/model/model_graph_snapshot.rs index 14b17cc06..920e5d445 100644 --- a/src/datadogV1/model/model_graph_snapshot.rs +++ b/src/datadogV1/model/model_graph_snapshot.rs @@ -29,6 +29,21 @@ impl GraphSnapshot { snapshot_url: None, } } + + pub fn with_graph_def(&mut self, value: String) -> &mut Self { + self.graph_def = Some(value); + self + } + + pub fn with_metric_query(&mut self, value: String) -> &mut Self { + self.metric_query = Some(value); + self + } + + pub fn with_snapshot_url(&mut self, value: String) -> &mut Self { + self.snapshot_url = Some(value); + self + } } impl Default for GraphSnapshot { fn default() -> Self { diff --git a/src/datadogV1/model/model_group_widget_definition.rs b/src/datadogV1/model/model_group_widget_definition.rs index 95e3535b5..615f70194 100644 --- a/src/datadogV1/model/model_group_widget_definition.rs +++ b/src/datadogV1/model/model_group_widget_definition.rs @@ -51,4 +51,32 @@ impl GroupWidgetDefinition { widgets, } } + + pub fn with_background_color(&mut self, value: String) -> &mut Self { + self.background_color = Some(value); + self + } + + pub fn with_banner_img(&mut self, value: String) -> &mut Self { + self.banner_img = Some(value); + self + } + + pub fn with_show_title(&mut self, value: bool) -> &mut Self { + self.show_title = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } } diff --git a/src/datadogV1/model/model_heat_map_widget_definition.rs b/src/datadogV1/model/model_heat_map_widget_definition.rs index 6754c6935..70668c47d 100644 --- a/src/datadogV1/model/model_heat_map_widget_definition.rs +++ b/src/datadogV1/model/model_heat_map_widget_definition.rs @@ -25,7 +25,7 @@ pub struct HeatMapWidgetDefinition { pub show_legend: Option, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// Title of the widget. #[serde(rename = "title")] pub title: Option, @@ -40,7 +40,7 @@ pub struct HeatMapWidgetDefinition { pub type_: crate::datadogV1::model::HeatMapWidgetDefinitionType, /// Axis controls for the widget. #[serde(rename = "yaxis")] - pub yaxis: Option>, + pub yaxis: Option, } impl HeatMapWidgetDefinition { @@ -62,4 +62,55 @@ impl HeatMapWidgetDefinition { yaxis: None, } } + + pub fn with_custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn with_events(&mut self, value: Vec) -> &mut Self { + self.events = Some(value); + self + } + + pub fn with_legend_size(&mut self, value: String) -> &mut Self { + self.legend_size = Some(value); + self + } + + pub fn with_show_legend(&mut self, value: bool) -> &mut Self { + self.show_legend = Some(value); + self + } + + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } + + pub fn with_yaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { + self.yaxis = Some(value); + self + } } diff --git a/src/datadogV1/model/model_heat_map_widget_request.rs b/src/datadogV1/model/model_heat_map_widget_request.rs index a161511db..052bedf96 100644 --- a/src/datadogV1/model/model_heat_map_widget_request.rs +++ b/src/datadogV1/model/model_heat_map_widget_request.rs @@ -10,25 +10,25 @@ use serde_with::skip_serializing_none; pub struct HeatMapWidgetRequest { /// The log query. #[serde(rename = "apm_query")] - pub apm_query: Option>, + pub apm_query: Option, /// The event query. #[serde(rename = "event_query")] - pub event_query: Option>, + pub event_query: Option, /// List of formulas that operate on queries. #[serde(rename = "formulas")] pub formulas: Option>, /// The log query. #[serde(rename = "log_query")] - pub log_query: Option>, + pub log_query: Option, /// The log query. #[serde(rename = "network_query")] - pub network_query: Option>, + pub network_query: Option, /// The process query to use in the widget. #[serde(rename = "process_query")] - pub process_query: Option>, + pub process_query: Option, /// The log query. #[serde(rename = "profile_metrics_query")] - pub profile_metrics_query: Option>, + pub profile_metrics_query: Option, /// Widget query. #[serde(rename = "q")] pub q: Option, @@ -40,13 +40,13 @@ pub struct HeatMapWidgetRequest { pub response_format: Option, /// The log query. #[serde(rename = "rum_query")] - pub rum_query: Option>, + pub rum_query: Option, /// The log query. #[serde(rename = "security_query")] - pub security_query: Option>, + pub security_query: Option, /// Widget style definition. #[serde(rename = "style")] - pub style: Option>, + pub style: Option, } impl HeatMapWidgetRequest { @@ -67,6 +67,104 @@ impl HeatMapWidgetRequest { style: None, } } + + pub fn with_apm_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn with_event_query( + &mut self, + value: crate::datadogV1::model::EventQueryDefinition, + ) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn with_formulas( + &mut self, + value: Vec, + ) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn with_log_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn with_network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn with_process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn with_profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn with_q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn with_queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn with_response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + self + } + + pub fn with_rum_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn with_security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + self + } + + pub fn with_style(&mut self, value: crate::datadogV1::model::WidgetStyle) -> &mut Self { + self.style = Some(value); + self + } } impl Default for HeatMapWidgetRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_host.rs b/src/datadogV1/model/model_host.rs index 23281967a..bc8adcf4f 100644 --- a/src/datadogV1/model/model_host.rs +++ b/src/datadogV1/model/model_host.rs @@ -31,10 +31,10 @@ pub struct Host { pub last_reported_time: Option, /// Metadata associated with your host. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, /// Host Metrics collected. #[serde(rename = "metrics")] - pub metrics: Option>, + pub metrics: Option, /// Timeout of the mute applied to your host. #[serde( rename = "mute_timeout", @@ -75,6 +75,79 @@ impl Host { up: None, } } + + pub fn with_aliases(&mut self, value: Vec) -> &mut Self { + self.aliases = Some(value); + self + } + + pub fn with_apps(&mut self, value: Vec) -> &mut Self { + self.apps = Some(value); + self + } + + pub fn with_aws_name(&mut self, value: String) -> &mut Self { + self.aws_name = Some(value); + self + } + + pub fn with_host_name(&mut self, value: String) -> &mut Self { + self.host_name = Some(value); + self + } + + pub fn with_id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_is_muted(&mut self, value: bool) -> &mut Self { + self.is_muted = Some(value); + self + } + + pub fn with_last_reported_time(&mut self, value: i64) -> &mut Self { + self.last_reported_time = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV1::model::HostMeta) -> &mut Self { + self.meta = Some(value); + self + } + + pub fn with_metrics(&mut self, value: crate::datadogV1::model::HostMetrics) -> &mut Self { + self.metrics = Some(value); + self + } + + pub fn with_mute_timeout(&mut self, value: Option) -> &mut Self { + self.mute_timeout = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_sources(&mut self, value: Vec) -> &mut Self { + self.sources = Some(value); + self + } + + pub fn with_tags_by_source( + &mut self, + value: std::collections::BTreeMap>, + ) -> &mut Self { + self.tags_by_source = Some(value); + self + } + + pub fn with_up(&mut self, value: bool) -> &mut Self { + self.up = Some(value); + self + } } impl Default for Host { fn default() -> Self { diff --git a/src/datadogV1/model/model_host_list_response.rs b/src/datadogV1/model/model_host_list_response.rs index 48312d5ec..29083680a 100644 --- a/src/datadogV1/model/model_host_list_response.rs +++ b/src/datadogV1/model/model_host_list_response.rs @@ -27,6 +27,21 @@ impl HostListResponse { total_returned: None, } } + + pub fn with_host_list(&mut self, value: Vec) -> &mut Self { + self.host_list = Some(value); + self + } + + pub fn with_total_matching(&mut self, value: i64) -> &mut Self { + self.total_matching = Some(value); + self + } + + pub fn with_total_returned(&mut self, value: i64) -> &mut Self { + self.total_returned = Some(value); + self + } } impl Default for HostListResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_host_map_request.rs b/src/datadogV1/model/model_host_map_request.rs index 56172eb6f..9085a218b 100644 --- a/src/datadogV1/model/model_host_map_request.rs +++ b/src/datadogV1/model/model_host_map_request.rs @@ -10,31 +10,31 @@ use serde_with::skip_serializing_none; pub struct HostMapRequest { /// The log query. #[serde(rename = "apm_query")] - pub apm_query: Option>, + pub apm_query: Option, /// The log query. #[serde(rename = "event_query")] - pub event_query: Option>, + pub event_query: Option, /// The log query. #[serde(rename = "log_query")] - pub log_query: Option>, + pub log_query: Option, /// The log query. #[serde(rename = "network_query")] - pub network_query: Option>, + pub network_query: Option, /// The process query to use in the widget. #[serde(rename = "process_query")] - pub process_query: Option>, + pub process_query: Option, /// The log query. #[serde(rename = "profile_metrics_query")] - pub profile_metrics_query: Option>, + pub profile_metrics_query: Option, /// Query definition. #[serde(rename = "q")] pub q: Option, /// The log query. #[serde(rename = "rum_query")] - pub rum_query: Option>, + pub rum_query: Option, /// The log query. #[serde(rename = "security_query")] - pub security_query: Option>, + pub security_query: Option, } impl HostMapRequest { @@ -51,6 +51,75 @@ impl HostMapRequest { security_query: None, } } + + pub fn with_apm_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn with_event_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn with_log_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn with_network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn with_process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn with_profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn with_q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn with_rum_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn with_security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + self + } } impl Default for HostMapRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_host_map_widget_definition.rs b/src/datadogV1/model/model_host_map_widget_definition.rs index a08e15eeb..7bf3c7e49 100644 --- a/src/datadogV1/model/model_host_map_widget_definition.rs +++ b/src/datadogV1/model/model_host_map_widget_definition.rs @@ -28,13 +28,13 @@ pub struct HostMapWidgetDefinition { pub notes: Option, /// List of definitions. #[serde(rename = "requests")] - pub requests: Box, + pub requests: crate::datadogV1::model::HostMapWidgetDefinitionRequests, /// List of tags used to filter the map. #[serde(rename = "scope")] pub scope: Option>, /// The style to apply to the widget. #[serde(rename = "style")] - pub style: Option>, + pub style: Option, /// Title of the widget. #[serde(rename = "title")] pub title: Option, @@ -51,7 +51,7 @@ pub struct HostMapWidgetDefinition { impl HostMapWidgetDefinition { pub fn new( - requests: Box, + requests: crate::datadogV1::model::HostMapWidgetDefinitionRequests, type_: crate::datadogV1::model::HostMapWidgetDefinitionType, ) -> HostMapWidgetDefinition { HostMapWidgetDefinition { @@ -70,4 +70,68 @@ impl HostMapWidgetDefinition { type_, } } + + pub fn with_custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn with_group(&mut self, value: Vec) -> &mut Self { + self.group = Some(value); + self + } + + pub fn with_no_group_hosts(&mut self, value: bool) -> &mut Self { + self.no_group_hosts = Some(value); + self + } + + pub fn with_no_metric_hosts(&mut self, value: bool) -> &mut Self { + self.no_metric_hosts = Some(value); + self + } + + pub fn with_node_type(&mut self, value: crate::datadogV1::model::WidgetNodeType) -> &mut Self { + self.node_type = Some(value); + self + } + + pub fn with_notes(&mut self, value: String) -> &mut Self { + self.notes = Some(value); + self + } + + pub fn with_scope(&mut self, value: Vec) -> &mut Self { + self.scope = Some(value); + self + } + + pub fn with_style( + &mut self, + value: crate::datadogV1::model::HostMapWidgetDefinitionStyle, + ) -> &mut Self { + self.style = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_host_map_widget_definition_requests.rs b/src/datadogV1/model/model_host_map_widget_definition_requests.rs index 5ba6c4c62..80febd0ae 100644 --- a/src/datadogV1/model/model_host_map_widget_definition_requests.rs +++ b/src/datadogV1/model/model_host_map_widget_definition_requests.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct HostMapWidgetDefinitionRequests { /// Updated host map. #[serde(rename = "fill")] - pub fill: Option>, + pub fill: Option, /// Updated host map. #[serde(rename = "size")] - pub size: Option>, + pub size: Option, } impl HostMapWidgetDefinitionRequests { @@ -23,6 +23,16 @@ impl HostMapWidgetDefinitionRequests { size: None, } } + + pub fn with_fill(&mut self, value: crate::datadogV1::model::HostMapRequest) -> &mut Self { + self.fill = Some(value); + self + } + + pub fn with_size(&mut self, value: crate::datadogV1::model::HostMapRequest) -> &mut Self { + self.size = Some(value); + self + } } impl Default for HostMapWidgetDefinitionRequests { fn default() -> Self { diff --git a/src/datadogV1/model/model_host_map_widget_definition_style.rs b/src/datadogV1/model/model_host_map_widget_definition_style.rs index 94b6a1dbb..4a3907395 100644 --- a/src/datadogV1/model/model_host_map_widget_definition_style.rs +++ b/src/datadogV1/model/model_host_map_widget_definition_style.rs @@ -31,6 +31,26 @@ impl HostMapWidgetDefinitionStyle { palette_flip: None, } } + + pub fn with_fill_max(&mut self, value: String) -> &mut Self { + self.fill_max = Some(value); + self + } + + pub fn with_fill_min(&mut self, value: String) -> &mut Self { + self.fill_min = Some(value); + self + } + + pub fn with_palette(&mut self, value: String) -> &mut Self { + self.palette = Some(value); + self + } + + pub fn with_palette_flip(&mut self, value: bool) -> &mut Self { + self.palette_flip = Some(value); + self + } } impl Default for HostMapWidgetDefinitionStyle { fn default() -> Self { diff --git a/src/datadogV1/model/model_host_meta.rs b/src/datadogV1/model/model_host_meta.rs index cd6ee492c..03c7f630f 100644 --- a/src/datadogV1/model/model_host_meta.rs +++ b/src/datadogV1/model/model_host_meta.rs @@ -25,7 +25,7 @@ pub struct HostMeta { pub gohai: Option, /// Agent install method. #[serde(rename = "install_method")] - pub install_method: Option>, + pub install_method: Option, /// An array of Mac versions. #[serde(rename = "macV")] pub mac_v: Option>, @@ -75,6 +75,84 @@ impl HostMeta { win_v: None, } } + + pub fn with_agent_checks(&mut self, value: Vec>) -> &mut Self { + self.agent_checks = Some(value); + self + } + + pub fn with_agent_version(&mut self, value: String) -> &mut Self { + self.agent_version = Some(value); + self + } + + pub fn with_cpu_cores(&mut self, value: i64) -> &mut Self { + self.cpu_cores = Some(value); + self + } + + pub fn with_fbsd_v(&mut self, value: Vec) -> &mut Self { + self.fbsd_v = Some(value); + self + } + + pub fn with_gohai(&mut self, value: String) -> &mut Self { + self.gohai = Some(value); + self + } + + pub fn with_install_method( + &mut self, + value: crate::datadogV1::model::HostMetaInstallMethod, + ) -> &mut Self { + self.install_method = Some(value); + self + } + + pub fn with_mac_v(&mut self, value: Vec) -> &mut Self { + self.mac_v = Some(value); + self + } + + pub fn with_machine(&mut self, value: String) -> &mut Self { + self.machine = Some(value); + self + } + + pub fn with_nix_v(&mut self, value: Vec) -> &mut Self { + self.nix_v = Some(value); + self + } + + pub fn with_platform(&mut self, value: String) -> &mut Self { + self.platform = Some(value); + self + } + + pub fn with_processor(&mut self, value: String) -> &mut Self { + self.processor = Some(value); + self + } + + pub fn with_python_v(&mut self, value: String) -> &mut Self { + self.python_v = Some(value); + self + } + + pub fn with_socket_fqdn(&mut self, value: String) -> &mut Self { + self.socket_fqdn = Some(value); + self + } + + pub fn with_socket_hostname(&mut self, value: String) -> &mut Self { + self.socket_hostname = Some(value); + self + } + + pub fn with_win_v(&mut self, value: Vec) -> &mut Self { + self.win_v = Some(value); + self + } } impl Default for HostMeta { fn default() -> Self { diff --git a/src/datadogV1/model/model_host_meta_install_method.rs b/src/datadogV1/model/model_host_meta_install_method.rs index 429d146fb..48251ddd9 100644 --- a/src/datadogV1/model/model_host_meta_install_method.rs +++ b/src/datadogV1/model/model_host_meta_install_method.rs @@ -27,6 +27,21 @@ impl HostMetaInstallMethod { tool_version: None, } } + + pub fn with_installer_version(&mut self, value: String) -> &mut Self { + self.installer_version = Some(value); + self + } + + pub fn with_tool(&mut self, value: String) -> &mut Self { + self.tool = Some(value); + self + } + + pub fn with_tool_version(&mut self, value: String) -> &mut Self { + self.tool_version = Some(value); + self + } } impl Default for HostMetaInstallMethod { fn default() -> Self { diff --git a/src/datadogV1/model/model_host_metrics.rs b/src/datadogV1/model/model_host_metrics.rs index 441c46340..54b9d31a6 100644 --- a/src/datadogV1/model/model_host_metrics.rs +++ b/src/datadogV1/model/model_host_metrics.rs @@ -27,6 +27,21 @@ impl HostMetrics { load: None, } } + + pub fn with_cpu(&mut self, value: f64) -> &mut Self { + self.cpu = Some(value); + self + } + + pub fn with_iowait(&mut self, value: f64) -> &mut Self { + self.iowait = Some(value); + self + } + + pub fn with_load(&mut self, value: f64) -> &mut Self { + self.load = Some(value); + self + } } impl Default for HostMetrics { fn default() -> Self { diff --git a/src/datadogV1/model/model_host_mute_response.rs b/src/datadogV1/model/model_host_mute_response.rs index 409533011..5a349750b 100644 --- a/src/datadogV1/model/model_host_mute_response.rs +++ b/src/datadogV1/model/model_host_mute_response.rs @@ -31,6 +31,26 @@ impl HostMuteResponse { message: None, } } + + pub fn with_action(&mut self, value: String) -> &mut Self { + self.action = Some(value); + self + } + + pub fn with_end(&mut self, value: i64) -> &mut Self { + self.end = Some(value); + self + } + + pub fn with_hostname(&mut self, value: String) -> &mut Self { + self.hostname = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } } impl Default for HostMuteResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_host_mute_settings.rs b/src/datadogV1/model/model_host_mute_settings.rs index 880568f55..f45b3235d 100644 --- a/src/datadogV1/model/model_host_mute_settings.rs +++ b/src/datadogV1/model/model_host_mute_settings.rs @@ -27,6 +27,21 @@ impl HostMuteSettings { override_: None, } } + + pub fn with_end(&mut self, value: i64) -> &mut Self { + self.end = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_override_(&mut self, value: bool) -> &mut Self { + self.override_ = Some(value); + self + } } impl Default for HostMuteSettings { fn default() -> Self { diff --git a/src/datadogV1/model/model_host_tags.rs b/src/datadogV1/model/model_host_tags.rs index ea5da71a2..ccd7b5df5 100644 --- a/src/datadogV1/model/model_host_tags.rs +++ b/src/datadogV1/model/model_host_tags.rs @@ -23,6 +23,16 @@ impl HostTags { tags: None, } } + + pub fn with_host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } impl Default for HostTags { fn default() -> Self { diff --git a/src/datadogV1/model/model_host_totals.rs b/src/datadogV1/model/model_host_totals.rs index e0c452c7f..17841397a 100644 --- a/src/datadogV1/model/model_host_totals.rs +++ b/src/datadogV1/model/model_host_totals.rs @@ -23,6 +23,16 @@ impl HostTotals { total_up: None, } } + + pub fn with_total_active(&mut self, value: i64) -> &mut Self { + self.total_active = Some(value); + self + } + + pub fn with_total_up(&mut self, value: i64) -> &mut Self { + self.total_up = Some(value); + self + } } impl Default for HostTotals { fn default() -> Self { diff --git a/src/datadogV1/model/model_hourly_usage_attribution_body.rs b/src/datadogV1/model/model_hourly_usage_attribution_body.rs index bdec5614c..fca8e66d7 100644 --- a/src/datadogV1/model/model_hourly_usage_attribution_body.rs +++ b/src/datadogV1/model/model_hourly_usage_attribution_body.rs @@ -55,6 +55,57 @@ impl HourlyUsageAttributionBody { usage_type: None, } } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } + + pub fn with_tag_config_source(&mut self, value: String) -> &mut Self { + self.tag_config_source = Some(value); + self + } + + pub fn with_tags( + &mut self, + value: Option>>>, + ) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_total_usage_sum(&mut self, value: f64) -> &mut Self { + self.total_usage_sum = Some(value); + self + } + + pub fn with_updated_at(&mut self, value: String) -> &mut Self { + self.updated_at = Some(value); + self + } + + pub fn with_usage_type( + &mut self, + value: crate::datadogV1::model::HourlyUsageAttributionUsageType, + ) -> &mut Self { + self.usage_type = Some(value); + self + } } impl Default for HourlyUsageAttributionBody { fn default() -> Self { diff --git a/src/datadogV1/model/model_hourly_usage_attribution_metadata.rs b/src/datadogV1/model/model_hourly_usage_attribution_metadata.rs index 51b172e46..49051709b 100644 --- a/src/datadogV1/model/model_hourly_usage_attribution_metadata.rs +++ b/src/datadogV1/model/model_hourly_usage_attribution_metadata.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct HourlyUsageAttributionMetadata { /// The metadata for the current pagination. #[serde(rename = "pagination")] - pub pagination: Option>, + pub pagination: Option, } impl HourlyUsageAttributionMetadata { pub fn new() -> HourlyUsageAttributionMetadata { HourlyUsageAttributionMetadata { pagination: None } } + + pub fn with_pagination( + &mut self, + value: crate::datadogV1::model::HourlyUsageAttributionPagination, + ) -> &mut Self { + self.pagination = Some(value); + self + } } impl Default for HourlyUsageAttributionMetadata { fn default() -> Self { diff --git a/src/datadogV1/model/model_hourly_usage_attribution_pagination.rs b/src/datadogV1/model/model_hourly_usage_attribution_pagination.rs index fe66c254d..2c79e00c4 100644 --- a/src/datadogV1/model/model_hourly_usage_attribution_pagination.rs +++ b/src/datadogV1/model/model_hourly_usage_attribution_pagination.rs @@ -23,6 +23,11 @@ impl HourlyUsageAttributionPagination { next_record_id: None, } } + + pub fn with_next_record_id(&mut self, value: Option) -> &mut Self { + self.next_record_id = Some(value); + self + } } impl Default for HourlyUsageAttributionPagination { fn default() -> Self { diff --git a/src/datadogV1/model/model_hourly_usage_attribution_response.rs b/src/datadogV1/model/model_hourly_usage_attribution_response.rs index 5cb4baae8..82189cf79 100644 --- a/src/datadogV1/model/model_hourly_usage_attribution_response.rs +++ b/src/datadogV1/model/model_hourly_usage_attribution_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct HourlyUsageAttributionResponse { /// The object containing document metadata. #[serde(rename = "metadata")] - pub metadata: Option>, + pub metadata: Option, /// Get the hourly usage attribution by tag(s). #[serde(rename = "usage")] pub usage: Option>, @@ -23,6 +23,22 @@ impl HourlyUsageAttributionResponse { usage: None, } } + + pub fn with_metadata( + &mut self, + value: crate::datadogV1::model::HourlyUsageAttributionMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for HourlyUsageAttributionResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_http_log_item.rs b/src/datadogV1/model/model_http_log_item.rs index 3dbb2f1f8..389f2cfe7 100644 --- a/src/datadogV1/model/model_http_log_item.rs +++ b/src/datadogV1/model/model_http_log_item.rs @@ -44,4 +44,24 @@ impl HTTPLogItem { additional_properties: std::collections::BTreeMap::new(), } } + + pub fn with_ddsource(&mut self, value: String) -> &mut Self { + self.ddsource = Some(value); + self + } + + pub fn with_ddtags(&mut self, value: String) -> &mut Self { + self.ddtags = Some(value); + self + } + + pub fn with_hostname(&mut self, value: String) -> &mut Self { + self.hostname = Some(value); + self + } + + pub fn with_service(&mut self, value: String) -> &mut Self { + self.service = Some(value); + self + } } diff --git a/src/datadogV1/model/model_image_widget_definition.rs b/src/datadogV1/model/model_image_widget_definition.rs index f23e66a99..36ed834ea 100644 --- a/src/datadogV1/model/model_image_widget_definition.rs +++ b/src/datadogV1/model/model_image_widget_definition.rs @@ -56,4 +56,45 @@ impl ImageWidgetDefinition { vertical_align: None, } } + + pub fn with_has_background(&mut self, value: bool) -> &mut Self { + self.has_background = Some(value); + self + } + + pub fn with_has_border(&mut self, value: bool) -> &mut Self { + self.has_border = Some(value); + self + } + + pub fn with_horizontal_align( + &mut self, + value: crate::datadogV1::model::WidgetHorizontalAlign, + ) -> &mut Self { + self.horizontal_align = Some(value); + self + } + + pub fn with_margin(&mut self, value: crate::datadogV1::model::WidgetMargin) -> &mut Self { + self.margin = Some(value); + self + } + + pub fn with_sizing(&mut self, value: crate::datadogV1::model::WidgetImageSizing) -> &mut Self { + self.sizing = Some(value); + self + } + + pub fn with_url_dark_theme(&mut self, value: String) -> &mut Self { + self.url_dark_theme = Some(value); + self + } + + pub fn with_vertical_align( + &mut self, + value: crate::datadogV1::model::WidgetVerticalAlign, + ) -> &mut Self { + self.vertical_align = Some(value); + self + } } diff --git a/src/datadogV1/model/model_intake_payload_accepted.rs b/src/datadogV1/model/model_intake_payload_accepted.rs index a0c97095c..617a18d65 100644 --- a/src/datadogV1/model/model_intake_payload_accepted.rs +++ b/src/datadogV1/model/model_intake_payload_accepted.rs @@ -17,6 +17,11 @@ impl IntakePayloadAccepted { pub fn new() -> IntakePayloadAccepted { IntakePayloadAccepted { status: None } } + + pub fn with_status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + self + } } impl Default for IntakePayloadAccepted { fn default() -> Self { diff --git a/src/datadogV1/model/model_ip_prefixes_agents.rs b/src/datadogV1/model/model_ip_prefixes_agents.rs index ad4ec4114..51f4d1445 100644 --- a/src/datadogV1/model/model_ip_prefixes_agents.rs +++ b/src/datadogV1/model/model_ip_prefixes_agents.rs @@ -23,6 +23,16 @@ impl IPPrefixesAgents { prefixes_ipv6: None, } } + + pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + self + } + + pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv6 = Some(value); + self + } } impl Default for IPPrefixesAgents { fn default() -> Self { diff --git a/src/datadogV1/model/model_ip_prefixes_api.rs b/src/datadogV1/model/model_ip_prefixes_api.rs index e05f46404..624ab4a4a 100644 --- a/src/datadogV1/model/model_ip_prefixes_api.rs +++ b/src/datadogV1/model/model_ip_prefixes_api.rs @@ -23,6 +23,16 @@ impl IPPrefixesAPI { prefixes_ipv6: None, } } + + pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + self + } + + pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv6 = Some(value); + self + } } impl Default for IPPrefixesAPI { fn default() -> Self { diff --git a/src/datadogV1/model/model_ip_prefixes_apm.rs b/src/datadogV1/model/model_ip_prefixes_apm.rs index a5ed80cf5..13b5d3ef9 100644 --- a/src/datadogV1/model/model_ip_prefixes_apm.rs +++ b/src/datadogV1/model/model_ip_prefixes_apm.rs @@ -23,6 +23,16 @@ impl IPPrefixesAPM { prefixes_ipv6: None, } } + + pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + self + } + + pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv6 = Some(value); + self + } } impl Default for IPPrefixesAPM { fn default() -> Self { diff --git a/src/datadogV1/model/model_ip_prefixes_global.rs b/src/datadogV1/model/model_ip_prefixes_global.rs index 3713c2088..c3f7b3ebe 100644 --- a/src/datadogV1/model/model_ip_prefixes_global.rs +++ b/src/datadogV1/model/model_ip_prefixes_global.rs @@ -23,6 +23,16 @@ impl IPPrefixesGlobal { prefixes_ipv6: None, } } + + pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + self + } + + pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv6 = Some(value); + self + } } impl Default for IPPrefixesGlobal { fn default() -> Self { diff --git a/src/datadogV1/model/model_ip_prefixes_logs.rs b/src/datadogV1/model/model_ip_prefixes_logs.rs index 7e2ec735f..9f4e7684a 100644 --- a/src/datadogV1/model/model_ip_prefixes_logs.rs +++ b/src/datadogV1/model/model_ip_prefixes_logs.rs @@ -23,6 +23,16 @@ impl IPPrefixesLogs { prefixes_ipv6: None, } } + + pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + self + } + + pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv6 = Some(value); + self + } } impl Default for IPPrefixesLogs { fn default() -> Self { diff --git a/src/datadogV1/model/model_ip_prefixes_orchestrator.rs b/src/datadogV1/model/model_ip_prefixes_orchestrator.rs index 4da6a396d..71baab1d9 100644 --- a/src/datadogV1/model/model_ip_prefixes_orchestrator.rs +++ b/src/datadogV1/model/model_ip_prefixes_orchestrator.rs @@ -23,6 +23,16 @@ impl IPPrefixesOrchestrator { prefixes_ipv6: None, } } + + pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + self + } + + pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv6 = Some(value); + self + } } impl Default for IPPrefixesOrchestrator { fn default() -> Self { diff --git a/src/datadogV1/model/model_ip_prefixes_process.rs b/src/datadogV1/model/model_ip_prefixes_process.rs index f3ccbd0a3..1f1e0773b 100644 --- a/src/datadogV1/model/model_ip_prefixes_process.rs +++ b/src/datadogV1/model/model_ip_prefixes_process.rs @@ -23,6 +23,16 @@ impl IPPrefixesProcess { prefixes_ipv6: None, } } + + pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + self + } + + pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv6 = Some(value); + self + } } impl Default for IPPrefixesProcess { fn default() -> Self { diff --git a/src/datadogV1/model/model_ip_prefixes_remote_configuration.rs b/src/datadogV1/model/model_ip_prefixes_remote_configuration.rs index 14af9a1ac..6015e9bac 100644 --- a/src/datadogV1/model/model_ip_prefixes_remote_configuration.rs +++ b/src/datadogV1/model/model_ip_prefixes_remote_configuration.rs @@ -23,6 +23,16 @@ impl IPPrefixesRemoteConfiguration { prefixes_ipv6: None, } } + + pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + self + } + + pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv6 = Some(value); + self + } } impl Default for IPPrefixesRemoteConfiguration { fn default() -> Self { diff --git a/src/datadogV1/model/model_ip_prefixes_synthetics.rs b/src/datadogV1/model/model_ip_prefixes_synthetics.rs index 452675920..079382770 100644 --- a/src/datadogV1/model/model_ip_prefixes_synthetics.rs +++ b/src/datadogV1/model/model_ip_prefixes_synthetics.rs @@ -31,6 +31,32 @@ impl IPPrefixesSynthetics { prefixes_ipv6_by_location: None, } } + + pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + self + } + + pub fn with_prefixes_ipv4_by_location( + &mut self, + value: std::collections::BTreeMap>, + ) -> &mut Self { + self.prefixes_ipv4_by_location = Some(value); + self + } + + pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv6 = Some(value); + self + } + + pub fn with_prefixes_ipv6_by_location( + &mut self, + value: std::collections::BTreeMap>, + ) -> &mut Self { + self.prefixes_ipv6_by_location = Some(value); + self + } } impl Default for IPPrefixesSynthetics { fn default() -> Self { diff --git a/src/datadogV1/model/model_ip_prefixes_synthetics_private_locations.rs b/src/datadogV1/model/model_ip_prefixes_synthetics_private_locations.rs index 7946e3bb5..b680e8bb6 100644 --- a/src/datadogV1/model/model_ip_prefixes_synthetics_private_locations.rs +++ b/src/datadogV1/model/model_ip_prefixes_synthetics_private_locations.rs @@ -23,6 +23,16 @@ impl IPPrefixesSyntheticsPrivateLocations { prefixes_ipv6: None, } } + + pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + self + } + + pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv6 = Some(value); + self + } } impl Default for IPPrefixesSyntheticsPrivateLocations { fn default() -> Self { diff --git a/src/datadogV1/model/model_ip_prefixes_webhooks.rs b/src/datadogV1/model/model_ip_prefixes_webhooks.rs index 1469bbb43..40c590333 100644 --- a/src/datadogV1/model/model_ip_prefixes_webhooks.rs +++ b/src/datadogV1/model/model_ip_prefixes_webhooks.rs @@ -23,6 +23,16 @@ impl IPPrefixesWebhooks { prefixes_ipv6: None, } } + + pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + self + } + + pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv6 = Some(value); + self + } } impl Default for IPPrefixesWebhooks { fn default() -> Self { diff --git a/src/datadogV1/model/model_ip_ranges.rs b/src/datadogV1/model/model_ip_ranges.rs index 685695881..520c71f34 100644 --- a/src/datadogV1/model/model_ip_ranges.rs +++ b/src/datadogV1/model/model_ip_ranges.rs @@ -10,44 +10,44 @@ use serde_with::skip_serializing_none; pub struct IPRanges { /// Available prefix information for the Agent endpoints. #[serde(rename = "agents")] - pub agents: Option>, + pub agents: Option, /// Available prefix information for the API endpoints. #[serde(rename = "api")] - pub api: Option>, + pub api: Option, /// Available prefix information for the APM endpoints. #[serde(rename = "apm")] - pub apm: Option>, + pub apm: Option, /// Available prefix information for all Datadog endpoints. #[serde(rename = "global")] - pub global: Option>, + pub global: Option, /// Available prefix information for the Logs endpoints. #[serde(rename = "logs")] - pub logs: Option>, + pub logs: Option, /// Date when last updated, in the form `YYYY-MM-DD-hh-mm-ss`. #[serde(rename = "modified")] pub modified: Option, /// Available prefix information for the Orchestrator endpoints. #[serde(rename = "orchestrator")] - pub orchestrator: Option>, + pub orchestrator: Option, /// Available prefix information for the Process endpoints. #[serde(rename = "process")] - pub process: Option>, + pub process: Option, /// Available prefix information for the Remote Configuration endpoints. #[serde(rename = "remote-configuration")] - pub remote_configuration: Option>, + pub remote_configuration: Option, /// Available prefix information for the Synthetics endpoints. #[serde(rename = "synthetics")] - pub synthetics: Option>, + pub synthetics: Option, /// Available prefix information for the Synthetics Private Locations endpoints. #[serde(rename = "synthetics-private-locations")] pub synthetics_private_locations: - Option>, + Option, /// Version of the IP list. #[serde(rename = "version")] pub version: Option, /// Available prefix information for the Webhook endpoints. #[serde(rename = "webhooks")] - pub webhooks: Option>, + pub webhooks: Option, } impl IPRanges { @@ -68,6 +68,86 @@ impl IPRanges { webhooks: None, } } + + pub fn with_agents(&mut self, value: crate::datadogV1::model::IPPrefixesAgents) -> &mut Self { + self.agents = Some(value); + self + } + + pub fn with_api(&mut self, value: crate::datadogV1::model::IPPrefixesAPI) -> &mut Self { + self.api = Some(value); + self + } + + pub fn with_apm(&mut self, value: crate::datadogV1::model::IPPrefixesAPM) -> &mut Self { + self.apm = Some(value); + self + } + + pub fn with_global(&mut self, value: crate::datadogV1::model::IPPrefixesGlobal) -> &mut Self { + self.global = Some(value); + self + } + + pub fn with_logs(&mut self, value: crate::datadogV1::model::IPPrefixesLogs) -> &mut Self { + self.logs = Some(value); + self + } + + pub fn with_modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn with_orchestrator( + &mut self, + value: crate::datadogV1::model::IPPrefixesOrchestrator, + ) -> &mut Self { + self.orchestrator = Some(value); + self + } + + pub fn with_process(&mut self, value: crate::datadogV1::model::IPPrefixesProcess) -> &mut Self { + self.process = Some(value); + self + } + + pub fn with_remote_configuration( + &mut self, + value: crate::datadogV1::model::IPPrefixesRemoteConfiguration, + ) -> &mut Self { + self.remote_configuration = Some(value); + self + } + + pub fn with_synthetics( + &mut self, + value: crate::datadogV1::model::IPPrefixesSynthetics, + ) -> &mut Self { + self.synthetics = Some(value); + self + } + + pub fn with_synthetics_private_locations( + &mut self, + value: crate::datadogV1::model::IPPrefixesSyntheticsPrivateLocations, + ) -> &mut Self { + self.synthetics_private_locations = Some(value); + self + } + + pub fn with_version(&mut self, value: i64) -> &mut Self { + self.version = Some(value); + self + } + + pub fn with_webhooks( + &mut self, + value: crate::datadogV1::model::IPPrefixesWebhooks, + ) -> &mut Self { + self.webhooks = Some(value); + self + } } impl Default for IPRanges { fn default() -> Self { diff --git a/src/datadogV1/model/model_list_stream_compute_items.rs b/src/datadogV1/model/model_list_stream_compute_items.rs index 4267fcfee..b91fc1467 100644 --- a/src/datadogV1/model/model_list_stream_compute_items.rs +++ b/src/datadogV1/model/model_list_stream_compute_items.rs @@ -25,4 +25,9 @@ impl ListStreamComputeItems { facet: None, } } + + pub fn with_facet(&mut self, value: String) -> &mut Self { + self.facet = Some(value); + self + } } diff --git a/src/datadogV1/model/model_list_stream_query.rs b/src/datadogV1/model/model_list_stream_query.rs index 9b8dc080c..f58ee3765 100644 --- a/src/datadogV1/model/model_list_stream_query.rs +++ b/src/datadogV1/model/model_list_stream_query.rs @@ -28,7 +28,7 @@ pub struct ListStreamQuery { pub query_string: String, /// Which column and order to sort by #[serde(rename = "sort")] - pub sort: Option>, + pub sort: Option, /// Option for storage location. Feature in Private Beta. #[serde(rename = "storage")] pub storage: Option, @@ -50,4 +50,43 @@ impl ListStreamQuery { storage: None, } } + + pub fn with_compute( + &mut self, + value: Vec, + ) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn with_event_size( + &mut self, + value: crate::datadogV1::model::WidgetEventSize, + ) -> &mut Self { + self.event_size = Some(value); + self + } + + pub fn with_group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn with_indexes(&mut self, value: Vec) -> &mut Self { + self.indexes = Some(value); + self + } + + pub fn with_sort(&mut self, value: crate::datadogV1::model::WidgetFieldSort) -> &mut Self { + self.sort = Some(value); + self + } + + pub fn with_storage(&mut self, value: String) -> &mut Self { + self.storage = Some(value); + self + } } diff --git a/src/datadogV1/model/model_list_stream_widget_definition.rs b/src/datadogV1/model/model_list_stream_widget_definition.rs index 60cb0cffa..b9a7eb753 100644 --- a/src/datadogV1/model/model_list_stream_widget_definition.rs +++ b/src/datadogV1/model/model_list_stream_widget_definition.rs @@ -21,7 +21,7 @@ pub struct ListStreamWidgetDefinition { pub show_legend: Option, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// Title of the widget. #[serde(rename = "title")] pub title: Option, @@ -52,4 +52,37 @@ impl ListStreamWidgetDefinition { type_, } } + + pub fn with_legend_size(&mut self, value: String) -> &mut Self { + self.legend_size = Some(value); + self + } + + pub fn with_show_legend(&mut self, value: bool) -> &mut Self { + self.show_legend = Some(value); + self + } + + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_list_stream_widget_request.rs b/src/datadogV1/model/model_list_stream_widget_request.rs index 57592e9b9..3e346c049 100644 --- a/src/datadogV1/model/model_list_stream_widget_request.rs +++ b/src/datadogV1/model/model_list_stream_widget_request.rs @@ -13,7 +13,7 @@ pub struct ListStreamWidgetRequest { pub columns: Vec, /// Updated list stream widget. #[serde(rename = "query")] - pub query: Box, + pub query: crate::datadogV1::model::ListStreamQuery, /// Widget response format. #[serde(rename = "response_format")] pub response_format: crate::datadogV1::model::ListStreamResponseFormat, @@ -22,7 +22,7 @@ pub struct ListStreamWidgetRequest { impl ListStreamWidgetRequest { pub fn new( columns: Vec, - query: Box, + query: crate::datadogV1::model::ListStreamQuery, response_format: crate::datadogV1::model::ListStreamResponseFormat, ) -> ListStreamWidgetRequest { ListStreamWidgetRequest { diff --git a/src/datadogV1/model/model_log.rs b/src/datadogV1/model/model_log.rs index fd8e44cd1..088928805 100644 --- a/src/datadogV1/model/model_log.rs +++ b/src/datadogV1/model/model_log.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct Log { /// JSON object containing all log attributes and their associated values. #[serde(rename = "content")] - pub content: Option>, + pub content: Option, /// Unique ID of the Log. #[serde(rename = "id")] pub id: Option, @@ -23,6 +23,16 @@ impl Log { id: None, } } + + pub fn with_content(&mut self, value: crate::datadogV1::model::LogContent) -> &mut Self { + self.content = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } } impl Default for Log { fn default() -> Self { diff --git a/src/datadogV1/model/model_log_content.rs b/src/datadogV1/model/model_log_content.rs index 8bad1259a..a707948b1 100644 --- a/src/datadogV1/model/model_log_content.rs +++ b/src/datadogV1/model/model_log_content.rs @@ -43,6 +43,39 @@ impl LogContent { timestamp: None, } } + + pub fn with_attributes( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_service(&mut self, value: String) -> &mut Self { + self.service = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_timestamp(&mut self, value: String) -> &mut Self { + self.timestamp = Some(value); + self + } } impl Default for LogContent { fn default() -> Self { diff --git a/src/datadogV1/model/model_log_query_definition.rs b/src/datadogV1/model/model_log_query_definition.rs index a00120cec..53a46c20c 100644 --- a/src/datadogV1/model/model_log_query_definition.rs +++ b/src/datadogV1/model/model_log_query_definition.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct LogQueryDefinition { /// Define computation for a log query. #[serde(rename = "compute")] - pub compute: Option>, + pub compute: Option, /// List of tag prefixes to group by in the case of a cluster check. #[serde(rename = "group_by")] pub group_by: Option>, @@ -22,7 +22,7 @@ pub struct LogQueryDefinition { pub multi_compute: Option>, /// The query being made on the logs. #[serde(rename = "search")] - pub search: Option>, + pub search: Option, } impl LogQueryDefinition { @@ -35,6 +35,40 @@ impl LogQueryDefinition { search: None, } } + + pub fn with_compute(&mut self, value: crate::datadogV1::model::LogsQueryCompute) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn with_group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn with_index(&mut self, value: String) -> &mut Self { + self.index = Some(value); + self + } + + pub fn with_multi_compute( + &mut self, + value: Vec, + ) -> &mut Self { + self.multi_compute = Some(value); + self + } + + pub fn with_search( + &mut self, + value: crate::datadogV1::model::LogQueryDefinitionSearch, + ) -> &mut Self { + self.search = Some(value); + self + } } impl Default for LogQueryDefinition { fn default() -> Self { diff --git a/src/datadogV1/model/model_log_query_definition_group_by.rs b/src/datadogV1/model/model_log_query_definition_group_by.rs index f2f482d6e..feb0a2a66 100644 --- a/src/datadogV1/model/model_log_query_definition_group_by.rs +++ b/src/datadogV1/model/model_log_query_definition_group_by.rs @@ -16,7 +16,7 @@ pub struct LogQueryDefinitionGroupBy { pub limit: Option, /// Define a sorting method. #[serde(rename = "sort")] - pub sort: Option>, + pub sort: Option, } impl LogQueryDefinitionGroupBy { @@ -27,4 +27,17 @@ impl LogQueryDefinitionGroupBy { sort: None, } } + + pub fn with_limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_sort( + &mut self, + value: crate::datadogV1::model::LogQueryDefinitionGroupBySort, + ) -> &mut Self { + self.sort = Some(value); + self + } } diff --git a/src/datadogV1/model/model_log_query_definition_group_by_sort.rs b/src/datadogV1/model/model_log_query_definition_group_by_sort.rs index f2eb5e021..99e2b5541 100644 --- a/src/datadogV1/model/model_log_query_definition_group_by_sort.rs +++ b/src/datadogV1/model/model_log_query_definition_group_by_sort.rs @@ -30,4 +30,9 @@ impl LogQueryDefinitionGroupBySort { order, } } + + pub fn with_facet(&mut self, value: String) -> &mut Self { + self.facet = Some(value); + self + } } diff --git a/src/datadogV1/model/model_log_stream_widget_definition.rs b/src/datadogV1/model/model_log_stream_widget_definition.rs index c385874ef..cd10d48c4 100644 --- a/src/datadogV1/model/model_log_stream_widget_definition.rs +++ b/src/datadogV1/model/model_log_stream_widget_definition.rs @@ -32,10 +32,10 @@ pub struct LogStreamWidgetDefinition { pub show_message_column: Option, /// Which column and order to sort by #[serde(rename = "sort")] - pub sort: Option>, + pub sort: Option, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// Title of the widget. #[serde(rename = "title")] pub title: Option, @@ -71,4 +71,82 @@ impl LogStreamWidgetDefinition { type_, } } + + #[allow(deprecated)] + pub fn with_columns(&mut self, value: Vec) -> &mut Self { + self.columns = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_indexes(&mut self, value: Vec) -> &mut Self { + self.indexes = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_logset(&mut self, value: String) -> &mut Self { + self.logset = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_message_display( + &mut self, + value: crate::datadogV1::model::WidgetMessageDisplay, + ) -> &mut Self { + self.message_display = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_show_date_column(&mut self, value: bool) -> &mut Self { + self.show_date_column = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_show_message_column(&mut self, value: bool) -> &mut Self { + self.show_message_column = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_sort(&mut self, value: crate::datadogV1::model::WidgetFieldSort) -> &mut Self { + self.sort = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_api_error.rs b/src/datadogV1/model/model_logs_api_error.rs index 351598de3..77d0f9d83 100644 --- a/src/datadogV1/model/model_logs_api_error.rs +++ b/src/datadogV1/model/model_logs_api_error.rs @@ -27,6 +27,21 @@ impl LogsAPIError { message: None, } } + + pub fn with_code(&mut self, value: String) -> &mut Self { + self.code = Some(value); + self + } + + pub fn with_details(&mut self, value: Vec) -> &mut Self { + self.details = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } } impl Default for LogsAPIError { fn default() -> Self { diff --git a/src/datadogV1/model/model_logs_api_error_response.rs b/src/datadogV1/model/model_logs_api_error_response.rs index 7817fecb1..9a63e3b79 100644 --- a/src/datadogV1/model/model_logs_api_error_response.rs +++ b/src/datadogV1/model/model_logs_api_error_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct LogsAPIErrorResponse { /// Error returned by the Logs API #[serde(rename = "error")] - pub error: Option>, + pub error: Option, } impl LogsAPIErrorResponse { pub fn new() -> LogsAPIErrorResponse { LogsAPIErrorResponse { error: None } } + + pub fn with_error(&mut self, value: crate::datadogV1::model::LogsAPIError) -> &mut Self { + self.error = Some(value); + self + } } impl Default for LogsAPIErrorResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_logs_arithmetic_processor.rs b/src/datadogV1/model/model_logs_arithmetic_processor.rs index 027cc5af4..074620256 100644 --- a/src/datadogV1/model/model_logs_arithmetic_processor.rs +++ b/src/datadogV1/model/model_logs_arithmetic_processor.rs @@ -64,4 +64,19 @@ impl LogsArithmeticProcessor { type_, } } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_is_replace_missing(&mut self, value: bool) -> &mut Self { + self.is_replace_missing = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_attribute_remapper.rs b/src/datadogV1/model/model_logs_attribute_remapper.rs index a587d41a2..bd66606c2 100644 --- a/src/datadogV1/model/model_logs_attribute_remapper.rs +++ b/src/datadogV1/model/model_logs_attribute_remapper.rs @@ -63,4 +63,42 @@ impl LogsAttributeRemapper { type_, } } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_override_on_conflict(&mut self, value: bool) -> &mut Self { + self.override_on_conflict = Some(value); + self + } + + pub fn with_preserve_source(&mut self, value: bool) -> &mut Self { + self.preserve_source = Some(value); + self + } + + pub fn with_source_type(&mut self, value: String) -> &mut Self { + self.source_type = Some(value); + self + } + + pub fn with_target_format( + &mut self, + value: crate::datadogV1::model::TargetFormatType, + ) -> &mut Self { + self.target_format = Some(value); + self + } + + pub fn with_target_type(&mut self, value: String) -> &mut Self { + self.target_type = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_by_retention.rs b/src/datadogV1/model/model_logs_by_retention.rs index a353ce5ee..472cbe0e3 100644 --- a/src/datadogV1/model/model_logs_by_retention.rs +++ b/src/datadogV1/model/model_logs_by_retention.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct LogsByRetention { /// Indexed logs usage summary for each organization for each retention period with usage. #[serde(rename = "orgs")] - pub orgs: Option>, + pub orgs: Option, /// Aggregated index logs usage for each retention period with usage. #[serde(rename = "usage")] pub usage: Option>, /// Object containing a summary of indexed logs usage by retention period for a single month. #[serde(rename = "usage_by_month")] - pub usage_by_month: Option>, + pub usage_by_month: Option, } impl LogsByRetention { @@ -27,6 +27,27 @@ impl LogsByRetention { usage_by_month: None, } } + + pub fn with_orgs(&mut self, value: crate::datadogV1::model::LogsByRetentionOrgs) -> &mut Self { + self.orgs = Some(value); + self + } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } + + pub fn with_usage_by_month( + &mut self, + value: crate::datadogV1::model::LogsByRetentionMonthlyUsage, + ) -> &mut Self { + self.usage_by_month = Some(value); + self + } } impl Default for LogsByRetention { fn default() -> Self { diff --git a/src/datadogV1/model/model_logs_by_retention_monthly_usage.rs b/src/datadogV1/model/model_logs_by_retention_monthly_usage.rs index 0f2d92f89..98c23ab40 100644 --- a/src/datadogV1/model/model_logs_by_retention_monthly_usage.rs +++ b/src/datadogV1/model/model_logs_by_retention_monthly_usage.rs @@ -23,6 +23,19 @@ impl LogsByRetentionMonthlyUsage { usage: None, } } + + pub fn with_date(&mut self, value: String) -> &mut Self { + self.date = Some(value); + self + } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for LogsByRetentionMonthlyUsage { fn default() -> Self { diff --git a/src/datadogV1/model/model_logs_by_retention_org_usage.rs b/src/datadogV1/model/model_logs_by_retention_org_usage.rs index d54d6068c..5610cb472 100644 --- a/src/datadogV1/model/model_logs_by_retention_org_usage.rs +++ b/src/datadogV1/model/model_logs_by_retention_org_usage.rs @@ -17,6 +17,14 @@ impl LogsByRetentionOrgUsage { pub fn new() -> LogsByRetentionOrgUsage { LogsByRetentionOrgUsage { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for LogsByRetentionOrgUsage { fn default() -> Self { diff --git a/src/datadogV1/model/model_logs_by_retention_orgs.rs b/src/datadogV1/model/model_logs_by_retention_orgs.rs index 0fbc33c5b..5c282034a 100644 --- a/src/datadogV1/model/model_logs_by_retention_orgs.rs +++ b/src/datadogV1/model/model_logs_by_retention_orgs.rs @@ -17,6 +17,14 @@ impl LogsByRetentionOrgs { pub fn new() -> LogsByRetentionOrgs { LogsByRetentionOrgs { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for LogsByRetentionOrgs { fn default() -> Self { diff --git a/src/datadogV1/model/model_logs_category_processor.rs b/src/datadogV1/model/model_logs_category_processor.rs index e149f7f4f..f8c5393d8 100644 --- a/src/datadogV1/model/model_logs_category_processor.rs +++ b/src/datadogV1/model/model_logs_category_processor.rs @@ -52,4 +52,14 @@ impl LogsCategoryProcessor { type_, } } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_category_processor_category.rs b/src/datadogV1/model/model_logs_category_processor_category.rs index 06f9b0ab7..08b400e72 100644 --- a/src/datadogV1/model/model_logs_category_processor_category.rs +++ b/src/datadogV1/model/model_logs_category_processor_category.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct LogsCategoryProcessorCategory { /// Filter for logs. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// Value to assign to the target attribute. #[serde(rename = "name")] pub name: Option, @@ -23,6 +23,16 @@ impl LogsCategoryProcessorCategory { name: None, } } + + pub fn with_filter(&mut self, value: crate::datadogV1::model::LogsFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } impl Default for LogsCategoryProcessorCategory { fn default() -> Self { diff --git a/src/datadogV1/model/model_logs_date_remapper.rs b/src/datadogV1/model/model_logs_date_remapper.rs index 004ab9b11..0a00acdde 100644 --- a/src/datadogV1/model/model_logs_date_remapper.rs +++ b/src/datadogV1/model/model_logs_date_remapper.rs @@ -52,4 +52,14 @@ impl LogsDateRemapper { type_, } } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_exclusion.rs b/src/datadogV1/model/model_logs_exclusion.rs index dfb57c695..dad196010 100644 --- a/src/datadogV1/model/model_logs_exclusion.rs +++ b/src/datadogV1/model/model_logs_exclusion.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct LogsExclusion { /// Exclusion filter is defined by a query, a sampling rule, and a active/inactive toggle. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// Whether or not the exclusion filter is active. #[serde(rename = "is_enabled")] pub is_enabled: Option, @@ -27,4 +27,17 @@ impl LogsExclusion { name, } } + + pub fn with_filter( + &mut self, + value: crate::datadogV1::model::LogsExclusionFilter, + ) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_exclusion_filter.rs b/src/datadogV1/model/model_logs_exclusion_filter.rs index 1c679e7ae..4a5997761 100644 --- a/src/datadogV1/model/model_logs_exclusion_filter.rs +++ b/src/datadogV1/model/model_logs_exclusion_filter.rs @@ -25,4 +25,9 @@ impl LogsExclusionFilter { sample_rate, } } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_filter.rs b/src/datadogV1/model/model_logs_filter.rs index b35faad7e..cc4a2be26 100644 --- a/src/datadogV1/model/model_logs_filter.rs +++ b/src/datadogV1/model/model_logs_filter.rs @@ -17,6 +17,11 @@ impl LogsFilter { pub fn new() -> LogsFilter { LogsFilter { query: None } } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } } impl Default for LogsFilter { fn default() -> Self { diff --git a/src/datadogV1/model/model_logs_geo_ip_parser.rs b/src/datadogV1/model/model_logs_geo_ip_parser.rs index c3c67f8e9..420d56707 100644 --- a/src/datadogV1/model/model_logs_geo_ip_parser.rs +++ b/src/datadogV1/model/model_logs_geo_ip_parser.rs @@ -40,4 +40,14 @@ impl LogsGeoIPParser { type_, } } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_grok_parser.rs b/src/datadogV1/model/model_logs_grok_parser.rs index 22e7267b9..b80176d8e 100644 --- a/src/datadogV1/model/model_logs_grok_parser.rs +++ b/src/datadogV1/model/model_logs_grok_parser.rs @@ -11,7 +11,7 @@ use serde_with::skip_serializing_none; pub struct LogsGrokParser { /// Set of rules for the grok parser. #[serde(rename = "grok")] - pub grok: Box, + pub grok: crate::datadogV1::model::LogsGrokParserRules, /// Whether or not the processor is enabled. #[serde(rename = "is_enabled")] pub is_enabled: Option, @@ -31,7 +31,7 @@ pub struct LogsGrokParser { impl LogsGrokParser { pub fn new( - grok: Box, + grok: crate::datadogV1::model::LogsGrokParserRules, source: String, type_: crate::datadogV1::model::LogsGrokParserType, ) -> LogsGrokParser { @@ -44,4 +44,19 @@ impl LogsGrokParser { type_, } } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_samples(&mut self, value: Vec) -> &mut Self { + self.samples = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_grok_parser_rules.rs b/src/datadogV1/model/model_logs_grok_parser_rules.rs index 5f4e640cf..8af543c1a 100644 --- a/src/datadogV1/model/model_logs_grok_parser_rules.rs +++ b/src/datadogV1/model/model_logs_grok_parser_rules.rs @@ -23,4 +23,9 @@ impl LogsGrokParserRules { support_rules: None, } } + + pub fn with_support_rules(&mut self, value: String) -> &mut Self { + self.support_rules = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_index.rs b/src/datadogV1/model/model_logs_index.rs index a01268e68..daa45be3f 100644 --- a/src/datadogV1/model/model_logs_index.rs +++ b/src/datadogV1/model/model_logs_index.rs @@ -18,7 +18,7 @@ pub struct LogsIndex { pub exclusion_filters: Option>, /// Filter for logs. #[serde(rename = "filter")] - pub filter: Box, + pub filter: crate::datadogV1::model::LogsFilter, /// A boolean stating if the index is rate limited, meaning more logs than the daily limit have been sent. /// Rate limit is reset every-day at 2pm UTC. #[serde(rename = "is_rate_limited")] @@ -33,7 +33,7 @@ pub struct LogsIndex { } impl LogsIndex { - pub fn new(filter: Box, name: String) -> LogsIndex { + pub fn new(filter: crate::datadogV1::model::LogsFilter, name: String) -> LogsIndex { LogsIndex { daily_limit: None, exclusion_filters: None, @@ -43,4 +43,27 @@ impl LogsIndex { num_retention_days: None, } } + + pub fn with_daily_limit(&mut self, value: i64) -> &mut Self { + self.daily_limit = Some(value); + self + } + + pub fn with_exclusion_filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.exclusion_filters = Some(value); + self + } + + pub fn with_is_rate_limited(&mut self, value: bool) -> &mut Self { + self.is_rate_limited = Some(value); + self + } + + pub fn with_num_retention_days(&mut self, value: i64) -> &mut Self { + self.num_retention_days = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_index_list_response.rs b/src/datadogV1/model/model_logs_index_list_response.rs index 9454876a1..1bf4a0e65 100644 --- a/src/datadogV1/model/model_logs_index_list_response.rs +++ b/src/datadogV1/model/model_logs_index_list_response.rs @@ -17,6 +17,11 @@ impl LogsIndexListResponse { pub fn new() -> LogsIndexListResponse { LogsIndexListResponse { indexes: None } } + + pub fn with_indexes(&mut self, value: Vec) -> &mut Self { + self.indexes = Some(value); + self + } } impl Default for LogsIndexListResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_logs_index_update_request.rs b/src/datadogV1/model/model_logs_index_update_request.rs index 4419a5c93..8ef12db03 100644 --- a/src/datadogV1/model/model_logs_index_update_request.rs +++ b/src/datadogV1/model/model_logs_index_update_request.rs @@ -23,7 +23,7 @@ pub struct LogsIndexUpdateRequest { pub exclusion_filters: Option>, /// Filter for logs. #[serde(rename = "filter")] - pub filter: Box, + pub filter: crate::datadogV1::model::LogsFilter, /// The number of days before logs are deleted from this index. Available values depend on /// retention plans specified in your organization's contract/subscriptions. /// @@ -34,7 +34,7 @@ pub struct LogsIndexUpdateRequest { } impl LogsIndexUpdateRequest { - pub fn new(filter: Box) -> LogsIndexUpdateRequest { + pub fn new(filter: crate::datadogV1::model::LogsFilter) -> LogsIndexUpdateRequest { LogsIndexUpdateRequest { daily_limit: None, disable_daily_limit: None, @@ -43,4 +43,27 @@ impl LogsIndexUpdateRequest { num_retention_days: None, } } + + pub fn with_daily_limit(&mut self, value: i64) -> &mut Self { + self.daily_limit = Some(value); + self + } + + pub fn with_disable_daily_limit(&mut self, value: bool) -> &mut Self { + self.disable_daily_limit = Some(value); + self + } + + pub fn with_exclusion_filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.exclusion_filters = Some(value); + self + } + + pub fn with_num_retention_days(&mut self, value: i64) -> &mut Self { + self.num_retention_days = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_list_request.rs b/src/datadogV1/model/model_logs_list_request.rs index cbc2a0191..31e7af8fa 100644 --- a/src/datadogV1/model/model_logs_list_request.rs +++ b/src/datadogV1/model/model_logs_list_request.rs @@ -30,11 +30,11 @@ pub struct LogsListRequest { pub start_at: Option, /// Timeframe to retrieve the log from. #[serde(rename = "time")] - pub time: Box, + pub time: crate::datadogV1::model::LogsListRequestTime, } impl LogsListRequest { - pub fn new(time: Box) -> LogsListRequest { + pub fn new(time: crate::datadogV1::model::LogsListRequestTime) -> LogsListRequest { LogsListRequest { index: None, limit: None, @@ -44,4 +44,29 @@ impl LogsListRequest { time, } } + + pub fn with_index(&mut self, value: String) -> &mut Self { + self.index = Some(value); + self + } + + pub fn with_limit(&mut self, value: i32) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_sort(&mut self, value: crate::datadogV1::model::LogsSort) -> &mut Self { + self.sort = Some(value); + self + } + + pub fn with_start_at(&mut self, value: String) -> &mut Self { + self.start_at = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_list_request_time.rs b/src/datadogV1/model/model_logs_list_request_time.rs index 73faa94b9..66c6485d6 100644 --- a/src/datadogV1/model/model_logs_list_request_time.rs +++ b/src/datadogV1/model/model_logs_list_request_time.rs @@ -28,4 +28,9 @@ impl LogsListRequestTime { to, } } + + pub fn with_timezone(&mut self, value: String) -> &mut Self { + self.timezone = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_list_response.rs b/src/datadogV1/model/model_logs_list_response.rs index d447b9a47..11215354c 100644 --- a/src/datadogV1/model/model_logs_list_response.rs +++ b/src/datadogV1/model/model_logs_list_response.rs @@ -32,6 +32,21 @@ impl LogsListResponse { status: None, } } + + pub fn with_logs(&mut self, value: Vec) -> &mut Self { + self.logs = Some(value); + self + } + + pub fn with_next_log_id(&mut self, value: Option) -> &mut Self { + self.next_log_id = Some(value); + self + } + + pub fn with_status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + self + } } impl Default for LogsListResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_logs_lookup_processor.rs b/src/datadogV1/model/model_logs_lookup_processor.rs index 60154b343..1215662a1 100644 --- a/src/datadogV1/model/model_logs_lookup_processor.rs +++ b/src/datadogV1/model/model_logs_lookup_processor.rs @@ -55,4 +55,19 @@ impl LogsLookupProcessor { type_, } } + + pub fn with_default_lookup(&mut self, value: String) -> &mut Self { + self.default_lookup = Some(value); + self + } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_message_remapper.rs b/src/datadogV1/model/model_logs_message_remapper.rs index bf9cc02f9..a9bf3d8f7 100644 --- a/src/datadogV1/model/model_logs_message_remapper.rs +++ b/src/datadogV1/model/model_logs_message_remapper.rs @@ -39,4 +39,14 @@ impl LogsMessageRemapper { type_, } } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_pipeline.rs b/src/datadogV1/model/model_logs_pipeline.rs index fab57bc9b..8c2d6e9b3 100644 --- a/src/datadogV1/model/model_logs_pipeline.rs +++ b/src/datadogV1/model/model_logs_pipeline.rs @@ -14,7 +14,7 @@ use serde_with::skip_serializing_none; pub struct LogsPipeline { /// Filter for logs. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// ID of the pipeline. #[serde(rename = "id")] pub id: Option, @@ -47,4 +47,37 @@ impl LogsPipeline { type_: None, } } + + pub fn with_filter(&mut self, value: crate::datadogV1::model::LogsFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_is_read_only(&mut self, value: bool) -> &mut Self { + self.is_read_only = Some(value); + self + } + + pub fn with_processors( + &mut self, + value: Vec, + ) -> &mut Self { + self.processors = Some(value); + self + } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_pipeline_processor.rs b/src/datadogV1/model/model_logs_pipeline_processor.rs index 4378cd390..dfd439905 100644 --- a/src/datadogV1/model/model_logs_pipeline_processor.rs +++ b/src/datadogV1/model/model_logs_pipeline_processor.rs @@ -14,7 +14,7 @@ use serde_with::skip_serializing_none; pub struct LogsPipelineProcessor { /// Filter for logs. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// Whether or not the processor is enabled. #[serde(rename = "is_enabled")] pub is_enabled: Option, @@ -39,4 +39,27 @@ impl LogsPipelineProcessor { type_, } } + + pub fn with_filter(&mut self, value: crate::datadogV1::model::LogsFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_processors( + &mut self, + value: Vec, + ) -> &mut Self { + self.processors = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_processor.rs b/src/datadogV1/model/model_logs_processor.rs index d68e13a7f..73ed6a525 100644 --- a/src/datadogV1/model/model_logs_processor.rs +++ b/src/datadogV1/model/model_logs_processor.rs @@ -7,22 +7,20 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum LogsProcessor { - LogsGrokParser(Box), - LogsDateRemapper(Box), - LogsStatusRemapper(Box), - LogsServiceRemapper(Box), - LogsMessageRemapper(Box), - LogsAttributeRemapper(Box), - LogsURLParser(Box), - LogsUserAgentParser(Box), - LogsCategoryProcessor(Box), - LogsArithmeticProcessor(Box), - LogsStringBuilderProcessor(Box), - LogsPipelineProcessor(Box), - LogsGeoIPParser(Box), - LogsLookupProcessor(Box), - ReferenceTableLogsLookupProcessor( - Box, - ), - LogsTraceRemapper(Box), + LogsGrokParser(crate::datadogV1::model::LogsGrokParser), + LogsDateRemapper(crate::datadogV1::model::LogsDateRemapper), + LogsStatusRemapper(crate::datadogV1::model::LogsStatusRemapper), + LogsServiceRemapper(crate::datadogV1::model::LogsServiceRemapper), + LogsMessageRemapper(crate::datadogV1::model::LogsMessageRemapper), + LogsAttributeRemapper(crate::datadogV1::model::LogsAttributeRemapper), + LogsURLParser(crate::datadogV1::model::LogsURLParser), + LogsUserAgentParser(crate::datadogV1::model::LogsUserAgentParser), + LogsCategoryProcessor(crate::datadogV1::model::LogsCategoryProcessor), + LogsArithmeticProcessor(crate::datadogV1::model::LogsArithmeticProcessor), + LogsStringBuilderProcessor(crate::datadogV1::model::LogsStringBuilderProcessor), + LogsPipelineProcessor(crate::datadogV1::model::LogsPipelineProcessor), + LogsGeoIPParser(crate::datadogV1::model::LogsGeoIPParser), + LogsLookupProcessor(crate::datadogV1::model::LogsLookupProcessor), + ReferenceTableLogsLookupProcessor(crate::datadogV1::model::ReferenceTableLogsLookupProcessor), + LogsTraceRemapper(crate::datadogV1::model::LogsTraceRemapper), } diff --git a/src/datadogV1/model/model_logs_query_compute.rs b/src/datadogV1/model/model_logs_query_compute.rs index 08483f932..953d9cd4e 100644 --- a/src/datadogV1/model/model_logs_query_compute.rs +++ b/src/datadogV1/model/model_logs_query_compute.rs @@ -27,4 +27,14 @@ impl LogsQueryCompute { interval: None, } } + + pub fn with_facet(&mut self, value: String) -> &mut Self { + self.facet = Some(value); + self + } + + pub fn with_interval(&mut self, value: i64) -> &mut Self { + self.interval = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_retention_agg_sum_usage.rs b/src/datadogV1/model/model_logs_retention_agg_sum_usage.rs index d80e07a4f..a65d16dc7 100644 --- a/src/datadogV1/model/model_logs_retention_agg_sum_usage.rs +++ b/src/datadogV1/model/model_logs_retention_agg_sum_usage.rs @@ -31,6 +31,26 @@ impl LogsRetentionAggSumUsage { retention: None, } } + + pub fn with_logs_indexed_logs_usage_agg_sum(&mut self, value: i64) -> &mut Self { + self.logs_indexed_logs_usage_agg_sum = Some(value); + self + } + + pub fn with_logs_live_indexed_logs_usage_agg_sum(&mut self, value: i64) -> &mut Self { + self.logs_live_indexed_logs_usage_agg_sum = Some(value); + self + } + + pub fn with_logs_rehydrated_indexed_logs_usage_agg_sum(&mut self, value: i64) -> &mut Self { + self.logs_rehydrated_indexed_logs_usage_agg_sum = Some(value); + self + } + + pub fn with_retention(&mut self, value: String) -> &mut Self { + self.retention = Some(value); + self + } } impl Default for LogsRetentionAggSumUsage { fn default() -> Self { diff --git a/src/datadogV1/model/model_logs_retention_sum_usage.rs b/src/datadogV1/model/model_logs_retention_sum_usage.rs index 423282fd4..64e13a10b 100644 --- a/src/datadogV1/model/model_logs_retention_sum_usage.rs +++ b/src/datadogV1/model/model_logs_retention_sum_usage.rs @@ -31,6 +31,26 @@ impl LogsRetentionSumUsage { retention: None, } } + + pub fn with_logs_indexed_logs_usage_sum(&mut self, value: i64) -> &mut Self { + self.logs_indexed_logs_usage_sum = Some(value); + self + } + + pub fn with_logs_live_indexed_logs_usage_sum(&mut self, value: i64) -> &mut Self { + self.logs_live_indexed_logs_usage_sum = Some(value); + self + } + + pub fn with_logs_rehydrated_indexed_logs_usage_sum(&mut self, value: i64) -> &mut Self { + self.logs_rehydrated_indexed_logs_usage_sum = Some(value); + self + } + + pub fn with_retention(&mut self, value: String) -> &mut Self { + self.retention = Some(value); + self + } } impl Default for LogsRetentionSumUsage { fn default() -> Self { diff --git a/src/datadogV1/model/model_logs_service_remapper.rs b/src/datadogV1/model/model_logs_service_remapper.rs index 47d1c78f3..430fa63d0 100644 --- a/src/datadogV1/model/model_logs_service_remapper.rs +++ b/src/datadogV1/model/model_logs_service_remapper.rs @@ -37,4 +37,14 @@ impl LogsServiceRemapper { type_, } } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_status_remapper.rs b/src/datadogV1/model/model_logs_status_remapper.rs index 37759d85f..5966acf36 100644 --- a/src/datadogV1/model/model_logs_status_remapper.rs +++ b/src/datadogV1/model/model_logs_status_remapper.rs @@ -51,4 +51,14 @@ impl LogsStatusRemapper { type_, } } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_string_builder_processor.rs b/src/datadogV1/model/model_logs_string_builder_processor.rs index 37314e44a..e58b718a3 100644 --- a/src/datadogV1/model/model_logs_string_builder_processor.rs +++ b/src/datadogV1/model/model_logs_string_builder_processor.rs @@ -56,4 +56,19 @@ impl LogsStringBuilderProcessor { type_, } } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_is_replace_missing(&mut self, value: bool) -> &mut Self { + self.is_replace_missing = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_trace_remapper.rs b/src/datadogV1/model/model_logs_trace_remapper.rs index ded0bbeea..e1cef9b8b 100644 --- a/src/datadogV1/model/model_logs_trace_remapper.rs +++ b/src/datadogV1/model/model_logs_trace_remapper.rs @@ -36,4 +36,19 @@ impl LogsTraceRemapper { type_, } } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_sources(&mut self, value: Vec) -> &mut Self { + self.sources = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_url_parser.rs b/src/datadogV1/model/model_logs_url_parser.rs index 6366b5101..5b5ac5d34 100644 --- a/src/datadogV1/model/model_logs_url_parser.rs +++ b/src/datadogV1/model/model_logs_url_parser.rs @@ -47,4 +47,19 @@ impl LogsURLParser { type_, } } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_normalize_ending_slashes(&mut self, value: Option) -> &mut Self { + self.normalize_ending_slashes = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_user_agent_parser.rs b/src/datadogV1/model/model_logs_user_agent_parser.rs index 76bd81bd2..887d17503 100644 --- a/src/datadogV1/model/model_logs_user_agent_parser.rs +++ b/src/datadogV1/model/model_logs_user_agent_parser.rs @@ -44,4 +44,19 @@ impl LogsUserAgentParser { type_, } } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_is_encoded(&mut self, value: bool) -> &mut Self { + self.is_encoded = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV1/model/model_matching_downtime.rs b/src/datadogV1/model/model_matching_downtime.rs index 52d69878a..c023ccbba 100644 --- a/src/datadogV1/model/model_matching_downtime.rs +++ b/src/datadogV1/model/model_matching_downtime.rs @@ -33,4 +33,19 @@ impl MatchingDowntime { start: None, } } + + pub fn with_end(&mut self, value: Option) -> &mut Self { + self.end = Some(value); + self + } + + pub fn with_scope(&mut self, value: Vec) -> &mut Self { + self.scope = Some(value); + self + } + + pub fn with_start(&mut self, value: i64) -> &mut Self { + self.start = Some(value); + self + } } diff --git a/src/datadogV1/model/model_metric_metadata.rs b/src/datadogV1/model/model_metric_metadata.rs index d35a549fc..5a7a34e93 100644 --- a/src/datadogV1/model/model_metric_metadata.rs +++ b/src/datadogV1/model/model_metric_metadata.rs @@ -43,6 +43,41 @@ impl MetricMetadata { unit: None, } } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_integration(&mut self, value: String) -> &mut Self { + self.integration = Some(value); + self + } + + pub fn with_per_unit(&mut self, value: String) -> &mut Self { + self.per_unit = Some(value); + self + } + + pub fn with_short_name(&mut self, value: String) -> &mut Self { + self.short_name = Some(value); + self + } + + pub fn with_statsd_interval(&mut self, value: i64) -> &mut Self { + self.statsd_interval = Some(value); + self + } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } + + pub fn with_unit(&mut self, value: String) -> &mut Self { + self.unit = Some(value); + self + } } impl Default for MetricMetadata { fn default() -> Self { diff --git a/src/datadogV1/model/model_metric_search_response.rs b/src/datadogV1/model/model_metric_search_response.rs index 5a1e83e18..b6002aa45 100644 --- a/src/datadogV1/model/model_metric_search_response.rs +++ b/src/datadogV1/model/model_metric_search_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct MetricSearchResponse { /// Search result. #[serde(rename = "results")] - pub results: Option>, + pub results: Option, } impl MetricSearchResponse { pub fn new() -> MetricSearchResponse { MetricSearchResponse { results: None } } + + pub fn with_results( + &mut self, + value: crate::datadogV1::model::MetricSearchResponseResults, + ) -> &mut Self { + self.results = Some(value); + self + } } impl Default for MetricSearchResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_metric_search_response_results.rs b/src/datadogV1/model/model_metric_search_response_results.rs index fdfb9dc33..4d9ffe4ba 100644 --- a/src/datadogV1/model/model_metric_search_response_results.rs +++ b/src/datadogV1/model/model_metric_search_response_results.rs @@ -17,6 +17,11 @@ impl MetricSearchResponseResults { pub fn new() -> MetricSearchResponseResults { MetricSearchResponseResults { metrics: None } } + + pub fn with_metrics(&mut self, value: Vec) -> &mut Self { + self.metrics = Some(value); + self + } } impl Default for MetricSearchResponseResults { fn default() -> Self { diff --git a/src/datadogV1/model/model_metrics_list_response.rs b/src/datadogV1/model/model_metrics_list_response.rs index 5f4e53d14..d2ba16826 100644 --- a/src/datadogV1/model/model_metrics_list_response.rs +++ b/src/datadogV1/model/model_metrics_list_response.rs @@ -23,6 +23,16 @@ impl MetricsListResponse { metrics: None, } } + + pub fn with_from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + self + } + + pub fn with_metrics(&mut self, value: Vec) -> &mut Self { + self.metrics = Some(value); + self + } } impl Default for MetricsListResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_metrics_query_metadata.rs b/src/datadogV1/model/model_metrics_query_metadata.rs index bd823f481..ae57a4260 100644 --- a/src/datadogV1/model/model_metrics_query_metadata.rs +++ b/src/datadogV1/model/model_metrics_query_metadata.rs @@ -70,6 +70,74 @@ impl MetricsQueryMetadata { unit: None, } } + + pub fn with_aggr(&mut self, value: Option) -> &mut Self { + self.aggr = Some(value); + self + } + + pub fn with_display_name(&mut self, value: String) -> &mut Self { + self.display_name = Some(value); + self + } + + pub fn with_end(&mut self, value: i64) -> &mut Self { + self.end = Some(value); + self + } + + pub fn with_expression(&mut self, value: String) -> &mut Self { + self.expression = Some(value); + self + } + + pub fn with_interval(&mut self, value: i64) -> &mut Self { + self.interval = Some(value); + self + } + + pub fn with_length(&mut self, value: i64) -> &mut Self { + self.length = Some(value); + self + } + + pub fn with_metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn with_pointlist(&mut self, value: Vec>>) -> &mut Self { + self.pointlist = Some(value); + self + } + + pub fn with_query_index(&mut self, value: i64) -> &mut Self { + self.query_index = Some(value); + self + } + + pub fn with_scope(&mut self, value: String) -> &mut Self { + self.scope = Some(value); + self + } + + pub fn with_start(&mut self, value: i64) -> &mut Self { + self.start = Some(value); + self + } + + pub fn with_tag_set(&mut self, value: Vec) -> &mut Self { + self.tag_set = Some(value); + self + } + + pub fn with_unit( + &mut self, + value: Vec>, + ) -> &mut Self { + self.unit = Some(value); + self + } } impl Default for MetricsQueryMetadata { fn default() -> Self { diff --git a/src/datadogV1/model/model_metrics_query_response.rs b/src/datadogV1/model/model_metrics_query_response.rs index c6c4be9ba..591c6ab38 100644 --- a/src/datadogV1/model/model_metrics_query_response.rs +++ b/src/datadogV1/model/model_metrics_query_response.rs @@ -51,6 +51,54 @@ impl MetricsQueryResponse { to_date: None, } } + + pub fn with_error(&mut self, value: String) -> &mut Self { + self.error = Some(value); + self + } + + pub fn with_from_date(&mut self, value: i64) -> &mut Self { + self.from_date = Some(value); + self + } + + pub fn with_group_by(&mut self, value: Vec) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_res_type(&mut self, value: String) -> &mut Self { + self.res_type = Some(value); + self + } + + pub fn with_series( + &mut self, + value: Vec, + ) -> &mut Self { + self.series = Some(value); + self + } + + pub fn with_status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_to_date(&mut self, value: i64) -> &mut Self { + self.to_date = Some(value); + self + } } impl Default for MetricsQueryResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_metrics_query_unit.rs b/src/datadogV1/model/model_metrics_query_unit.rs index 43ca3a1e4..313bfd0e3 100644 --- a/src/datadogV1/model/model_metrics_query_unit.rs +++ b/src/datadogV1/model/model_metrics_query_unit.rs @@ -35,6 +35,31 @@ impl MetricsQueryUnit { short_name: None, } } + + pub fn with_family(&mut self, value: String) -> &mut Self { + self.family = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_plural(&mut self, value: String) -> &mut Self { + self.plural = Some(value); + self + } + + pub fn with_scale_factor(&mut self, value: f64) -> &mut Self { + self.scale_factor = Some(value); + self + } + + pub fn with_short_name(&mut self, value: String) -> &mut Self { + self.short_name = Some(value); + self + } } impl Default for MetricsQueryUnit { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor.rs b/src/datadogV1/model/model_monitor.rs index 3142e33b7..9531a48ca 100644 --- a/src/datadogV1/model/model_monitor.rs +++ b/src/datadogV1/model/model_monitor.rs @@ -13,7 +13,7 @@ pub struct Monitor { pub created: Option, /// Object describing the creator of the shared element. #[serde(rename = "creator")] - pub creator: Option>, + pub creator: Option, /// Whether or not the monitor is deleted. (Always `null`) #[serde( rename = "deleted", @@ -41,7 +41,7 @@ pub struct Monitor { pub name: Option, /// List of options associated with your monitor. #[serde(rename = "options")] - pub options: Option>, + pub options: Option, /// The different states your monitor can be in. #[serde(rename = "overall_state")] pub overall_state: Option, @@ -64,7 +64,7 @@ pub struct Monitor { pub restricted_roles: Option>>, /// Wrapper object with the different monitor states. #[serde(rename = "state")] - pub state: Option>, + pub state: Option, /// Tags associated to your monitor. #[serde(rename = "tags")] pub tags: Option>, @@ -95,4 +95,85 @@ impl Monitor { type_, } } + + pub fn with_created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn with_creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + self.creator = Some(value); + self + } + + pub fn with_deleted(&mut self, value: Option) -> &mut Self { + self.deleted = Some(value); + self + } + + pub fn with_id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_matching_downtimes( + &mut self, + value: Vec, + ) -> &mut Self { + self.matching_downtimes = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn with_multi(&mut self, value: bool) -> &mut Self { + self.multi = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_options(&mut self, value: crate::datadogV1::model::MonitorOptions) -> &mut Self { + self.options = Some(value); + self + } + + pub fn with_overall_state( + &mut self, + value: crate::datadogV1::model::MonitorOverallStates, + ) -> &mut Self { + self.overall_state = Some(value); + self + } + + pub fn with_priority(&mut self, value: Option) -> &mut Self { + self.priority = Some(value); + self + } + + pub fn with_restricted_roles(&mut self, value: Option>) -> &mut Self { + self.restricted_roles = Some(value); + self + } + + pub fn with_state(&mut self, value: crate::datadogV1::model::MonitorState) -> &mut Self { + self.state = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } diff --git a/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition.rs b/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition.rs index 3595563c3..5c6a96b69 100644 --- a/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition.rs +++ b/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MonitorFormulaAndFunctionEventQueryDefinition { /// Compute options. #[serde(rename = "compute")] - pub compute: Box, + pub compute: crate::datadogV1::model::MonitorFormulaAndFunctionEventQueryDefinitionCompute, /// Data source for event platform-based queries. #[serde(rename = "data_source")] pub data_source: crate::datadogV1::model::MonitorFormulaAndFunctionEventsDataSource, @@ -26,12 +26,12 @@ pub struct MonitorFormulaAndFunctionEventQueryDefinition { /// Search options. #[serde(rename = "search")] pub search: - Option>, + Option, } impl MonitorFormulaAndFunctionEventQueryDefinition { pub fn new( - compute: Box, + compute: crate::datadogV1::model::MonitorFormulaAndFunctionEventQueryDefinitionCompute, data_source: crate::datadogV1::model::MonitorFormulaAndFunctionEventsDataSource, name: String, ) -> MonitorFormulaAndFunctionEventQueryDefinition { @@ -44,4 +44,25 @@ impl MonitorFormulaAndFunctionEventQueryDefinition { search: None, } } + + pub fn with_group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn with_indexes(&mut self, value: Vec) -> &mut Self { + self.indexes = Some(value); + self + } + + pub fn with_search( + &mut self, + value: crate::datadogV1::model::MonitorFormulaAndFunctionEventQueryDefinitionSearch, + ) -> &mut Self { + self.search = Some(value); + self + } } diff --git a/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition_compute.rs b/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition_compute.rs index dab275e37..74f6aa0b1 100644 --- a/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition_compute.rs +++ b/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition_compute.rs @@ -29,4 +29,14 @@ impl MonitorFormulaAndFunctionEventQueryDefinitionCompute { metric: None, } } + + pub fn with_interval(&mut self, value: i64) -> &mut Self { + self.interval = Some(value); + self + } + + pub fn with_metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } } diff --git a/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by.rs b/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by.rs index d058ec6ae..9d667cfa6 100644 --- a/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by.rs +++ b/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by.rs @@ -16,7 +16,7 @@ pub struct MonitorFormulaAndFunctionEventQueryGroupBy { pub limit: Option, /// Options for sorting group by results. #[serde(rename = "sort")] - pub sort: Option>, + pub sort: Option, } impl MonitorFormulaAndFunctionEventQueryGroupBy { @@ -27,4 +27,17 @@ impl MonitorFormulaAndFunctionEventQueryGroupBy { sort: None, } } + + pub fn with_limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_sort( + &mut self, + value: crate::datadogV1::model::MonitorFormulaAndFunctionEventQueryGroupBySort, + ) -> &mut Self { + self.sort = Some(value); + self + } } diff --git a/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by_sort.rs b/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by_sort.rs index 03530da05..b1962cb9e 100644 --- a/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by_sort.rs +++ b/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by_sort.rs @@ -29,4 +29,14 @@ impl MonitorFormulaAndFunctionEventQueryGroupBySort { order: None, } } + + pub fn with_metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn with_order(&mut self, value: crate::datadogV1::model::QuerySortOrder) -> &mut Self { + self.order = Some(value); + self + } } diff --git a/src/datadogV1/model/model_monitor_formula_and_function_query_definition.rs b/src/datadogV1/model/model_monitor_formula_and_function_query_definition.rs index 6a0f69dc7..6867b9954 100644 --- a/src/datadogV1/model/model_monitor_formula_and_function_query_definition.rs +++ b/src/datadogV1/model/model_monitor_formula_and_function_query_definition.rs @@ -8,6 +8,6 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum MonitorFormulaAndFunctionQueryDefinition { MonitorFormulaAndFunctionEventQueryDefinition( - Box, + crate::datadogV1::model::MonitorFormulaAndFunctionEventQueryDefinition, ), } diff --git a/src/datadogV1/model/model_monitor_group_search_response.rs b/src/datadogV1/model/model_monitor_group_search_response.rs index 7ee2a2f44..a6ac6fece 100644 --- a/src/datadogV1/model/model_monitor_group_search_response.rs +++ b/src/datadogV1/model/model_monitor_group_search_response.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct MonitorGroupSearchResponse { /// The counts of monitor groups per different criteria. #[serde(rename = "counts")] - pub counts: Option>, + pub counts: Option, /// The list of found monitor groups. #[serde(rename = "groups")] pub groups: Option>, /// Metadata about the response. #[serde(rename = "metadata")] - pub metadata: Option>, + pub metadata: Option, } impl MonitorGroupSearchResponse { @@ -27,6 +27,30 @@ impl MonitorGroupSearchResponse { metadata: None, } } + + pub fn with_counts( + &mut self, + value: crate::datadogV1::model::MonitorGroupSearchResponseCounts, + ) -> &mut Self { + self.counts = Some(value); + self + } + + pub fn with_groups( + &mut self, + value: Vec, + ) -> &mut Self { + self.groups = Some(value); + self + } + + pub fn with_metadata( + &mut self, + value: crate::datadogV1::model::MonitorSearchResponseMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } } impl Default for MonitorGroupSearchResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor_group_search_response_counts.rs b/src/datadogV1/model/model_monitor_group_search_response_counts.rs index 2a658d210..386092aaf 100644 --- a/src/datadogV1/model/model_monitor_group_search_response_counts.rs +++ b/src/datadogV1/model/model_monitor_group_search_response_counts.rs @@ -23,6 +23,22 @@ impl MonitorGroupSearchResponseCounts { type_: None, } } + + pub fn with_status( + &mut self, + value: Vec, + ) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: Vec, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for MonitorGroupSearchResponseCounts { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor_group_search_result.rs b/src/datadogV1/model/model_monitor_group_search_result.rs index 48a4b14c6..b97213634 100644 --- a/src/datadogV1/model/model_monitor_group_search_result.rs +++ b/src/datadogV1/model/model_monitor_group_search_result.rs @@ -47,6 +47,44 @@ impl MonitorGroupSearchResult { status: None, } } + + pub fn with_group(&mut self, value: String) -> &mut Self { + self.group = Some(value); + self + } + + pub fn with_group_tags(&mut self, value: Vec) -> &mut Self { + self.group_tags = Some(value); + self + } + + pub fn with_last_nodata_ts(&mut self, value: i64) -> &mut Self { + self.last_nodata_ts = Some(value); + self + } + + pub fn with_last_triggered_ts(&mut self, value: Option) -> &mut Self { + self.last_triggered_ts = Some(value); + self + } + + pub fn with_monitor_id(&mut self, value: i64) -> &mut Self { + self.monitor_id = Some(value); + self + } + + pub fn with_monitor_name(&mut self, value: String) -> &mut Self { + self.monitor_name = Some(value); + self + } + + pub fn with_status( + &mut self, + value: crate::datadogV1::model::MonitorOverallStates, + ) -> &mut Self { + self.status = Some(value); + self + } } impl Default for MonitorGroupSearchResult { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor_options.rs b/src/datadogV1/model/model_monitor_options.rs index 33a21d8bc..fd2b66e54 100644 --- a/src/datadogV1/model/model_monitor_options.rs +++ b/src/datadogV1/model/model_monitor_options.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MonitorOptions { /// Type of aggregation performed in the monitor query. #[serde(rename = "aggregation")] - pub aggregation: Option>, + pub aggregation: Option, /// IDs of the device the Synthetics monitor is running on. #[deprecated] #[serde(rename = "device_ids")] @@ -158,7 +158,7 @@ pub struct MonitorOptions { pub require_full_window: Option, /// Configuration options for scheduling. #[serde(rename = "scheduling_options")] - pub scheduling_options: Option>, + pub scheduling_options: Option, /// Information about the downtime applied to the monitor. Only shows v1 downtimes. #[deprecated] #[serde(rename = "silenced")] @@ -173,10 +173,10 @@ pub struct MonitorOptions { pub synthetics_check_id: Option>, /// Alerting time window options. #[serde(rename = "threshold_windows")] - pub threshold_windows: Option>, + pub threshold_windows: Option, /// List of the different monitor threshold available. #[serde(rename = "thresholds")] - pub thresholds: Option>, + pub thresholds: Option, /// The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours. #[serde( rename = "timeout_h", @@ -226,6 +226,219 @@ impl MonitorOptions { variables: None, } } + + #[allow(deprecated)] + pub fn with_aggregation( + &mut self, + value: crate::datadogV1::model::MonitorOptionsAggregation, + ) -> &mut Self { + self.aggregation = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_device_ids( + &mut self, + value: Vec, + ) -> &mut Self { + self.device_ids = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_enable_logs_sample(&mut self, value: bool) -> &mut Self { + self.enable_logs_sample = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_enable_samples(&mut self, value: bool) -> &mut Self { + self.enable_samples = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_escalation_message(&mut self, value: String) -> &mut Self { + self.escalation_message = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_evaluation_delay(&mut self, value: Option) -> &mut Self { + self.evaluation_delay = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_group_retention_duration(&mut self, value: String) -> &mut Self { + self.group_retention_duration = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_groupby_simple_monitor(&mut self, value: bool) -> &mut Self { + self.groupby_simple_monitor = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_include_tags(&mut self, value: bool) -> &mut Self { + self.include_tags = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_locked(&mut self, value: bool) -> &mut Self { + self.locked = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_min_failure_duration(&mut self, value: Option) -> &mut Self { + self.min_failure_duration = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_min_location_failed(&mut self, value: Option) -> &mut Self { + self.min_location_failed = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_new_group_delay(&mut self, value: Option) -> &mut Self { + self.new_group_delay = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_new_host_delay(&mut self, value: Option) -> &mut Self { + self.new_host_delay = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_no_data_timeframe(&mut self, value: Option) -> &mut Self { + self.no_data_timeframe = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_notification_preset_name( + &mut self, + value: crate::datadogV1::model::MonitorOptionsNotificationPresets, + ) -> &mut Self { + self.notification_preset_name = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_notify_audit(&mut self, value: bool) -> &mut Self { + self.notify_audit = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_notify_by(&mut self, value: Vec) -> &mut Self { + self.notify_by = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_notify_no_data(&mut self, value: bool) -> &mut Self { + self.notify_no_data = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_on_missing_data( + &mut self, + value: crate::datadogV1::model::OnMissingDataOption, + ) -> &mut Self { + self.on_missing_data = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_renotify_interval(&mut self, value: Option) -> &mut Self { + self.renotify_interval = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_renotify_occurrences(&mut self, value: Option) -> &mut Self { + self.renotify_occurrences = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_renotify_statuses( + &mut self, + value: Option>, + ) -> &mut Self { + self.renotify_statuses = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_require_full_window(&mut self, value: bool) -> &mut Self { + self.require_full_window = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_scheduling_options( + &mut self, + value: crate::datadogV1::model::MonitorOptionsSchedulingOptions, + ) -> &mut Self { + self.scheduling_options = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_silenced(&mut self, value: std::collections::BTreeMap) -> &mut Self { + self.silenced = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_synthetics_check_id(&mut self, value: Option) -> &mut Self { + self.synthetics_check_id = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_threshold_windows( + &mut self, + value: crate::datadogV1::model::MonitorThresholdWindowOptions, + ) -> &mut Self { + self.threshold_windows = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_thresholds( + &mut self, + value: crate::datadogV1::model::MonitorThresholds, + ) -> &mut Self { + self.thresholds = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_timeout_h(&mut self, value: Option) -> &mut Self { + self.timeout_h = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_variables( + &mut self, + value: Vec, + ) -> &mut Self { + self.variables = Some(value); + self + } } impl Default for MonitorOptions { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor_options_aggregation.rs b/src/datadogV1/model/model_monitor_options_aggregation.rs index c0d307113..2c21b7a24 100644 --- a/src/datadogV1/model/model_monitor_options_aggregation.rs +++ b/src/datadogV1/model/model_monitor_options_aggregation.rs @@ -27,6 +27,21 @@ impl MonitorOptionsAggregation { type_: None, } } + + pub fn with_group_by(&mut self, value: String) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn with_metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for MonitorOptionsAggregation { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor_options_custom_schedule.rs b/src/datadogV1/model/model_monitor_options_custom_schedule.rs index 70ef8b3ac..0ffe224ef 100644 --- a/src/datadogV1/model/model_monitor_options_custom_schedule.rs +++ b/src/datadogV1/model/model_monitor_options_custom_schedule.rs @@ -17,6 +17,14 @@ impl MonitorOptionsCustomSchedule { pub fn new() -> MonitorOptionsCustomSchedule { MonitorOptionsCustomSchedule { recurrences: None } } + + pub fn with_recurrences( + &mut self, + value: Vec, + ) -> &mut Self { + self.recurrences = Some(value); + self + } } impl Default for MonitorOptionsCustomSchedule { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor_options_custom_schedule_recurrence.rs b/src/datadogV1/model/model_monitor_options_custom_schedule_recurrence.rs index b20200e03..5fc450f70 100644 --- a/src/datadogV1/model/model_monitor_options_custom_schedule_recurrence.rs +++ b/src/datadogV1/model/model_monitor_options_custom_schedule_recurrence.rs @@ -27,6 +27,21 @@ impl MonitorOptionsCustomScheduleRecurrence { timezone: None, } } + + pub fn with_rrule(&mut self, value: String) -> &mut Self { + self.rrule = Some(value); + self + } + + pub fn with_start(&mut self, value: String) -> &mut Self { + self.start = Some(value); + self + } + + pub fn with_timezone(&mut self, value: String) -> &mut Self { + self.timezone = Some(value); + self + } } impl Default for MonitorOptionsCustomScheduleRecurrence { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor_options_scheduling_options.rs b/src/datadogV1/model/model_monitor_options_scheduling_options.rs index 87aa7c608..720787cca 100644 --- a/src/datadogV1/model/model_monitor_options_scheduling_options.rs +++ b/src/datadogV1/model/model_monitor_options_scheduling_options.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct MonitorOptionsSchedulingOptions { /// Configuration options for the custom schedule. **This feature is in private beta.** #[serde(rename = "custom_schedule")] - pub custom_schedule: Option>, + pub custom_schedule: Option, /// Configuration options for the evaluation window. If `hour_starts` is set, no other fields may be set. Otherwise, `day_starts` and `month_starts` must be set together. #[serde(rename = "evaluation_window")] pub evaluation_window: - Option>, + Option, } impl MonitorOptionsSchedulingOptions { @@ -24,6 +24,22 @@ impl MonitorOptionsSchedulingOptions { evaluation_window: None, } } + + pub fn with_custom_schedule( + &mut self, + value: crate::datadogV1::model::MonitorOptionsCustomSchedule, + ) -> &mut Self { + self.custom_schedule = Some(value); + self + } + + pub fn with_evaluation_window( + &mut self, + value: crate::datadogV1::model::MonitorOptionsSchedulingOptionsEvaluationWindow, + ) -> &mut Self { + self.evaluation_window = Some(value); + self + } } impl Default for MonitorOptionsSchedulingOptions { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor_options_scheduling_options_evaluation_window.rs b/src/datadogV1/model/model_monitor_options_scheduling_options_evaluation_window.rs index 9297ee523..e52315c2c 100644 --- a/src/datadogV1/model/model_monitor_options_scheduling_options_evaluation_window.rs +++ b/src/datadogV1/model/model_monitor_options_scheduling_options_evaluation_window.rs @@ -27,6 +27,21 @@ impl MonitorOptionsSchedulingOptionsEvaluationWindow { month_starts: None, } } + + pub fn with_day_starts(&mut self, value: String) -> &mut Self { + self.day_starts = Some(value); + self + } + + pub fn with_hour_starts(&mut self, value: i32) -> &mut Self { + self.hour_starts = Some(value); + self + } + + pub fn with_month_starts(&mut self, value: i32) -> &mut Self { + self.month_starts = Some(value); + self + } } impl Default for MonitorOptionsSchedulingOptionsEvaluationWindow { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor_search_count_item.rs b/src/datadogV1/model/model_monitor_search_count_item.rs index 10fdb43fb..1786d6e9d 100644 --- a/src/datadogV1/model/model_monitor_search_count_item.rs +++ b/src/datadogV1/model/model_monitor_search_count_item.rs @@ -23,6 +23,16 @@ impl MonitorSearchCountItem { name: None, } } + + pub fn with_count(&mut self, value: i64) -> &mut Self { + self.count = Some(value); + self + } + + pub fn with_name(&mut self, value: serde_json::Value) -> &mut Self { + self.name = Some(value); + self + } } impl Default for MonitorSearchCountItem { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor_search_response.rs b/src/datadogV1/model/model_monitor_search_response.rs index 86384c3e5..d04b7a0a3 100644 --- a/src/datadogV1/model/model_monitor_search_response.rs +++ b/src/datadogV1/model/model_monitor_search_response.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct MonitorSearchResponse { /// The counts of monitors per different criteria. #[serde(rename = "counts")] - pub counts: Option>, + pub counts: Option, /// Metadata about the response. #[serde(rename = "metadata")] - pub metadata: Option>, + pub metadata: Option, /// The list of found monitors. #[serde(rename = "monitors")] pub monitors: Option>, @@ -27,6 +27,30 @@ impl MonitorSearchResponse { monitors: None, } } + + pub fn with_counts( + &mut self, + value: crate::datadogV1::model::MonitorSearchResponseCounts, + ) -> &mut Self { + self.counts = Some(value); + self + } + + pub fn with_metadata( + &mut self, + value: crate::datadogV1::model::MonitorSearchResponseMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn with_monitors( + &mut self, + value: Vec, + ) -> &mut Self { + self.monitors = Some(value); + self + } } impl Default for MonitorSearchResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor_search_response_counts.rs b/src/datadogV1/model/model_monitor_search_response_counts.rs index 72263e5ad..b8e67cdbf 100644 --- a/src/datadogV1/model/model_monitor_search_response_counts.rs +++ b/src/datadogV1/model/model_monitor_search_response_counts.rs @@ -31,6 +31,38 @@ impl MonitorSearchResponseCounts { type_: None, } } + + pub fn with_muted( + &mut self, + value: Vec, + ) -> &mut Self { + self.muted = Some(value); + self + } + + pub fn with_status( + &mut self, + value: Vec, + ) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_tag( + &mut self, + value: Vec, + ) -> &mut Self { + self.tag = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: Vec, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for MonitorSearchResponseCounts { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor_search_response_metadata.rs b/src/datadogV1/model/model_monitor_search_response_metadata.rs index d2d9f084d..a68338103 100644 --- a/src/datadogV1/model/model_monitor_search_response_metadata.rs +++ b/src/datadogV1/model/model_monitor_search_response_metadata.rs @@ -31,6 +31,26 @@ impl MonitorSearchResponseMetadata { total_count: None, } } + + pub fn with_page(&mut self, value: i64) -> &mut Self { + self.page = Some(value); + self + } + + pub fn with_page_count(&mut self, value: i64) -> &mut Self { + self.page_count = Some(value); + self + } + + pub fn with_per_page(&mut self, value: i64) -> &mut Self { + self.per_page = Some(value); + self + } + + pub fn with_total_count(&mut self, value: i64) -> &mut Self { + self.total_count = Some(value); + self + } } impl Default for MonitorSearchResponseMetadata { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor_search_result.rs b/src/datadogV1/model/model_monitor_search_result.rs index ef43470df..1d8ebde14 100644 --- a/src/datadogV1/model/model_monitor_search_result.rs +++ b/src/datadogV1/model/model_monitor_search_result.rs @@ -13,7 +13,7 @@ pub struct MonitorSearchResult { pub classification: Option, /// Object describing the creator of the shared element. #[serde(rename = "creator")] - pub creator: Option>, + pub creator: Option, /// ID of the monitor. #[serde(rename = "id")] pub id: Option, @@ -74,6 +74,77 @@ impl MonitorSearchResult { type_: None, } } + + pub fn with_classification(&mut self, value: String) -> &mut Self { + self.classification = Some(value); + self + } + + pub fn with_creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + self.creator = Some(value); + self + } + + pub fn with_id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_last_triggered_ts(&mut self, value: Option) -> &mut Self { + self.last_triggered_ts = Some(value); + self + } + + pub fn with_metrics(&mut self, value: Vec) -> &mut Self { + self.metrics = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_notifications( + &mut self, + value: Vec, + ) -> &mut Self { + self.notifications = Some(value); + self + } + + pub fn with_org_id(&mut self, value: i64) -> &mut Self { + self.org_id = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_scopes(&mut self, value: Vec) -> &mut Self { + self.scopes = Some(value); + self + } + + pub fn with_status( + &mut self, + value: crate::datadogV1::model::MonitorOverallStates, + ) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV1::model::MonitorType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for MonitorSearchResult { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor_search_result_notification.rs b/src/datadogV1/model/model_monitor_search_result_notification.rs index 24f464361..dd63a7eff 100644 --- a/src/datadogV1/model/model_monitor_search_result_notification.rs +++ b/src/datadogV1/model/model_monitor_search_result_notification.rs @@ -23,6 +23,16 @@ impl MonitorSearchResultNotification { name: None, } } + + pub fn with_handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } impl Default for MonitorSearchResultNotification { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor_state.rs b/src/datadogV1/model/model_monitor_state.rs index 4eb3a0572..faf116c9b 100644 --- a/src/datadogV1/model/model_monitor_state.rs +++ b/src/datadogV1/model/model_monitor_state.rs @@ -19,6 +19,14 @@ impl MonitorState { pub fn new() -> MonitorState { MonitorState { groups: None } } + + pub fn with_groups( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.groups = Some(value); + self + } } impl Default for MonitorState { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor_state_group.rs b/src/datadogV1/model/model_monitor_state_group.rs index 1a033168f..e50b08422 100644 --- a/src/datadogV1/model/model_monitor_state_group.rs +++ b/src/datadogV1/model/model_monitor_state_group.rs @@ -39,6 +39,39 @@ impl MonitorStateGroup { status: None, } } + + pub fn with_last_nodata_ts(&mut self, value: i64) -> &mut Self { + self.last_nodata_ts = Some(value); + self + } + + pub fn with_last_notified_ts(&mut self, value: i64) -> &mut Self { + self.last_notified_ts = Some(value); + self + } + + pub fn with_last_resolved_ts(&mut self, value: i64) -> &mut Self { + self.last_resolved_ts = Some(value); + self + } + + pub fn with_last_triggered_ts(&mut self, value: i64) -> &mut Self { + self.last_triggered_ts = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_status( + &mut self, + value: crate::datadogV1::model::MonitorOverallStates, + ) -> &mut Self { + self.status = Some(value); + self + } } impl Default for MonitorStateGroup { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor_summary_widget_definition.rs b/src/datadogV1/model/model_monitor_summary_widget_definition.rs index d21267e86..8bea1d1ab 100644 --- a/src/datadogV1/model/model_monitor_summary_widget_definition.rs +++ b/src/datadogV1/model/model_monitor_summary_widget_definition.rs @@ -77,4 +77,91 @@ impl MonitorSummaryWidgetDefinition { type_, } } + + #[allow(deprecated)] + pub fn with_color_preference( + &mut self, + value: crate::datadogV1::model::WidgetColorPreference, + ) -> &mut Self { + self.color_preference = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_count(&mut self, value: i64) -> &mut Self { + self.count = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_display_format( + &mut self, + value: crate::datadogV1::model::WidgetMonitorSummaryDisplayFormat, + ) -> &mut Self { + self.display_format = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_hide_zero_counts(&mut self, value: bool) -> &mut Self { + self.hide_zero_counts = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_show_last_triggered(&mut self, value: bool) -> &mut Self { + self.show_last_triggered = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_show_priority(&mut self, value: bool) -> &mut Self { + self.show_priority = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_sort( + &mut self, + value: crate::datadogV1::model::WidgetMonitorSummarySort, + ) -> &mut Self { + self.sort = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_start(&mut self, value: i64) -> &mut Self { + self.start = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_summary_type( + &mut self, + value: crate::datadogV1::model::WidgetSummaryType, + ) -> &mut Self { + self.summary_type = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_monitor_threshold_window_options.rs b/src/datadogV1/model/model_monitor_threshold_window_options.rs index 1cbd9cd1d..04ba2f2fc 100644 --- a/src/datadogV1/model/model_monitor_threshold_window_options.rs +++ b/src/datadogV1/model/model_monitor_threshold_window_options.rs @@ -31,6 +31,16 @@ impl MonitorThresholdWindowOptions { trigger_window: None, } } + + pub fn with_recovery_window(&mut self, value: Option) -> &mut Self { + self.recovery_window = Some(value); + self + } + + pub fn with_trigger_window(&mut self, value: Option) -> &mut Self { + self.trigger_window = Some(value); + self + } } impl Default for MonitorThresholdWindowOptions { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor_thresholds.rs b/src/datadogV1/model/model_monitor_thresholds.rs index 833e08907..d6688f284 100644 --- a/src/datadogV1/model/model_monitor_thresholds.rs +++ b/src/datadogV1/model/model_monitor_thresholds.rs @@ -55,6 +55,36 @@ impl MonitorThresholds { warning_recovery: None, } } + + pub fn with_critical(&mut self, value: f64) -> &mut Self { + self.critical = Some(value); + self + } + + pub fn with_critical_recovery(&mut self, value: Option) -> &mut Self { + self.critical_recovery = Some(value); + self + } + + pub fn with_ok(&mut self, value: Option) -> &mut Self { + self.ok = Some(value); + self + } + + pub fn with_unknown(&mut self, value: Option) -> &mut Self { + self.unknown = Some(value); + self + } + + pub fn with_warning(&mut self, value: Option) -> &mut Self { + self.warning = Some(value); + self + } + + pub fn with_warning_recovery(&mut self, value: Option) -> &mut Self { + self.warning_recovery = Some(value); + self + } } impl Default for MonitorThresholds { fn default() -> Self { diff --git a/src/datadogV1/model/model_monitor_update_request.rs b/src/datadogV1/model/model_monitor_update_request.rs index fca72de61..3a5b17c97 100644 --- a/src/datadogV1/model/model_monitor_update_request.rs +++ b/src/datadogV1/model/model_monitor_update_request.rs @@ -13,7 +13,7 @@ pub struct MonitorUpdateRequest { pub created: Option, /// Object describing the creator of the shared element. #[serde(rename = "creator")] - pub creator: Option>, + pub creator: Option, /// Whether or not the monitor is deleted. (Always `null`) #[serde( rename = "deleted", @@ -38,7 +38,7 @@ pub struct MonitorUpdateRequest { pub name: Option, /// List of options associated with your monitor. #[serde(rename = "options")] - pub options: Option>, + pub options: Option, /// The different states your monitor can be in. #[serde(rename = "overall_state")] pub overall_state: Option, @@ -57,7 +57,7 @@ pub struct MonitorUpdateRequest { pub restricted_roles: Option>>, /// Wrapper object with the different monitor states. #[serde(rename = "state")] - pub state: Option>, + pub state: Option, /// Tags associated to your monitor. #[serde(rename = "tags")] pub tags: Option>, @@ -87,6 +87,89 @@ impl MonitorUpdateRequest { type_: None, } } + + pub fn with_created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn with_creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + self.creator = Some(value); + self + } + + pub fn with_deleted(&mut self, value: Option) -> &mut Self { + self.deleted = Some(value); + self + } + + pub fn with_id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn with_multi(&mut self, value: bool) -> &mut Self { + self.multi = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_options(&mut self, value: crate::datadogV1::model::MonitorOptions) -> &mut Self { + self.options = Some(value); + self + } + + pub fn with_overall_state( + &mut self, + value: crate::datadogV1::model::MonitorOverallStates, + ) -> &mut Self { + self.overall_state = Some(value); + self + } + + pub fn with_priority(&mut self, value: i64) -> &mut Self { + self.priority = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_restricted_roles(&mut self, value: Option>) -> &mut Self { + self.restricted_roles = Some(value); + self + } + + pub fn with_state(&mut self, value: crate::datadogV1::model::MonitorState) -> &mut Self { + self.state = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV1::model::MonitorType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for MonitorUpdateRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_monthly_usage_attribution_body.rs b/src/datadogV1/model/model_monthly_usage_attribution_body.rs index 6bdd07be4..2c1386db8 100644 --- a/src/datadogV1/model/model_monthly_usage_attribution_body.rs +++ b/src/datadogV1/model/model_monthly_usage_attribution_body.rs @@ -35,7 +35,7 @@ pub struct MonthlyUsageAttributionBody { pub updated_at: Option, /// Fields in Usage Summary by tag(s). #[serde(rename = "values")] - pub values: Option>, + pub values: Option, } impl MonthlyUsageAttributionBody { @@ -51,6 +51,52 @@ impl MonthlyUsageAttributionBody { values: None, } } + + pub fn with_month(&mut self, value: String) -> &mut Self { + self.month = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } + + pub fn with_tag_config_source(&mut self, value: String) -> &mut Self { + self.tag_config_source = Some(value); + self + } + + pub fn with_tags( + &mut self, + value: Option>>>, + ) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_updated_at(&mut self, value: String) -> &mut Self { + self.updated_at = Some(value); + self + } + + pub fn with_values( + &mut self, + value: crate::datadogV1::model::MonthlyUsageAttributionValues, + ) -> &mut Self { + self.values = Some(value); + self + } } impl Default for MonthlyUsageAttributionBody { fn default() -> Self { diff --git a/src/datadogV1/model/model_monthly_usage_attribution_metadata.rs b/src/datadogV1/model/model_monthly_usage_attribution_metadata.rs index f781631aa..e91c33e51 100644 --- a/src/datadogV1/model/model_monthly_usage_attribution_metadata.rs +++ b/src/datadogV1/model/model_monthly_usage_attribution_metadata.rs @@ -13,7 +13,7 @@ pub struct MonthlyUsageAttributionMetadata { pub aggregates: Option>, /// The metadata for the current pagination. #[serde(rename = "pagination")] - pub pagination: Option>, + pub pagination: Option, } impl MonthlyUsageAttributionMetadata { @@ -23,6 +23,22 @@ impl MonthlyUsageAttributionMetadata { pagination: None, } } + + pub fn with_aggregates( + &mut self, + value: Vec, + ) -> &mut Self { + self.aggregates = Some(value); + self + } + + pub fn with_pagination( + &mut self, + value: crate::datadogV1::model::MonthlyUsageAttributionPagination, + ) -> &mut Self { + self.pagination = Some(value); + self + } } impl Default for MonthlyUsageAttributionMetadata { fn default() -> Self { diff --git a/src/datadogV1/model/model_monthly_usage_attribution_pagination.rs b/src/datadogV1/model/model_monthly_usage_attribution_pagination.rs index 1157d9315..c927f83e9 100644 --- a/src/datadogV1/model/model_monthly_usage_attribution_pagination.rs +++ b/src/datadogV1/model/model_monthly_usage_attribution_pagination.rs @@ -23,6 +23,11 @@ impl MonthlyUsageAttributionPagination { next_record_id: None, } } + + pub fn with_next_record_id(&mut self, value: Option) -> &mut Self { + self.next_record_id = Some(value); + self + } } impl Default for MonthlyUsageAttributionPagination { fn default() -> Self { diff --git a/src/datadogV1/model/model_monthly_usage_attribution_response.rs b/src/datadogV1/model/model_monthly_usage_attribution_response.rs index c742b6b23..e1bf7e14e 100644 --- a/src/datadogV1/model/model_monthly_usage_attribution_response.rs +++ b/src/datadogV1/model/model_monthly_usage_attribution_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MonthlyUsageAttributionResponse { /// The object containing document metadata. #[serde(rename = "metadata")] - pub metadata: Option>, + pub metadata: Option, /// Get usage summary by tag(s). #[serde(rename = "usage")] pub usage: Option>, @@ -23,6 +23,22 @@ impl MonthlyUsageAttributionResponse { usage: None, } } + + pub fn with_metadata( + &mut self, + value: crate::datadogV1::model::MonthlyUsageAttributionMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for MonthlyUsageAttributionResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_monthly_usage_attribution_values.rs b/src/datadogV1/model/model_monthly_usage_attribution_values.rs index bd10675ee..b6452c6a6 100644 --- a/src/datadogV1/model/model_monthly_usage_attribution_values.rs +++ b/src/datadogV1/model/model_monthly_usage_attribution_values.rs @@ -495,6 +495,606 @@ impl MonthlyUsageAttributionValues { vuln_management_hosts_usage: None, } } + + pub fn with_api_percentage(&mut self, value: f64) -> &mut Self { + self.api_percentage = Some(value); + self + } + + pub fn with_api_usage(&mut self, value: f64) -> &mut Self { + self.api_usage = Some(value); + self + } + + pub fn with_apm_fargate_percentage(&mut self, value: f64) -> &mut Self { + self.apm_fargate_percentage = Some(value); + self + } + + pub fn with_apm_fargate_usage(&mut self, value: f64) -> &mut Self { + self.apm_fargate_usage = Some(value); + self + } + + pub fn with_apm_host_percentage(&mut self, value: f64) -> &mut Self { + self.apm_host_percentage = Some(value); + self + } + + pub fn with_apm_host_usage(&mut self, value: f64) -> &mut Self { + self.apm_host_usage = Some(value); + self + } + + pub fn with_apm_usm_percentage(&mut self, value: f64) -> &mut Self { + self.apm_usm_percentage = Some(value); + self + } + + pub fn with_apm_usm_usage(&mut self, value: f64) -> &mut Self { + self.apm_usm_usage = Some(value); + self + } + + pub fn with_appsec_fargate_percentage(&mut self, value: f64) -> &mut Self { + self.appsec_fargate_percentage = Some(value); + self + } + + pub fn with_appsec_fargate_usage(&mut self, value: f64) -> &mut Self { + self.appsec_fargate_usage = Some(value); + self + } + + pub fn with_appsec_percentage(&mut self, value: f64) -> &mut Self { + self.appsec_percentage = Some(value); + self + } + + pub fn with_appsec_usage(&mut self, value: f64) -> &mut Self { + self.appsec_usage = Some(value); + self + } + + pub fn with_browser_percentage(&mut self, value: f64) -> &mut Self { + self.browser_percentage = Some(value); + self + } + + pub fn with_browser_usage(&mut self, value: f64) -> &mut Self { + self.browser_usage = Some(value); + self + } + + pub fn with_ci_pipeline_indexed_spans_percentage(&mut self, value: f64) -> &mut Self { + self.ci_pipeline_indexed_spans_percentage = Some(value); + self + } + + pub fn with_ci_pipeline_indexed_spans_usage(&mut self, value: f64) -> &mut Self { + self.ci_pipeline_indexed_spans_usage = Some(value); + self + } + + pub fn with_ci_test_indexed_spans_percentage(&mut self, value: f64) -> &mut Self { + self.ci_test_indexed_spans_percentage = Some(value); + self + } + + pub fn with_ci_test_indexed_spans_usage(&mut self, value: f64) -> &mut Self { + self.ci_test_indexed_spans_usage = Some(value); + self + } + + pub fn with_ci_visibility_itr_percentage(&mut self, value: f64) -> &mut Self { + self.ci_visibility_itr_percentage = Some(value); + self + } + + pub fn with_ci_visibility_itr_usage(&mut self, value: f64) -> &mut Self { + self.ci_visibility_itr_usage = Some(value); + self + } + + pub fn with_cloud_siem_percentage(&mut self, value: f64) -> &mut Self { + self.cloud_siem_percentage = Some(value); + self + } + + pub fn with_cloud_siem_usage(&mut self, value: f64) -> &mut Self { + self.cloud_siem_usage = Some(value); + self + } + + pub fn with_container_excl_agent_percentage(&mut self, value: f64) -> &mut Self { + self.container_excl_agent_percentage = Some(value); + self + } + + pub fn with_container_excl_agent_usage(&mut self, value: f64) -> &mut Self { + self.container_excl_agent_usage = Some(value); + self + } + + pub fn with_container_percentage(&mut self, value: f64) -> &mut Self { + self.container_percentage = Some(value); + self + } + + pub fn with_container_usage(&mut self, value: f64) -> &mut Self { + self.container_usage = Some(value); + self + } + + pub fn with_cspm_containers_percentage(&mut self, value: f64) -> &mut Self { + self.cspm_containers_percentage = Some(value); + self + } + + pub fn with_cspm_containers_usage(&mut self, value: f64) -> &mut Self { + self.cspm_containers_usage = Some(value); + self + } + + pub fn with_cspm_hosts_percentage(&mut self, value: f64) -> &mut Self { + self.cspm_hosts_percentage = Some(value); + self + } + + pub fn with_cspm_hosts_usage(&mut self, value: f64) -> &mut Self { + self.cspm_hosts_usage = Some(value); + self + } + + pub fn with_custom_event_percentage(&mut self, value: f64) -> &mut Self { + self.custom_event_percentage = Some(value); + self + } + + pub fn with_custom_event_usage(&mut self, value: f64) -> &mut Self { + self.custom_event_usage = Some(value); + self + } + + pub fn with_custom_ingested_timeseries_percentage(&mut self, value: f64) -> &mut Self { + self.custom_ingested_timeseries_percentage = Some(value); + self + } + + pub fn with_custom_ingested_timeseries_usage(&mut self, value: f64) -> &mut Self { + self.custom_ingested_timeseries_usage = Some(value); + self + } + + pub fn with_custom_timeseries_percentage(&mut self, value: f64) -> &mut Self { + self.custom_timeseries_percentage = Some(value); + self + } + + pub fn with_custom_timeseries_usage(&mut self, value: f64) -> &mut Self { + self.custom_timeseries_usage = Some(value); + self + } + + pub fn with_cws_containers_percentage(&mut self, value: f64) -> &mut Self { + self.cws_containers_percentage = Some(value); + self + } + + pub fn with_cws_containers_usage(&mut self, value: f64) -> &mut Self { + self.cws_containers_usage = Some(value); + self + } + + pub fn with_cws_hosts_percentage(&mut self, value: f64) -> &mut Self { + self.cws_hosts_percentage = Some(value); + self + } + + pub fn with_cws_hosts_usage(&mut self, value: f64) -> &mut Self { + self.cws_hosts_usage = Some(value); + self + } + + pub fn with_dbm_hosts_percentage(&mut self, value: f64) -> &mut Self { + self.dbm_hosts_percentage = Some(value); + self + } + + pub fn with_dbm_hosts_usage(&mut self, value: f64) -> &mut Self { + self.dbm_hosts_usage = Some(value); + self + } + + pub fn with_dbm_queries_percentage(&mut self, value: f64) -> &mut Self { + self.dbm_queries_percentage = Some(value); + self + } + + pub fn with_dbm_queries_usage(&mut self, value: f64) -> &mut Self { + self.dbm_queries_usage = Some(value); + self + } + + pub fn with_estimated_indexed_logs_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_indexed_logs_percentage = Some(value); + self + } + + pub fn with_estimated_indexed_logs_usage(&mut self, value: f64) -> &mut Self { + self.estimated_indexed_logs_usage = Some(value); + self + } + + pub fn with_estimated_indexed_spans_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_indexed_spans_percentage = Some(value); + self + } + + pub fn with_estimated_indexed_spans_usage(&mut self, value: f64) -> &mut Self { + self.estimated_indexed_spans_usage = Some(value); + self + } + + pub fn with_estimated_ingested_logs_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_ingested_logs_percentage = Some(value); + self + } + + pub fn with_estimated_ingested_logs_usage(&mut self, value: f64) -> &mut Self { + self.estimated_ingested_logs_usage = Some(value); + self + } + + pub fn with_estimated_ingested_spans_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_ingested_spans_percentage = Some(value); + self + } + + pub fn with_estimated_ingested_spans_usage(&mut self, value: f64) -> &mut Self { + self.estimated_ingested_spans_usage = Some(value); + self + } + + pub fn with_estimated_rum_sessions_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_rum_sessions_percentage = Some(value); + self + } + + pub fn with_estimated_rum_sessions_usage(&mut self, value: f64) -> &mut Self { + self.estimated_rum_sessions_usage = Some(value); + self + } + + pub fn with_fargate_percentage(&mut self, value: f64) -> &mut Self { + self.fargate_percentage = Some(value); + self + } + + pub fn with_fargate_usage(&mut self, value: f64) -> &mut Self { + self.fargate_usage = Some(value); + self + } + + pub fn with_functions_percentage(&mut self, value: f64) -> &mut Self { + self.functions_percentage = Some(value); + self + } + + pub fn with_functions_usage(&mut self, value: f64) -> &mut Self { + self.functions_usage = Some(value); + self + } + + pub fn with_indexed_spans_percentage(&mut self, value: f64) -> &mut Self { + self.indexed_spans_percentage = Some(value); + self + } + + pub fn with_indexed_spans_usage(&mut self, value: f64) -> &mut Self { + self.indexed_spans_usage = Some(value); + self + } + + pub fn with_infra_host_percentage(&mut self, value: f64) -> &mut Self { + self.infra_host_percentage = Some(value); + self + } + + pub fn with_infra_host_usage(&mut self, value: f64) -> &mut Self { + self.infra_host_usage = Some(value); + self + } + + pub fn with_ingested_logs_bytes_percentage(&mut self, value: f64) -> &mut Self { + self.ingested_logs_bytes_percentage = Some(value); + self + } + + pub fn with_ingested_logs_bytes_usage(&mut self, value: f64) -> &mut Self { + self.ingested_logs_bytes_usage = Some(value); + self + } + + pub fn with_ingested_spans_bytes_percentage(&mut self, value: f64) -> &mut Self { + self.ingested_spans_bytes_percentage = Some(value); + self + } + + pub fn with_ingested_spans_bytes_usage(&mut self, value: f64) -> &mut Self { + self.ingested_spans_bytes_usage = Some(value); + self + } + + pub fn with_invocations_percentage(&mut self, value: f64) -> &mut Self { + self.invocations_percentage = Some(value); + self + } + + pub fn with_invocations_usage(&mut self, value: f64) -> &mut Self { + self.invocations_usage = Some(value); + self + } + + pub fn with_lambda_traced_invocations_percentage(&mut self, value: f64) -> &mut Self { + self.lambda_traced_invocations_percentage = Some(value); + self + } + + pub fn with_lambda_traced_invocations_usage(&mut self, value: f64) -> &mut Self { + self.lambda_traced_invocations_usage = Some(value); + self + } + + pub fn with_logs_indexed_15day_percentage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_15day_percentage = Some(value); + self + } + + pub fn with_logs_indexed_15day_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_15day_usage = Some(value); + self + } + + pub fn with_logs_indexed_180day_percentage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_180day_percentage = Some(value); + self + } + + pub fn with_logs_indexed_180day_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_180day_usage = Some(value); + self + } + + pub fn with_logs_indexed_30day_percentage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_30day_percentage = Some(value); + self + } + + pub fn with_logs_indexed_30day_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_30day_usage = Some(value); + self + } + + pub fn with_logs_indexed_360day_percentage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_360day_percentage = Some(value); + self + } + + pub fn with_logs_indexed_360day_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_360day_usage = Some(value); + self + } + + pub fn with_logs_indexed_3day_percentage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_3day_percentage = Some(value); + self + } + + pub fn with_logs_indexed_3day_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_3day_usage = Some(value); + self + } + + pub fn with_logs_indexed_45day_percentage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_45day_percentage = Some(value); + self + } + + pub fn with_logs_indexed_45day_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_45day_usage = Some(value); + self + } + + pub fn with_logs_indexed_60day_percentage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_60day_percentage = Some(value); + self + } + + pub fn with_logs_indexed_60day_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_60day_usage = Some(value); + self + } + + pub fn with_logs_indexed_7day_percentage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_7day_percentage = Some(value); + self + } + + pub fn with_logs_indexed_7day_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_7day_usage = Some(value); + self + } + + pub fn with_logs_indexed_90day_percentage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_90day_percentage = Some(value); + self + } + + pub fn with_logs_indexed_90day_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_90day_usage = Some(value); + self + } + + pub fn with_logs_indexed_custom_retention_percentage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_custom_retention_percentage = Some(value); + self + } + + pub fn with_logs_indexed_custom_retention_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_custom_retention_usage = Some(value); + self + } + + pub fn with_mobile_app_testing_percentage(&mut self, value: f64) -> &mut Self { + self.mobile_app_testing_percentage = Some(value); + self + } + + pub fn with_mobile_app_testing_usage(&mut self, value: f64) -> &mut Self { + self.mobile_app_testing_usage = Some(value); + self + } + + pub fn with_ndm_netflow_percentage(&mut self, value: f64) -> &mut Self { + self.ndm_netflow_percentage = Some(value); + self + } + + pub fn with_ndm_netflow_usage(&mut self, value: f64) -> &mut Self { + self.ndm_netflow_usage = Some(value); + self + } + + pub fn with_npm_host_percentage(&mut self, value: f64) -> &mut Self { + self.npm_host_percentage = Some(value); + self + } + + pub fn with_npm_host_usage(&mut self, value: f64) -> &mut Self { + self.npm_host_usage = Some(value); + self + } + + pub fn with_obs_pipeline_bytes_percentage(&mut self, value: f64) -> &mut Self { + self.obs_pipeline_bytes_percentage = Some(value); + self + } + + pub fn with_obs_pipeline_bytes_usage(&mut self, value: f64) -> &mut Self { + self.obs_pipeline_bytes_usage = Some(value); + self + } + + pub fn with_profiled_container_percentage(&mut self, value: f64) -> &mut Self { + self.profiled_container_percentage = Some(value); + self + } + + pub fn with_profiled_container_usage(&mut self, value: f64) -> &mut Self { + self.profiled_container_usage = Some(value); + self + } + + pub fn with_profiled_fargate_percentage(&mut self, value: f64) -> &mut Self { + self.profiled_fargate_percentage = Some(value); + self + } + + pub fn with_profiled_fargate_usage(&mut self, value: f64) -> &mut Self { + self.profiled_fargate_usage = Some(value); + self + } + + pub fn with_profiled_host_percentage(&mut self, value: f64) -> &mut Self { + self.profiled_host_percentage = Some(value); + self + } + + pub fn with_profiled_host_usage(&mut self, value: f64) -> &mut Self { + self.profiled_host_usage = Some(value); + self + } + + pub fn with_rum_browser_mobile_sessions_percentage(&mut self, value: f64) -> &mut Self { + self.rum_browser_mobile_sessions_percentage = Some(value); + self + } + + pub fn with_rum_browser_mobile_sessions_usage(&mut self, value: f64) -> &mut Self { + self.rum_browser_mobile_sessions_usage = Some(value); + self + } + + pub fn with_rum_replay_sessions_percentage(&mut self, value: f64) -> &mut Self { + self.rum_replay_sessions_percentage = Some(value); + self + } + + pub fn with_rum_replay_sessions_usage(&mut self, value: f64) -> &mut Self { + self.rum_replay_sessions_usage = Some(value); + self + } + + pub fn with_sds_scanned_bytes_percentage(&mut self, value: f64) -> &mut Self { + self.sds_scanned_bytes_percentage = Some(value); + self + } + + pub fn with_sds_scanned_bytes_usage(&mut self, value: f64) -> &mut Self { + self.sds_scanned_bytes_usage = Some(value); + self + } + + pub fn with_serverless_apps_percentage(&mut self, value: f64) -> &mut Self { + self.serverless_apps_percentage = Some(value); + self + } + + pub fn with_serverless_apps_usage(&mut self, value: f64) -> &mut Self { + self.serverless_apps_usage = Some(value); + self + } + + pub fn with_siem_ingested_bytes_percentage(&mut self, value: f64) -> &mut Self { + self.siem_ingested_bytes_percentage = Some(value); + self + } + + pub fn with_siem_ingested_bytes_usage(&mut self, value: f64) -> &mut Self { + self.siem_ingested_bytes_usage = Some(value); + self + } + + pub fn with_snmp_percentage(&mut self, value: f64) -> &mut Self { + self.snmp_percentage = Some(value); + self + } + + pub fn with_snmp_usage(&mut self, value: f64) -> &mut Self { + self.snmp_usage = Some(value); + self + } + + pub fn with_universal_service_monitoring_percentage(&mut self, value: f64) -> &mut Self { + self.universal_service_monitoring_percentage = Some(value); + self + } + + pub fn with_universal_service_monitoring_usage(&mut self, value: f64) -> &mut Self { + self.universal_service_monitoring_usage = Some(value); + self + } + + pub fn with_vuln_management_hosts_percentage(&mut self, value: f64) -> &mut Self { + self.vuln_management_hosts_percentage = Some(value); + self + } + + pub fn with_vuln_management_hosts_usage(&mut self, value: f64) -> &mut Self { + self.vuln_management_hosts_usage = Some(value); + self + } } impl Default for MonthlyUsageAttributionValues { fn default() -> Self { diff --git a/src/datadogV1/model/model_note_widget_definition.rs b/src/datadogV1/model/model_note_widget_definition.rs index a70338a95..261e46866 100644 --- a/src/datadogV1/model/model_note_widget_definition.rs +++ b/src/datadogV1/model/model_note_widget_definition.rs @@ -58,4 +58,50 @@ impl NoteWidgetDefinition { vertical_align: None, } } + + pub fn with_background_color(&mut self, value: String) -> &mut Self { + self.background_color = Some(value); + self + } + + pub fn with_font_size(&mut self, value: String) -> &mut Self { + self.font_size = Some(value); + self + } + + pub fn with_has_padding(&mut self, value: bool) -> &mut Self { + self.has_padding = Some(value); + self + } + + pub fn with_show_tick(&mut self, value: bool) -> &mut Self { + self.show_tick = Some(value); + self + } + + pub fn with_text_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.text_align = Some(value); + self + } + + pub fn with_tick_edge(&mut self, value: crate::datadogV1::model::WidgetTickEdge) -> &mut Self { + self.tick_edge = Some(value); + self + } + + pub fn with_tick_pos(&mut self, value: String) -> &mut Self { + self.tick_pos = Some(value); + self + } + + pub fn with_vertical_align( + &mut self, + value: crate::datadogV1::model::WidgetVerticalAlign, + ) -> &mut Self { + self.vertical_align = Some(value); + self + } } diff --git a/src/datadogV1/model/model_notebook_absolute_time.rs b/src/datadogV1/model/model_notebook_absolute_time.rs index ca4dac2e5..a39e01045 100644 --- a/src/datadogV1/model/model_notebook_absolute_time.rs +++ b/src/datadogV1/model/model_notebook_absolute_time.rs @@ -27,4 +27,9 @@ impl NotebookAbsoluteTime { start, } } + + pub fn with_live(&mut self, value: bool) -> &mut Self { + self.live = Some(value); + self + } } diff --git a/src/datadogV1/model/model_notebook_author.rs b/src/datadogV1/model/model_notebook_author.rs index 8c0768c21..81e076e64 100644 --- a/src/datadogV1/model/model_notebook_author.rs +++ b/src/datadogV1/model/model_notebook_author.rs @@ -51,6 +51,51 @@ impl NotebookAuthor { verified: None, } } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_disabled(&mut self, value: bool) -> &mut Self { + self.disabled = Some(value); + self + } + + pub fn with_email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn with_handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + self + } + + pub fn with_icon(&mut self, value: String) -> &mut Self { + self.icon = Some(value); + self + } + + pub fn with_name(&mut self, value: Option) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_title(&mut self, value: Option) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_verified(&mut self, value: bool) -> &mut Self { + self.verified = Some(value); + self + } } impl Default for NotebookAuthor { fn default() -> Self { diff --git a/src/datadogV1/model/model_notebook_cell_create_request.rs b/src/datadogV1/model/model_notebook_cell_create_request.rs index 3711ef674..415c27ce0 100644 --- a/src/datadogV1/model/model_notebook_cell_create_request.rs +++ b/src/datadogV1/model/model_notebook_cell_create_request.rs @@ -11,7 +11,7 @@ pub struct NotebookCellCreateRequest { /// The attributes of a notebook cell in create cell request. Valid cell types are `markdown`, `timeseries`, `toplist`, `heatmap`, `distribution`, /// `log_stream`. [More information on each graph visualization type.]() #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV1::model::NotebookCellCreateRequestAttributes, /// Type of the Notebook Cell resource. #[serde(rename = "type")] pub type_: crate::datadogV1::model::NotebookCellResourceType, @@ -19,7 +19,7 @@ pub struct NotebookCellCreateRequest { impl NotebookCellCreateRequest { pub fn new( - attributes: Box, + attributes: crate::datadogV1::model::NotebookCellCreateRequestAttributes, type_: crate::datadogV1::model::NotebookCellResourceType, ) -> NotebookCellCreateRequest { NotebookCellCreateRequest { attributes, type_ } diff --git a/src/datadogV1/model/model_notebook_cell_create_request_attributes.rs b/src/datadogV1/model/model_notebook_cell_create_request_attributes.rs index cd31dbaa3..b9e5e51f4 100644 --- a/src/datadogV1/model/model_notebook_cell_create_request_attributes.rs +++ b/src/datadogV1/model/model_notebook_cell_create_request_attributes.rs @@ -8,14 +8,10 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum NotebookCellCreateRequestAttributes { - NotebookMarkdownCellAttributes(Box), - NotebookTimeseriesCellAttributes( - Box, - ), - NotebookToplistCellAttributes(Box), - NotebookHeatMapCellAttributes(Box), - NotebookDistributionCellAttributes( - Box, - ), - NotebookLogStreamCellAttributes(Box), + NotebookMarkdownCellAttributes(crate::datadogV1::model::NotebookMarkdownCellAttributes), + NotebookTimeseriesCellAttributes(crate::datadogV1::model::NotebookTimeseriesCellAttributes), + NotebookToplistCellAttributes(crate::datadogV1::model::NotebookToplistCellAttributes), + NotebookHeatMapCellAttributes(crate::datadogV1::model::NotebookHeatMapCellAttributes), + NotebookDistributionCellAttributes(crate::datadogV1::model::NotebookDistributionCellAttributes), + NotebookLogStreamCellAttributes(crate::datadogV1::model::NotebookLogStreamCellAttributes), } diff --git a/src/datadogV1/model/model_notebook_cell_response.rs b/src/datadogV1/model/model_notebook_cell_response.rs index 97355fa6c..0dd0f5f04 100644 --- a/src/datadogV1/model/model_notebook_cell_response.rs +++ b/src/datadogV1/model/model_notebook_cell_response.rs @@ -11,7 +11,7 @@ pub struct NotebookCellResponse { /// The attributes of a notebook cell response. Valid cell types are `markdown`, `timeseries`, `toplist`, `heatmap`, `distribution`, /// `log_stream`. [More information on each graph visualization type.]() #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV1::model::NotebookCellResponseAttributes, /// Notebook cell ID. #[serde(rename = "id")] pub id: String, @@ -22,7 +22,7 @@ pub struct NotebookCellResponse { impl NotebookCellResponse { pub fn new( - attributes: Box, + attributes: crate::datadogV1::model::NotebookCellResponseAttributes, id: String, type_: crate::datadogV1::model::NotebookCellResourceType, ) -> NotebookCellResponse { diff --git a/src/datadogV1/model/model_notebook_cell_response_attributes.rs b/src/datadogV1/model/model_notebook_cell_response_attributes.rs index 039afe89b..eed9107a0 100644 --- a/src/datadogV1/model/model_notebook_cell_response_attributes.rs +++ b/src/datadogV1/model/model_notebook_cell_response_attributes.rs @@ -8,14 +8,10 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum NotebookCellResponseAttributes { - NotebookMarkdownCellAttributes(Box), - NotebookTimeseriesCellAttributes( - Box, - ), - NotebookToplistCellAttributes(Box), - NotebookHeatMapCellAttributes(Box), - NotebookDistributionCellAttributes( - Box, - ), - NotebookLogStreamCellAttributes(Box), + NotebookMarkdownCellAttributes(crate::datadogV1::model::NotebookMarkdownCellAttributes), + NotebookTimeseriesCellAttributes(crate::datadogV1::model::NotebookTimeseriesCellAttributes), + NotebookToplistCellAttributes(crate::datadogV1::model::NotebookToplistCellAttributes), + NotebookHeatMapCellAttributes(crate::datadogV1::model::NotebookHeatMapCellAttributes), + NotebookDistributionCellAttributes(crate::datadogV1::model::NotebookDistributionCellAttributes), + NotebookLogStreamCellAttributes(crate::datadogV1::model::NotebookLogStreamCellAttributes), } diff --git a/src/datadogV1/model/model_notebook_cell_time.rs b/src/datadogV1/model/model_notebook_cell_time.rs index 28c3db740..518369a88 100644 --- a/src/datadogV1/model/model_notebook_cell_time.rs +++ b/src/datadogV1/model/model_notebook_cell_time.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum NotebookCellTime { - NotebookRelativeTime(Box), - NotebookAbsoluteTime(Box), + NotebookRelativeTime(crate::datadogV1::model::NotebookRelativeTime), + NotebookAbsoluteTime(crate::datadogV1::model::NotebookAbsoluteTime), } diff --git a/src/datadogV1/model/model_notebook_cell_update_request.rs b/src/datadogV1/model/model_notebook_cell_update_request.rs index b894963c2..282afd69a 100644 --- a/src/datadogV1/model/model_notebook_cell_update_request.rs +++ b/src/datadogV1/model/model_notebook_cell_update_request.rs @@ -11,7 +11,7 @@ pub struct NotebookCellUpdateRequest { /// The attributes of a notebook cell in update cell request. Valid cell types are `markdown`, `timeseries`, `toplist`, `heatmap`, `distribution`, /// `log_stream`. [More information on each graph visualization type.]() #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV1::model::NotebookCellUpdateRequestAttributes, /// Notebook cell ID. #[serde(rename = "id")] pub id: String, @@ -22,7 +22,7 @@ pub struct NotebookCellUpdateRequest { impl NotebookCellUpdateRequest { pub fn new( - attributes: Box, + attributes: crate::datadogV1::model::NotebookCellUpdateRequestAttributes, id: String, type_: crate::datadogV1::model::NotebookCellResourceType, ) -> NotebookCellUpdateRequest { diff --git a/src/datadogV1/model/model_notebook_cell_update_request_attributes.rs b/src/datadogV1/model/model_notebook_cell_update_request_attributes.rs index 8fea453e3..715f2dabd 100644 --- a/src/datadogV1/model/model_notebook_cell_update_request_attributes.rs +++ b/src/datadogV1/model/model_notebook_cell_update_request_attributes.rs @@ -8,14 +8,10 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum NotebookCellUpdateRequestAttributes { - NotebookMarkdownCellAttributes(Box), - NotebookTimeseriesCellAttributes( - Box, - ), - NotebookToplistCellAttributes(Box), - NotebookHeatMapCellAttributes(Box), - NotebookDistributionCellAttributes( - Box, - ), - NotebookLogStreamCellAttributes(Box), + NotebookMarkdownCellAttributes(crate::datadogV1::model::NotebookMarkdownCellAttributes), + NotebookTimeseriesCellAttributes(crate::datadogV1::model::NotebookTimeseriesCellAttributes), + NotebookToplistCellAttributes(crate::datadogV1::model::NotebookToplistCellAttributes), + NotebookHeatMapCellAttributes(crate::datadogV1::model::NotebookHeatMapCellAttributes), + NotebookDistributionCellAttributes(crate::datadogV1::model::NotebookDistributionCellAttributes), + NotebookLogStreamCellAttributes(crate::datadogV1::model::NotebookLogStreamCellAttributes), } diff --git a/src/datadogV1/model/model_notebook_create_data.rs b/src/datadogV1/model/model_notebook_create_data.rs index 2f508cd97..a7a1f82ef 100644 --- a/src/datadogV1/model/model_notebook_create_data.rs +++ b/src/datadogV1/model/model_notebook_create_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct NotebookCreateData { /// The data attributes of a notebook. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV1::model::NotebookCreateDataAttributes, /// Type of the Notebook resource. #[serde(rename = "type")] pub type_: crate::datadogV1::model::NotebookResourceType, @@ -18,7 +18,7 @@ pub struct NotebookCreateData { impl NotebookCreateData { pub fn new( - attributes: Box, + attributes: crate::datadogV1::model::NotebookCreateDataAttributes, type_: crate::datadogV1::model::NotebookResourceType, ) -> NotebookCreateData { NotebookCreateData { attributes, type_ } diff --git a/src/datadogV1/model/model_notebook_create_data_attributes.rs b/src/datadogV1/model/model_notebook_create_data_attributes.rs index 1936729fb..9bcde18b7 100644 --- a/src/datadogV1/model/model_notebook_create_data_attributes.rs +++ b/src/datadogV1/model/model_notebook_create_data_attributes.rs @@ -13,7 +13,7 @@ pub struct NotebookCreateDataAttributes { pub cells: Vec, /// Metadata associated with the notebook. #[serde(rename = "metadata")] - pub metadata: Option>, + pub metadata: Option, /// The name of the notebook. #[serde(rename = "name")] pub name: String, @@ -22,14 +22,14 @@ pub struct NotebookCreateDataAttributes { pub status: Option, /// Notebook global timeframe. #[serde(rename = "time")] - pub time: Box, + pub time: crate::datadogV1::model::NotebookGlobalTime, } impl NotebookCreateDataAttributes { pub fn new( cells: Vec, name: String, - time: Box, + time: crate::datadogV1::model::NotebookGlobalTime, ) -> NotebookCreateDataAttributes { NotebookCreateDataAttributes { cells, @@ -39,4 +39,14 @@ impl NotebookCreateDataAttributes { time, } } + + pub fn with_metadata(&mut self, value: crate::datadogV1::model::NotebookMetadata) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn with_status(&mut self, value: crate::datadogV1::model::NotebookStatus) -> &mut Self { + self.status = Some(value); + self + } } diff --git a/src/datadogV1/model/model_notebook_create_request.rs b/src/datadogV1/model/model_notebook_create_request.rs index 81e46aa6e..193c97ab3 100644 --- a/src/datadogV1/model/model_notebook_create_request.rs +++ b/src/datadogV1/model/model_notebook_create_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct NotebookCreateRequest { /// The data for a notebook create request. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV1::model::NotebookCreateData, } impl NotebookCreateRequest { - pub fn new(data: Box) -> NotebookCreateRequest { + pub fn new(data: crate::datadogV1::model::NotebookCreateData) -> NotebookCreateRequest { NotebookCreateRequest { data } } } diff --git a/src/datadogV1/model/model_notebook_distribution_cell_attributes.rs b/src/datadogV1/model/model_notebook_distribution_cell_attributes.rs index 7dc17b300..00e8d58df 100644 --- a/src/datadogV1/model/model_notebook_distribution_cell_attributes.rs +++ b/src/datadogV1/model/model_notebook_distribution_cell_attributes.rs @@ -12,21 +12,21 @@ pub struct NotebookDistributionCellAttributes { /// aggregated across one or several tags, such as hosts. /// Unlike the heat map, a distribution graph’s x-axis is quantity rather than time. #[serde(rename = "definition")] - pub definition: Box, + pub definition: crate::datadogV1::model::DistributionWidgetDefinition, /// The size of the graph. #[serde(rename = "graph_size")] pub graph_size: Option, /// Object describing how to split the graph to display multiple visualizations per request. #[serde(rename = "split_by")] - pub split_by: Option>, + pub split_by: Option, /// Timeframe for the notebook cell. When 'null', the notebook global time is used. #[serde(rename = "time", default, with = "::serde_with::rust::double_option")] - pub time: Option>>, + pub time: Option>, } impl NotebookDistributionCellAttributes { pub fn new( - definition: Box, + definition: crate::datadogV1::model::DistributionWidgetDefinition, ) -> NotebookDistributionCellAttributes { NotebookDistributionCellAttributes { definition, @@ -35,4 +35,25 @@ impl NotebookDistributionCellAttributes { time: None, } } + + pub fn with_graph_size( + &mut self, + value: crate::datadogV1::model::NotebookGraphSize, + ) -> &mut Self { + self.graph_size = Some(value); + self + } + + pub fn with_split_by(&mut self, value: crate::datadogV1::model::NotebookSplitBy) -> &mut Self { + self.split_by = Some(value); + self + } + + pub fn with_time( + &mut self, + value: Option, + ) -> &mut Self { + self.time = Some(value); + self + } } diff --git a/src/datadogV1/model/model_notebook_global_time.rs b/src/datadogV1/model/model_notebook_global_time.rs index e6cc05696..2fd3194d3 100644 --- a/src/datadogV1/model/model_notebook_global_time.rs +++ b/src/datadogV1/model/model_notebook_global_time.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum NotebookGlobalTime { - NotebookRelativeTime(Box), - NotebookAbsoluteTime(Box), + NotebookRelativeTime(crate::datadogV1::model::NotebookRelativeTime), + NotebookAbsoluteTime(crate::datadogV1::model::NotebookAbsoluteTime), } diff --git a/src/datadogV1/model/model_notebook_heat_map_cell_attributes.rs b/src/datadogV1/model/model_notebook_heat_map_cell_attributes.rs index 1cdf0bed5..034619566 100644 --- a/src/datadogV1/model/model_notebook_heat_map_cell_attributes.rs +++ b/src/datadogV1/model/model_notebook_heat_map_cell_attributes.rs @@ -10,21 +10,21 @@ use serde_with::skip_serializing_none; pub struct NotebookHeatMapCellAttributes { /// The heat map visualization shows metrics aggregated across many tags, such as hosts. The more hosts that have a particular value, the darker that square is. #[serde(rename = "definition")] - pub definition: Box, + pub definition: crate::datadogV1::model::HeatMapWidgetDefinition, /// The size of the graph. #[serde(rename = "graph_size")] pub graph_size: Option, /// Object describing how to split the graph to display multiple visualizations per request. #[serde(rename = "split_by")] - pub split_by: Option>, + pub split_by: Option, /// Timeframe for the notebook cell. When 'null', the notebook global time is used. #[serde(rename = "time", default, with = "::serde_with::rust::double_option")] - pub time: Option>>, + pub time: Option>, } impl NotebookHeatMapCellAttributes { pub fn new( - definition: Box, + definition: crate::datadogV1::model::HeatMapWidgetDefinition, ) -> NotebookHeatMapCellAttributes { NotebookHeatMapCellAttributes { definition, @@ -33,4 +33,25 @@ impl NotebookHeatMapCellAttributes { time: None, } } + + pub fn with_graph_size( + &mut self, + value: crate::datadogV1::model::NotebookGraphSize, + ) -> &mut Self { + self.graph_size = Some(value); + self + } + + pub fn with_split_by(&mut self, value: crate::datadogV1::model::NotebookSplitBy) -> &mut Self { + self.split_by = Some(value); + self + } + + pub fn with_time( + &mut self, + value: Option, + ) -> &mut Self { + self.time = Some(value); + self + } } diff --git a/src/datadogV1/model/model_notebook_log_stream_cell_attributes.rs b/src/datadogV1/model/model_notebook_log_stream_cell_attributes.rs index b506a5e2b..2d755afd4 100644 --- a/src/datadogV1/model/model_notebook_log_stream_cell_attributes.rs +++ b/src/datadogV1/model/model_notebook_log_stream_cell_attributes.rs @@ -10,18 +10,18 @@ use serde_with::skip_serializing_none; pub struct NotebookLogStreamCellAttributes { /// The Log Stream displays a log flow matching the defined query. Only available on FREE layout dashboards. #[serde(rename = "definition")] - pub definition: Box, + pub definition: crate::datadogV1::model::LogStreamWidgetDefinition, /// The size of the graph. #[serde(rename = "graph_size")] pub graph_size: Option, /// Timeframe for the notebook cell. When 'null', the notebook global time is used. #[serde(rename = "time", default, with = "::serde_with::rust::double_option")] - pub time: Option>>, + pub time: Option>, } impl NotebookLogStreamCellAttributes { pub fn new( - definition: Box, + definition: crate::datadogV1::model::LogStreamWidgetDefinition, ) -> NotebookLogStreamCellAttributes { NotebookLogStreamCellAttributes { definition, @@ -29,4 +29,20 @@ impl NotebookLogStreamCellAttributes { time: None, } } + + pub fn with_graph_size( + &mut self, + value: crate::datadogV1::model::NotebookGraphSize, + ) -> &mut Self { + self.graph_size = Some(value); + self + } + + pub fn with_time( + &mut self, + value: Option, + ) -> &mut Self { + self.time = Some(value); + self + } } diff --git a/src/datadogV1/model/model_notebook_markdown_cell_attributes.rs b/src/datadogV1/model/model_notebook_markdown_cell_attributes.rs index 974f5dab9..da1c99f2e 100644 --- a/src/datadogV1/model/model_notebook_markdown_cell_attributes.rs +++ b/src/datadogV1/model/model_notebook_markdown_cell_attributes.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct NotebookMarkdownCellAttributes { /// Text in a notebook is formatted with [Markdown](), which enables the use of headings, subheadings, links, images, lists, and code blocks. #[serde(rename = "definition")] - pub definition: Box, + pub definition: crate::datadogV1::model::NotebookMarkdownCellDefinition, } impl NotebookMarkdownCellAttributes { pub fn new( - definition: Box, + definition: crate::datadogV1::model::NotebookMarkdownCellDefinition, ) -> NotebookMarkdownCellAttributes { NotebookMarkdownCellAttributes { definition } } diff --git a/src/datadogV1/model/model_notebook_metadata.rs b/src/datadogV1/model/model_notebook_metadata.rs index ee311dac3..630f5f378 100644 --- a/src/datadogV1/model/model_notebook_metadata.rs +++ b/src/datadogV1/model/model_notebook_metadata.rs @@ -27,6 +27,24 @@ impl NotebookMetadata { type_: None, } } + + pub fn with_is_template(&mut self, value: bool) -> &mut Self { + self.is_template = Some(value); + self + } + + pub fn with_take_snapshots(&mut self, value: bool) -> &mut Self { + self.take_snapshots = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: Option, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for NotebookMetadata { fn default() -> Self { diff --git a/src/datadogV1/model/model_notebook_response.rs b/src/datadogV1/model/model_notebook_response.rs index 0295082f3..344dbe1c0 100644 --- a/src/datadogV1/model/model_notebook_response.rs +++ b/src/datadogV1/model/model_notebook_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct NotebookResponse { /// The data for a notebook. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl NotebookResponse { pub fn new() -> NotebookResponse { NotebookResponse { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV1::model::NotebookResponseData) -> &mut Self { + self.data = Some(value); + self + } } impl Default for NotebookResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_notebook_response_data.rs b/src/datadogV1/model/model_notebook_response_data.rs index 8513feb09..ac38723b1 100644 --- a/src/datadogV1/model/model_notebook_response_data.rs +++ b/src/datadogV1/model/model_notebook_response_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct NotebookResponseData { /// The attributes of a notebook. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV1::model::NotebookResponseDataAttributes, /// Unique notebook ID, assigned when you create the notebook. #[serde(rename = "id")] pub id: i64, @@ -21,7 +21,7 @@ pub struct NotebookResponseData { impl NotebookResponseData { pub fn new( - attributes: Box, + attributes: crate::datadogV1::model::NotebookResponseDataAttributes, id: i64, type_: crate::datadogV1::model::NotebookResourceType, ) -> NotebookResponseData { diff --git a/src/datadogV1/model/model_notebook_response_data_attributes.rs b/src/datadogV1/model/model_notebook_response_data_attributes.rs index cb4388f1e..041e0921d 100644 --- a/src/datadogV1/model/model_notebook_response_data_attributes.rs +++ b/src/datadogV1/model/model_notebook_response_data_attributes.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct NotebookResponseDataAttributes { /// Attributes of user object returned by the API. #[serde(rename = "author")] - pub author: Option>, + pub author: Option, /// List of cells to display in the notebook. #[serde(rename = "cells")] pub cells: Vec, @@ -19,7 +19,7 @@ pub struct NotebookResponseDataAttributes { pub created: Option, /// Metadata associated with the notebook. #[serde(rename = "metadata")] - pub metadata: Option>, + pub metadata: Option, /// UTC time stamp for when the notebook was last modified. #[serde(rename = "modified")] pub modified: Option, @@ -31,14 +31,14 @@ pub struct NotebookResponseDataAttributes { pub status: Option, /// Notebook global timeframe. #[serde(rename = "time")] - pub time: Box, + pub time: crate::datadogV1::model::NotebookGlobalTime, } impl NotebookResponseDataAttributes { pub fn new( cells: Vec, name: String, - time: Box, + time: crate::datadogV1::model::NotebookGlobalTime, ) -> NotebookResponseDataAttributes { NotebookResponseDataAttributes { author: None, @@ -51,4 +51,29 @@ impl NotebookResponseDataAttributes { time, } } + + pub fn with_author(&mut self, value: crate::datadogV1::model::NotebookAuthor) -> &mut Self { + self.author = Some(value); + self + } + + pub fn with_created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn with_metadata(&mut self, value: crate::datadogV1::model::NotebookMetadata) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn with_modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn with_status(&mut self, value: crate::datadogV1::model::NotebookStatus) -> &mut Self { + self.status = Some(value); + self + } } diff --git a/src/datadogV1/model/model_notebook_timeseries_cell_attributes.rs b/src/datadogV1/model/model_notebook_timeseries_cell_attributes.rs index 3927cfcb4..3024682bf 100644 --- a/src/datadogV1/model/model_notebook_timeseries_cell_attributes.rs +++ b/src/datadogV1/model/model_notebook_timeseries_cell_attributes.rs @@ -10,21 +10,21 @@ use serde_with::skip_serializing_none; pub struct NotebookTimeseriesCellAttributes { /// The timeseries visualization allows you to display the evolution of one or more metrics, log events, or Indexed Spans over time. #[serde(rename = "definition")] - pub definition: Box, + pub definition: crate::datadogV1::model::TimeseriesWidgetDefinition, /// The size of the graph. #[serde(rename = "graph_size")] pub graph_size: Option, /// Object describing how to split the graph to display multiple visualizations per request. #[serde(rename = "split_by")] - pub split_by: Option>, + pub split_by: Option, /// Timeframe for the notebook cell. When 'null', the notebook global time is used. #[serde(rename = "time", default, with = "::serde_with::rust::double_option")] - pub time: Option>>, + pub time: Option>, } impl NotebookTimeseriesCellAttributes { pub fn new( - definition: Box, + definition: crate::datadogV1::model::TimeseriesWidgetDefinition, ) -> NotebookTimeseriesCellAttributes { NotebookTimeseriesCellAttributes { definition, @@ -33,4 +33,25 @@ impl NotebookTimeseriesCellAttributes { time: None, } } + + pub fn with_graph_size( + &mut self, + value: crate::datadogV1::model::NotebookGraphSize, + ) -> &mut Self { + self.graph_size = Some(value); + self + } + + pub fn with_split_by(&mut self, value: crate::datadogV1::model::NotebookSplitBy) -> &mut Self { + self.split_by = Some(value); + self + } + + pub fn with_time( + &mut self, + value: Option, + ) -> &mut Self { + self.time = Some(value); + self + } } diff --git a/src/datadogV1/model/model_notebook_toplist_cell_attributes.rs b/src/datadogV1/model/model_notebook_toplist_cell_attributes.rs index e8d5043bb..f072ab1e1 100644 --- a/src/datadogV1/model/model_notebook_toplist_cell_attributes.rs +++ b/src/datadogV1/model/model_notebook_toplist_cell_attributes.rs @@ -10,21 +10,21 @@ use serde_with::skip_serializing_none; pub struct NotebookToplistCellAttributes { /// The top list visualization enables you to display a list of Tag value like hostname or service with the most or least of any metric value, such as highest consumers of CPU, hosts with the least disk space, etc. #[serde(rename = "definition")] - pub definition: Box, + pub definition: crate::datadogV1::model::ToplistWidgetDefinition, /// The size of the graph. #[serde(rename = "graph_size")] pub graph_size: Option, /// Object describing how to split the graph to display multiple visualizations per request. #[serde(rename = "split_by")] - pub split_by: Option>, + pub split_by: Option, /// Timeframe for the notebook cell. When 'null', the notebook global time is used. #[serde(rename = "time", default, with = "::serde_with::rust::double_option")] - pub time: Option>>, + pub time: Option>, } impl NotebookToplistCellAttributes { pub fn new( - definition: Box, + definition: crate::datadogV1::model::ToplistWidgetDefinition, ) -> NotebookToplistCellAttributes { NotebookToplistCellAttributes { definition, @@ -33,4 +33,25 @@ impl NotebookToplistCellAttributes { time: None, } } + + pub fn with_graph_size( + &mut self, + value: crate::datadogV1::model::NotebookGraphSize, + ) -> &mut Self { + self.graph_size = Some(value); + self + } + + pub fn with_split_by(&mut self, value: crate::datadogV1::model::NotebookSplitBy) -> &mut Self { + self.split_by = Some(value); + self + } + + pub fn with_time( + &mut self, + value: Option, + ) -> &mut Self { + self.time = Some(value); + self + } } diff --git a/src/datadogV1/model/model_notebook_update_cell.rs b/src/datadogV1/model/model_notebook_update_cell.rs index 5bc570d61..67d6f75bf 100644 --- a/src/datadogV1/model/model_notebook_update_cell.rs +++ b/src/datadogV1/model/model_notebook_update_cell.rs @@ -8,6 +8,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum NotebookUpdateCell { - NotebookCellCreateRequest(Box), - NotebookCellUpdateRequest(Box), + NotebookCellCreateRequest(crate::datadogV1::model::NotebookCellCreateRequest), + NotebookCellUpdateRequest(crate::datadogV1::model::NotebookCellUpdateRequest), } diff --git a/src/datadogV1/model/model_notebook_update_data.rs b/src/datadogV1/model/model_notebook_update_data.rs index ca5ce4577..c0813de7d 100644 --- a/src/datadogV1/model/model_notebook_update_data.rs +++ b/src/datadogV1/model/model_notebook_update_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct NotebookUpdateData { /// The data attributes of a notebook. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV1::model::NotebookUpdateDataAttributes, /// Type of the Notebook resource. #[serde(rename = "type")] pub type_: crate::datadogV1::model::NotebookResourceType, @@ -18,7 +18,7 @@ pub struct NotebookUpdateData { impl NotebookUpdateData { pub fn new( - attributes: Box, + attributes: crate::datadogV1::model::NotebookUpdateDataAttributes, type_: crate::datadogV1::model::NotebookResourceType, ) -> NotebookUpdateData { NotebookUpdateData { attributes, type_ } diff --git a/src/datadogV1/model/model_notebook_update_data_attributes.rs b/src/datadogV1/model/model_notebook_update_data_attributes.rs index 89eb2c104..5567b47fc 100644 --- a/src/datadogV1/model/model_notebook_update_data_attributes.rs +++ b/src/datadogV1/model/model_notebook_update_data_attributes.rs @@ -13,7 +13,7 @@ pub struct NotebookUpdateDataAttributes { pub cells: Vec, /// Metadata associated with the notebook. #[serde(rename = "metadata")] - pub metadata: Option>, + pub metadata: Option, /// The name of the notebook. #[serde(rename = "name")] pub name: String, @@ -22,14 +22,14 @@ pub struct NotebookUpdateDataAttributes { pub status: Option, /// Notebook global timeframe. #[serde(rename = "time")] - pub time: Box, + pub time: crate::datadogV1::model::NotebookGlobalTime, } impl NotebookUpdateDataAttributes { pub fn new( cells: Vec, name: String, - time: Box, + time: crate::datadogV1::model::NotebookGlobalTime, ) -> NotebookUpdateDataAttributes { NotebookUpdateDataAttributes { cells, @@ -39,4 +39,14 @@ impl NotebookUpdateDataAttributes { time, } } + + pub fn with_metadata(&mut self, value: crate::datadogV1::model::NotebookMetadata) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn with_status(&mut self, value: crate::datadogV1::model::NotebookStatus) -> &mut Self { + self.status = Some(value); + self + } } diff --git a/src/datadogV1/model/model_notebook_update_request.rs b/src/datadogV1/model/model_notebook_update_request.rs index 820a036d7..a940ab1a2 100644 --- a/src/datadogV1/model/model_notebook_update_request.rs +++ b/src/datadogV1/model/model_notebook_update_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct NotebookUpdateRequest { /// The data for a notebook update request. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV1::model::NotebookUpdateData, } impl NotebookUpdateRequest { - pub fn new(data: Box) -> NotebookUpdateRequest { + pub fn new(data: crate::datadogV1::model::NotebookUpdateData) -> NotebookUpdateRequest { NotebookUpdateRequest { data } } } diff --git a/src/datadogV1/model/model_notebooks_response.rs b/src/datadogV1/model/model_notebooks_response.rs index 1b8bdc2b3..6518956b0 100644 --- a/src/datadogV1/model/model_notebooks_response.rs +++ b/src/datadogV1/model/model_notebooks_response.rs @@ -13,7 +13,7 @@ pub struct NotebooksResponse { pub data: Option>, /// Searches metadata returned by the API. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl NotebooksResponse { @@ -23,6 +23,22 @@ impl NotebooksResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV1::model::NotebooksResponseMeta, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for NotebooksResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_notebooks_response_data.rs b/src/datadogV1/model/model_notebooks_response_data.rs index 76c97cf1b..f6db9a750 100644 --- a/src/datadogV1/model/model_notebooks_response_data.rs +++ b/src/datadogV1/model/model_notebooks_response_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct NotebooksResponseData { /// The attributes of a notebook in get all response. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV1::model::NotebooksResponseDataAttributes, /// Unique notebook ID, assigned when you create the notebook. #[serde(rename = "id")] pub id: i64, @@ -21,7 +21,7 @@ pub struct NotebooksResponseData { impl NotebooksResponseData { pub fn new( - attributes: Box, + attributes: crate::datadogV1::model::NotebooksResponseDataAttributes, id: i64, type_: crate::datadogV1::model::NotebookResourceType, ) -> NotebooksResponseData { diff --git a/src/datadogV1/model/model_notebooks_response_data_attributes.rs b/src/datadogV1/model/model_notebooks_response_data_attributes.rs index f72c8dc70..8116fed9a 100644 --- a/src/datadogV1/model/model_notebooks_response_data_attributes.rs +++ b/src/datadogV1/model/model_notebooks_response_data_attributes.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct NotebooksResponseDataAttributes { /// Attributes of user object returned by the API. #[serde(rename = "author")] - pub author: Option>, + pub author: Option, /// List of cells to display in the notebook. #[serde(rename = "cells")] pub cells: Option>, @@ -19,7 +19,7 @@ pub struct NotebooksResponseDataAttributes { pub created: Option, /// Metadata associated with the notebook. #[serde(rename = "metadata")] - pub metadata: Option>, + pub metadata: Option, /// UTC time stamp for when the notebook was last modified. #[serde(rename = "modified")] pub modified: Option, @@ -31,7 +31,7 @@ pub struct NotebooksResponseDataAttributes { pub status: Option, /// Notebook global timeframe. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, } impl NotebooksResponseDataAttributes { @@ -47,4 +47,42 @@ impl NotebooksResponseDataAttributes { time: None, } } + + pub fn with_author(&mut self, value: crate::datadogV1::model::NotebookAuthor) -> &mut Self { + self.author = Some(value); + self + } + + pub fn with_cells( + &mut self, + value: Vec, + ) -> &mut Self { + self.cells = Some(value); + self + } + + pub fn with_created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn with_metadata(&mut self, value: crate::datadogV1::model::NotebookMetadata) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn with_modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn with_status(&mut self, value: crate::datadogV1::model::NotebookStatus) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_time(&mut self, value: crate::datadogV1::model::NotebookGlobalTime) -> &mut Self { + self.time = Some(value); + self + } } diff --git a/src/datadogV1/model/model_notebooks_response_meta.rs b/src/datadogV1/model/model_notebooks_response_meta.rs index 768e4e4f5..fa1d5f76c 100644 --- a/src/datadogV1/model/model_notebooks_response_meta.rs +++ b/src/datadogV1/model/model_notebooks_response_meta.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct NotebooksResponseMeta { /// Pagination metadata returned by the API. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, } impl NotebooksResponseMeta { pub fn new() -> NotebooksResponseMeta { NotebooksResponseMeta { page: None } } + + pub fn with_page( + &mut self, + value: crate::datadogV1::model::NotebooksResponsePage, + ) -> &mut Self { + self.page = Some(value); + self + } } impl Default for NotebooksResponseMeta { fn default() -> Self { diff --git a/src/datadogV1/model/model_notebooks_response_page.rs b/src/datadogV1/model/model_notebooks_response_page.rs index f48e39de4..57d3c80a3 100644 --- a/src/datadogV1/model/model_notebooks_response_page.rs +++ b/src/datadogV1/model/model_notebooks_response_page.rs @@ -23,6 +23,16 @@ impl NotebooksResponsePage { total_filtered_count: None, } } + + pub fn with_total_count(&mut self, value: i64) -> &mut Self { + self.total_count = Some(value); + self + } + + pub fn with_total_filtered_count(&mut self, value: i64) -> &mut Self { + self.total_filtered_count = Some(value); + self + } } impl Default for NotebooksResponsePage { fn default() -> Self { diff --git a/src/datadogV1/model/model_org_downgraded_response.rs b/src/datadogV1/model/model_org_downgraded_response.rs index 12b602c73..271bb2c9c 100644 --- a/src/datadogV1/model/model_org_downgraded_response.rs +++ b/src/datadogV1/model/model_org_downgraded_response.rs @@ -17,6 +17,11 @@ impl OrgDowngradedResponse { pub fn new() -> OrgDowngradedResponse { OrgDowngradedResponse { message: None } } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } } impl Default for OrgDowngradedResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_organization.rs b/src/datadogV1/model/model_organization.rs index c612e73c7..19dbf2799 100644 --- a/src/datadogV1/model/model_organization.rs +++ b/src/datadogV1/model/model_organization.rs @@ -11,7 +11,7 @@ pub struct Organization { /// A JSON array of billing type. #[deprecated] #[serde(rename = "billing")] - pub billing: Option>, + pub billing: Option, /// Date of the organization creation. #[serde(rename = "created")] pub created: Option, @@ -26,11 +26,11 @@ pub struct Organization { pub public_id: Option, /// A JSON array of settings. #[serde(rename = "settings")] - pub settings: Option>, + pub settings: Option, /// Subscription definition. #[deprecated] #[serde(rename = "subscription")] - pub subscription: Option>, + pub subscription: Option, /// Only available for MSP customers. Allows child organizations to be created on a trial plan. #[serde(rename = "trial")] pub trial: Option, @@ -50,6 +50,63 @@ impl Organization { trial: None, } } + + #[allow(deprecated)] + pub fn with_billing( + &mut self, + value: crate::datadogV1::model::OrganizationBilling, + ) -> &mut Self { + self.billing = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_settings( + &mut self, + value: crate::datadogV1::model::OrganizationSettings, + ) -> &mut Self { + self.settings = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_subscription( + &mut self, + value: crate::datadogV1::model::OrganizationSubscription, + ) -> &mut Self { + self.subscription = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_trial(&mut self, value: bool) -> &mut Self { + self.trial = Some(value); + self + } } impl Default for Organization { fn default() -> Self { diff --git a/src/datadogV1/model/model_organization_billing.rs b/src/datadogV1/model/model_organization_billing.rs index e8293d233..597089de1 100644 --- a/src/datadogV1/model/model_organization_billing.rs +++ b/src/datadogV1/model/model_organization_billing.rs @@ -17,6 +17,11 @@ impl OrganizationBilling { pub fn new() -> OrganizationBilling { OrganizationBilling { type_: None } } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for OrganizationBilling { fn default() -> Self { diff --git a/src/datadogV1/model/model_organization_create_body.rs b/src/datadogV1/model/model_organization_create_body.rs index 52129c57b..648c2ceb2 100644 --- a/src/datadogV1/model/model_organization_create_body.rs +++ b/src/datadogV1/model/model_organization_create_body.rs @@ -11,14 +11,14 @@ pub struct OrganizationCreateBody { /// A JSON array of billing type. #[deprecated] #[serde(rename = "billing")] - pub billing: Option>, + pub billing: Option, /// The name of the new child-organization, limited to 32 characters. #[serde(rename = "name")] pub name: String, /// Subscription definition. #[deprecated] #[serde(rename = "subscription")] - pub subscription: Option>, + pub subscription: Option, } impl OrganizationCreateBody { @@ -30,4 +30,22 @@ impl OrganizationCreateBody { subscription: None, } } + + #[allow(deprecated)] + pub fn with_billing( + &mut self, + value: crate::datadogV1::model::OrganizationBilling, + ) -> &mut Self { + self.billing = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_subscription( + &mut self, + value: crate::datadogV1::model::OrganizationSubscription, + ) -> &mut Self { + self.subscription = Some(value); + self + } } diff --git a/src/datadogV1/model/model_organization_create_response.rs b/src/datadogV1/model/model_organization_create_response.rs index 3abc9382d..9f538a81d 100644 --- a/src/datadogV1/model/model_organization_create_response.rs +++ b/src/datadogV1/model/model_organization_create_response.rs @@ -10,16 +10,16 @@ use serde_with::skip_serializing_none; pub struct OrganizationCreateResponse { /// Datadog API key. #[serde(rename = "api_key")] - pub api_key: Option>, + pub api_key: Option, /// An application key with its associated metadata. #[serde(rename = "application_key")] - pub application_key: Option>, + pub application_key: Option, /// Create, edit, and manage organizations. #[serde(rename = "org")] - pub org: Option>, + pub org: Option, /// Create, edit, and disable users. #[serde(rename = "user")] - pub user: Option>, + pub user: Option, } impl OrganizationCreateResponse { @@ -31,6 +31,29 @@ impl OrganizationCreateResponse { user: None, } } + + pub fn with_api_key(&mut self, value: crate::datadogV1::model::ApiKey) -> &mut Self { + self.api_key = Some(value); + self + } + + pub fn with_application_key( + &mut self, + value: crate::datadogV1::model::ApplicationKey, + ) -> &mut Self { + self.application_key = Some(value); + self + } + + pub fn with_org(&mut self, value: crate::datadogV1::model::Organization) -> &mut Self { + self.org = Some(value); + self + } + + pub fn with_user(&mut self, value: crate::datadogV1::model::User) -> &mut Self { + self.user = Some(value); + self + } } impl Default for OrganizationCreateResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_organization_list_response.rs b/src/datadogV1/model/model_organization_list_response.rs index 8876f1900..d6cb27be9 100644 --- a/src/datadogV1/model/model_organization_list_response.rs +++ b/src/datadogV1/model/model_organization_list_response.rs @@ -17,6 +17,11 @@ impl OrganizationListResponse { pub fn new() -> OrganizationListResponse { OrganizationListResponse { orgs: None } } + + pub fn with_orgs(&mut self, value: Vec) -> &mut Self { + self.orgs = Some(value); + self + } } impl Default for OrganizationListResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_organization_response.rs b/src/datadogV1/model/model_organization_response.rs index ad41821ed..bdcbfacb3 100644 --- a/src/datadogV1/model/model_organization_response.rs +++ b/src/datadogV1/model/model_organization_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct OrganizationResponse { /// Create, edit, and manage organizations. #[serde(rename = "org")] - pub org: Option>, + pub org: Option, } impl OrganizationResponse { pub fn new() -> OrganizationResponse { OrganizationResponse { org: None } } + + pub fn with_org(&mut self, value: crate::datadogV1::model::Organization) -> &mut Self { + self.org = Some(value); + self + } } impl Default for OrganizationResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_organization_settings.rs b/src/datadogV1/model/model_organization_settings.rs index 7f8efae01..97ff3abd4 100644 --- a/src/datadogV1/model/model_organization_settings.rs +++ b/src/datadogV1/model/model_organization_settings.rs @@ -14,7 +14,7 @@ pub struct OrganizationSettings { /// Set the boolean property enabled to enable or disable single sign on with SAML. /// See the SAML documentation for more information about all SAML settings. #[serde(rename = "saml")] - pub saml: Option>, + pub saml: Option, /// The access role of the user. Options are **st** (standard user), **adm** (admin user), or **ro** (read-only user). #[serde( rename = "saml_autocreate_access_role", @@ -25,7 +25,7 @@ pub struct OrganizationSettings { /// Has two properties, `enabled` (boolean) and `domains`, which is a list of domains without the @ symbol. #[serde(rename = "saml_autocreate_users_domains")] pub saml_autocreate_users_domains: - Option>, + Option, /// Whether or not SAML can be enabled for this organization. #[serde(rename = "saml_can_be_enabled")] pub saml_can_be_enabled: Option, @@ -35,7 +35,7 @@ pub struct OrganizationSettings { /// Has one property enabled (boolean). #[serde(rename = "saml_idp_initiated_login")] pub saml_idp_initiated_login: - Option>, + Option, /// Whether or not a SAML identity provider metadata file was provided to the Datadog organization. #[serde(rename = "saml_idp_metadata_uploaded")] pub saml_idp_metadata_uploaded: Option, @@ -44,7 +44,7 @@ pub struct OrganizationSettings { pub saml_login_url: Option, /// Has one property enabled (boolean). #[serde(rename = "saml_strict_mode")] - pub saml_strict_mode: Option>, + pub saml_strict_mode: Option, } impl OrganizationSettings { @@ -62,6 +62,71 @@ impl OrganizationSettings { saml_strict_mode: None, } } + + pub fn with_private_widget_share(&mut self, value: bool) -> &mut Self { + self.private_widget_share = Some(value); + self + } + + pub fn with_saml( + &mut self, + value: crate::datadogV1::model::OrganizationSettingsSaml, + ) -> &mut Self { + self.saml = Some(value); + self + } + + pub fn with_saml_autocreate_access_role( + &mut self, + value: Option, + ) -> &mut Self { + self.saml_autocreate_access_role = Some(value); + self + } + + pub fn with_saml_autocreate_users_domains( + &mut self, + value: crate::datadogV1::model::OrganizationSettingsSamlAutocreateUsersDomains, + ) -> &mut Self { + self.saml_autocreate_users_domains = Some(value); + self + } + + pub fn with_saml_can_be_enabled(&mut self, value: bool) -> &mut Self { + self.saml_can_be_enabled = Some(value); + self + } + + pub fn with_saml_idp_endpoint(&mut self, value: String) -> &mut Self { + self.saml_idp_endpoint = Some(value); + self + } + + pub fn with_saml_idp_initiated_login( + &mut self, + value: crate::datadogV1::model::OrganizationSettingsSamlIdpInitiatedLogin, + ) -> &mut Self { + self.saml_idp_initiated_login = Some(value); + self + } + + pub fn with_saml_idp_metadata_uploaded(&mut self, value: bool) -> &mut Self { + self.saml_idp_metadata_uploaded = Some(value); + self + } + + pub fn with_saml_login_url(&mut self, value: String) -> &mut Self { + self.saml_login_url = Some(value); + self + } + + pub fn with_saml_strict_mode( + &mut self, + value: crate::datadogV1::model::OrganizationSettingsSamlStrictMode, + ) -> &mut Self { + self.saml_strict_mode = Some(value); + self + } } impl Default for OrganizationSettings { fn default() -> Self { diff --git a/src/datadogV1/model/model_organization_settings_saml.rs b/src/datadogV1/model/model_organization_settings_saml.rs index 9afe36a58..eb0f6588b 100644 --- a/src/datadogV1/model/model_organization_settings_saml.rs +++ b/src/datadogV1/model/model_organization_settings_saml.rs @@ -18,6 +18,11 @@ impl OrganizationSettingsSaml { pub fn new() -> OrganizationSettingsSaml { OrganizationSettingsSaml { enabled: None } } + + pub fn with_enabled(&mut self, value: bool) -> &mut Self { + self.enabled = Some(value); + self + } } impl Default for OrganizationSettingsSaml { fn default() -> Self { diff --git a/src/datadogV1/model/model_organization_settings_saml_autocreate_users_domains.rs b/src/datadogV1/model/model_organization_settings_saml_autocreate_users_domains.rs index 4acbf097b..045356b9c 100644 --- a/src/datadogV1/model/model_organization_settings_saml_autocreate_users_domains.rs +++ b/src/datadogV1/model/model_organization_settings_saml_autocreate_users_domains.rs @@ -23,6 +23,16 @@ impl OrganizationSettingsSamlAutocreateUsersDomains { enabled: None, } } + + pub fn with_domains(&mut self, value: Vec) -> &mut Self { + self.domains = Some(value); + self + } + + pub fn with_enabled(&mut self, value: bool) -> &mut Self { + self.enabled = Some(value); + self + } } impl Default for OrganizationSettingsSamlAutocreateUsersDomains { fn default() -> Self { diff --git a/src/datadogV1/model/model_organization_settings_saml_idp_initiated_login.rs b/src/datadogV1/model/model_organization_settings_saml_idp_initiated_login.rs index ae482f117..074a7ce3a 100644 --- a/src/datadogV1/model/model_organization_settings_saml_idp_initiated_login.rs +++ b/src/datadogV1/model/model_organization_settings_saml_idp_initiated_login.rs @@ -18,6 +18,11 @@ impl OrganizationSettingsSamlIdpInitiatedLogin { pub fn new() -> OrganizationSettingsSamlIdpInitiatedLogin { OrganizationSettingsSamlIdpInitiatedLogin { enabled: None } } + + pub fn with_enabled(&mut self, value: bool) -> &mut Self { + self.enabled = Some(value); + self + } } impl Default for OrganizationSettingsSamlIdpInitiatedLogin { fn default() -> Self { diff --git a/src/datadogV1/model/model_organization_settings_saml_strict_mode.rs b/src/datadogV1/model/model_organization_settings_saml_strict_mode.rs index f2008540f..5cafe3040 100644 --- a/src/datadogV1/model/model_organization_settings_saml_strict_mode.rs +++ b/src/datadogV1/model/model_organization_settings_saml_strict_mode.rs @@ -18,6 +18,11 @@ impl OrganizationSettingsSamlStrictMode { pub fn new() -> OrganizationSettingsSamlStrictMode { OrganizationSettingsSamlStrictMode { enabled: None } } + + pub fn with_enabled(&mut self, value: bool) -> &mut Self { + self.enabled = Some(value); + self + } } impl Default for OrganizationSettingsSamlStrictMode { fn default() -> Self { diff --git a/src/datadogV1/model/model_organization_subscription.rs b/src/datadogV1/model/model_organization_subscription.rs index 98ccf49b6..10d6f3bdc 100644 --- a/src/datadogV1/model/model_organization_subscription.rs +++ b/src/datadogV1/model/model_organization_subscription.rs @@ -17,6 +17,11 @@ impl OrganizationSubscription { pub fn new() -> OrganizationSubscription { OrganizationSubscription { type_: None } } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for OrganizationSubscription { fn default() -> Self { diff --git a/src/datadogV1/model/model_pagination.rs b/src/datadogV1/model/model_pagination.rs index dbbe59bca..70afe1080 100644 --- a/src/datadogV1/model/model_pagination.rs +++ b/src/datadogV1/model/model_pagination.rs @@ -23,6 +23,16 @@ impl Pagination { total_filtered_count: None, } } + + pub fn with_total_count(&mut self, value: i64) -> &mut Self { + self.total_count = Some(value); + self + } + + pub fn with_total_filtered_count(&mut self, value: i64) -> &mut Self { + self.total_filtered_count = Some(value); + self + } } impl Default for Pagination { fn default() -> Self { diff --git a/src/datadogV1/model/model_powerpack_template_variable_contents.rs b/src/datadogV1/model/model_powerpack_template_variable_contents.rs index 557b45bba..9ff5d51b7 100644 --- a/src/datadogV1/model/model_powerpack_template_variable_contents.rs +++ b/src/datadogV1/model/model_powerpack_template_variable_contents.rs @@ -27,4 +27,9 @@ impl PowerpackTemplateVariableContents { values, } } + + pub fn with_prefix(&mut self, value: String) -> &mut Self { + self.prefix = Some(value); + self + } } diff --git a/src/datadogV1/model/model_powerpack_template_variables.rs b/src/datadogV1/model/model_powerpack_template_variables.rs index 96341c295..4c1133259 100644 --- a/src/datadogV1/model/model_powerpack_template_variables.rs +++ b/src/datadogV1/model/model_powerpack_template_variables.rs @@ -25,6 +25,22 @@ impl PowerpackTemplateVariables { controlled_externally: None, } } + + pub fn with_controlled_by_powerpack( + &mut self, + value: Vec, + ) -> &mut Self { + self.controlled_by_powerpack = Some(value); + self + } + + pub fn with_controlled_externally( + &mut self, + value: Vec, + ) -> &mut Self { + self.controlled_externally = Some(value); + self + } } impl Default for PowerpackTemplateVariables { fn default() -> Self { diff --git a/src/datadogV1/model/model_powerpack_widget_definition.rs b/src/datadogV1/model/model_powerpack_widget_definition.rs index ace4febb7..e9d2fd591 100644 --- a/src/datadogV1/model/model_powerpack_widget_definition.rs +++ b/src/datadogV1/model/model_powerpack_widget_definition.rs @@ -22,7 +22,7 @@ pub struct PowerpackWidgetDefinition { pub show_title: Option, /// Powerpack template variables. #[serde(rename = "template_variables")] - pub template_variables: Option>, + pub template_variables: Option, /// Title of the widget. #[serde(rename = "title")] pub title: Option, @@ -46,4 +46,32 @@ impl PowerpackWidgetDefinition { type_, } } + + pub fn with_background_color(&mut self, value: String) -> &mut Self { + self.background_color = Some(value); + self + } + + pub fn with_banner_img(&mut self, value: String) -> &mut Self { + self.banner_img = Some(value); + self + } + + pub fn with_show_title(&mut self, value: bool) -> &mut Self { + self.show_title = Some(value); + self + } + + pub fn with_template_variables( + &mut self, + value: crate::datadogV1::model::PowerpackTemplateVariables, + ) -> &mut Self { + self.template_variables = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } } diff --git a/src/datadogV1/model/model_process_query_definition.rs b/src/datadogV1/model/model_process_query_definition.rs index cfc7bb576..2c31ccc6c 100644 --- a/src/datadogV1/model/model_process_query_definition.rs +++ b/src/datadogV1/model/model_process_query_definition.rs @@ -31,4 +31,19 @@ impl ProcessQueryDefinition { search_by: None, } } + + pub fn with_filter_by(&mut self, value: Vec) -> &mut Self { + self.filter_by = Some(value); + self + } + + pub fn with_limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_search_by(&mut self, value: String) -> &mut Self { + self.search_by = Some(value); + self + } } diff --git a/src/datadogV1/model/model_query_value_widget_definition.rs b/src/datadogV1/model/model_query_value_widget_definition.rs index fc59385f4..76875b8d0 100644 --- a/src/datadogV1/model/model_query_value_widget_definition.rs +++ b/src/datadogV1/model/model_query_value_widget_definition.rs @@ -28,10 +28,10 @@ pub struct QueryValueWidgetDefinition { pub text_align: Option, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// Set a timeseries on the widget background. #[serde(rename = "timeseries_background")] - pub timeseries_background: Option>, + pub timeseries_background: Option, /// Title of your widget. #[serde(rename = "title")] pub title: Option, @@ -66,4 +66,66 @@ impl QueryValueWidgetDefinition { type_, } } + + pub fn with_autoscale(&mut self, value: bool) -> &mut Self { + self.autoscale = Some(value); + self + } + + pub fn with_custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn with_custom_unit(&mut self, value: String) -> &mut Self { + self.custom_unit = Some(value); + self + } + + pub fn with_precision(&mut self, value: i64) -> &mut Self { + self.precision = Some(value); + self + } + + pub fn with_text_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.text_align = Some(value); + self + } + + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_timeseries_background( + &mut self, + value: crate::datadogV1::model::TimeseriesBackground, + ) -> &mut Self { + self.timeseries_background = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_query_value_widget_request.rs b/src/datadogV1/model/model_query_value_widget_request.rs index bc43a6885..7c5184327 100644 --- a/src/datadogV1/model/model_query_value_widget_request.rs +++ b/src/datadogV1/model/model_query_value_widget_request.rs @@ -13,31 +13,31 @@ pub struct QueryValueWidgetRequest { pub aggregator: Option, /// The log query. #[serde(rename = "apm_query")] - pub apm_query: Option>, + pub apm_query: Option, /// The log query. #[serde(rename = "audit_query")] - pub audit_query: Option>, + pub audit_query: Option, /// List of conditional formats. #[serde(rename = "conditional_formats")] pub conditional_formats: Option>, /// The log query. #[serde(rename = "event_query")] - pub event_query: Option>, + pub event_query: Option, /// List of formulas that operate on queries. #[serde(rename = "formulas")] pub formulas: Option>, /// The log query. #[serde(rename = "log_query")] - pub log_query: Option>, + pub log_query: Option, /// The log query. #[serde(rename = "network_query")] - pub network_query: Option>, + pub network_query: Option, /// The process query to use in the widget. #[serde(rename = "process_query")] - pub process_query: Option>, + pub process_query: Option, /// The log query. #[serde(rename = "profile_metrics_query")] - pub profile_metrics_query: Option>, + pub profile_metrics_query: Option, /// TODO. #[serde(rename = "q")] pub q: Option, @@ -49,10 +49,10 @@ pub struct QueryValueWidgetRequest { pub response_format: Option, /// The log query. #[serde(rename = "rum_query")] - pub rum_query: Option>, + pub rum_query: Option, /// The log query. #[serde(rename = "security_query")] - pub security_query: Option>, + pub security_query: Option, } impl QueryValueWidgetRequest { @@ -75,6 +75,123 @@ impl QueryValueWidgetRequest { security_query: None, } } + + pub fn with_aggregator( + &mut self, + value: crate::datadogV1::model::WidgetAggregator, + ) -> &mut Self { + self.aggregator = Some(value); + self + } + + pub fn with_apm_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn with_audit_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.audit_query = Some(value); + self + } + + pub fn with_conditional_formats( + &mut self, + value: Vec, + ) -> &mut Self { + self.conditional_formats = Some(value); + self + } + + pub fn with_event_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn with_formulas( + &mut self, + value: Vec, + ) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn with_log_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn with_network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn with_process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn with_profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn with_q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn with_queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn with_response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + self + } + + pub fn with_rum_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn with_security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + self + } } impl Default for QueryValueWidgetRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_reference_table_logs_lookup_processor.rs b/src/datadogV1/model/model_reference_table_logs_lookup_processor.rs index 09e9a97d0..3f18cd50d 100644 --- a/src/datadogV1/model/model_reference_table_logs_lookup_processor.rs +++ b/src/datadogV1/model/model_reference_table_logs_lookup_processor.rs @@ -50,4 +50,14 @@ impl ReferenceTableLogsLookupProcessor { type_, } } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV1/model/model_response_meta_attributes.rs b/src/datadogV1/model/model_response_meta_attributes.rs index 17056f88d..3c0d439bb 100644 --- a/src/datadogV1/model/model_response_meta_attributes.rs +++ b/src/datadogV1/model/model_response_meta_attributes.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct ResponseMetaAttributes { /// Pagination object. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, } impl ResponseMetaAttributes { pub fn new() -> ResponseMetaAttributes { ResponseMetaAttributes { page: None } } + + pub fn with_page(&mut self, value: crate::datadogV1::model::Pagination) -> &mut Self { + self.page = Some(value); + self + } } impl Default for ResponseMetaAttributes { fn default() -> Self { diff --git a/src/datadogV1/model/model_run_workflow_widget_definition.rs b/src/datadogV1/model/model_run_workflow_widget_definition.rs index ed5d98127..a7b32f3d9 100644 --- a/src/datadogV1/model/model_run_workflow_widget_definition.rs +++ b/src/datadogV1/model/model_run_workflow_widget_definition.rs @@ -16,7 +16,7 @@ pub struct RunWorkflowWidgetDefinition { pub inputs: Option>, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// Title of your widget. #[serde(rename = "title")] pub title: Option, @@ -50,4 +50,43 @@ impl RunWorkflowWidgetDefinition { workflow_id, } } + + pub fn with_custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn with_inputs( + &mut self, + value: Vec, + ) -> &mut Self { + self.inputs = Some(value); + self + } + + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_scatter_plot_request.rs b/src/datadogV1/model/model_scatter_plot_request.rs index 6783dfab7..ab80e4280 100644 --- a/src/datadogV1/model/model_scatter_plot_request.rs +++ b/src/datadogV1/model/model_scatter_plot_request.rs @@ -13,31 +13,31 @@ pub struct ScatterPlotRequest { pub aggregator: Option, /// The log query. #[serde(rename = "apm_query")] - pub apm_query: Option>, + pub apm_query: Option, /// The log query. #[serde(rename = "event_query")] - pub event_query: Option>, + pub event_query: Option, /// The log query. #[serde(rename = "log_query")] - pub log_query: Option>, + pub log_query: Option, /// The log query. #[serde(rename = "network_query")] - pub network_query: Option>, + pub network_query: Option, /// The process query to use in the widget. #[serde(rename = "process_query")] - pub process_query: Option>, + pub process_query: Option, /// The log query. #[serde(rename = "profile_metrics_query")] - pub profile_metrics_query: Option>, + pub profile_metrics_query: Option, /// Query definition. #[serde(rename = "q")] pub q: Option, /// The log query. #[serde(rename = "rum_query")] - pub rum_query: Option>, + pub rum_query: Option, /// The log query. #[serde(rename = "security_query")] - pub security_query: Option>, + pub security_query: Option, } impl ScatterPlotRequest { @@ -55,6 +55,83 @@ impl ScatterPlotRequest { security_query: None, } } + + pub fn with_aggregator( + &mut self, + value: crate::datadogV1::model::ScatterplotWidgetAggregator, + ) -> &mut Self { + self.aggregator = Some(value); + self + } + + pub fn with_apm_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn with_event_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn with_log_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn with_network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn with_process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn with_profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn with_q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn with_rum_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn with_security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + self + } } impl Default for ScatterPlotRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_scatter_plot_widget_definition.rs b/src/datadogV1/model/model_scatter_plot_widget_definition.rs index 54c18d411..524666937 100644 --- a/src/datadogV1/model/model_scatter_plot_widget_definition.rs +++ b/src/datadogV1/model/model_scatter_plot_widget_definition.rs @@ -16,10 +16,10 @@ pub struct ScatterPlotWidgetDefinition { pub custom_links: Option>, /// Widget definition. #[serde(rename = "requests")] - pub requests: Box, + pub requests: crate::datadogV1::model::ScatterPlotWidgetDefinitionRequests, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// Title of your widget. #[serde(rename = "title")] pub title: Option, @@ -34,15 +34,15 @@ pub struct ScatterPlotWidgetDefinition { pub type_: crate::datadogV1::model::ScatterPlotWidgetDefinitionType, /// Axis controls for the widget. #[serde(rename = "xaxis")] - pub xaxis: Option>, + pub xaxis: Option, /// Axis controls for the widget. #[serde(rename = "yaxis")] - pub yaxis: Option>, + pub yaxis: Option, } impl ScatterPlotWidgetDefinition { pub fn new( - requests: Box, + requests: crate::datadogV1::model::ScatterPlotWidgetDefinitionRequests, type_: crate::datadogV1::model::ScatterPlotWidgetDefinitionType, ) -> ScatterPlotWidgetDefinition { ScatterPlotWidgetDefinition { @@ -58,4 +58,50 @@ impl ScatterPlotWidgetDefinition { yaxis: None, } } + + pub fn with_color_by_groups(&mut self, value: Vec) -> &mut Self { + self.color_by_groups = Some(value); + self + } + + pub fn with_custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } + + pub fn with_xaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { + self.xaxis = Some(value); + self + } + + pub fn with_yaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { + self.yaxis = Some(value); + self + } } diff --git a/src/datadogV1/model/model_scatter_plot_widget_definition_requests.rs b/src/datadogV1/model/model_scatter_plot_widget_definition_requests.rs index d06115da8..c03a2964b 100644 --- a/src/datadogV1/model/model_scatter_plot_widget_definition_requests.rs +++ b/src/datadogV1/model/model_scatter_plot_widget_definition_requests.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct ScatterPlotWidgetDefinitionRequests { /// Scatterplot request containing formulas and functions. #[serde(rename = "table")] - pub table: Option>, + pub table: Option, /// Updated scatter plot. #[serde(rename = "x")] - pub x: Option>, + pub x: Option, /// Updated scatter plot. #[serde(rename = "y")] - pub y: Option>, + pub y: Option, } impl ScatterPlotWidgetDefinitionRequests { @@ -27,6 +27,24 @@ impl ScatterPlotWidgetDefinitionRequests { y: None, } } + + pub fn with_table( + &mut self, + value: crate::datadogV1::model::ScatterplotTableRequest, + ) -> &mut Self { + self.table = Some(value); + self + } + + pub fn with_x(&mut self, value: crate::datadogV1::model::ScatterPlotRequest) -> &mut Self { + self.x = Some(value); + self + } + + pub fn with_y(&mut self, value: crate::datadogV1::model::ScatterPlotRequest) -> &mut Self { + self.y = Some(value); + self + } } impl Default for ScatterPlotWidgetDefinitionRequests { fn default() -> Self { diff --git a/src/datadogV1/model/model_scatterplot_table_request.rs b/src/datadogV1/model/model_scatterplot_table_request.rs index c8f33999a..bfc144c17 100644 --- a/src/datadogV1/model/model_scatterplot_table_request.rs +++ b/src/datadogV1/model/model_scatterplot_table_request.rs @@ -27,6 +27,30 @@ impl ScatterplotTableRequest { response_format: None, } } + + pub fn with_formulas( + &mut self, + value: Vec, + ) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn with_queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn with_response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + self + } } impl Default for ScatterplotTableRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_scatterplot_widget_formula.rs b/src/datadogV1/model/model_scatterplot_widget_formula.rs index 83818db2b..28d0b9467 100644 --- a/src/datadogV1/model/model_scatterplot_widget_formula.rs +++ b/src/datadogV1/model/model_scatterplot_widget_formula.rs @@ -30,4 +30,9 @@ impl ScatterplotWidgetFormula { formula, } } + + pub fn with_alias(&mut self, value: String) -> &mut Self { + self.alias = Some(value); + self + } } diff --git a/src/datadogV1/model/model_search_service_level_objective.rs b/src/datadogV1/model/model_search_service_level_objective.rs index f11a3e253..242064c0f 100644 --- a/src/datadogV1/model/model_search_service_level_objective.rs +++ b/src/datadogV1/model/model_search_service_level_objective.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct SearchServiceLevelObjective { /// A service level objective ID and attributes. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl SearchServiceLevelObjective { pub fn new() -> SearchServiceLevelObjective { SearchServiceLevelObjective { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV1::model::SearchServiceLevelObjectiveData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for SearchServiceLevelObjective { fn default() -> Self { diff --git a/src/datadogV1/model/model_search_service_level_objective_attributes.rs b/src/datadogV1/model/model_search_service_level_objective_attributes.rs index e00f9a0a5..d4475078f 100644 --- a/src/datadogV1/model/model_search_service_level_objective_attributes.rs +++ b/src/datadogV1/model/model_search_service_level_objective_attributes.rs @@ -24,7 +24,7 @@ pub struct SearchServiceLevelObjectiveAttributes { default, with = "::serde_with::rust::double_option" )] - pub creator: Option>>, + pub creator: Option>, /// A user-defined description of the service level objective. /// /// Always included in service level objective responses (but may be `null`). @@ -65,7 +65,7 @@ pub struct SearchServiceLevelObjectiveAttributes { /// to be used because this will sum up all request counts instead of averaging them, or taking the max or /// min of all of those requests. #[serde(rename = "query", default, with = "::serde_with::rust::double_option")] - pub query: Option>>, + pub query: Option>, /// Tags with the `service` tag key. #[serde(rename = "service_tags")] pub service_tags: Option>, @@ -74,7 +74,7 @@ pub struct SearchServiceLevelObjectiveAttributes { pub slo_type: Option, /// Status of the SLO's primary timeframe. #[serde(rename = "status")] - pub status: Option>, + pub status: Option, /// Tags with the `team` tag key. #[serde(rename = "team_tags")] pub team_tags: Option>, @@ -105,6 +105,98 @@ impl SearchServiceLevelObjectiveAttributes { thresholds: None, } } + + pub fn with_all_tags(&mut self, value: Vec) -> &mut Self { + self.all_tags = Some(value); + self + } + + pub fn with_created_at(&mut self, value: i64) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_creator( + &mut self, + value: Option, + ) -> &mut Self { + self.creator = Some(value); + self + } + + pub fn with_description(&mut self, value: Option) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_env_tags(&mut self, value: Vec) -> &mut Self { + self.env_tags = Some(value); + self + } + + pub fn with_groups(&mut self, value: Option>) -> &mut Self { + self.groups = Some(value); + self + } + + pub fn with_modified_at(&mut self, value: i64) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn with_monitor_ids(&mut self, value: Option>) -> &mut Self { + self.monitor_ids = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_overall_status( + &mut self, + value: Vec, + ) -> &mut Self { + self.overall_status = Some(value); + self + } + + pub fn with_query( + &mut self, + value: Option, + ) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_service_tags(&mut self, value: Vec) -> &mut Self { + self.service_tags = Some(value); + self + } + + pub fn with_slo_type(&mut self, value: crate::datadogV1::model::SLOType) -> &mut Self { + self.slo_type = Some(value); + self + } + + pub fn with_status(&mut self, value: crate::datadogV1::model::SLOStatus) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_team_tags(&mut self, value: Vec) -> &mut Self { + self.team_tags = Some(value); + self + } + + pub fn with_thresholds( + &mut self, + value: Vec, + ) -> &mut Self { + self.thresholds = Some(value); + self + } } impl Default for SearchServiceLevelObjectiveAttributes { fn default() -> Self { diff --git a/src/datadogV1/model/model_search_service_level_objective_data.rs b/src/datadogV1/model/model_search_service_level_objective_data.rs index e9aa6d766..8ae3ed58d 100644 --- a/src/datadogV1/model/model_search_service_level_objective_data.rs +++ b/src/datadogV1/model/model_search_service_level_objective_data.rs @@ -11,7 +11,7 @@ pub struct SearchServiceLevelObjectiveData { /// A service level objective object includes a service level indicator, thresholds /// for one or more timeframes, and metadata (`name`, `description`, and `tags`). #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// A unique identifier for the service level objective object. /// /// Always included in service level objective responses. @@ -30,6 +30,24 @@ impl SearchServiceLevelObjectiveData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV1::model::SearchServiceLevelObjectiveAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SearchServiceLevelObjectiveData { fn default() -> Self { diff --git a/src/datadogV1/model/model_search_slo_query.rs b/src/datadogV1/model/model_search_slo_query.rs index eefd50b4c..a597ba294 100644 --- a/src/datadogV1/model/model_search_slo_query.rs +++ b/src/datadogV1/model/model_search_slo_query.rs @@ -34,6 +34,21 @@ impl SearchSLOQuery { numerator: None, } } + + pub fn with_denominator(&mut self, value: String) -> &mut Self { + self.denominator = Some(value); + self + } + + pub fn with_metrics(&mut self, value: Option>) -> &mut Self { + self.metrics = Some(value); + self + } + + pub fn with_numerator(&mut self, value: String) -> &mut Self { + self.numerator = Some(value); + self + } } impl Default for SearchSLOQuery { fn default() -> Self { diff --git a/src/datadogV1/model/model_search_slo_response.rs b/src/datadogV1/model/model_search_slo_response.rs index 9fab48ea4..b6c667047 100644 --- a/src/datadogV1/model/model_search_slo_response.rs +++ b/src/datadogV1/model/model_search_slo_response.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct SearchSLOResponse { /// Data from search SLO response. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// Pagination links. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, /// Searches metadata returned by the API. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl SearchSLOResponse { @@ -27,6 +27,30 @@ impl SearchSLOResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: crate::datadogV1::model::SearchSLOResponseData, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links( + &mut self, + value: crate::datadogV1::model::SearchSLOResponseLinks, + ) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV1::model::SearchSLOResponseMeta, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for SearchSLOResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_search_slo_response_data.rs b/src/datadogV1/model/model_search_slo_response_data.rs index 14bbe5f09..02edba6a4 100644 --- a/src/datadogV1/model/model_search_slo_response_data.rs +++ b/src/datadogV1/model/model_search_slo_response_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SearchSLOResponseData { /// Attributes #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Type of service level objective result. #[serde(rename = "type")] pub type_: Option, @@ -23,6 +23,19 @@ impl SearchSLOResponseData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV1::model::SearchSLOResponseDataAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SearchSLOResponseData { fn default() -> Self { diff --git a/src/datadogV1/model/model_search_slo_response_data_attributes.rs b/src/datadogV1/model/model_search_slo_response_data_attributes.rs index ea5cc24e1..cfddc2a29 100644 --- a/src/datadogV1/model/model_search_slo_response_data_attributes.rs +++ b/src/datadogV1/model/model_search_slo_response_data_attributes.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SearchSLOResponseDataAttributes { /// Facets #[serde(rename = "facets")] - pub facets: Option>, + pub facets: Option, /// SLOs #[serde(rename = "slos")] pub slos: Option>, @@ -23,6 +23,22 @@ impl SearchSLOResponseDataAttributes { slos: None, } } + + pub fn with_facets( + &mut self, + value: crate::datadogV1::model::SearchSLOResponseDataAttributesFacets, + ) -> &mut Self { + self.facets = Some(value); + self + } + + pub fn with_slos( + &mut self, + value: Vec, + ) -> &mut Self { + self.slos = Some(value); + self + } } impl Default for SearchSLOResponseDataAttributes { fn default() -> Self { diff --git a/src/datadogV1/model/model_search_slo_response_data_attributes_facets.rs b/src/datadogV1/model/model_search_slo_response_data_attributes_facets.rs index 720cce66b..76f88d7db 100644 --- a/src/datadogV1/model/model_search_slo_response_data_attributes_facets.rs +++ b/src/datadogV1/model/model_search_slo_response_data_attributes_facets.rs @@ -55,6 +55,70 @@ impl SearchSLOResponseDataAttributesFacets { timeframe: None, } } + + pub fn with_all_tags( + &mut self, + value: Vec, + ) -> &mut Self { + self.all_tags = Some(value); + self + } + + pub fn with_creator_name( + &mut self, + value: Vec, + ) -> &mut Self { + self.creator_name = Some(value); + self + } + + pub fn with_env_tags( + &mut self, + value: Vec, + ) -> &mut Self { + self.env_tags = Some(value); + self + } + + pub fn with_service_tags( + &mut self, + value: Vec, + ) -> &mut Self { + self.service_tags = Some(value); + self + } + + pub fn with_slo_type( + &mut self, + value: Vec, + ) -> &mut Self { + self.slo_type = Some(value); + self + } + + pub fn with_target( + &mut self, + value: Vec, + ) -> &mut Self { + self.target = Some(value); + self + } + + pub fn with_team_tags( + &mut self, + value: Vec, + ) -> &mut Self { + self.team_tags = Some(value); + self + } + + pub fn with_timeframe( + &mut self, + value: Vec, + ) -> &mut Self { + self.timeframe = Some(value); + self + } } impl Default for SearchSLOResponseDataAttributesFacets { fn default() -> Self { diff --git a/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_int.rs b/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_int.rs index c27ae1e23..c9b67fc2d 100644 --- a/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_int.rs +++ b/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_int.rs @@ -23,6 +23,16 @@ impl SearchSLOResponseDataAttributesFacetsObjectInt { name: None, } } + + pub fn with_count(&mut self, value: i64) -> &mut Self { + self.count = Some(value); + self + } + + pub fn with_name(&mut self, value: f64) -> &mut Self { + self.name = Some(value); + self + } } impl Default for SearchSLOResponseDataAttributesFacetsObjectInt { fn default() -> Self { diff --git a/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_string.rs b/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_string.rs index c46e9d0a4..c859f090d 100644 --- a/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_string.rs +++ b/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_string.rs @@ -23,6 +23,16 @@ impl SearchSLOResponseDataAttributesFacetsObjectString { name: None, } } + + pub fn with_count(&mut self, value: i64) -> &mut Self { + self.count = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } impl Default for SearchSLOResponseDataAttributesFacetsObjectString { fn default() -> Self { diff --git a/src/datadogV1/model/model_search_slo_response_links.rs b/src/datadogV1/model/model_search_slo_response_links.rs index 87b7eef1e..a58997db4 100644 --- a/src/datadogV1/model/model_search_slo_response_links.rs +++ b/src/datadogV1/model/model_search_slo_response_links.rs @@ -35,6 +35,31 @@ impl SearchSLOResponseLinks { self_: None, } } + + pub fn with_first(&mut self, value: String) -> &mut Self { + self.first = Some(value); + self + } + + pub fn with_last(&mut self, value: Option) -> &mut Self { + self.last = Some(value); + self + } + + pub fn with_next(&mut self, value: String) -> &mut Self { + self.next = Some(value); + self + } + + pub fn with_prev(&mut self, value: Option) -> &mut Self { + self.prev = Some(value); + self + } + + pub fn with_self_(&mut self, value: String) -> &mut Self { + self.self_ = Some(value); + self + } } impl Default for SearchSLOResponseLinks { fn default() -> Self { diff --git a/src/datadogV1/model/model_search_slo_response_meta.rs b/src/datadogV1/model/model_search_slo_response_meta.rs index 4039304af..a27e89513 100644 --- a/src/datadogV1/model/model_search_slo_response_meta.rs +++ b/src/datadogV1/model/model_search_slo_response_meta.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct SearchSLOResponseMeta { /// Pagination metadata returned by the API. #[serde(rename = "pagination")] - pub pagination: Option>, + pub pagination: Option, } impl SearchSLOResponseMeta { pub fn new() -> SearchSLOResponseMeta { SearchSLOResponseMeta { pagination: None } } + + pub fn with_pagination( + &mut self, + value: crate::datadogV1::model::SearchSLOResponseMetaPage, + ) -> &mut Self { + self.pagination = Some(value); + self + } } impl Default for SearchSLOResponseMeta { fn default() -> Self { diff --git a/src/datadogV1/model/model_search_slo_response_meta_page.rs b/src/datadogV1/model/model_search_slo_response_meta_page.rs index 7ff0ebf85..30be703c2 100644 --- a/src/datadogV1/model/model_search_slo_response_meta_page.rs +++ b/src/datadogV1/model/model_search_slo_response_meta_page.rs @@ -47,6 +47,46 @@ impl SearchSLOResponseMetaPage { type_: None, } } + + pub fn with_first_number(&mut self, value: i64) -> &mut Self { + self.first_number = Some(value); + self + } + + pub fn with_last_number(&mut self, value: i64) -> &mut Self { + self.last_number = Some(value); + self + } + + pub fn with_next_number(&mut self, value: i64) -> &mut Self { + self.next_number = Some(value); + self + } + + pub fn with_number(&mut self, value: i64) -> &mut Self { + self.number = Some(value); + self + } + + pub fn with_prev_number(&mut self, value: i64) -> &mut Self { + self.prev_number = Some(value); + self + } + + pub fn with_size(&mut self, value: i64) -> &mut Self { + self.size = Some(value); + self + } + + pub fn with_total(&mut self, value: i64) -> &mut Self { + self.total = Some(value); + self + } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SearchSLOResponseMetaPage { fn default() -> Self { diff --git a/src/datadogV1/model/model_search_slo_threshold.rs b/src/datadogV1/model/model_search_slo_threshold.rs index 2573d1864..60feac408 100644 --- a/src/datadogV1/model/model_search_slo_threshold.rs +++ b/src/datadogV1/model/model_search_slo_threshold.rs @@ -55,4 +55,19 @@ impl SearchSLOThreshold { warning_display: None, } } + + pub fn with_target_display(&mut self, value: String) -> &mut Self { + self.target_display = Some(value); + self + } + + pub fn with_warning(&mut self, value: Option) -> &mut Self { + self.warning = Some(value); + self + } + + pub fn with_warning_display(&mut self, value: Option) -> &mut Self { + self.warning_display = Some(value); + self + } } diff --git a/src/datadogV1/model/model_selectable_template_variable_items.rs b/src/datadogV1/model/model_selectable_template_variable_items.rs index cc5a7bb3a..13df8d965 100644 --- a/src/datadogV1/model/model_selectable_template_variable_items.rs +++ b/src/datadogV1/model/model_selectable_template_variable_items.rs @@ -35,6 +35,26 @@ impl SelectableTemplateVariableItems { visible_tags: None, } } + + pub fn with_default_value(&mut self, value: String) -> &mut Self { + self.default_value = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_prefix(&mut self, value: String) -> &mut Self { + self.prefix = Some(value); + self + } + + pub fn with_visible_tags(&mut self, value: Option>) -> &mut Self { + self.visible_tags = Some(value); + self + } } impl Default for SelectableTemplateVariableItems { fn default() -> Self { diff --git a/src/datadogV1/model/model_series.rs b/src/datadogV1/model/model_series.rs index 0ad12ceab..7dfe2f85a 100644 --- a/src/datadogV1/model/model_series.rs +++ b/src/datadogV1/model/model_series.rs @@ -44,4 +44,24 @@ impl Series { type_: None, } } + + pub fn with_host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn with_interval(&mut self, value: Option) -> &mut Self { + self.interval = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV1/model/model_service_check.rs b/src/datadogV1/model/model_service_check.rs index a2528b561..9c24d5d6f 100644 --- a/src/datadogV1/model/model_service_check.rs +++ b/src/datadogV1/model/model_service_check.rs @@ -44,4 +44,14 @@ impl ServiceCheck { timestamp: None, } } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_timestamp(&mut self, value: i64) -> &mut Self { + self.timestamp = Some(value); + self + } } diff --git a/src/datadogV1/model/model_service_level_objective.rs b/src/datadogV1/model/model_service_level_objective.rs index a1ab44fda..c6d292b09 100644 --- a/src/datadogV1/model/model_service_level_objective.rs +++ b/src/datadogV1/model/model_service_level_objective.rs @@ -16,7 +16,7 @@ pub struct ServiceLevelObjective { pub created_at: Option, /// Object describing the creator of the shared element. #[serde(rename = "creator")] - pub creator: Option>, + pub creator: Option, /// A user-defined description of the service level objective. /// /// Always included in service level objective responses (but may be `null`). @@ -63,7 +63,7 @@ pub struct ServiceLevelObjective { /// to be used because this will sum up all request counts instead of averaging them, or taking the max or /// min of all of those requests. #[serde(rename = "query")] - pub query: Option>, + pub query: Option, /// A list of tags associated with this service level objective. /// Always included in service level objective responses (but may be empty). /// Optional in create/update requests. @@ -116,4 +116,72 @@ impl ServiceLevelObjective { warning_threshold: None, } } + + pub fn with_created_at(&mut self, value: i64) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + self.creator = Some(value); + self + } + + pub fn with_description(&mut self, value: Option) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_groups(&mut self, value: Vec) -> &mut Self { + self.groups = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_modified_at(&mut self, value: i64) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn with_monitor_ids(&mut self, value: Vec) -> &mut Self { + self.monitor_ids = Some(value); + self + } + + pub fn with_monitor_tags(&mut self, value: Vec) -> &mut Self { + self.monitor_tags = Some(value); + self + } + + pub fn with_query( + &mut self, + value: crate::datadogV1::model::ServiceLevelObjectiveQuery, + ) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_target_threshold(&mut self, value: f64) -> &mut Self { + self.target_threshold = Some(value); + self + } + + pub fn with_timeframe(&mut self, value: crate::datadogV1::model::SLOTimeframe) -> &mut Self { + self.timeframe = Some(value); + self + } + + pub fn with_warning_threshold(&mut self, value: f64) -> &mut Self { + self.warning_threshold = Some(value); + self + } } diff --git a/src/datadogV1/model/model_service_level_objective_request.rs b/src/datadogV1/model/model_service_level_objective_request.rs index 450c1b834..d8094261c 100644 --- a/src/datadogV1/model/model_service_level_objective_request.rs +++ b/src/datadogV1/model/model_service_level_objective_request.rs @@ -37,7 +37,7 @@ pub struct ServiceLevelObjectiveRequest { /// to be used because this will sum up all request counts instead of averaging them, or taking the max or /// min of all of those requests. #[serde(rename = "query")] - pub query: Option>, + pub query: Option, /// A list of tags associated with this service level objective. /// Always included in service level objective responses (but may be empty). /// Optional in create/update requests. @@ -85,4 +85,47 @@ impl ServiceLevelObjectiveRequest { warning_threshold: None, } } + + pub fn with_description(&mut self, value: Option) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_groups(&mut self, value: Vec) -> &mut Self { + self.groups = Some(value); + self + } + + pub fn with_monitor_ids(&mut self, value: Vec) -> &mut Self { + self.monitor_ids = Some(value); + self + } + + pub fn with_query( + &mut self, + value: crate::datadogV1::model::ServiceLevelObjectiveQuery, + ) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_target_threshold(&mut self, value: f64) -> &mut Self { + self.target_threshold = Some(value); + self + } + + pub fn with_timeframe(&mut self, value: crate::datadogV1::model::SLOTimeframe) -> &mut Self { + self.timeframe = Some(value); + self + } + + pub fn with_warning_threshold(&mut self, value: f64) -> &mut Self { + self.warning_threshold = Some(value); + self + } } diff --git a/src/datadogV1/model/model_service_map_widget_definition.rs b/src/datadogV1/model/model_service_map_widget_definition.rs index 646025ae8..0c333f39c 100644 --- a/src/datadogV1/model/model_service_map_widget_definition.rs +++ b/src/datadogV1/model/model_service_map_widget_definition.rs @@ -47,4 +47,30 @@ impl ServiceMapWidgetDefinition { type_, } } + + pub fn with_custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_service_summary_widget_definition.rs b/src/datadogV1/model/model_service_summary_widget_definition.rs index b1057cd35..94f90da8c 100644 --- a/src/datadogV1/model/model_service_summary_widget_definition.rs +++ b/src/datadogV1/model/model_service_summary_widget_definition.rs @@ -43,7 +43,7 @@ pub struct ServiceSummaryWidgetDefinition { pub span_name: String, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// Title of the widget. #[serde(rename = "title")] pub title: Option, @@ -84,4 +84,73 @@ impl ServiceSummaryWidgetDefinition { type_, } } + + pub fn with_display_format( + &mut self, + value: crate::datadogV1::model::WidgetServiceSummaryDisplayFormat, + ) -> &mut Self { + self.display_format = Some(value); + self + } + + pub fn with_show_breakdown(&mut self, value: bool) -> &mut Self { + self.show_breakdown = Some(value); + self + } + + pub fn with_show_distribution(&mut self, value: bool) -> &mut Self { + self.show_distribution = Some(value); + self + } + + pub fn with_show_errors(&mut self, value: bool) -> &mut Self { + self.show_errors = Some(value); + self + } + + pub fn with_show_hits(&mut self, value: bool) -> &mut Self { + self.show_hits = Some(value); + self + } + + pub fn with_show_latency(&mut self, value: bool) -> &mut Self { + self.show_latency = Some(value); + self + } + + pub fn with_show_resource_list(&mut self, value: bool) -> &mut Self { + self.show_resource_list = Some(value); + self + } + + pub fn with_size_format( + &mut self, + value: crate::datadogV1::model::WidgetSizeFormat, + ) -> &mut Self { + self.size_format = Some(value); + self + } + + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_shared_dashboard.rs b/src/datadogV1/model/model_shared_dashboard.rs index 893d46d74..f21b08bd4 100644 --- a/src/datadogV1/model/model_shared_dashboard.rs +++ b/src/datadogV1/model/model_shared_dashboard.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SharedDashboard { /// User who shared the dashboard. #[serde(rename = "author")] - pub author: Option>, + pub author: Option, /// Date the dashboard was shared. #[serde(rename = "created_at")] pub created_at: Option, @@ -22,7 +22,7 @@ pub struct SharedDashboard { pub dashboard_type: crate::datadogV1::model::DashboardType, /// Object containing the live span selection for the dashboard. #[serde(rename = "global_time")] - pub global_time: Option>, + pub global_time: Option, /// Whether to allow viewers to select a different global time setting for the shared dashboard. #[serde( rename = "global_time_selectable_enabled", @@ -79,4 +79,61 @@ impl SharedDashboard { token: None, } } + + pub fn with_author( + &mut self, + value: crate::datadogV1::model::SharedDashboardAuthor, + ) -> &mut Self { + self.author = Some(value); + self + } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_global_time( + &mut self, + value: crate::datadogV1::model::DashboardGlobalTime, + ) -> &mut Self { + self.global_time = Some(value); + self + } + + pub fn with_global_time_selectable_enabled(&mut self, value: Option) -> &mut Self { + self.global_time_selectable_enabled = Some(value); + self + } + + pub fn with_public_url(&mut self, value: String) -> &mut Self { + self.public_url = Some(value); + self + } + + pub fn with_selectable_template_vars( + &mut self, + value: Option>, + ) -> &mut Self { + self.selectable_template_vars = Some(value); + self + } + + pub fn with_share_list(&mut self, value: Option>) -> &mut Self { + self.share_list = Some(value); + self + } + + pub fn with_share_type( + &mut self, + value: Option, + ) -> &mut Self { + self.share_type = Some(value); + self + } + + pub fn with_token(&mut self, value: String) -> &mut Self { + self.token = Some(value); + self + } } diff --git a/src/datadogV1/model/model_shared_dashboard_author.rs b/src/datadogV1/model/model_shared_dashboard_author.rs index aa4809a30..a1dc97592 100644 --- a/src/datadogV1/model/model_shared_dashboard_author.rs +++ b/src/datadogV1/model/model_shared_dashboard_author.rs @@ -23,6 +23,16 @@ impl SharedDashboardAuthor { name: None, } } + + pub fn with_handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + self + } + + pub fn with_name(&mut self, value: Option) -> &mut Self { + self.name = Some(value); + self + } } impl Default for SharedDashboardAuthor { fn default() -> Self { diff --git a/src/datadogV1/model/model_shared_dashboard_invites.rs b/src/datadogV1/model/model_shared_dashboard_invites.rs index c590702da..f3fc44882 100644 --- a/src/datadogV1/model/model_shared_dashboard_invites.rs +++ b/src/datadogV1/model/model_shared_dashboard_invites.rs @@ -10,16 +10,24 @@ use serde_with::skip_serializing_none; pub struct SharedDashboardInvites { /// An object or list of objects containing the information for an invitation to a shared dashboard. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV1::model::SharedDashboardInvitesData, /// Pagination metadata returned by the API. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl SharedDashboardInvites { pub fn new( - data: Box, + data: crate::datadogV1::model::SharedDashboardInvitesData, ) -> SharedDashboardInvites { SharedDashboardInvites { data, meta: None } } + + pub fn with_meta( + &mut self, + value: crate::datadogV1::model::SharedDashboardInvitesMeta, + ) -> &mut Self { + self.meta = Some(value); + self + } } diff --git a/src/datadogV1/model/model_shared_dashboard_invites_data.rs b/src/datadogV1/model/model_shared_dashboard_invites_data.rs index 3ee00d5e8..690ed6ac3 100644 --- a/src/datadogV1/model/model_shared_dashboard_invites_data.rs +++ b/src/datadogV1/model/model_shared_dashboard_invites_data.rs @@ -7,8 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum SharedDashboardInvitesData { - SharedDashboardInvitesDataObject( - Box, - ), + SharedDashboardInvitesDataObject(crate::datadogV1::model::SharedDashboardInvitesDataObject), SharedDashboardInvitesDataList(Vec), } diff --git a/src/datadogV1/model/model_shared_dashboard_invites_data_object.rs b/src/datadogV1/model/model_shared_dashboard_invites_data_object.rs index ca4b3fbee..b93c09844 100644 --- a/src/datadogV1/model/model_shared_dashboard_invites_data_object.rs +++ b/src/datadogV1/model/model_shared_dashboard_invites_data_object.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SharedDashboardInvitesDataObject { /// Attributes of the shared dashboard invitation #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV1::model::SharedDashboardInvitesDataObjectAttributes, /// Type for shared dashboard invitation request body. #[serde(rename = "type")] pub type_: crate::datadogV1::model::DashboardInviteType, @@ -18,7 +18,7 @@ pub struct SharedDashboardInvitesDataObject { impl SharedDashboardInvitesDataObject { pub fn new( - attributes: Box, + attributes: crate::datadogV1::model::SharedDashboardInvitesDataObjectAttributes, type_: crate::datadogV1::model::DashboardInviteType, ) -> SharedDashboardInvitesDataObject { SharedDashboardInvitesDataObject { attributes, type_ } diff --git a/src/datadogV1/model/model_shared_dashboard_invites_data_object_attributes.rs b/src/datadogV1/model/model_shared_dashboard_invites_data_object_attributes.rs index 242a11873..fe523b497 100644 --- a/src/datadogV1/model/model_shared_dashboard_invites_data_object_attributes.rs +++ b/src/datadogV1/model/model_shared_dashboard_invites_data_object_attributes.rs @@ -43,6 +43,36 @@ impl SharedDashboardInvitesDataObjectAttributes { share_token: None, } } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn with_has_session(&mut self, value: bool) -> &mut Self { + self.has_session = Some(value); + self + } + + pub fn with_invitation_expiry(&mut self, value: String) -> &mut Self { + self.invitation_expiry = Some(value); + self + } + + pub fn with_session_expiry(&mut self, value: Option) -> &mut Self { + self.session_expiry = Some(value); + self + } + + pub fn with_share_token(&mut self, value: String) -> &mut Self { + self.share_token = Some(value); + self + } } impl Default for SharedDashboardInvitesDataObjectAttributes { fn default() -> Self { diff --git a/src/datadogV1/model/model_shared_dashboard_invites_meta.rs b/src/datadogV1/model/model_shared_dashboard_invites_meta.rs index 5ae18301a..443e51dae 100644 --- a/src/datadogV1/model/model_shared_dashboard_invites_meta.rs +++ b/src/datadogV1/model/model_shared_dashboard_invites_meta.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct SharedDashboardInvitesMeta { /// Object containing the total count of invitations across all pages #[serde(rename = "page")] - pub page: Option>, + pub page: Option, } impl SharedDashboardInvitesMeta { pub fn new() -> SharedDashboardInvitesMeta { SharedDashboardInvitesMeta { page: None } } + + pub fn with_page( + &mut self, + value: crate::datadogV1::model::SharedDashboardInvitesMetaPage, + ) -> &mut Self { + self.page = Some(value); + self + } } impl Default for SharedDashboardInvitesMeta { fn default() -> Self { diff --git a/src/datadogV1/model/model_shared_dashboard_invites_meta_page.rs b/src/datadogV1/model/model_shared_dashboard_invites_meta_page.rs index dad2753d7..b4a485242 100644 --- a/src/datadogV1/model/model_shared_dashboard_invites_meta_page.rs +++ b/src/datadogV1/model/model_shared_dashboard_invites_meta_page.rs @@ -17,6 +17,11 @@ impl SharedDashboardInvitesMetaPage { pub fn new() -> SharedDashboardInvitesMetaPage { SharedDashboardInvitesMetaPage { total_count: None } } + + pub fn with_total_count(&mut self, value: i64) -> &mut Self { + self.total_count = Some(value); + self + } } impl Default for SharedDashboardInvitesMetaPage { fn default() -> Self { diff --git a/src/datadogV1/model/model_shared_dashboard_update_request.rs b/src/datadogV1/model/model_shared_dashboard_update_request.rs index 7d7ecd3ba..a33c5bc6c 100644 --- a/src/datadogV1/model/model_shared_dashboard_update_request.rs +++ b/src/datadogV1/model/model_shared_dashboard_update_request.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SharedDashboardUpdateRequest { /// Timeframe setting for the shared dashboard. #[serde(rename = "global_time")] - pub global_time: Option>, + pub global_time: Option, /// Whether to allow viewers to select a different global time setting for the shared dashboard. #[serde( rename = "global_time_selectable_enabled", @@ -44,7 +44,7 @@ pub struct SharedDashboardUpdateRequest { impl SharedDashboardUpdateRequest { pub fn new( - global_time: Option>, + global_time: Option, ) -> SharedDashboardUpdateRequest { SharedDashboardUpdateRequest { global_time, @@ -54,4 +54,30 @@ impl SharedDashboardUpdateRequest { share_type: None, } } + + pub fn with_global_time_selectable_enabled(&mut self, value: Option) -> &mut Self { + self.global_time_selectable_enabled = Some(value); + self + } + + pub fn with_selectable_template_vars( + &mut self, + value: Option>, + ) -> &mut Self { + self.selectable_template_vars = Some(value); + self + } + + pub fn with_share_list(&mut self, value: Option>) -> &mut Self { + self.share_list = Some(value); + self + } + + pub fn with_share_type( + &mut self, + value: Option, + ) -> &mut Self { + self.share_type = Some(value); + self + } } diff --git a/src/datadogV1/model/model_shared_dashboard_update_request_global_time.rs b/src/datadogV1/model/model_shared_dashboard_update_request_global_time.rs index ac80c7b8e..26dbe613f 100644 --- a/src/datadogV1/model/model_shared_dashboard_update_request_global_time.rs +++ b/src/datadogV1/model/model_shared_dashboard_update_request_global_time.rs @@ -17,6 +17,14 @@ impl SharedDashboardUpdateRequestGlobalTime { pub fn new() -> SharedDashboardUpdateRequestGlobalTime { SharedDashboardUpdateRequestGlobalTime { live_span: None } } + + pub fn with_live_span( + &mut self, + value: crate::datadogV1::model::DashboardGlobalTimeLiveSpan, + ) -> &mut Self { + self.live_span = Some(value); + self + } } impl Default for SharedDashboardUpdateRequestGlobalTime { fn default() -> Self { diff --git a/src/datadogV1/model/model_signal_assignee_update_request.rs b/src/datadogV1/model/model_signal_assignee_update_request.rs index c562c1c11..7ac64e2a8 100644 --- a/src/datadogV1/model/model_signal_assignee_update_request.rs +++ b/src/datadogV1/model/model_signal_assignee_update_request.rs @@ -23,4 +23,9 @@ impl SignalAssigneeUpdateRequest { version: None, } } + + pub fn with_version(&mut self, value: i64) -> &mut Self { + self.version = Some(value); + self + } } diff --git a/src/datadogV1/model/model_signal_state_update_request.rs b/src/datadogV1/model/model_signal_state_update_request.rs index f19966a74..f08592c94 100644 --- a/src/datadogV1/model/model_signal_state_update_request.rs +++ b/src/datadogV1/model/model_signal_state_update_request.rs @@ -31,4 +31,22 @@ impl SignalStateUpdateRequest { version: None, } } + + pub fn with_archive_comment(&mut self, value: String) -> &mut Self { + self.archive_comment = Some(value); + self + } + + pub fn with_archive_reason( + &mut self, + value: crate::datadogV1::model::SignalArchiveReason, + ) -> &mut Self { + self.archive_reason = Some(value); + self + } + + pub fn with_version(&mut self, value: i64) -> &mut Self { + self.version = Some(value); + self + } } diff --git a/src/datadogV1/model/model_slack_integration_channel.rs b/src/datadogV1/model/model_slack_integration_channel.rs index e31add1a4..6bb28125c 100644 --- a/src/datadogV1/model/model_slack_integration_channel.rs +++ b/src/datadogV1/model/model_slack_integration_channel.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SlackIntegrationChannel { /// Configuration options for what is shown in an alert event message. #[serde(rename = "display")] - pub display: Option>, + pub display: Option, /// Your channel name. #[serde(rename = "name")] pub name: Option, @@ -23,6 +23,19 @@ impl SlackIntegrationChannel { name: None, } } + + pub fn with_display( + &mut self, + value: crate::datadogV1::model::SlackIntegrationChannelDisplay, + ) -> &mut Self { + self.display = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } impl Default for SlackIntegrationChannel { fn default() -> Self { diff --git a/src/datadogV1/model/model_slack_integration_channel_display.rs b/src/datadogV1/model/model_slack_integration_channel_display.rs index 5636a199a..9d3c2cdde 100644 --- a/src/datadogV1/model/model_slack_integration_channel_display.rs +++ b/src/datadogV1/model/model_slack_integration_channel_display.rs @@ -31,6 +31,26 @@ impl SlackIntegrationChannelDisplay { tags: None, } } + + pub fn with_message(&mut self, value: bool) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_notified(&mut self, value: bool) -> &mut Self { + self.notified = Some(value); + self + } + + pub fn with_snapshot(&mut self, value: bool) -> &mut Self { + self.snapshot = Some(value); + self + } + + pub fn with_tags(&mut self, value: bool) -> &mut Self { + self.tags = Some(value); + self + } } impl Default for SlackIntegrationChannelDisplay { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_bulk_delete_response.rs b/src/datadogV1/model/model_slo_bulk_delete_response.rs index ccdfb0b75..0e8d11b3f 100644 --- a/src/datadogV1/model/model_slo_bulk_delete_response.rs +++ b/src/datadogV1/model/model_slo_bulk_delete_response.rs @@ -15,7 +15,7 @@ use serde_with::skip_serializing_none; pub struct SLOBulkDeleteResponse { /// An array of service level objective objects. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// Array of errors object returned. #[serde(rename = "errors")] pub errors: Option>, @@ -28,6 +28,22 @@ impl SLOBulkDeleteResponse { errors: None, } } + + pub fn with_data( + &mut self, + value: crate::datadogV1::model::SLOBulkDeleteResponseData, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_errors( + &mut self, + value: Vec, + ) -> &mut Self { + self.errors = Some(value); + self + } } impl Default for SLOBulkDeleteResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_bulk_delete_response_data.rs b/src/datadogV1/model/model_slo_bulk_delete_response_data.rs index 55cc37cf2..4ef27a7f6 100644 --- a/src/datadogV1/model/model_slo_bulk_delete_response_data.rs +++ b/src/datadogV1/model/model_slo_bulk_delete_response_data.rs @@ -26,6 +26,16 @@ impl SLOBulkDeleteResponseData { updated: None, } } + + pub fn with_deleted(&mut self, value: Vec) -> &mut Self { + self.deleted = Some(value); + self + } + + pub fn with_updated(&mut self, value: Vec) -> &mut Self { + self.updated = Some(value); + self + } } impl Default for SLOBulkDeleteResponseData { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_correction.rs b/src/datadogV1/model/model_slo_correction.rs index 89368c422..e14ff3e7d 100644 --- a/src/datadogV1/model/model_slo_correction.rs +++ b/src/datadogV1/model/model_slo_correction.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SLOCorrection { /// The attribute object associated with the SLO correction. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The ID of the SLO correction. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl SLOCorrection { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV1::model::SLOCorrectionResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV1::model::SLOCorrectionType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SLOCorrection { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_correction_create_data.rs b/src/datadogV1/model/model_slo_correction_create_data.rs index 5811d1ec3..c45a197b9 100644 --- a/src/datadogV1/model/model_slo_correction_create_data.rs +++ b/src/datadogV1/model/model_slo_correction_create_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SLOCorrectionCreateData { /// The attribute object associated with the SLO correction to be created. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// SLO correction resource type. #[serde(rename = "type")] pub type_: crate::datadogV1::model::SLOCorrectionType, @@ -23,4 +23,12 @@ impl SLOCorrectionCreateData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV1::model::SLOCorrectionCreateRequestAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } } diff --git a/src/datadogV1/model/model_slo_correction_create_request.rs b/src/datadogV1/model/model_slo_correction_create_request.rs index b8f130cfc..1019b9787 100644 --- a/src/datadogV1/model/model_slo_correction_create_request.rs +++ b/src/datadogV1/model/model_slo_correction_create_request.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct SLOCorrectionCreateRequest { /// The data object associated with the SLO correction to be created. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl SLOCorrectionCreateRequest { pub fn new() -> SLOCorrectionCreateRequest { SLOCorrectionCreateRequest { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV1::model::SLOCorrectionCreateData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for SLOCorrectionCreateRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_correction_create_request_attributes.rs b/src/datadogV1/model/model_slo_correction_create_request_attributes.rs index 3b15c579f..27e05af17 100644 --- a/src/datadogV1/model/model_slo_correction_create_request_attributes.rs +++ b/src/datadogV1/model/model_slo_correction_create_request_attributes.rs @@ -52,4 +52,29 @@ impl SLOCorrectionCreateRequestAttributes { timezone: None, } } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_duration(&mut self, value: i64) -> &mut Self { + self.duration = Some(value); + self + } + + pub fn with_end(&mut self, value: i64) -> &mut Self { + self.end = Some(value); + self + } + + pub fn with_rrule(&mut self, value: String) -> &mut Self { + self.rrule = Some(value); + self + } + + pub fn with_timezone(&mut self, value: String) -> &mut Self { + self.timezone = Some(value); + self + } } diff --git a/src/datadogV1/model/model_slo_correction_list_response.rs b/src/datadogV1/model/model_slo_correction_list_response.rs index dad68b46f..8db1bfb02 100644 --- a/src/datadogV1/model/model_slo_correction_list_response.rs +++ b/src/datadogV1/model/model_slo_correction_list_response.rs @@ -13,7 +13,7 @@ pub struct SLOCorrectionListResponse { pub data: Option>, /// Object describing meta attributes of response. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl SLOCorrectionListResponse { @@ -23,6 +23,19 @@ impl SLOCorrectionListResponse { meta: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV1::model::ResponseMetaAttributes, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for SLOCorrectionListResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_correction_response.rs b/src/datadogV1/model/model_slo_correction_response.rs index 9d075b224..c71e34615 100644 --- a/src/datadogV1/model/model_slo_correction_response.rs +++ b/src/datadogV1/model/model_slo_correction_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct SLOCorrectionResponse { /// The response object of a list of SLO corrections. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl SLOCorrectionResponse { pub fn new() -> SLOCorrectionResponse { SLOCorrectionResponse { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV1::model::SLOCorrection) -> &mut Self { + self.data = Some(value); + self + } } impl Default for SLOCorrectionResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_correction_response_attributes.rs b/src/datadogV1/model/model_slo_correction_response_attributes.rs index c0bbeff15..44bcec170 100644 --- a/src/datadogV1/model/model_slo_correction_response_attributes.rs +++ b/src/datadogV1/model/model_slo_correction_response_attributes.rs @@ -20,7 +20,7 @@ pub struct SLOCorrectionResponseAttributes { pub created_at: Option>, /// Object describing the creator of the shared element. #[serde(rename = "creator")] - pub creator: Option>, + pub creator: Option, /// Description of the correction being made. #[serde(rename = "description")] pub description: Option, @@ -47,8 +47,7 @@ pub struct SLOCorrectionResponseAttributes { default, with = "::serde_with::rust::double_option" )] - pub modifier: - Option>>, + pub modifier: Option>, /// The recurrence rules as defined in the iCalendar RFC 5545. The supported rules for SLO corrections /// are `FREQ`, `INTERVAL`, `COUNT`, and `UNTIL`. #[serde(rename = "rrule", default, with = "::serde_with::rust::double_option")] @@ -81,6 +80,72 @@ impl SLOCorrectionResponseAttributes { timezone: None, } } + + pub fn with_category( + &mut self, + value: crate::datadogV1::model::SLOCorrectionCategory, + ) -> &mut Self { + self.category = Some(value); + self + } + + pub fn with_created_at(&mut self, value: Option) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + self.creator = Some(value); + self + } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_duration(&mut self, value: Option) -> &mut Self { + self.duration = Some(value); + self + } + + pub fn with_end(&mut self, value: Option) -> &mut Self { + self.end = Some(value); + self + } + + pub fn with_modified_at(&mut self, value: Option) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn with_modifier( + &mut self, + value: Option, + ) -> &mut Self { + self.modifier = Some(value); + self + } + + pub fn with_rrule(&mut self, value: Option) -> &mut Self { + self.rrule = Some(value); + self + } + + pub fn with_slo_id(&mut self, value: String) -> &mut Self { + self.slo_id = Some(value); + self + } + + pub fn with_start(&mut self, value: i64) -> &mut Self { + self.start = Some(value); + self + } + + pub fn with_timezone(&mut self, value: String) -> &mut Self { + self.timezone = Some(value); + self + } } impl Default for SLOCorrectionResponseAttributes { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_correction_response_attributes_modifier.rs b/src/datadogV1/model/model_slo_correction_response_attributes_modifier.rs index 46fec9c24..433802565 100644 --- a/src/datadogV1/model/model_slo_correction_response_attributes_modifier.rs +++ b/src/datadogV1/model/model_slo_correction_response_attributes_modifier.rs @@ -27,6 +27,21 @@ impl SLOCorrectionResponseAttributesModifier { name: None, } } + + pub fn with_email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn with_handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } impl Default for SLOCorrectionResponseAttributesModifier { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_correction_update_data.rs b/src/datadogV1/model/model_slo_correction_update_data.rs index d9def594b..a89c2d44e 100644 --- a/src/datadogV1/model/model_slo_correction_update_data.rs +++ b/src/datadogV1/model/model_slo_correction_update_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SLOCorrectionUpdateData { /// The attribute object associated with the SLO correction to be updated. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// SLO correction resource type. #[serde(rename = "type")] pub type_: Option, @@ -23,6 +23,19 @@ impl SLOCorrectionUpdateData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV1::model::SLOCorrectionUpdateRequestAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV1::model::SLOCorrectionType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SLOCorrectionUpdateData { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_correction_update_request.rs b/src/datadogV1/model/model_slo_correction_update_request.rs index 75983717a..df3feca82 100644 --- a/src/datadogV1/model/model_slo_correction_update_request.rs +++ b/src/datadogV1/model/model_slo_correction_update_request.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct SLOCorrectionUpdateRequest { /// The data object associated with the SLO correction to be updated. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl SLOCorrectionUpdateRequest { pub fn new() -> SLOCorrectionUpdateRequest { SLOCorrectionUpdateRequest { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV1::model::SLOCorrectionUpdateData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for SLOCorrectionUpdateRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_correction_update_request_attributes.rs b/src/datadogV1/model/model_slo_correction_update_request_attributes.rs index a2cea1dd6..74ac0adc0 100644 --- a/src/datadogV1/model/model_slo_correction_update_request_attributes.rs +++ b/src/datadogV1/model/model_slo_correction_update_request_attributes.rs @@ -44,6 +44,44 @@ impl SLOCorrectionUpdateRequestAttributes { timezone: None, } } + + pub fn with_category( + &mut self, + value: crate::datadogV1::model::SLOCorrectionCategory, + ) -> &mut Self { + self.category = Some(value); + self + } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_duration(&mut self, value: i64) -> &mut Self { + self.duration = Some(value); + self + } + + pub fn with_end(&mut self, value: i64) -> &mut Self { + self.end = Some(value); + self + } + + pub fn with_rrule(&mut self, value: String) -> &mut Self { + self.rrule = Some(value); + self + } + + pub fn with_start(&mut self, value: i64) -> &mut Self { + self.start = Some(value); + self + } + + pub fn with_timezone(&mut self, value: String) -> &mut Self { + self.timezone = Some(value); + self + } } impl Default for SLOCorrectionUpdateRequestAttributes { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_creator.rs b/src/datadogV1/model/model_slo_creator.rs index c15bb54b6..7a298a0f6 100644 --- a/src/datadogV1/model/model_slo_creator.rs +++ b/src/datadogV1/model/model_slo_creator.rs @@ -27,6 +27,21 @@ impl SLOCreator { name: None, } } + + pub fn with_email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn with_id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_name(&mut self, value: Option) -> &mut Self { + self.name = Some(value); + self + } } impl Default for SLOCreator { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_delete_response.rs b/src/datadogV1/model/model_slo_delete_response.rs index 9fc32243d..1c48edc49 100644 --- a/src/datadogV1/model/model_slo_delete_response.rs +++ b/src/datadogV1/model/model_slo_delete_response.rs @@ -23,6 +23,16 @@ impl SLODeleteResponse { errors: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_errors(&mut self, value: std::collections::BTreeMap) -> &mut Self { + self.errors = Some(value); + self + } } impl Default for SLODeleteResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_history_metrics.rs b/src/datadogV1/model/model_slo_history_metrics.rs index 84bd524a1..ea28e2df7 100644 --- a/src/datadogV1/model/model_slo_history_metrics.rs +++ b/src/datadogV1/model/model_slo_history_metrics.rs @@ -13,7 +13,7 @@ pub struct SLOHistoryMetrics { /// A representation of `metric` based SLO time series for the provided queries. /// This is the same response type from `batch_query` endpoint. #[serde(rename = "denominator")] - pub denominator: Box, + pub denominator: crate::datadogV1::model::SLOHistoryMetricsSeries, /// The aggregated query interval for the series data. It's implicit based on the query time window. #[serde(rename = "interval")] pub interval: i64, @@ -23,7 +23,7 @@ pub struct SLOHistoryMetrics { /// A representation of `metric` based SLO time series for the provided queries. /// This is the same response type from `batch_query` endpoint. #[serde(rename = "numerator")] - pub numerator: Box, + pub numerator: crate::datadogV1::model::SLOHistoryMetricsSeries, /// The combined numerator and denominator query CSV. #[serde(rename = "query")] pub query: String, @@ -40,9 +40,9 @@ pub struct SLOHistoryMetrics { impl SLOHistoryMetrics { pub fn new( - denominator: Box, + denominator: crate::datadogV1::model::SLOHistoryMetricsSeries, interval: i64, - numerator: Box, + numerator: crate::datadogV1::model::SLOHistoryMetricsSeries, query: String, res_type: String, resp_version: i64, @@ -59,4 +59,9 @@ impl SLOHistoryMetrics { times, } } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } } diff --git a/src/datadogV1/model/model_slo_history_metrics_series.rs b/src/datadogV1/model/model_slo_history_metrics_series.rs index 64ef1e2bf..d1d8b6948 100644 --- a/src/datadogV1/model/model_slo_history_metrics_series.rs +++ b/src/datadogV1/model/model_slo_history_metrics_series.rs @@ -14,7 +14,7 @@ pub struct SLOHistoryMetricsSeries { pub count: i64, /// Query metadata. #[serde(rename = "metadata")] - pub metadata: Option>, + pub metadata: Option, /// Total sum of the query. #[serde(rename = "sum")] pub sum: f64, @@ -32,4 +32,12 @@ impl SLOHistoryMetricsSeries { values, } } + + pub fn with_metadata( + &mut self, + value: crate::datadogV1::model::SLOHistoryMetricsSeriesMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } } diff --git a/src/datadogV1/model/model_slo_history_metrics_series_metadata.rs b/src/datadogV1/model/model_slo_history_metrics_series_metadata.rs index 019e166d7..e1edea0d8 100644 --- a/src/datadogV1/model/model_slo_history_metrics_series_metadata.rs +++ b/src/datadogV1/model/model_slo_history_metrics_series_metadata.rs @@ -42,6 +42,39 @@ impl SLOHistoryMetricsSeriesMetadata { unit: None, } } + + pub fn with_aggr(&mut self, value: String) -> &mut Self { + self.aggr = Some(value); + self + } + + pub fn with_expression(&mut self, value: String) -> &mut Self { + self.expression = Some(value); + self + } + + pub fn with_metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn with_query_index(&mut self, value: i64) -> &mut Self { + self.query_index = Some(value); + self + } + + pub fn with_scope(&mut self, value: String) -> &mut Self { + self.scope = Some(value); + self + } + + pub fn with_unit( + &mut self, + value: Option>>, + ) -> &mut Self { + self.unit = Some(value); + self + } } impl Default for SLOHistoryMetricsSeriesMetadata { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_history_metrics_series_metadata_unit.rs b/src/datadogV1/model/model_slo_history_metrics_series_metadata_unit.rs index 8a49ab23b..667d5e8ad 100644 --- a/src/datadogV1/model/model_slo_history_metrics_series_metadata_unit.rs +++ b/src/datadogV1/model/model_slo_history_metrics_series_metadata_unit.rs @@ -43,6 +43,36 @@ impl SLOHistoryMetricsSeriesMetadataUnit { short_name: None, } } + + pub fn with_family(&mut self, value: String) -> &mut Self { + self.family = Some(value); + self + } + + pub fn with_id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_plural(&mut self, value: Option) -> &mut Self { + self.plural = Some(value); + self + } + + pub fn with_scale_factor(&mut self, value: f64) -> &mut Self { + self.scale_factor = Some(value); + self + } + + pub fn with_short_name(&mut self, value: Option) -> &mut Self { + self.short_name = Some(value); + self + } } impl Default for SLOHistoryMetricsSeriesMetadataUnit { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_history_monitor.rs b/src/datadogV1/model/model_slo_history_monitor.rs index dfdc11fa6..f8c197100 100644 --- a/src/datadogV1/model/model_slo_history_monitor.rs +++ b/src/datadogV1/model/model_slo_history_monitor.rs @@ -72,6 +72,84 @@ impl SLOHistoryMonitor { uptime: None, } } + + #[allow(deprecated)] + pub fn with_error_budget_remaining( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.error_budget_remaining = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_errors( + &mut self, + value: Vec, + ) -> &mut Self { + self.errors = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_group(&mut self, value: String) -> &mut Self { + self.group = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_history(&mut self, value: Vec>) -> &mut Self { + self.history = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_monitor_modified(&mut self, value: i64) -> &mut Self { + self.monitor_modified = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_monitor_type(&mut self, value: String) -> &mut Self { + self.monitor_type = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_precision(&mut self, value: f64) -> &mut Self { + self.precision = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_preview(&mut self, value: bool) -> &mut Self { + self.preview = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_sli_value(&mut self, value: Option) -> &mut Self { + self.sli_value = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_span_precision(&mut self, value: f64) -> &mut Self { + self.span_precision = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_uptime(&mut self, value: f64) -> &mut Self { + self.uptime = Some(value); + self + } } impl Default for SLOHistoryMonitor { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_history_response.rs b/src/datadogV1/model/model_slo_history_response.rs index 0ba522784..3f5321a6a 100644 --- a/src/datadogV1/model/model_slo_history_response.rs +++ b/src/datadogV1/model/model_slo_history_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SLOHistoryResponse { /// An array of service level objective objects. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// A list of errors while querying the history data for the service level objective. #[serde(rename = "errors", default, with = "::serde_with::rust::double_option")] pub errors: Option>>, @@ -23,6 +23,22 @@ impl SLOHistoryResponse { errors: None, } } + + pub fn with_data( + &mut self, + value: crate::datadogV1::model::SLOHistoryResponseData, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_errors( + &mut self, + value: Option>, + ) -> &mut Self { + self.errors = Some(value); + self + } } impl Default for SLOHistoryResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_history_response_data.rs b/src/datadogV1/model/model_slo_history_response_data.rs index 99abd960b..8f8d57f57 100644 --- a/src/datadogV1/model/model_slo_history_response_data.rs +++ b/src/datadogV1/model/model_slo_history_response_data.rs @@ -29,12 +29,12 @@ pub struct SLOHistoryResponseData { /// An object that holds an SLI value and its associated data. It can represent an SLO's overall SLI value. /// This can also represent the SLI value for a specific monitor in multi-monitor SLOs, or a group in grouped SLOs. #[serde(rename = "overall")] - pub overall: Option>, + pub overall: Option, /// A `metric` based SLO history response. /// /// This is not included in responses for `monitor` based SLOs. #[serde(rename = "series")] - pub series: Option>, + pub series: Option, /// mapping of string timeframe to the SLO threshold. #[serde(rename = "thresholds")] pub thresholds: @@ -67,6 +67,65 @@ impl SLOHistoryResponseData { type_id: None, } } + + pub fn with_from_ts(&mut self, value: i64) -> &mut Self { + self.from_ts = Some(value); + self + } + + pub fn with_group_by(&mut self, value: Vec) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn with_groups( + &mut self, + value: Vec, + ) -> &mut Self { + self.groups = Some(value); + self + } + + pub fn with_monitors( + &mut self, + value: Vec, + ) -> &mut Self { + self.monitors = Some(value); + self + } + + pub fn with_overall(&mut self, value: crate::datadogV1::model::SLOHistorySLIData) -> &mut Self { + self.overall = Some(value); + self + } + + pub fn with_series(&mut self, value: crate::datadogV1::model::SLOHistoryMetrics) -> &mut Self { + self.series = Some(value); + self + } + + pub fn with_thresholds( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.thresholds = Some(value); + self + } + + pub fn with_to_ts(&mut self, value: i64) -> &mut Self { + self.to_ts = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV1::model::SLOType) -> &mut Self { + self.type_ = Some(value); + self + } + + pub fn with_type_id(&mut self, value: crate::datadogV1::model::SLOTypeNumeric) -> &mut Self { + self.type_id = Some(value); + self + } } impl Default for SLOHistoryResponseData { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_history_response_error.rs b/src/datadogV1/model/model_slo_history_response_error.rs index 5cd9b3919..cf81a0f14 100644 --- a/src/datadogV1/model/model_slo_history_response_error.rs +++ b/src/datadogV1/model/model_slo_history_response_error.rs @@ -17,6 +17,11 @@ impl SLOHistoryResponseError { pub fn new() -> SLOHistoryResponseError { SLOHistoryResponseError { error: None } } + + pub fn with_error(&mut self, value: String) -> &mut Self { + self.error = Some(value); + self + } } impl Default for SLOHistoryResponseError { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_history_sli_data.rs b/src/datadogV1/model/model_slo_history_sli_data.rs index 5870abd30..65f99711c 100644 --- a/src/datadogV1/model/model_slo_history_sli_data.rs +++ b/src/datadogV1/model/model_slo_history_sli_data.rs @@ -71,6 +71,84 @@ impl SLOHistorySLIData { uptime: None, } } + + #[allow(deprecated)] + pub fn with_error_budget_remaining( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.error_budget_remaining = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_errors( + &mut self, + value: Vec, + ) -> &mut Self { + self.errors = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_group(&mut self, value: String) -> &mut Self { + self.group = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_history(&mut self, value: Vec>) -> &mut Self { + self.history = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_monitor_modified(&mut self, value: i64) -> &mut Self { + self.monitor_modified = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_monitor_type(&mut self, value: String) -> &mut Self { + self.monitor_type = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_precision(&mut self, value: std::collections::BTreeMap) -> &mut Self { + self.precision = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_preview(&mut self, value: bool) -> &mut Self { + self.preview = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_sli_value(&mut self, value: Option) -> &mut Self { + self.sli_value = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_span_precision(&mut self, value: f64) -> &mut Self { + self.span_precision = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_uptime(&mut self, value: Option) -> &mut Self { + self.uptime = Some(value); + self + } } impl Default for SLOHistorySLIData { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_list_response.rs b/src/datadogV1/model/model_slo_list_response.rs index 12f3d3a11..f3e709651 100644 --- a/src/datadogV1/model/model_slo_list_response.rs +++ b/src/datadogV1/model/model_slo_list_response.rs @@ -17,7 +17,7 @@ pub struct SLOListResponse { pub errors: Option>, /// The metadata object containing additional information about the list of SLOs. #[serde(rename = "metadata")] - pub metadata: Option>, + pub metadata: Option, } impl SLOListResponse { @@ -28,6 +28,27 @@ impl SLOListResponse { metadata: None, } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_errors(&mut self, value: Vec) -> &mut Self { + self.errors = Some(value); + self + } + + pub fn with_metadata( + &mut self, + value: crate::datadogV1::model::SLOListResponseMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } } impl Default for SLOListResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_list_response_metadata.rs b/src/datadogV1/model/model_slo_list_response_metadata.rs index 8b43808e5..312051b5c 100644 --- a/src/datadogV1/model/model_slo_list_response_metadata.rs +++ b/src/datadogV1/model/model_slo_list_response_metadata.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct SLOListResponseMetadata { /// The object containing information about the pages of the list of SLOs. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, } impl SLOListResponseMetadata { pub fn new() -> SLOListResponseMetadata { SLOListResponseMetadata { page: None } } + + pub fn with_page( + &mut self, + value: crate::datadogV1::model::SLOListResponseMetadataPage, + ) -> &mut Self { + self.page = Some(value); + self + } } impl Default for SLOListResponseMetadata { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_list_response_metadata_page.rs b/src/datadogV1/model/model_slo_list_response_metadata_page.rs index a5fb035b7..ad5b5fff6 100644 --- a/src/datadogV1/model/model_slo_list_response_metadata_page.rs +++ b/src/datadogV1/model/model_slo_list_response_metadata_page.rs @@ -23,6 +23,16 @@ impl SLOListResponseMetadataPage { total_filtered_count: None, } } + + pub fn with_total_count(&mut self, value: i64) -> &mut Self { + self.total_count = Some(value); + self + } + + pub fn with_total_filtered_count(&mut self, value: i64) -> &mut Self { + self.total_filtered_count = Some(value); + self + } } impl Default for SLOListResponseMetadataPage { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_list_widget_definition.rs b/src/datadogV1/model/model_slo_list_widget_definition.rs index b82ffd4dc..efe94721d 100644 --- a/src/datadogV1/model/model_slo_list_widget_definition.rs +++ b/src/datadogV1/model/model_slo_list_widget_definition.rs @@ -38,4 +38,22 @@ impl SLOListWidgetDefinition { type_, } } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_slo_list_widget_query.rs b/src/datadogV1/model/model_slo_list_widget_query.rs index 740947f96..f6e52f56c 100644 --- a/src/datadogV1/model/model_slo_list_widget_query.rs +++ b/src/datadogV1/model/model_slo_list_widget_query.rs @@ -27,4 +27,14 @@ impl SLOListWidgetQuery { sort: None, } } + + pub fn with_limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_sort(&mut self, value: Vec) -> &mut Self { + self.sort = Some(value); + self + } } diff --git a/src/datadogV1/model/model_slo_list_widget_request.rs b/src/datadogV1/model/model_slo_list_widget_request.rs index 4fc1e4a66..099658ee5 100644 --- a/src/datadogV1/model/model_slo_list_widget_request.rs +++ b/src/datadogV1/model/model_slo_list_widget_request.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SLOListWidgetRequest { /// Updated SLO List widget. #[serde(rename = "query")] - pub query: Box, + pub query: crate::datadogV1::model::SLOListWidgetQuery, /// Widget request type. #[serde(rename = "request_type")] pub request_type: crate::datadogV1::model::SLOListWidgetRequestType, @@ -18,7 +18,7 @@ pub struct SLOListWidgetRequest { impl SLOListWidgetRequest { pub fn new( - query: Box, + query: crate::datadogV1::model::SLOListWidgetQuery, request_type: crate::datadogV1::model::SLOListWidgetRequestType, ) -> SLOListWidgetRequest { SLOListWidgetRequest { diff --git a/src/datadogV1/model/model_slo_overall_statuses.rs b/src/datadogV1/model/model_slo_overall_statuses.rs index 583661aea..31fe7ed59 100644 --- a/src/datadogV1/model/model_slo_overall_statuses.rs +++ b/src/datadogV1/model/model_slo_overall_statuses.rs @@ -29,7 +29,7 @@ pub struct SLOOverallStatuses { with = "::serde_with::rust::double_option" )] pub raw_error_budget_remaining: - Option>>, + Option>, /// The amount of decimal places the SLI value is accurate to. #[serde( rename = "span_precision", @@ -65,6 +65,54 @@ impl SLOOverallStatuses { timeframe: None, } } + + pub fn with_error(&mut self, value: Option) -> &mut Self { + self.error = Some(value); + self + } + + pub fn with_error_budget_remaining(&mut self, value: Option) -> &mut Self { + self.error_budget_remaining = Some(value); + self + } + + pub fn with_indexed_at(&mut self, value: i64) -> &mut Self { + self.indexed_at = Some(value); + self + } + + pub fn with_raw_error_budget_remaining( + &mut self, + value: Option, + ) -> &mut Self { + self.raw_error_budget_remaining = Some(value); + self + } + + pub fn with_span_precision(&mut self, value: Option) -> &mut Self { + self.span_precision = Some(value); + self + } + + pub fn with_state(&mut self, value: crate::datadogV1::model::SLOState) -> &mut Self { + self.state = Some(value); + self + } + + pub fn with_status(&mut self, value: Option) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_target(&mut self, value: f64) -> &mut Self { + self.target = Some(value); + self + } + + pub fn with_timeframe(&mut self, value: crate::datadogV1::model::SLOTimeframe) -> &mut Self { + self.timeframe = Some(value); + self + } } impl Default for SLOOverallStatuses { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_raw_error_budget_remaining.rs b/src/datadogV1/model/model_slo_raw_error_budget_remaining.rs index e9091249f..7f0854397 100644 --- a/src/datadogV1/model/model_slo_raw_error_budget_remaining.rs +++ b/src/datadogV1/model/model_slo_raw_error_budget_remaining.rs @@ -23,6 +23,16 @@ impl SLORawErrorBudgetRemaining { value: None, } } + + pub fn with_unit(&mut self, value: String) -> &mut Self { + self.unit = Some(value); + self + } + + pub fn with_value(&mut self, value: f64) -> &mut Self { + self.value = Some(value); + self + } } impl Default for SLORawErrorBudgetRemaining { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_response.rs b/src/datadogV1/model/model_slo_response.rs index 8fad69c2d..8db94db0e 100644 --- a/src/datadogV1/model/model_slo_response.rs +++ b/src/datadogV1/model/model_slo_response.rs @@ -11,7 +11,7 @@ pub struct SLOResponse { /// A service level objective object includes a service level indicator, thresholds /// for one or more timeframes, and metadata (`name`, `description`, `tags`, etc.). #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// An array of error messages. Each endpoint documents how/whether this field is /// used. #[serde(rename = "errors")] @@ -25,6 +25,16 @@ impl SLOResponse { errors: None, } } + + pub fn with_data(&mut self, value: crate::datadogV1::model::SLOResponseData) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_errors(&mut self, value: Vec) -> &mut Self { + self.errors = Some(value); + self + } } impl Default for SLOResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_response_data.rs b/src/datadogV1/model/model_slo_response_data.rs index a539cf64e..124ef4d57 100644 --- a/src/datadogV1/model/model_slo_response_data.rs +++ b/src/datadogV1/model/model_slo_response_data.rs @@ -19,7 +19,7 @@ pub struct SLOResponseData { pub created_at: Option, /// Object describing the creator of the shared element. #[serde(rename = "creator")] - pub creator: Option>, + pub creator: Option, /// A user-defined description of the service level objective. /// /// Always included in service level objective responses (but may be `null`). @@ -66,7 +66,7 @@ pub struct SLOResponseData { /// to be used because this will sum up all request counts instead of averaging them, or taking the max or /// min of all of those requests. #[serde(rename = "query")] - pub query: Option>, + pub query: Option, /// A list of tags associated with this service level objective. /// Always included in service level objective responses (but may be empty). /// Optional in create/update requests. @@ -116,6 +116,97 @@ impl SLOResponseData { warning_threshold: None, } } + + pub fn with_configured_alert_ids(&mut self, value: Vec) -> &mut Self { + self.configured_alert_ids = Some(value); + self + } + + pub fn with_created_at(&mut self, value: i64) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + self.creator = Some(value); + self + } + + pub fn with_description(&mut self, value: Option) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_groups(&mut self, value: Vec) -> &mut Self { + self.groups = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_modified_at(&mut self, value: i64) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn with_monitor_ids(&mut self, value: Vec) -> &mut Self { + self.monitor_ids = Some(value); + self + } + + pub fn with_monitor_tags(&mut self, value: Vec) -> &mut Self { + self.monitor_tags = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_query( + &mut self, + value: crate::datadogV1::model::ServiceLevelObjectiveQuery, + ) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_target_threshold(&mut self, value: f64) -> &mut Self { + self.target_threshold = Some(value); + self + } + + pub fn with_thresholds( + &mut self, + value: Vec, + ) -> &mut Self { + self.thresholds = Some(value); + self + } + + pub fn with_timeframe(&mut self, value: crate::datadogV1::model::SLOTimeframe) -> &mut Self { + self.timeframe = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV1::model::SLOType) -> &mut Self { + self.type_ = Some(value); + self + } + + pub fn with_warning_threshold(&mut self, value: f64) -> &mut Self { + self.warning_threshold = Some(value); + self + } } impl Default for SLOResponseData { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_status.rs b/src/datadogV1/model/model_slo_status.rs index 25831f70f..1450cca5e 100644 --- a/src/datadogV1/model/model_slo_status.rs +++ b/src/datadogV1/model/model_slo_status.rs @@ -33,7 +33,7 @@ pub struct SLOStatus { with = "::serde_with::rust::double_option" )] pub raw_error_budget_remaining: - Option>>, + Option>, /// The current service level indicator (SLI) of the SLO, also known as 'status'. This is a percentage value from 0-100 (inclusive). #[serde(rename = "sli", default, with = "::serde_with::rust::double_option")] pub sli: Option>, @@ -61,6 +61,44 @@ impl SLOStatus { state: None, } } + + pub fn with_calculation_error(&mut self, value: Option) -> &mut Self { + self.calculation_error = Some(value); + self + } + + pub fn with_error_budget_remaining(&mut self, value: Option) -> &mut Self { + self.error_budget_remaining = Some(value); + self + } + + pub fn with_indexed_at(&mut self, value: i64) -> &mut Self { + self.indexed_at = Some(value); + self + } + + pub fn with_raw_error_budget_remaining( + &mut self, + value: Option, + ) -> &mut Self { + self.raw_error_budget_remaining = Some(value); + self + } + + pub fn with_sli(&mut self, value: Option) -> &mut Self { + self.sli = Some(value); + self + } + + pub fn with_span_precision(&mut self, value: Option) -> &mut Self { + self.span_precision = Some(value); + self + } + + pub fn with_state(&mut self, value: crate::datadogV1::model::SLOState) -> &mut Self { + self.state = Some(value); + self + } } impl Default for SLOStatus { fn default() -> Self { diff --git a/src/datadogV1/model/model_slo_threshold.rs b/src/datadogV1/model/model_slo_threshold.rs index d52c4ce60..29aec48fb 100644 --- a/src/datadogV1/model/model_slo_threshold.rs +++ b/src/datadogV1/model/model_slo_threshold.rs @@ -44,4 +44,19 @@ impl SLOThreshold { warning_display: None, } } + + pub fn with_target_display(&mut self, value: String) -> &mut Self { + self.target_display = Some(value); + self + } + + pub fn with_warning(&mut self, value: f64) -> &mut Self { + self.warning = Some(value); + self + } + + pub fn with_warning_display(&mut self, value: String) -> &mut Self { + self.warning_display = Some(value); + self + } } diff --git a/src/datadogV1/model/model_slo_widget_definition.rs b/src/datadogV1/model/model_slo_widget_definition.rs index ad483fae0..73a961194 100644 --- a/src/datadogV1/model/model_slo_widget_definition.rs +++ b/src/datadogV1/model/model_slo_widget_definition.rs @@ -62,4 +62,55 @@ impl SLOWidgetDefinition { view_type, } } + + pub fn with_additional_query_filters(&mut self, value: String) -> &mut Self { + self.additional_query_filters = Some(value); + self + } + + pub fn with_global_time_target(&mut self, value: String) -> &mut Self { + self.global_time_target = Some(value); + self + } + + pub fn with_show_error_budget(&mut self, value: bool) -> &mut Self { + self.show_error_budget = Some(value); + self + } + + pub fn with_slo_id(&mut self, value: String) -> &mut Self { + self.slo_id = Some(value); + self + } + + pub fn with_time_windows( + &mut self, + value: Vec, + ) -> &mut Self { + self.time_windows = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } + + pub fn with_view_mode(&mut self, value: crate::datadogV1::model::WidgetViewMode) -> &mut Self { + self.view_mode = Some(value); + self + } } diff --git a/src/datadogV1/model/model_split_config.rs b/src/datadogV1/model/model_split_config.rs index dcc3b5ca5..0af41527f 100644 --- a/src/datadogV1/model/model_split_config.rs +++ b/src/datadogV1/model/model_split_config.rs @@ -13,7 +13,7 @@ pub struct SplitConfig { pub limit: i64, /// Controls the order in which graphs appear in the split. #[serde(rename = "sort")] - pub sort: Box, + pub sort: crate::datadogV1::model::SplitSort, /// The dimension(s) on which to split the graph #[serde(rename = "split_dimensions")] pub split_dimensions: Vec, @@ -25,7 +25,7 @@ pub struct SplitConfig { impl SplitConfig { pub fn new( limit: i64, - sort: Box, + sort: crate::datadogV1::model::SplitSort, split_dimensions: Vec, ) -> SplitConfig { SplitConfig { @@ -35,4 +35,12 @@ impl SplitConfig { static_splits: None, } } + + pub fn with_static_splits( + &mut self, + value: Vec>, + ) -> &mut Self { + self.static_splits = Some(value); + self + } } diff --git a/src/datadogV1/model/model_split_graph_source_widget_definition.rs b/src/datadogV1/model/model_split_graph_source_widget_definition.rs index a80777657..1ef1eb165 100644 --- a/src/datadogV1/model/model_split_graph_source_widget_definition.rs +++ b/src/datadogV1/model/model_split_graph_source_widget_definition.rs @@ -7,13 +7,13 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum SplitGraphSourceWidgetDefinition { - ChangeWidgetDefinition(Box), - GeomapWidgetDefinition(Box), - QueryValueWidgetDefinition(Box), - ScatterPlotWidgetDefinition(Box), - SunburstWidgetDefinition(Box), - TableWidgetDefinition(Box), - TimeseriesWidgetDefinition(Box), - ToplistWidgetDefinition(Box), - TreeMapWidgetDefinition(Box), + ChangeWidgetDefinition(crate::datadogV1::model::ChangeWidgetDefinition), + GeomapWidgetDefinition(crate::datadogV1::model::GeomapWidgetDefinition), + QueryValueWidgetDefinition(crate::datadogV1::model::QueryValueWidgetDefinition), + ScatterPlotWidgetDefinition(crate::datadogV1::model::ScatterPlotWidgetDefinition), + SunburstWidgetDefinition(crate::datadogV1::model::SunburstWidgetDefinition), + TableWidgetDefinition(crate::datadogV1::model::TableWidgetDefinition), + TimeseriesWidgetDefinition(crate::datadogV1::model::TimeseriesWidgetDefinition), + ToplistWidgetDefinition(crate::datadogV1::model::ToplistWidgetDefinition), + TreeMapWidgetDefinition(crate::datadogV1::model::TreeMapWidgetDefinition), } diff --git a/src/datadogV1/model/model_split_graph_widget_definition.rs b/src/datadogV1/model/model_split_graph_widget_definition.rs index c219235b3..7baa2884a 100644 --- a/src/datadogV1/model/model_split_graph_widget_definition.rs +++ b/src/datadogV1/model/model_split_graph_widget_definition.rs @@ -17,13 +17,13 @@ pub struct SplitGraphWidgetDefinition { pub size: crate::datadogV1::model::SplitGraphVizSize, /// The original widget we are splitting on. #[serde(rename = "source_widget_definition")] - pub source_widget_definition: Box, + pub source_widget_definition: crate::datadogV1::model::SplitGraphSourceWidgetDefinition, /// Encapsulates all user choices about how to split a graph. #[serde(rename = "split_config")] - pub split_config: Box, + pub split_config: crate::datadogV1::model::SplitConfig, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// Title of your widget. #[serde(rename = "title")] pub title: Option, @@ -35,8 +35,8 @@ pub struct SplitGraphWidgetDefinition { impl SplitGraphWidgetDefinition { pub fn new( size: crate::datadogV1::model::SplitGraphVizSize, - source_widget_definition: Box, - split_config: Box, + source_widget_definition: crate::datadogV1::model::SplitGraphSourceWidgetDefinition, + split_config: crate::datadogV1::model::SplitConfig, type_: crate::datadogV1::model::SplitGraphWidgetDefinitionType, ) -> SplitGraphWidgetDefinition { SplitGraphWidgetDefinition { @@ -49,4 +49,19 @@ impl SplitGraphWidgetDefinition { type_, } } + + pub fn with_has_uniform_y_axes(&mut self, value: bool) -> &mut Self { + self.has_uniform_y_axes = Some(value); + self + } + + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } } diff --git a/src/datadogV1/model/model_split_sort.rs b/src/datadogV1/model/model_split_sort.rs index 0da04465f..780fe425b 100644 --- a/src/datadogV1/model/model_split_sort.rs +++ b/src/datadogV1/model/model_split_sort.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SplitSort { /// Defines the metric and aggregation used as the sort value. #[serde(rename = "compute")] - pub compute: Option>, + pub compute: Option, /// Widget sorting methods. #[serde(rename = "order")] pub order: crate::datadogV1::model::WidgetSort, @@ -23,4 +23,12 @@ impl SplitSort { order, } } + + pub fn with_compute( + &mut self, + value: crate::datadogV1::model::SplitConfigSortCompute, + ) -> &mut Self { + self.compute = Some(value); + self + } } diff --git a/src/datadogV1/model/model_successful_signal_update_response.rs b/src/datadogV1/model/model_successful_signal_update_response.rs index b4dd3e168..d7cb56083 100644 --- a/src/datadogV1/model/model_successful_signal_update_response.rs +++ b/src/datadogV1/model/model_successful_signal_update_response.rs @@ -17,6 +17,11 @@ impl SuccessfulSignalUpdateResponse { pub fn new() -> SuccessfulSignalUpdateResponse { SuccessfulSignalUpdateResponse { status: None } } + + pub fn with_status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + self + } } impl Default for SuccessfulSignalUpdateResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_sunburst_widget_definition.rs b/src/datadogV1/model/model_sunburst_widget_definition.rs index 0733158a5..c8c91fcbc 100644 --- a/src/datadogV1/model/model_sunburst_widget_definition.rs +++ b/src/datadogV1/model/model_sunburst_widget_definition.rs @@ -16,13 +16,13 @@ pub struct SunburstWidgetDefinition { pub hide_total: Option, /// Configuration of the legend. #[serde(rename = "legend")] - pub legend: Option>, + pub legend: Option, /// List of sunburst widget requests. #[serde(rename = "requests")] pub requests: Vec, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// Title of your widget. #[serde(rename = "title")] pub title: Option, @@ -54,4 +54,48 @@ impl SunburstWidgetDefinition { type_, } } + + pub fn with_custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn with_hide_total(&mut self, value: bool) -> &mut Self { + self.hide_total = Some(value); + self + } + + pub fn with_legend( + &mut self, + value: crate::datadogV1::model::SunburstWidgetLegend, + ) -> &mut Self { + self.legend = Some(value); + self + } + + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_sunburst_widget_legend.rs b/src/datadogV1/model/model_sunburst_widget_legend.rs index af4481c32..1ead84869 100644 --- a/src/datadogV1/model/model_sunburst_widget_legend.rs +++ b/src/datadogV1/model/model_sunburst_widget_legend.rs @@ -7,8 +7,8 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum SunburstWidgetLegend { - SunburstWidgetLegendTable(Box), + SunburstWidgetLegendTable(crate::datadogV1::model::SunburstWidgetLegendTable), SunburstWidgetLegendInlineAutomatic( - Box, + crate::datadogV1::model::SunburstWidgetLegendInlineAutomatic, ), } diff --git a/src/datadogV1/model/model_sunburst_widget_legend_inline_automatic.rs b/src/datadogV1/model/model_sunburst_widget_legend_inline_automatic.rs index 4560246f8..23e955fb6 100644 --- a/src/datadogV1/model/model_sunburst_widget_legend_inline_automatic.rs +++ b/src/datadogV1/model/model_sunburst_widget_legend_inline_automatic.rs @@ -29,4 +29,14 @@ impl SunburstWidgetLegendInlineAutomatic { type_, } } + + pub fn with_hide_percent(&mut self, value: bool) -> &mut Self { + self.hide_percent = Some(value); + self + } + + pub fn with_hide_value(&mut self, value: bool) -> &mut Self { + self.hide_value = Some(value); + self + } } diff --git a/src/datadogV1/model/model_sunburst_widget_request.rs b/src/datadogV1/model/model_sunburst_widget_request.rs index 830daa55a..813e0b97e 100644 --- a/src/datadogV1/model/model_sunburst_widget_request.rs +++ b/src/datadogV1/model/model_sunburst_widget_request.rs @@ -10,28 +10,28 @@ use serde_with::skip_serializing_none; pub struct SunburstWidgetRequest { /// The log query. #[serde(rename = "apm_query")] - pub apm_query: Option>, + pub apm_query: Option, /// The log query. #[serde(rename = "audit_query")] - pub audit_query: Option>, + pub audit_query: Option, /// The log query. #[serde(rename = "event_query")] - pub event_query: Option>, + pub event_query: Option, /// List of formulas that operate on queries. #[serde(rename = "formulas")] pub formulas: Option>, /// The log query. #[serde(rename = "log_query")] - pub log_query: Option>, + pub log_query: Option, /// The log query. #[serde(rename = "network_query")] - pub network_query: Option>, + pub network_query: Option, /// The process query to use in the widget. #[serde(rename = "process_query")] - pub process_query: Option>, + pub process_query: Option, /// The log query. #[serde(rename = "profile_metrics_query")] - pub profile_metrics_query: Option>, + pub profile_metrics_query: Option, /// Widget query. #[serde(rename = "q")] pub q: Option, @@ -43,13 +43,13 @@ pub struct SunburstWidgetRequest { pub response_format: Option, /// The log query. #[serde(rename = "rum_query")] - pub rum_query: Option>, + pub rum_query: Option, /// The log query. #[serde(rename = "security_query")] - pub security_query: Option>, + pub security_query: Option, /// Widget style definition. #[serde(rename = "style")] - pub style: Option>, + pub style: Option, } impl SunburstWidgetRequest { @@ -71,6 +71,112 @@ impl SunburstWidgetRequest { style: None, } } + + pub fn with_apm_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn with_audit_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.audit_query = Some(value); + self + } + + pub fn with_event_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn with_formulas( + &mut self, + value: Vec, + ) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn with_log_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn with_network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn with_process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn with_profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn with_q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn with_queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn with_response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + self + } + + pub fn with_rum_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn with_security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + self + } + + pub fn with_style(&mut self, value: crate::datadogV1::model::WidgetStyle) -> &mut Self { + self.style = Some(value); + self + } } impl Default for SunburstWidgetRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_api_step.rs b/src/datadogV1/model/model_synthetics_api_step.rs index 93722cc54..f669b1660 100644 --- a/src/datadogV1/model/model_synthetics_api_step.rs +++ b/src/datadogV1/model/model_synthetics_api_step.rs @@ -26,10 +26,10 @@ pub struct SyntheticsAPIStep { pub name: String, /// Object describing the Synthetic test request. #[serde(rename = "request")] - pub request: Box, + pub request: crate::datadogV1::model::SyntheticsTestRequest, /// Object describing the retry strategy to apply to a Synthetic test. #[serde(rename = "retry")] - pub retry: Option>, + pub retry: Option, /// The subtype of the Synthetic multistep API test step, currently only supporting `http`. #[serde(rename = "subtype")] pub subtype: crate::datadogV1::model::SyntheticsAPIStepSubtype, @@ -39,7 +39,7 @@ impl SyntheticsAPIStep { pub fn new( assertions: Vec, name: String, - request: Box, + request: crate::datadogV1::model::SyntheticsTestRequest, subtype: crate::datadogV1::model::SyntheticsAPIStepSubtype, ) -> SyntheticsAPIStep { SyntheticsAPIStep { @@ -53,4 +53,30 @@ impl SyntheticsAPIStep { subtype, } } + + pub fn with_allow_failure(&mut self, value: bool) -> &mut Self { + self.allow_failure = Some(value); + self + } + + pub fn with_extracted_values( + &mut self, + value: Vec, + ) -> &mut Self { + self.extracted_values = Some(value); + self + } + + pub fn with_is_critical(&mut self, value: bool) -> &mut Self { + self.is_critical = Some(value); + self + } + + pub fn with_retry( + &mut self, + value: crate::datadogV1::model::SyntheticsTestOptionsRetry, + ) -> &mut Self { + self.retry = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_api_test.rs b/src/datadogV1/model/model_synthetics_api_test.rs index e01d0a1b0..dee7ffbeb 100644 --- a/src/datadogV1/model/model_synthetics_api_test.rs +++ b/src/datadogV1/model/model_synthetics_api_test.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SyntheticsAPITest { /// Configuration object for a Synthetic API test. #[serde(rename = "config")] - pub config: Box, + pub config: crate::datadogV1::model::SyntheticsAPITestConfig, /// Array of locations used to run the test. #[serde(rename = "locations")] pub locations: Vec, @@ -25,7 +25,7 @@ pub struct SyntheticsAPITest { pub name: String, /// Object describing the extra options for a Synthetic test. #[serde(rename = "options")] - pub options: Box, + pub options: crate::datadogV1::model::SyntheticsTestOptions, /// The public ID for the test. #[serde(rename = "public_id")] pub public_id: Option, @@ -47,11 +47,11 @@ pub struct SyntheticsAPITest { impl SyntheticsAPITest { pub fn new( - config: Box, + config: crate::datadogV1::model::SyntheticsAPITestConfig, locations: Vec, message: String, name: String, - options: Box, + options: crate::datadogV1::model::SyntheticsTestOptions, type_: crate::datadogV1::model::SyntheticsAPITestType, ) -> SyntheticsAPITest { SyntheticsAPITest { @@ -68,4 +68,35 @@ impl SyntheticsAPITest { type_, } } + + pub fn with_monitor_id(&mut self, value: i64) -> &mut Self { + self.monitor_id = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_status( + &mut self, + value: crate::datadogV1::model::SyntheticsTestPauseStatus, + ) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_subtype( + &mut self, + value: crate::datadogV1::model::SyntheticsTestDetailsSubType, + ) -> &mut Self { + self.subtype = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_api_test_config.rs b/src/datadogV1/model/model_synthetics_api_test_config.rs index c905ad8ee..1a9196538 100644 --- a/src/datadogV1/model/model_synthetics_api_test_config.rs +++ b/src/datadogV1/model/model_synthetics_api_test_config.rs @@ -16,7 +16,7 @@ pub struct SyntheticsAPITestConfig { pub config_variables: Option>, /// Object describing the Synthetic test request. #[serde(rename = "request")] - pub request: Option>, + pub request: Option, /// When the test subtype is `multi`, the steps of the test. #[serde(rename = "steps")] pub steps: Option>, @@ -31,6 +31,38 @@ impl SyntheticsAPITestConfig { steps: None, } } + + pub fn with_assertions( + &mut self, + value: Vec, + ) -> &mut Self { + self.assertions = Some(value); + self + } + + pub fn with_config_variables( + &mut self, + value: Vec, + ) -> &mut Self { + self.config_variables = Some(value); + self + } + + pub fn with_request( + &mut self, + value: crate::datadogV1::model::SyntheticsTestRequest, + ) -> &mut Self { + self.request = Some(value); + self + } + + pub fn with_steps( + &mut self, + value: Vec, + ) -> &mut Self { + self.steps = Some(value); + self + } } impl Default for SyntheticsAPITestConfig { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_api_test_result_data.rs b/src/datadogV1/model/model_synthetics_api_test_result_data.rs index 9486d933f..7a03a9483 100644 --- a/src/datadogV1/model/model_synthetics_api_test_result_data.rs +++ b/src/datadogV1/model/model_synthetics_api_test_result_data.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct SyntheticsAPITestResultData { /// Object describing the SSL certificate used for a Synthetic test. #[serde(rename = "cert")] - pub cert: Option>, + pub cert: Option, /// Status of a Synthetic test. #[serde(rename = "eventType")] pub event_type: Option, /// The API test failure details. #[serde(rename = "failure")] - pub failure: Option>, + pub failure: Option, /// The API test HTTP status code. #[serde(rename = "httpStatusCode")] pub http_status_code: Option, @@ -37,7 +37,7 @@ pub struct SyntheticsAPITestResultData { /// Object containing all metrics and their values collected for a Synthetic API test. /// See the [Synthetic Monitoring Metrics documentation](). #[serde(rename = "timings")] - pub timings: Option>, + pub timings: Option, } impl SyntheticsAPITestResultData { @@ -54,6 +54,69 @@ impl SyntheticsAPITestResultData { timings: None, } } + + pub fn with_cert( + &mut self, + value: crate::datadogV1::model::SyntheticsSSLCertificate, + ) -> &mut Self { + self.cert = Some(value); + self + } + + pub fn with_event_type( + &mut self, + value: crate::datadogV1::model::SyntheticsTestProcessStatus, + ) -> &mut Self { + self.event_type = Some(value); + self + } + + pub fn with_failure( + &mut self, + value: crate::datadogV1::model::SyntheticsApiTestResultFailure, + ) -> &mut Self { + self.failure = Some(value); + self + } + + pub fn with_http_status_code(&mut self, value: i64) -> &mut Self { + self.http_status_code = Some(value); + self + } + + pub fn with_request_headers( + &mut self, + value: std::collections::BTreeMap< + String, + std::collections::BTreeMap, + >, + ) -> &mut Self { + self.request_headers = Some(value); + self + } + + pub fn with_response_body(&mut self, value: String) -> &mut Self { + self.response_body = Some(value); + self + } + + pub fn with_response_headers( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.response_headers = Some(value); + self + } + + pub fn with_response_size(&mut self, value: i64) -> &mut Self { + self.response_size = Some(value); + self + } + + pub fn with_timings(&mut self, value: crate::datadogV1::model::SyntheticsTiming) -> &mut Self { + self.timings = Some(value); + self + } } impl Default for SyntheticsAPITestResultData { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_api_test_result_failure.rs b/src/datadogV1/model/model_synthetics_api_test_result_failure.rs index e1034eeb8..840c67826 100644 --- a/src/datadogV1/model/model_synthetics_api_test_result_failure.rs +++ b/src/datadogV1/model/model_synthetics_api_test_result_failure.rs @@ -23,6 +23,19 @@ impl SyntheticsApiTestResultFailure { message: None, } } + + pub fn with_code( + &mut self, + value: crate::datadogV1::model::SyntheticsApiTestFailureCode, + ) -> &mut Self { + self.code = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } } impl Default for SyntheticsApiTestResultFailure { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_api_test_result_full.rs b/src/datadogV1/model/model_synthetics_api_test_result_full.rs index 4af29f641..adf82d0ba 100644 --- a/src/datadogV1/model/model_synthetics_api_test_result_full.rs +++ b/src/datadogV1/model/model_synthetics_api_test_result_full.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SyntheticsAPITestResultFull { /// Object describing the API test configuration. #[serde(rename = "check")] - pub check: Option>, + pub check: Option, /// When the API test was conducted. #[serde(rename = "check_time")] pub check_time: Option, @@ -22,7 +22,7 @@ pub struct SyntheticsAPITestResultFull { pub probe_dc: Option, /// Object containing results for your Synthetic API test. #[serde(rename = "result")] - pub result: Option>, + pub result: Option, /// ID of the API test result. #[serde(rename = "result_id")] pub result_id: Option, @@ -46,6 +46,50 @@ impl SyntheticsAPITestResultFull { status: None, } } + + pub fn with_check( + &mut self, + value: crate::datadogV1::model::SyntheticsAPITestResultFullCheck, + ) -> &mut Self { + self.check = Some(value); + self + } + + pub fn with_check_time(&mut self, value: f64) -> &mut Self { + self.check_time = Some(value); + self + } + + pub fn with_check_version(&mut self, value: i64) -> &mut Self { + self.check_version = Some(value); + self + } + + pub fn with_probe_dc(&mut self, value: String) -> &mut Self { + self.probe_dc = Some(value); + self + } + + pub fn with_result( + &mut self, + value: crate::datadogV1::model::SyntheticsAPITestResultData, + ) -> &mut Self { + self.result = Some(value); + self + } + + pub fn with_result_id(&mut self, value: String) -> &mut Self { + self.result_id = Some(value); + self + } + + pub fn with_status( + &mut self, + value: crate::datadogV1::model::SyntheticsTestMonitorStatus, + ) -> &mut Self { + self.status = Some(value); + self + } } impl Default for SyntheticsAPITestResultFull { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_api_test_result_full_check.rs b/src/datadogV1/model/model_synthetics_api_test_result_full_check.rs index 3e4dfa740..35d931ca5 100644 --- a/src/datadogV1/model/model_synthetics_api_test_result_full_check.rs +++ b/src/datadogV1/model/model_synthetics_api_test_result_full_check.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct SyntheticsAPITestResultFullCheck { /// Configuration object for a Synthetic test. #[serde(rename = "config")] - pub config: Box, + pub config: crate::datadogV1::model::SyntheticsTestConfig, } impl SyntheticsAPITestResultFullCheck { pub fn new( - config: Box, + config: crate::datadogV1::model::SyntheticsTestConfig, ) -> SyntheticsAPITestResultFullCheck { SyntheticsAPITestResultFullCheck { config } } diff --git a/src/datadogV1/model/model_synthetics_api_test_result_short.rs b/src/datadogV1/model/model_synthetics_api_test_result_short.rs index 56cc9fe0d..a45d727a5 100644 --- a/src/datadogV1/model/model_synthetics_api_test_result_short.rs +++ b/src/datadogV1/model/model_synthetics_api_test_result_short.rs @@ -16,7 +16,7 @@ pub struct SyntheticsAPITestResultShort { pub probe_dc: Option, /// Result of the last API test run. #[serde(rename = "result")] - pub result: Option>, + pub result: Option, /// ID of the API test result. #[serde(rename = "result_id")] pub result_id: Option, @@ -38,6 +38,37 @@ impl SyntheticsAPITestResultShort { status: None, } } + + pub fn with_check_time(&mut self, value: f64) -> &mut Self { + self.check_time = Some(value); + self + } + + pub fn with_probe_dc(&mut self, value: String) -> &mut Self { + self.probe_dc = Some(value); + self + } + + pub fn with_result( + &mut self, + value: crate::datadogV1::model::SyntheticsAPITestResultShortResult, + ) -> &mut Self { + self.result = Some(value); + self + } + + pub fn with_result_id(&mut self, value: String) -> &mut Self { + self.result_id = Some(value); + self + } + + pub fn with_status( + &mut self, + value: crate::datadogV1::model::SyntheticsTestMonitorStatus, + ) -> &mut Self { + self.status = Some(value); + self + } } impl Default for SyntheticsAPITestResultShort { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_api_test_result_short_result.rs b/src/datadogV1/model/model_synthetics_api_test_result_short_result.rs index b5de0822c..23d7262f9 100644 --- a/src/datadogV1/model/model_synthetics_api_test_result_short_result.rs +++ b/src/datadogV1/model/model_synthetics_api_test_result_short_result.rs @@ -14,7 +14,7 @@ pub struct SyntheticsAPITestResultShortResult { /// Object containing all metrics and their values collected for a Synthetic API test. /// See the [Synthetic Monitoring Metrics documentation](). #[serde(rename = "timings")] - pub timings: Option>, + pub timings: Option, } impl SyntheticsAPITestResultShortResult { @@ -24,6 +24,16 @@ impl SyntheticsAPITestResultShortResult { timings: None, } } + + pub fn with_passed(&mut self, value: bool) -> &mut Self { + self.passed = Some(value); + self + } + + pub fn with_timings(&mut self, value: crate::datadogV1::model::SyntheticsTiming) -> &mut Self { + self.timings = Some(value); + self + } } impl Default for SyntheticsAPITestResultShortResult { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_assertion.rs b/src/datadogV1/model/model_synthetics_assertion.rs index e127a46c2..ae64f5e88 100644 --- a/src/datadogV1/model/model_synthetics_assertion.rs +++ b/src/datadogV1/model/model_synthetics_assertion.rs @@ -8,9 +8,7 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum SyntheticsAssertion { - SyntheticsAssertionTarget(Box), - SyntheticsAssertionJSONPathTarget( - Box, - ), - SyntheticsAssertionXPathTarget(Box), + SyntheticsAssertionTarget(crate::datadogV1::model::SyntheticsAssertionTarget), + SyntheticsAssertionJSONPathTarget(crate::datadogV1::model::SyntheticsAssertionJSONPathTarget), + SyntheticsAssertionXPathTarget(crate::datadogV1::model::SyntheticsAssertionXPathTarget), } diff --git a/src/datadogV1/model/model_synthetics_assertion_json_path_target.rs b/src/datadogV1/model/model_synthetics_assertion_json_path_target.rs index 54ff40bfe..c887200c4 100644 --- a/src/datadogV1/model/model_synthetics_assertion_json_path_target.rs +++ b/src/datadogV1/model/model_synthetics_assertion_json_path_target.rs @@ -16,7 +16,7 @@ pub struct SyntheticsAssertionJSONPathTarget { pub property: Option, /// Composed target for `validatesJSONPath` operator. #[serde(rename = "target")] - pub target: Option>, + pub target: Option, /// Type of the assertion. #[serde(rename = "type")] pub type_: crate::datadogV1::model::SyntheticsAssertionType, @@ -34,4 +34,17 @@ impl SyntheticsAssertionJSONPathTarget { type_, } } + + pub fn with_property(&mut self, value: String) -> &mut Self { + self.property = Some(value); + self + } + + pub fn with_target( + &mut self, + value: crate::datadogV1::model::SyntheticsAssertionJSONPathTargetTarget, + ) -> &mut Self { + self.target = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_assertion_json_path_target_target.rs b/src/datadogV1/model/model_synthetics_assertion_json_path_target_target.rs index 2578994f1..7ea5b4f62 100644 --- a/src/datadogV1/model/model_synthetics_assertion_json_path_target_target.rs +++ b/src/datadogV1/model/model_synthetics_assertion_json_path_target_target.rs @@ -27,6 +27,21 @@ impl SyntheticsAssertionJSONPathTargetTarget { target_value: None, } } + + pub fn with_json_path(&mut self, value: String) -> &mut Self { + self.json_path = Some(value); + self + } + + pub fn with_operator(&mut self, value: String) -> &mut Self { + self.operator = Some(value); + self + } + + pub fn with_target_value(&mut self, value: serde_json::Value) -> &mut Self { + self.target_value = Some(value); + self + } } impl Default for SyntheticsAssertionJSONPathTargetTarget { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_assertion_target.rs b/src/datadogV1/model/model_synthetics_assertion_target.rs index 224cd35dd..dcd237141 100644 --- a/src/datadogV1/model/model_synthetics_assertion_target.rs +++ b/src/datadogV1/model/model_synthetics_assertion_target.rs @@ -39,4 +39,17 @@ impl SyntheticsAssertionTarget { type_, } } + + pub fn with_property(&mut self, value: String) -> &mut Self { + self.property = Some(value); + self + } + + pub fn with_timings_scope( + &mut self, + value: crate::datadogV1::model::SyntheticsAssertionTimingsScope, + ) -> &mut Self { + self.timings_scope = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_assertion_x_path_target.rs b/src/datadogV1/model/model_synthetics_assertion_x_path_target.rs index b0d59f9be..89d9ab170 100644 --- a/src/datadogV1/model/model_synthetics_assertion_x_path_target.rs +++ b/src/datadogV1/model/model_synthetics_assertion_x_path_target.rs @@ -16,7 +16,7 @@ pub struct SyntheticsAssertionXPathTarget { pub property: Option, /// Composed target for `validatesXPath` operator. #[serde(rename = "target")] - pub target: Option>, + pub target: Option, /// Type of the assertion. #[serde(rename = "type")] pub type_: crate::datadogV1::model::SyntheticsAssertionType, @@ -34,4 +34,17 @@ impl SyntheticsAssertionXPathTarget { type_, } } + + pub fn with_property(&mut self, value: String) -> &mut Self { + self.property = Some(value); + self + } + + pub fn with_target( + &mut self, + value: crate::datadogV1::model::SyntheticsAssertionXPathTargetTarget, + ) -> &mut Self { + self.target = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_assertion_x_path_target_target.rs b/src/datadogV1/model/model_synthetics_assertion_x_path_target_target.rs index 185e80148..4d36e80c9 100644 --- a/src/datadogV1/model/model_synthetics_assertion_x_path_target_target.rs +++ b/src/datadogV1/model/model_synthetics_assertion_x_path_target_target.rs @@ -27,6 +27,21 @@ impl SyntheticsAssertionXPathTargetTarget { x_path: None, } } + + pub fn with_operator(&mut self, value: String) -> &mut Self { + self.operator = Some(value); + self + } + + pub fn with_target_value(&mut self, value: serde_json::Value) -> &mut Self { + self.target_value = Some(value); + self + } + + pub fn with_x_path(&mut self, value: String) -> &mut Self { + self.x_path = Some(value); + self + } } impl Default for SyntheticsAssertionXPathTargetTarget { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_basic_auth.rs b/src/datadogV1/model/model_synthetics_basic_auth.rs index ee4738958..66f3188c8 100644 --- a/src/datadogV1/model/model_synthetics_basic_auth.rs +++ b/src/datadogV1/model/model_synthetics_basic_auth.rs @@ -7,10 +7,10 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum SyntheticsBasicAuth { - SyntheticsBasicAuthWeb(Box), - SyntheticsBasicAuthSigv4(Box), - SyntheticsBasicAuthNTLM(Box), - SyntheticsBasicAuthDigest(Box), - SyntheticsBasicAuthOauthClient(Box), - SyntheticsBasicAuthOauthROP(Box), + SyntheticsBasicAuthWeb(crate::datadogV1::model::SyntheticsBasicAuthWeb), + SyntheticsBasicAuthSigv4(crate::datadogV1::model::SyntheticsBasicAuthSigv4), + SyntheticsBasicAuthNTLM(crate::datadogV1::model::SyntheticsBasicAuthNTLM), + SyntheticsBasicAuthDigest(crate::datadogV1::model::SyntheticsBasicAuthDigest), + SyntheticsBasicAuthOauthClient(crate::datadogV1::model::SyntheticsBasicAuthOauthClient), + SyntheticsBasicAuthOauthROP(crate::datadogV1::model::SyntheticsBasicAuthOauthROP), } diff --git a/src/datadogV1/model/model_synthetics_basic_auth_digest.rs b/src/datadogV1/model/model_synthetics_basic_auth_digest.rs index cc9cafffe..0a1d154ae 100644 --- a/src/datadogV1/model/model_synthetics_basic_auth_digest.rs +++ b/src/datadogV1/model/model_synthetics_basic_auth_digest.rs @@ -27,4 +27,12 @@ impl SyntheticsBasicAuthDigest { username, } } + + pub fn with_type_( + &mut self, + value: crate::datadogV1::model::SyntheticsBasicAuthDigestType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_basic_auth_ntlm.rs b/src/datadogV1/model/model_synthetics_basic_auth_ntlm.rs index 30c1578ad..705342cf2 100644 --- a/src/datadogV1/model/model_synthetics_basic_auth_ntlm.rs +++ b/src/datadogV1/model/model_synthetics_basic_auth_ntlm.rs @@ -37,4 +37,24 @@ impl SyntheticsBasicAuthNTLM { workstation: None, } } + + pub fn with_domain(&mut self, value: String) -> &mut Self { + self.domain = Some(value); + self + } + + pub fn with_password(&mut self, value: String) -> &mut Self { + self.password = Some(value); + self + } + + pub fn with_username(&mut self, value: String) -> &mut Self { + self.username = Some(value); + self + } + + pub fn with_workstation(&mut self, value: String) -> &mut Self { + self.workstation = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_basic_auth_oauth_client.rs b/src/datadogV1/model/model_synthetics_basic_auth_oauth_client.rs index d82e87f93..ac878bb9b 100644 --- a/src/datadogV1/model/model_synthetics_basic_auth_oauth_client.rs +++ b/src/datadogV1/model/model_synthetics_basic_auth_oauth_client.rs @@ -53,4 +53,27 @@ impl SyntheticsBasicAuthOauthClient { type_: None, } } + + pub fn with_audience(&mut self, value: String) -> &mut Self { + self.audience = Some(value); + self + } + + pub fn with_resource(&mut self, value: String) -> &mut Self { + self.resource = Some(value); + self + } + + pub fn with_scope(&mut self, value: String) -> &mut Self { + self.scope = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV1::model::SyntheticsBasicAuthOauthClientType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_basic_auth_oauth_rop.rs b/src/datadogV1/model/model_synthetics_basic_auth_oauth_rop.rs index a19e95ad8..a18d83d78 100644 --- a/src/datadogV1/model/model_synthetics_basic_auth_oauth_rop.rs +++ b/src/datadogV1/model/model_synthetics_basic_auth_oauth_rop.rs @@ -61,4 +61,37 @@ impl SyntheticsBasicAuthOauthROP { username, } } + + pub fn with_audience(&mut self, value: String) -> &mut Self { + self.audience = Some(value); + self + } + + pub fn with_client_id(&mut self, value: String) -> &mut Self { + self.client_id = Some(value); + self + } + + pub fn with_client_secret(&mut self, value: String) -> &mut Self { + self.client_secret = Some(value); + self + } + + pub fn with_resource(&mut self, value: String) -> &mut Self { + self.resource = Some(value); + self + } + + pub fn with_scope(&mut self, value: String) -> &mut Self { + self.scope = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV1::model::SyntheticsBasicAuthOauthROPType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_basic_auth_sigv4.rs b/src/datadogV1/model/model_synthetics_basic_auth_sigv4.rs index 052a4c328..c8c0d989d 100644 --- a/src/datadogV1/model/model_synthetics_basic_auth_sigv4.rs +++ b/src/datadogV1/model/model_synthetics_basic_auth_sigv4.rs @@ -43,4 +43,19 @@ impl SyntheticsBasicAuthSigv4 { type_, } } + + pub fn with_region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } + + pub fn with_service_name(&mut self, value: String) -> &mut Self { + self.service_name = Some(value); + self + } + + pub fn with_session_token(&mut self, value: String) -> &mut Self { + self.session_token = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_basic_auth_web.rs b/src/datadogV1/model/model_synthetics_basic_auth_web.rs index 2fb8c290a..e6c3a22d7 100644 --- a/src/datadogV1/model/model_synthetics_basic_auth_web.rs +++ b/src/datadogV1/model/model_synthetics_basic_auth_web.rs @@ -27,4 +27,12 @@ impl SyntheticsBasicAuthWeb { username, } } + + pub fn with_type_( + &mut self, + value: crate::datadogV1::model::SyntheticsBasicAuthWebType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_batch_details.rs b/src/datadogV1/model/model_synthetics_batch_details.rs index ccdd32b5a..e07a30194 100644 --- a/src/datadogV1/model/model_synthetics_batch_details.rs +++ b/src/datadogV1/model/model_synthetics_batch_details.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct SyntheticsBatchDetails { /// Wrapper object that contains the details of a batch. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl SyntheticsBatchDetails { pub fn new() -> SyntheticsBatchDetails { SyntheticsBatchDetails { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV1::model::SyntheticsBatchDetailsData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for SyntheticsBatchDetails { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_batch_details_data.rs b/src/datadogV1/model/model_synthetics_batch_details_data.rs index 82f841764..0da004997 100644 --- a/src/datadogV1/model/model_synthetics_batch_details_data.rs +++ b/src/datadogV1/model/model_synthetics_batch_details_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SyntheticsBatchDetailsData { /// Metadata for the Synthetic tests run. #[serde(rename = "metadata")] - pub metadata: Option>, + pub metadata: Option, /// List of results for the batch. #[serde(rename = "results")] pub results: Option>, @@ -27,6 +27,27 @@ impl SyntheticsBatchDetailsData { status: None, } } + + pub fn with_metadata( + &mut self, + value: crate::datadogV1::model::SyntheticsCIBatchMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn with_results( + &mut self, + value: Vec, + ) -> &mut Self { + self.results = Some(value); + self + } + + pub fn with_status(&mut self, value: crate::datadogV1::model::SyntheticsStatus) -> &mut Self { + self.status = Some(value); + self + } } impl Default for SyntheticsBatchDetailsData { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_batch_result.rs b/src/datadogV1/model/model_synthetics_batch_result.rs index 14cc9a0a0..3f9305e5e 100644 --- a/src/datadogV1/model/model_synthetics_batch_result.rs +++ b/src/datadogV1/model/model_synthetics_batch_result.rs @@ -55,6 +55,62 @@ impl SyntheticsBatchResult { test_type: None, } } + + pub fn with_device(&mut self, value: crate::datadogV1::model::SyntheticsDeviceID) -> &mut Self { + self.device = Some(value); + self + } + + pub fn with_duration(&mut self, value: f64) -> &mut Self { + self.duration = Some(value); + self + } + + pub fn with_execution_rule( + &mut self, + value: crate::datadogV1::model::SyntheticsTestExecutionRule, + ) -> &mut Self { + self.execution_rule = Some(value); + self + } + + pub fn with_location(&mut self, value: String) -> &mut Self { + self.location = Some(value); + self + } + + pub fn with_result_id(&mut self, value: String) -> &mut Self { + self.result_id = Some(value); + self + } + + pub fn with_retries(&mut self, value: f64) -> &mut Self { + self.retries = Some(value); + self + } + + pub fn with_status(&mut self, value: crate::datadogV1::model::SyntheticsStatus) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_test_name(&mut self, value: String) -> &mut Self { + self.test_name = Some(value); + self + } + + pub fn with_test_public_id(&mut self, value: String) -> &mut Self { + self.test_public_id = Some(value); + self + } + + pub fn with_test_type( + &mut self, + value: crate::datadogV1::model::SyntheticsTestDetailsType, + ) -> &mut Self { + self.test_type = Some(value); + self + } } impl Default for SyntheticsBatchResult { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_browser_error.rs b/src/datadogV1/model/model_synthetics_browser_error.rs index 8ff3a1335..af78a5c92 100644 --- a/src/datadogV1/model/model_synthetics_browser_error.rs +++ b/src/datadogV1/model/model_synthetics_browser_error.rs @@ -35,4 +35,9 @@ impl SyntheticsBrowserError { type_, } } + + pub fn with_status(&mut self, value: i64) -> &mut Self { + self.status = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_browser_test.rs b/src/datadogV1/model/model_synthetics_browser_test.rs index e43dae678..eb72553c7 100644 --- a/src/datadogV1/model/model_synthetics_browser_test.rs +++ b/src/datadogV1/model/model_synthetics_browser_test.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SyntheticsBrowserTest { /// Configuration object for a Synthetic browser test. #[serde(rename = "config")] - pub config: Box, + pub config: crate::datadogV1::model::SyntheticsBrowserTestConfig, /// Array of locations used to run the test. #[serde(rename = "locations")] pub locations: Vec, @@ -25,7 +25,7 @@ pub struct SyntheticsBrowserTest { pub name: String, /// Object describing the extra options for a Synthetic test. #[serde(rename = "options")] - pub options: Box, + pub options: crate::datadogV1::model::SyntheticsTestOptions, /// The public ID of the test. #[serde(rename = "public_id")] pub public_id: Option, @@ -46,11 +46,11 @@ pub struct SyntheticsBrowserTest { impl SyntheticsBrowserTest { pub fn new( - config: Box, + config: crate::datadogV1::model::SyntheticsBrowserTestConfig, locations: Vec, message: String, name: String, - options: Box, + options: crate::datadogV1::model::SyntheticsTestOptions, type_: crate::datadogV1::model::SyntheticsBrowserTestType, ) -> SyntheticsBrowserTest { SyntheticsBrowserTest { @@ -67,4 +67,32 @@ impl SyntheticsBrowserTest { type_, } } + + pub fn with_monitor_id(&mut self, value: i64) -> &mut Self { + self.monitor_id = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_status( + &mut self, + value: crate::datadogV1::model::SyntheticsTestPauseStatus, + ) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_steps(&mut self, value: Vec) -> &mut Self { + self.steps = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_browser_test_config.rs b/src/datadogV1/model/model_synthetics_browser_test_config.rs index 5e865db0b..ef1ea1768 100644 --- a/src/datadogV1/model/model_synthetics_browser_test_config.rs +++ b/src/datadogV1/model/model_synthetics_browser_test_config.rs @@ -16,7 +16,7 @@ pub struct SyntheticsBrowserTestConfig { pub config_variables: Option>, /// Object describing the Synthetic test request. #[serde(rename = "request")] - pub request: Box, + pub request: crate::datadogV1::model::SyntheticsTestRequest, /// Cookies to be used for the request, using the [Set-Cookie]() syntax. #[serde(rename = "setCookie")] pub set_cookie: Option, @@ -28,7 +28,7 @@ pub struct SyntheticsBrowserTestConfig { impl SyntheticsBrowserTestConfig { pub fn new( assertions: Vec, - request: Box, + request: crate::datadogV1::model::SyntheticsTestRequest, ) -> SyntheticsBrowserTestConfig { SyntheticsBrowserTestConfig { assertions, @@ -38,4 +38,25 @@ impl SyntheticsBrowserTestConfig { variables: None, } } + + pub fn with_config_variables( + &mut self, + value: Vec, + ) -> &mut Self { + self.config_variables = Some(value); + self + } + + pub fn with_set_cookie(&mut self, value: String) -> &mut Self { + self.set_cookie = Some(value); + self + } + + pub fn with_variables( + &mut self, + value: Vec, + ) -> &mut Self { + self.variables = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_browser_test_result_data.rs b/src/datadogV1/model/model_synthetics_browser_test_result_data.rs index 64506813e..6ad755f82 100644 --- a/src/datadogV1/model/model_synthetics_browser_test_result_data.rs +++ b/src/datadogV1/model/model_synthetics_browser_test_result_data.rs @@ -16,7 +16,7 @@ pub struct SyntheticsBrowserTestResultData { pub browser_version: Option, /// Object describing the device used to perform the Synthetic test. #[serde(rename = "device")] - pub device: Option>, + pub device: Option, /// Global duration in second of the browser test. #[serde(rename = "duration")] pub duration: Option, @@ -25,7 +25,7 @@ pub struct SyntheticsBrowserTestResultData { pub error: Option, /// The browser test failure details. #[serde(rename = "failure")] - pub failure: Option>, + pub failure: Option, /// Whether or not the browser test was conducted. #[serde(rename = "passed")] pub passed: Option, @@ -64,6 +64,72 @@ impl SyntheticsBrowserTestResultData { time_to_interactive: None, } } + + pub fn with_browser_type(&mut self, value: String) -> &mut Self { + self.browser_type = Some(value); + self + } + + pub fn with_browser_version(&mut self, value: String) -> &mut Self { + self.browser_version = Some(value); + self + } + + pub fn with_device(&mut self, value: crate::datadogV1::model::SyntheticsDevice) -> &mut Self { + self.device = Some(value); + self + } + + pub fn with_duration(&mut self, value: f64) -> &mut Self { + self.duration = Some(value); + self + } + + pub fn with_error(&mut self, value: String) -> &mut Self { + self.error = Some(value); + self + } + + pub fn with_failure( + &mut self, + value: crate::datadogV1::model::SyntheticsBrowserTestResultFailure, + ) -> &mut Self { + self.failure = Some(value); + self + } + + pub fn with_passed(&mut self, value: bool) -> &mut Self { + self.passed = Some(value); + self + } + + pub fn with_received_email_count(&mut self, value: i64) -> &mut Self { + self.received_email_count = Some(value); + self + } + + pub fn with_start_url(&mut self, value: String) -> &mut Self { + self.start_url = Some(value); + self + } + + pub fn with_step_details( + &mut self, + value: Vec, + ) -> &mut Self { + self.step_details = Some(value); + self + } + + pub fn with_thumbnails_bucket_key(&mut self, value: bool) -> &mut Self { + self.thumbnails_bucket_key = Some(value); + self + } + + pub fn with_time_to_interactive(&mut self, value: f64) -> &mut Self { + self.time_to_interactive = Some(value); + self + } } impl Default for SyntheticsBrowserTestResultData { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_browser_test_result_failure.rs b/src/datadogV1/model/model_synthetics_browser_test_result_failure.rs index 5a0e9f320..2d3e146ac 100644 --- a/src/datadogV1/model/model_synthetics_browser_test_result_failure.rs +++ b/src/datadogV1/model/model_synthetics_browser_test_result_failure.rs @@ -23,6 +23,19 @@ impl SyntheticsBrowserTestResultFailure { message: None, } } + + pub fn with_code( + &mut self, + value: crate::datadogV1::model::SyntheticsBrowserTestFailureCode, + ) -> &mut Self { + self.code = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } } impl Default for SyntheticsBrowserTestResultFailure { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_browser_test_result_full.rs b/src/datadogV1/model/model_synthetics_browser_test_result_full.rs index d74d9c48d..51e33c741 100644 --- a/src/datadogV1/model/model_synthetics_browser_test_result_full.rs +++ b/src/datadogV1/model/model_synthetics_browser_test_result_full.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SyntheticsBrowserTestResultFull { /// Object describing the browser test configuration. #[serde(rename = "check")] - pub check: Option>, + pub check: Option, /// When the browser test was conducted. #[serde(rename = "check_time")] pub check_time: Option, @@ -22,7 +22,7 @@ pub struct SyntheticsBrowserTestResultFull { pub probe_dc: Option, /// Object containing results for your Synthetic browser test. #[serde(rename = "result")] - pub result: Option>, + pub result: Option, /// ID of the browser test result. #[serde(rename = "result_id")] pub result_id: Option, @@ -46,6 +46,50 @@ impl SyntheticsBrowserTestResultFull { status: None, } } + + pub fn with_check( + &mut self, + value: crate::datadogV1::model::SyntheticsBrowserTestResultFullCheck, + ) -> &mut Self { + self.check = Some(value); + self + } + + pub fn with_check_time(&mut self, value: f64) -> &mut Self { + self.check_time = Some(value); + self + } + + pub fn with_check_version(&mut self, value: i64) -> &mut Self { + self.check_version = Some(value); + self + } + + pub fn with_probe_dc(&mut self, value: String) -> &mut Self { + self.probe_dc = Some(value); + self + } + + pub fn with_result( + &mut self, + value: crate::datadogV1::model::SyntheticsBrowserTestResultData, + ) -> &mut Self { + self.result = Some(value); + self + } + + pub fn with_result_id(&mut self, value: String) -> &mut Self { + self.result_id = Some(value); + self + } + + pub fn with_status( + &mut self, + value: crate::datadogV1::model::SyntheticsTestMonitorStatus, + ) -> &mut Self { + self.status = Some(value); + self + } } impl Default for SyntheticsBrowserTestResultFull { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_browser_test_result_full_check.rs b/src/datadogV1/model/model_synthetics_browser_test_result_full_check.rs index 62c4286c2..61e754ab0 100644 --- a/src/datadogV1/model/model_synthetics_browser_test_result_full_check.rs +++ b/src/datadogV1/model/model_synthetics_browser_test_result_full_check.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct SyntheticsBrowserTestResultFullCheck { /// Configuration object for a Synthetic test. #[serde(rename = "config")] - pub config: Box, + pub config: crate::datadogV1::model::SyntheticsTestConfig, } impl SyntheticsBrowserTestResultFullCheck { pub fn new( - config: Box, + config: crate::datadogV1::model::SyntheticsTestConfig, ) -> SyntheticsBrowserTestResultFullCheck { SyntheticsBrowserTestResultFullCheck { config } } diff --git a/src/datadogV1/model/model_synthetics_browser_test_result_short.rs b/src/datadogV1/model/model_synthetics_browser_test_result_short.rs index 0124ef205..b2439a661 100644 --- a/src/datadogV1/model/model_synthetics_browser_test_result_short.rs +++ b/src/datadogV1/model/model_synthetics_browser_test_result_short.rs @@ -16,7 +16,7 @@ pub struct SyntheticsBrowserTestResultShort { pub probe_dc: Option, /// Object with the result of the last browser test run. #[serde(rename = "result")] - pub result: Option>, + pub result: Option, /// ID of the browser test result. #[serde(rename = "result_id")] pub result_id: Option, @@ -38,6 +38,37 @@ impl SyntheticsBrowserTestResultShort { status: None, } } + + pub fn with_check_time(&mut self, value: f64) -> &mut Self { + self.check_time = Some(value); + self + } + + pub fn with_probe_dc(&mut self, value: String) -> &mut Self { + self.probe_dc = Some(value); + self + } + + pub fn with_result( + &mut self, + value: crate::datadogV1::model::SyntheticsBrowserTestResultShortResult, + ) -> &mut Self { + self.result = Some(value); + self + } + + pub fn with_result_id(&mut self, value: String) -> &mut Self { + self.result_id = Some(value); + self + } + + pub fn with_status( + &mut self, + value: crate::datadogV1::model::SyntheticsTestMonitorStatus, + ) -> &mut Self { + self.status = Some(value); + self + } } impl Default for SyntheticsBrowserTestResultShort { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_browser_test_result_short_result.rs b/src/datadogV1/model/model_synthetics_browser_test_result_short_result.rs index 11fb96f04..de155e875 100644 --- a/src/datadogV1/model/model_synthetics_browser_test_result_short_result.rs +++ b/src/datadogV1/model/model_synthetics_browser_test_result_short_result.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SyntheticsBrowserTestResultShortResult { /// Object describing the device used to perform the Synthetic test. #[serde(rename = "device")] - pub device: Option>, + pub device: Option, /// Length in milliseconds of the browser test run. #[serde(rename = "duration")] pub duration: Option, @@ -35,6 +35,31 @@ impl SyntheticsBrowserTestResultShortResult { step_count_total: None, } } + + pub fn with_device(&mut self, value: crate::datadogV1::model::SyntheticsDevice) -> &mut Self { + self.device = Some(value); + self + } + + pub fn with_duration(&mut self, value: f64) -> &mut Self { + self.duration = Some(value); + self + } + + pub fn with_error_count(&mut self, value: i64) -> &mut Self { + self.error_count = Some(value); + self + } + + pub fn with_step_count_completed(&mut self, value: i64) -> &mut Self { + self.step_count_completed = Some(value); + self + } + + pub fn with_step_count_total(&mut self, value: i64) -> &mut Self { + self.step_count_total = Some(value); + self + } } impl Default for SyntheticsBrowserTestResultShortResult { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_browser_test_rum_settings.rs b/src/datadogV1/model/model_synthetics_browser_test_rum_settings.rs index 98ce5125f..4825aa8ea 100644 --- a/src/datadogV1/model/model_synthetics_browser_test_rum_settings.rs +++ b/src/datadogV1/model/model_synthetics_browser_test_rum_settings.rs @@ -37,4 +37,14 @@ impl SyntheticsBrowserTestRumSettings { is_enabled, } } + + pub fn with_application_id(&mut self, value: String) -> &mut Self { + self.application_id = Some(value); + self + } + + pub fn with_client_token_id(&mut self, value: i64) -> &mut Self { + self.client_token_id = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_browser_variable.rs b/src/datadogV1/model/model_synthetics_browser_variable.rs index e28a007a9..62919e6d3 100644 --- a/src/datadogV1/model/model_synthetics_browser_variable.rs +++ b/src/datadogV1/model/model_synthetics_browser_variable.rs @@ -43,4 +43,24 @@ impl SyntheticsBrowserVariable { type_, } } + + pub fn with_example(&mut self, value: String) -> &mut Self { + self.example = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_pattern(&mut self, value: String) -> &mut Self { + self.pattern = Some(value); + self + } + + pub fn with_secure(&mut self, value: bool) -> &mut Self { + self.secure = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_ci_batch_metadata.rs b/src/datadogV1/model/model_synthetics_ci_batch_metadata.rs index 62f37574f..2edfe9e8d 100644 --- a/src/datadogV1/model/model_synthetics_ci_batch_metadata.rs +++ b/src/datadogV1/model/model_synthetics_ci_batch_metadata.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct SyntheticsCIBatchMetadata { /// Description of the CI provider. #[serde(rename = "ci")] - pub ci: Option>, + pub ci: Option, /// Git information. #[serde(rename = "git")] - pub git: Option>, + pub git: Option, } impl SyntheticsCIBatchMetadata { @@ -23,6 +23,22 @@ impl SyntheticsCIBatchMetadata { git: None, } } + + pub fn with_ci( + &mut self, + value: crate::datadogV1::model::SyntheticsCIBatchMetadataCI, + ) -> &mut Self { + self.ci = Some(value); + self + } + + pub fn with_git( + &mut self, + value: crate::datadogV1::model::SyntheticsCIBatchMetadataGit, + ) -> &mut Self { + self.git = Some(value); + self + } } impl Default for SyntheticsCIBatchMetadata { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_ci_batch_metadata_ci.rs b/src/datadogV1/model/model_synthetics_ci_batch_metadata_ci.rs index 5372d30d5..2961e3688 100644 --- a/src/datadogV1/model/model_synthetics_ci_batch_metadata_ci.rs +++ b/src/datadogV1/model/model_synthetics_ci_batch_metadata_ci.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct SyntheticsCIBatchMetadataCI { /// Description of the CI pipeline. #[serde(rename = "pipeline")] - pub pipeline: Option>, + pub pipeline: Option, /// Description of the CI provider. #[serde(rename = "provider")] - pub provider: Option>, + pub provider: Option, } impl SyntheticsCIBatchMetadataCI { @@ -23,6 +23,22 @@ impl SyntheticsCIBatchMetadataCI { provider: None, } } + + pub fn with_pipeline( + &mut self, + value: crate::datadogV1::model::SyntheticsCIBatchMetadataPipeline, + ) -> &mut Self { + self.pipeline = Some(value); + self + } + + pub fn with_provider( + &mut self, + value: crate::datadogV1::model::SyntheticsCIBatchMetadataProvider, + ) -> &mut Self { + self.provider = Some(value); + self + } } impl Default for SyntheticsCIBatchMetadataCI { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_ci_batch_metadata_git.rs b/src/datadogV1/model/model_synthetics_ci_batch_metadata_git.rs index 5539b4d30..73928af68 100644 --- a/src/datadogV1/model/model_synthetics_ci_batch_metadata_git.rs +++ b/src/datadogV1/model/model_synthetics_ci_batch_metadata_git.rs @@ -23,6 +23,16 @@ impl SyntheticsCIBatchMetadataGit { commit_sha: None, } } + + pub fn with_branch(&mut self, value: String) -> &mut Self { + self.branch = Some(value); + self + } + + pub fn with_commit_sha(&mut self, value: String) -> &mut Self { + self.commit_sha = Some(value); + self + } } impl Default for SyntheticsCIBatchMetadataGit { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_ci_batch_metadata_pipeline.rs b/src/datadogV1/model/model_synthetics_ci_batch_metadata_pipeline.rs index f56775610..92c3d9298 100644 --- a/src/datadogV1/model/model_synthetics_ci_batch_metadata_pipeline.rs +++ b/src/datadogV1/model/model_synthetics_ci_batch_metadata_pipeline.rs @@ -17,6 +17,11 @@ impl SyntheticsCIBatchMetadataPipeline { pub fn new() -> SyntheticsCIBatchMetadataPipeline { SyntheticsCIBatchMetadataPipeline { url: None } } + + pub fn with_url(&mut self, value: String) -> &mut Self { + self.url = Some(value); + self + } } impl Default for SyntheticsCIBatchMetadataPipeline { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_ci_batch_metadata_provider.rs b/src/datadogV1/model/model_synthetics_ci_batch_metadata_provider.rs index 77f3cd28d..dcbbac2be 100644 --- a/src/datadogV1/model/model_synthetics_ci_batch_metadata_provider.rs +++ b/src/datadogV1/model/model_synthetics_ci_batch_metadata_provider.rs @@ -17,6 +17,11 @@ impl SyntheticsCIBatchMetadataProvider { pub fn new() -> SyntheticsCIBatchMetadataProvider { SyntheticsCIBatchMetadataProvider { name: None } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } impl Default for SyntheticsCIBatchMetadataProvider { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_ci_test.rs b/src/datadogV1/model/model_synthetics_ci_test.rs index 96faf4c85..dbe8c45af 100644 --- a/src/datadogV1/model/model_synthetics_ci_test.rs +++ b/src/datadogV1/model/model_synthetics_ci_test.rs @@ -13,7 +13,7 @@ pub struct SyntheticsCITest { pub allow_insecure_certificates: Option, /// Object to handle basic authentication when performing the test. #[serde(rename = "basicAuth")] - pub basic_auth: Option>, + pub basic_auth: Option, /// Body to include in the test. #[serde(rename = "body")] pub body: Option, @@ -37,13 +37,13 @@ pub struct SyntheticsCITest { pub locations: Option>, /// Metadata for the Synthetic tests run. #[serde(rename = "metadata")] - pub metadata: Option>, + pub metadata: Option, /// The public ID of the Synthetic test to trigger. #[serde(rename = "public_id")] pub public_id: String, /// Object describing the retry strategy to apply to a Synthetic test. #[serde(rename = "retry")] - pub retry: Option>, + pub retry: Option, /// Starting URL for the browser test. #[serde(rename = "startUrl")] pub start_url: Option, @@ -71,4 +71,84 @@ impl SyntheticsCITest { variables: None, } } + + pub fn with_allow_insecure_certificates(&mut self, value: bool) -> &mut Self { + self.allow_insecure_certificates = Some(value); + self + } + + pub fn with_basic_auth( + &mut self, + value: crate::datadogV1::model::SyntheticsBasicAuth, + ) -> &mut Self { + self.basic_auth = Some(value); + self + } + + pub fn with_body(&mut self, value: String) -> &mut Self { + self.body = Some(value); + self + } + + pub fn with_body_type(&mut self, value: String) -> &mut Self { + self.body_type = Some(value); + self + } + + pub fn with_cookies(&mut self, value: String) -> &mut Self { + self.cookies = Some(value); + self + } + + pub fn with_device_ids( + &mut self, + value: Vec, + ) -> &mut Self { + self.device_ids = Some(value); + self + } + + pub fn with_follow_redirects(&mut self, value: bool) -> &mut Self { + self.follow_redirects = Some(value); + self + } + + pub fn with_headers(&mut self, value: std::collections::BTreeMap) -> &mut Self { + self.headers = Some(value); + self + } + + pub fn with_locations(&mut self, value: Vec) -> &mut Self { + self.locations = Some(value); + self + } + + pub fn with_metadata( + &mut self, + value: crate::datadogV1::model::SyntheticsCIBatchMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn with_retry( + &mut self, + value: crate::datadogV1::model::SyntheticsTestOptionsRetry, + ) -> &mut Self { + self.retry = Some(value); + self + } + + pub fn with_start_url(&mut self, value: String) -> &mut Self { + self.start_url = Some(value); + self + } + + pub fn with_variables( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.variables = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_ci_test_body.rs b/src/datadogV1/model/model_synthetics_ci_test_body.rs index c98b9a636..fb681ffd8 100644 --- a/src/datadogV1/model/model_synthetics_ci_test_body.rs +++ b/src/datadogV1/model/model_synthetics_ci_test_body.rs @@ -17,6 +17,14 @@ impl SyntheticsCITestBody { pub fn new() -> SyntheticsCITestBody { SyntheticsCITestBody { tests: None } } + + pub fn with_tests( + &mut self, + value: Vec, + ) -> &mut Self { + self.tests = Some(value); + self + } } impl Default for SyntheticsCITestBody { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_config_variable.rs b/src/datadogV1/model/model_synthetics_config_variable.rs index 53ce8fbde..220b1972b 100644 --- a/src/datadogV1/model/model_synthetics_config_variable.rs +++ b/src/datadogV1/model/model_synthetics_config_variable.rs @@ -42,4 +42,24 @@ impl SyntheticsConfigVariable { type_, } } + + pub fn with_example(&mut self, value: String) -> &mut Self { + self.example = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_pattern(&mut self, value: String) -> &mut Self { + self.pattern = Some(value); + self + } + + pub fn with_secure(&mut self, value: bool) -> &mut Self { + self.secure = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_core_web_vitals.rs b/src/datadogV1/model/model_synthetics_core_web_vitals.rs index 20c3512bc..2a163e811 100644 --- a/src/datadogV1/model/model_synthetics_core_web_vitals.rs +++ b/src/datadogV1/model/model_synthetics_core_web_vitals.rs @@ -27,6 +27,21 @@ impl SyntheticsCoreWebVitals { url: None, } } + + pub fn with_cls(&mut self, value: f64) -> &mut Self { + self.cls = Some(value); + self + } + + pub fn with_lcp(&mut self, value: f64) -> &mut Self { + self.lcp = Some(value); + self + } + + pub fn with_url(&mut self, value: String) -> &mut Self { + self.url = Some(value); + self + } } impl Default for SyntheticsCoreWebVitals { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_delete_tests_payload.rs b/src/datadogV1/model/model_synthetics_delete_tests_payload.rs index 529dcf228..0a2d976fd 100644 --- a/src/datadogV1/model/model_synthetics_delete_tests_payload.rs +++ b/src/datadogV1/model/model_synthetics_delete_tests_payload.rs @@ -18,6 +18,11 @@ impl SyntheticsDeleteTestsPayload { pub fn new() -> SyntheticsDeleteTestsPayload { SyntheticsDeleteTestsPayload { public_ids: None } } + + pub fn with_public_ids(&mut self, value: Vec) -> &mut Self { + self.public_ids = Some(value); + self + } } impl Default for SyntheticsDeleteTestsPayload { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_delete_tests_response.rs b/src/datadogV1/model/model_synthetics_delete_tests_response.rs index 4454734e7..1d07256e0 100644 --- a/src/datadogV1/model/model_synthetics_delete_tests_response.rs +++ b/src/datadogV1/model/model_synthetics_delete_tests_response.rs @@ -20,6 +20,14 @@ impl SyntheticsDeleteTestsResponse { deleted_tests: None, } } + + pub fn with_deleted_tests( + &mut self, + value: Vec, + ) -> &mut Self { + self.deleted_tests = Some(value); + self + } } impl Default for SyntheticsDeleteTestsResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_deleted_test.rs b/src/datadogV1/model/model_synthetics_deleted_test.rs index 6bd3fd867..80875d417 100644 --- a/src/datadogV1/model/model_synthetics_deleted_test.rs +++ b/src/datadogV1/model/model_synthetics_deleted_test.rs @@ -24,6 +24,16 @@ impl SyntheticsDeletedTest { public_id: None, } } + + pub fn with_deleted_at(&mut self, value: String) -> &mut Self { + self.deleted_at = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for SyntheticsDeletedTest { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_device.rs b/src/datadogV1/model/model_synthetics_device.rs index 3d4f3374a..48541ad41 100644 --- a/src/datadogV1/model/model_synthetics_device.rs +++ b/src/datadogV1/model/model_synthetics_device.rs @@ -40,4 +40,9 @@ impl SyntheticsDevice { width, } } + + pub fn with_is_mobile(&mut self, value: bool) -> &mut Self { + self.is_mobile = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_get_api_test_latest_results_response.rs b/src/datadogV1/model/model_synthetics_get_api_test_latest_results_response.rs index eaf06ce59..d3181056d 100644 --- a/src/datadogV1/model/model_synthetics_get_api_test_latest_results_response.rs +++ b/src/datadogV1/model/model_synthetics_get_api_test_latest_results_response.rs @@ -23,6 +23,19 @@ impl SyntheticsGetAPITestLatestResultsResponse { results: None, } } + + pub fn with_last_timestamp_fetched(&mut self, value: i64) -> &mut Self { + self.last_timestamp_fetched = Some(value); + self + } + + pub fn with_results( + &mut self, + value: Vec, + ) -> &mut Self { + self.results = Some(value); + self + } } impl Default for SyntheticsGetAPITestLatestResultsResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_get_browser_test_latest_results_response.rs b/src/datadogV1/model/model_synthetics_get_browser_test_latest_results_response.rs index ca286939f..3c6e08270 100644 --- a/src/datadogV1/model/model_synthetics_get_browser_test_latest_results_response.rs +++ b/src/datadogV1/model/model_synthetics_get_browser_test_latest_results_response.rs @@ -23,6 +23,19 @@ impl SyntheticsGetBrowserTestLatestResultsResponse { results: None, } } + + pub fn with_last_timestamp_fetched(&mut self, value: i64) -> &mut Self { + self.last_timestamp_fetched = Some(value); + self + } + + pub fn with_results( + &mut self, + value: Vec, + ) -> &mut Self { + self.results = Some(value); + self + } } impl Default for SyntheticsGetBrowserTestLatestResultsResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_global_variable.rs b/src/datadogV1/model/model_synthetics_global_variable.rs index 4c1c76e43..fa383641a 100644 --- a/src/datadogV1/model/model_synthetics_global_variable.rs +++ b/src/datadogV1/model/model_synthetics_global_variable.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SyntheticsGlobalVariable { /// Attributes of the global variable. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Description of the global variable. #[serde(rename = "description")] pub description: String, @@ -23,7 +23,7 @@ pub struct SyntheticsGlobalVariable { /// Parser options to use for retrieving a Synthetic global variable from a Synthetic test. Used in conjunction with `parse_test_public_id`. #[serde(rename = "parse_test_options")] pub parse_test_options: - Option>, + Option, /// A Synthetic test ID to use as a test to generate the variable value. #[serde(rename = "parse_test_public_id")] pub parse_test_public_id: Option, @@ -32,7 +32,7 @@ pub struct SyntheticsGlobalVariable { pub tags: Vec, /// Value of the global variable. #[serde(rename = "value")] - pub value: Box, + pub value: crate::datadogV1::model::SyntheticsGlobalVariableValue, } impl SyntheticsGlobalVariable { @@ -40,7 +40,7 @@ impl SyntheticsGlobalVariable { description: String, name: String, tags: Vec, - value: Box, + value: crate::datadogV1::model::SyntheticsGlobalVariableValue, ) -> SyntheticsGlobalVariable { SyntheticsGlobalVariable { attributes: None, @@ -53,4 +53,30 @@ impl SyntheticsGlobalVariable { value, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV1::model::SyntheticsGlobalVariableAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_parse_test_options( + &mut self, + value: crate::datadogV1::model::SyntheticsGlobalVariableParseTestOptions, + ) -> &mut Self { + self.parse_test_options = Some(value); + self + } + + pub fn with_parse_test_public_id(&mut self, value: String) -> &mut Self { + self.parse_test_public_id = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_global_variable_attributes.rs b/src/datadogV1/model/model_synthetics_global_variable_attributes.rs index d67c12b37..fcf6b02dc 100644 --- a/src/datadogV1/model/model_synthetics_global_variable_attributes.rs +++ b/src/datadogV1/model/model_synthetics_global_variable_attributes.rs @@ -19,6 +19,11 @@ impl SyntheticsGlobalVariableAttributes { restricted_roles: None, } } + + pub fn with_restricted_roles(&mut self, value: Vec) -> &mut Self { + self.restricted_roles = Some(value); + self + } } impl Default for SyntheticsGlobalVariableAttributes { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_global_variable_options.rs b/src/datadogV1/model/model_synthetics_global_variable_options.rs index ee007fa75..894b84c77 100644 --- a/src/datadogV1/model/model_synthetics_global_variable_options.rs +++ b/src/datadogV1/model/model_synthetics_global_variable_options.rs @@ -10,8 +10,7 @@ use serde_with::skip_serializing_none; pub struct SyntheticsGlobalVariableOptions { /// Parameters for the TOTP/MFA variable #[serde(rename = "totp_parameters")] - pub totp_parameters: - Option>, + pub totp_parameters: Option, } impl SyntheticsGlobalVariableOptions { @@ -20,6 +19,14 @@ impl SyntheticsGlobalVariableOptions { totp_parameters: None, } } + + pub fn with_totp_parameters( + &mut self, + value: crate::datadogV1::model::SyntheticsGlobalVariableTOTPParameters, + ) -> &mut Self { + self.totp_parameters = Some(value); + self + } } impl Default for SyntheticsGlobalVariableOptions { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_global_variable_parse_test_options.rs b/src/datadogV1/model/model_synthetics_global_variable_parse_test_options.rs index 99d13eaed..524fe47b1 100644 --- a/src/datadogV1/model/model_synthetics_global_variable_parse_test_options.rs +++ b/src/datadogV1/model/model_synthetics_global_variable_parse_test_options.rs @@ -16,7 +16,7 @@ pub struct SyntheticsGlobalVariableParseTestOptions { pub local_variable_name: Option, /// Details of the parser to use for the global variable. #[serde(rename = "parser")] - pub parser: Option>, + pub parser: Option, /// Property of the Synthetic Test Response to use for a Synthetic global variable. #[serde(rename = "type")] pub type_: crate::datadogV1::model::SyntheticsGlobalVariableParseTestOptionsType, @@ -33,4 +33,22 @@ impl SyntheticsGlobalVariableParseTestOptions { type_, } } + + pub fn with_field(&mut self, value: String) -> &mut Self { + self.field = Some(value); + self + } + + pub fn with_local_variable_name(&mut self, value: String) -> &mut Self { + self.local_variable_name = Some(value); + self + } + + pub fn with_parser( + &mut self, + value: crate::datadogV1::model::SyntheticsVariableParser, + ) -> &mut Self { + self.parser = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_global_variable_totp_parameters.rs b/src/datadogV1/model/model_synthetics_global_variable_totp_parameters.rs index aa413befe..7f02c1063 100644 --- a/src/datadogV1/model/model_synthetics_global_variable_totp_parameters.rs +++ b/src/datadogV1/model/model_synthetics_global_variable_totp_parameters.rs @@ -23,6 +23,16 @@ impl SyntheticsGlobalVariableTOTPParameters { refresh_interval: None, } } + + pub fn with_digits(&mut self, value: i32) -> &mut Self { + self.digits = Some(value); + self + } + + pub fn with_refresh_interval(&mut self, value: i32) -> &mut Self { + self.refresh_interval = Some(value); + self + } } impl Default for SyntheticsGlobalVariableTOTPParameters { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_global_variable_value.rs b/src/datadogV1/model/model_synthetics_global_variable_value.rs index 54cc2cb32..fc47fd45c 100644 --- a/src/datadogV1/model/model_synthetics_global_variable_value.rs +++ b/src/datadogV1/model/model_synthetics_global_variable_value.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SyntheticsGlobalVariableValue { /// Options for the Global Variable for MFA. #[serde(rename = "options")] - pub options: Option>, + pub options: Option, /// Determines if the value of the variable is hidden. #[serde(rename = "secure")] pub secure: Option, @@ -28,6 +28,24 @@ impl SyntheticsGlobalVariableValue { value: None, } } + + pub fn with_options( + &mut self, + value: crate::datadogV1::model::SyntheticsGlobalVariableOptions, + ) -> &mut Self { + self.options = Some(value); + self + } + + pub fn with_secure(&mut self, value: bool) -> &mut Self { + self.secure = Some(value); + self + } + + pub fn with_value(&mut self, value: String) -> &mut Self { + self.value = Some(value); + self + } } impl Default for SyntheticsGlobalVariableValue { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_list_global_variables_response.rs b/src/datadogV1/model/model_synthetics_list_global_variables_response.rs index 92eb562ac..f13d644da 100644 --- a/src/datadogV1/model/model_synthetics_list_global_variables_response.rs +++ b/src/datadogV1/model/model_synthetics_list_global_variables_response.rs @@ -17,6 +17,14 @@ impl SyntheticsListGlobalVariablesResponse { pub fn new() -> SyntheticsListGlobalVariablesResponse { SyntheticsListGlobalVariablesResponse { variables: None } } + + pub fn with_variables( + &mut self, + value: Vec, + ) -> &mut Self { + self.variables = Some(value); + self + } } impl Default for SyntheticsListGlobalVariablesResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_list_tests_response.rs b/src/datadogV1/model/model_synthetics_list_tests_response.rs index f10e23a86..4cec7a5b7 100644 --- a/src/datadogV1/model/model_synthetics_list_tests_response.rs +++ b/src/datadogV1/model/model_synthetics_list_tests_response.rs @@ -17,6 +17,14 @@ impl SyntheticsListTestsResponse { pub fn new() -> SyntheticsListTestsResponse { SyntheticsListTestsResponse { tests: None } } + + pub fn with_tests( + &mut self, + value: Vec, + ) -> &mut Self { + self.tests = Some(value); + self + } } impl Default for SyntheticsListTestsResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_location.rs b/src/datadogV1/model/model_synthetics_location.rs index 7d5fa67fe..c5e469396 100644 --- a/src/datadogV1/model/model_synthetics_location.rs +++ b/src/datadogV1/model/model_synthetics_location.rs @@ -24,6 +24,16 @@ impl SyntheticsLocation { name: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } impl Default for SyntheticsLocation { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_locations.rs b/src/datadogV1/model/model_synthetics_locations.rs index a9613ccdf..061e2b254 100644 --- a/src/datadogV1/model/model_synthetics_locations.rs +++ b/src/datadogV1/model/model_synthetics_locations.rs @@ -17,6 +17,14 @@ impl SyntheticsLocations { pub fn new() -> SyntheticsLocations { SyntheticsLocations { locations: None } } + + pub fn with_locations( + &mut self, + value: Vec, + ) -> &mut Self { + self.locations = Some(value); + self + } } impl Default for SyntheticsLocations { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_parsing_options.rs b/src/datadogV1/model/model_synthetics_parsing_options.rs index 92e65b944..22445e61a 100644 --- a/src/datadogV1/model/model_synthetics_parsing_options.rs +++ b/src/datadogV1/model/model_synthetics_parsing_options.rs @@ -16,7 +16,7 @@ pub struct SyntheticsParsingOptions { pub name: Option, /// Details of the parser to use for the global variable. #[serde(rename = "parser")] - pub parser: Option>, + pub parser: Option, /// Determines whether or not the extracted value will be obfuscated. #[serde(rename = "secure")] pub secure: Option, @@ -35,6 +35,37 @@ impl SyntheticsParsingOptions { type_: None, } } + + pub fn with_field(&mut self, value: String) -> &mut Self { + self.field = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_parser( + &mut self, + value: crate::datadogV1::model::SyntheticsVariableParser, + ) -> &mut Self { + self.parser = Some(value); + self + } + + pub fn with_secure(&mut self, value: bool) -> &mut Self { + self.secure = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV1::model::SyntheticsGlobalVariableParseTestOptionsType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SyntheticsParsingOptions { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_patch_test_body.rs b/src/datadogV1/model/model_synthetics_patch_test_body.rs index 5b47f0cc2..d64e0efbc 100644 --- a/src/datadogV1/model/model_synthetics_patch_test_body.rs +++ b/src/datadogV1/model/model_synthetics_patch_test_body.rs @@ -17,6 +17,14 @@ impl SyntheticsPatchTestBody { pub fn new() -> SyntheticsPatchTestBody { SyntheticsPatchTestBody { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for SyntheticsPatchTestBody { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_patch_test_operation.rs b/src/datadogV1/model/model_synthetics_patch_test_operation.rs index 559e40342..602a4a0e0 100644 --- a/src/datadogV1/model/model_synthetics_patch_test_operation.rs +++ b/src/datadogV1/model/model_synthetics_patch_test_operation.rs @@ -27,6 +27,24 @@ impl SyntheticsPatchTestOperation { value: None, } } + + pub fn with_op( + &mut self, + value: crate::datadogV1::model::SyntheticsPatchTestOperationName, + ) -> &mut Self { + self.op = Some(value); + self + } + + pub fn with_path(&mut self, value: String) -> &mut Self { + self.path = Some(value); + self + } + + pub fn with_value(&mut self, value: serde_json::Value) -> &mut Self { + self.value = Some(value); + self + } } impl Default for SyntheticsPatchTestOperation { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_private_location.rs b/src/datadogV1/model/model_synthetics_private_location.rs index 7bfa36107..d836725ad 100644 --- a/src/datadogV1/model/model_synthetics_private_location.rs +++ b/src/datadogV1/model/model_synthetics_private_location.rs @@ -16,13 +16,13 @@ pub struct SyntheticsPrivateLocation { pub id: Option, /// Object containing metadata about the private location. #[serde(rename = "metadata")] - pub metadata: Option>, + pub metadata: Option, /// Name of the private location. #[serde(rename = "name")] pub name: String, /// Secrets for the private location. Only present in the response when creating the private location. #[serde(rename = "secrets")] - pub secrets: Option>, + pub secrets: Option, /// Array of tags attached to the private location. #[serde(rename = "tags")] pub tags: Vec, @@ -39,4 +39,25 @@ impl SyntheticsPrivateLocation { tags, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_metadata( + &mut self, + value: crate::datadogV1::model::SyntheticsPrivateLocationMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn with_secrets( + &mut self, + value: crate::datadogV1::model::SyntheticsPrivateLocationSecrets, + ) -> &mut Self { + self.secrets = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_private_location_creation_response.rs b/src/datadogV1/model/model_synthetics_private_location_creation_response.rs index cf34218a3..cb3a8a93e 100644 --- a/src/datadogV1/model/model_synthetics_private_location_creation_response.rs +++ b/src/datadogV1/model/model_synthetics_private_location_creation_response.rs @@ -13,12 +13,11 @@ pub struct SyntheticsPrivateLocationCreationResponse { pub config: Option>, /// Object containing information about the private location to create. #[serde(rename = "private_location")] - pub private_location: Option>, + pub private_location: Option, /// Public key for the result encryption. #[serde(rename = "result_encryption")] - pub result_encryption: Option< - Box, - >, + pub result_encryption: + Option, } impl SyntheticsPrivateLocationCreationResponse { @@ -29,6 +28,30 @@ impl SyntheticsPrivateLocationCreationResponse { result_encryption: None, } } + + pub fn with_config( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.config = Some(value); + self + } + + pub fn with_private_location( + &mut self, + value: crate::datadogV1::model::SyntheticsPrivateLocation, + ) -> &mut Self { + self.private_location = Some(value); + self + } + + pub fn with_result_encryption( + &mut self, + value: crate::datadogV1::model::SyntheticsPrivateLocationCreationResponseResultEncryption, + ) -> &mut Self { + self.result_encryption = Some(value); + self + } } impl Default for SyntheticsPrivateLocationCreationResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_private_location_creation_response_result_encryption.rs b/src/datadogV1/model/model_synthetics_private_location_creation_response_result_encryption.rs index fe5d3aea1..f8dd801ec 100644 --- a/src/datadogV1/model/model_synthetics_private_location_creation_response_result_encryption.rs +++ b/src/datadogV1/model/model_synthetics_private_location_creation_response_result_encryption.rs @@ -23,6 +23,16 @@ impl SyntheticsPrivateLocationCreationResponseResultEncryption { key: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_key(&mut self, value: String) -> &mut Self { + self.key = Some(value); + self + } } impl Default for SyntheticsPrivateLocationCreationResponseResultEncryption { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_private_location_metadata.rs b/src/datadogV1/model/model_synthetics_private_location_metadata.rs index 3a45786fd..329aedb65 100644 --- a/src/datadogV1/model/model_synthetics_private_location_metadata.rs +++ b/src/datadogV1/model/model_synthetics_private_location_metadata.rs @@ -19,6 +19,11 @@ impl SyntheticsPrivateLocationMetadata { restricted_roles: None, } } + + pub fn with_restricted_roles(&mut self, value: Vec) -> &mut Self { + self.restricted_roles = Some(value); + self + } } impl Default for SyntheticsPrivateLocationMetadata { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_private_location_secrets.rs b/src/datadogV1/model/model_synthetics_private_location_secrets.rs index dfdd11622..6122a8173 100644 --- a/src/datadogV1/model/model_synthetics_private_location_secrets.rs +++ b/src/datadogV1/model/model_synthetics_private_location_secrets.rs @@ -11,11 +11,11 @@ pub struct SyntheticsPrivateLocationSecrets { /// Authentication part of the secrets. #[serde(rename = "authentication")] pub authentication: - Option>, + Option, /// Private key for the private location. #[serde(rename = "config_decryption")] pub config_decryption: - Option>, + Option, } impl SyntheticsPrivateLocationSecrets { @@ -25,6 +25,22 @@ impl SyntheticsPrivateLocationSecrets { config_decryption: None, } } + + pub fn with_authentication( + &mut self, + value: crate::datadogV1::model::SyntheticsPrivateLocationSecretsAuthentication, + ) -> &mut Self { + self.authentication = Some(value); + self + } + + pub fn with_config_decryption( + &mut self, + value: crate::datadogV1::model::SyntheticsPrivateLocationSecretsConfigDecryption, + ) -> &mut Self { + self.config_decryption = Some(value); + self + } } impl Default for SyntheticsPrivateLocationSecrets { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_private_location_secrets_authentication.rs b/src/datadogV1/model/model_synthetics_private_location_secrets_authentication.rs index 15bd5519c..530b89efe 100644 --- a/src/datadogV1/model/model_synthetics_private_location_secrets_authentication.rs +++ b/src/datadogV1/model/model_synthetics_private_location_secrets_authentication.rs @@ -23,6 +23,16 @@ impl SyntheticsPrivateLocationSecretsAuthentication { key: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_key(&mut self, value: String) -> &mut Self { + self.key = Some(value); + self + } } impl Default for SyntheticsPrivateLocationSecretsAuthentication { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_private_location_secrets_config_decryption.rs b/src/datadogV1/model/model_synthetics_private_location_secrets_config_decryption.rs index dbaeb8b1e..cf7803c52 100644 --- a/src/datadogV1/model/model_synthetics_private_location_secrets_config_decryption.rs +++ b/src/datadogV1/model/model_synthetics_private_location_secrets_config_decryption.rs @@ -17,6 +17,11 @@ impl SyntheticsPrivateLocationSecretsConfigDecryption { pub fn new() -> SyntheticsPrivateLocationSecretsConfigDecryption { SyntheticsPrivateLocationSecretsConfigDecryption { key: None } } + + pub fn with_key(&mut self, value: String) -> &mut Self { + self.key = Some(value); + self + } } impl Default for SyntheticsPrivateLocationSecretsConfigDecryption { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_ssl_certificate.rs b/src/datadogV1/model/model_synthetics_ssl_certificate.rs index 719d5df76..4aaf9630e 100644 --- a/src/datadogV1/model/model_synthetics_ssl_certificate.rs +++ b/src/datadogV1/model/model_synthetics_ssl_certificate.rs @@ -25,7 +25,7 @@ pub struct SyntheticsSSLCertificate { pub fingerprint256: Option, /// Object describing the issuer of a SSL certificate. #[serde(rename = "issuer")] - pub issuer: Option>, + pub issuer: Option, /// Modulus associated to the SSL certificate private key. #[serde(rename = "modulus")] pub modulus: Option, @@ -37,7 +37,7 @@ pub struct SyntheticsSSLCertificate { pub serial_number: Option, /// Object describing the SSL certificate used for the test. #[serde(rename = "subject")] - pub subject: Option>, + pub subject: Option, /// Date from which the SSL certificate is valid. #[serde(rename = "validFrom")] pub valid_from: Option, @@ -63,6 +63,72 @@ impl SyntheticsSSLCertificate { valid_to: None, } } + + pub fn with_cipher(&mut self, value: String) -> &mut Self { + self.cipher = Some(value); + self + } + + pub fn with_exponent(&mut self, value: f64) -> &mut Self { + self.exponent = Some(value); + self + } + + pub fn with_ext_key_usage(&mut self, value: Vec) -> &mut Self { + self.ext_key_usage = Some(value); + self + } + + pub fn with_fingerprint(&mut self, value: String) -> &mut Self { + self.fingerprint = Some(value); + self + } + + pub fn with_fingerprint256(&mut self, value: String) -> &mut Self { + self.fingerprint256 = Some(value); + self + } + + pub fn with_issuer( + &mut self, + value: crate::datadogV1::model::SyntheticsSSLCertificateIssuer, + ) -> &mut Self { + self.issuer = Some(value); + self + } + + pub fn with_modulus(&mut self, value: String) -> &mut Self { + self.modulus = Some(value); + self + } + + pub fn with_protocol(&mut self, value: String) -> &mut Self { + self.protocol = Some(value); + self + } + + pub fn with_serial_number(&mut self, value: String) -> &mut Self { + self.serial_number = Some(value); + self + } + + pub fn with_subject( + &mut self, + value: crate::datadogV1::model::SyntheticsSSLCertificateSubject, + ) -> &mut Self { + self.subject = Some(value); + self + } + + pub fn with_valid_from(&mut self, value: String) -> &mut Self { + self.valid_from = Some(value); + self + } + + pub fn with_valid_to(&mut self, value: String) -> &mut Self { + self.valid_to = Some(value); + self + } } impl Default for SyntheticsSSLCertificate { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_ssl_certificate_issuer.rs b/src/datadogV1/model/model_synthetics_ssl_certificate_issuer.rs index a68378041..e8d4d6a0d 100644 --- a/src/datadogV1/model/model_synthetics_ssl_certificate_issuer.rs +++ b/src/datadogV1/model/model_synthetics_ssl_certificate_issuer.rs @@ -39,6 +39,36 @@ impl SyntheticsSSLCertificateIssuer { st: None, } } + + pub fn with_c(&mut self, value: String) -> &mut Self { + self.c = Some(value); + self + } + + pub fn with_cn(&mut self, value: String) -> &mut Self { + self.cn = Some(value); + self + } + + pub fn with_l(&mut self, value: String) -> &mut Self { + self.l = Some(value); + self + } + + pub fn with_o(&mut self, value: String) -> &mut Self { + self.o = Some(value); + self + } + + pub fn with_ou(&mut self, value: String) -> &mut Self { + self.ou = Some(value); + self + } + + pub fn with_st(&mut self, value: String) -> &mut Self { + self.st = Some(value); + self + } } impl Default for SyntheticsSSLCertificateIssuer { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_ssl_certificate_subject.rs b/src/datadogV1/model/model_synthetics_ssl_certificate_subject.rs index ed03f882c..80bee3439 100644 --- a/src/datadogV1/model/model_synthetics_ssl_certificate_subject.rs +++ b/src/datadogV1/model/model_synthetics_ssl_certificate_subject.rs @@ -43,6 +43,41 @@ impl SyntheticsSSLCertificateSubject { alt_name: None, } } + + pub fn with_c(&mut self, value: String) -> &mut Self { + self.c = Some(value); + self + } + + pub fn with_cn(&mut self, value: String) -> &mut Self { + self.cn = Some(value); + self + } + + pub fn with_l(&mut self, value: String) -> &mut Self { + self.l = Some(value); + self + } + + pub fn with_o(&mut self, value: String) -> &mut Self { + self.o = Some(value); + self + } + + pub fn with_ou(&mut self, value: String) -> &mut Self { + self.ou = Some(value); + self + } + + pub fn with_st(&mut self, value: String) -> &mut Self { + self.st = Some(value); + self + } + + pub fn with_alt_name(&mut self, value: String) -> &mut Self { + self.alt_name = Some(value); + self + } } impl Default for SyntheticsSSLCertificateSubject { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_step.rs b/src/datadogV1/model/model_synthetics_step.rs index 35b1b0cf3..b0cdf3248 100644 --- a/src/datadogV1/model/model_synthetics_step.rs +++ b/src/datadogV1/model/model_synthetics_step.rs @@ -43,6 +43,44 @@ impl SyntheticsStep { type_: None, } } + + pub fn with_allow_failure(&mut self, value: bool) -> &mut Self { + self.allow_failure = Some(value); + self + } + + pub fn with_is_critical(&mut self, value: bool) -> &mut Self { + self.is_critical = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_no_screenshot(&mut self, value: bool) -> &mut Self { + self.no_screenshot = Some(value); + self + } + + pub fn with_params( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.params = Some(value); + self + } + + pub fn with_timeout(&mut self, value: i64) -> &mut Self { + self.timeout = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV1::model::SyntheticsStepType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SyntheticsStep { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_step_detail.rs b/src/datadogV1/model/model_synthetics_step_detail.rs index 5544ca208..7218fd629 100644 --- a/src/datadogV1/model/model_synthetics_step_detail.rs +++ b/src/datadogV1/model/model_synthetics_step_detail.rs @@ -84,6 +84,109 @@ impl SyntheticsStepDetail { warnings: None, } } + + pub fn with_browser_errors( + &mut self, + value: Vec, + ) -> &mut Self { + self.browser_errors = Some(value); + self + } + + pub fn with_check_type( + &mut self, + value: crate::datadogV1::model::SyntheticsCheckType, + ) -> &mut Self { + self.check_type = Some(value); + self + } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_duration(&mut self, value: f64) -> &mut Self { + self.duration = Some(value); + self + } + + pub fn with_error(&mut self, value: String) -> &mut Self { + self.error = Some(value); + self + } + + pub fn with_playing_tab( + &mut self, + value: crate::datadogV1::model::SyntheticsPlayingTab, + ) -> &mut Self { + self.playing_tab = Some(value); + self + } + + pub fn with_screenshot_bucket_key(&mut self, value: bool) -> &mut Self { + self.screenshot_bucket_key = Some(value); + self + } + + pub fn with_skipped(&mut self, value: bool) -> &mut Self { + self.skipped = Some(value); + self + } + + pub fn with_snapshot_bucket_key(&mut self, value: bool) -> &mut Self { + self.snapshot_bucket_key = Some(value); + self + } + + pub fn with_step_id(&mut self, value: i64) -> &mut Self { + self.step_id = Some(value); + self + } + + pub fn with_sub_test_step_details( + &mut self, + value: Vec, + ) -> &mut Self { + self.sub_test_step_details = Some(value); + self + } + + pub fn with_time_to_interactive(&mut self, value: f64) -> &mut Self { + self.time_to_interactive = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV1::model::SyntheticsStepType) -> &mut Self { + self.type_ = Some(value); + self + } + + pub fn with_url(&mut self, value: String) -> &mut Self { + self.url = Some(value); + self + } + + pub fn with_value(&mut self, value: serde_json::Value) -> &mut Self { + self.value = Some(value); + self + } + + pub fn with_vitals_metrics( + &mut self, + value: Vec, + ) -> &mut Self { + self.vitals_metrics = Some(value); + self + } + + pub fn with_warnings( + &mut self, + value: Vec, + ) -> &mut Self { + self.warnings = Some(value); + self + } } impl Default for SyntheticsStepDetail { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_test_ci_options.rs b/src/datadogV1/model/model_synthetics_test_ci_options.rs index 4b1382648..af17e2503 100644 --- a/src/datadogV1/model/model_synthetics_test_ci_options.rs +++ b/src/datadogV1/model/model_synthetics_test_ci_options.rs @@ -19,6 +19,14 @@ impl SyntheticsTestCiOptions { execution_rule: None, } } + + pub fn with_execution_rule( + &mut self, + value: crate::datadogV1::model::SyntheticsTestExecutionRule, + ) -> &mut Self { + self.execution_rule = Some(value); + self + } } impl Default for SyntheticsTestCiOptions { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_test_config.rs b/src/datadogV1/model/model_synthetics_test_config.rs index 6518d0459..c57b402f8 100644 --- a/src/datadogV1/model/model_synthetics_test_config.rs +++ b/src/datadogV1/model/model_synthetics_test_config.rs @@ -16,7 +16,7 @@ pub struct SyntheticsTestConfig { pub config_variables: Option>, /// Object describing the Synthetic test request. #[serde(rename = "request")] - pub request: Option>, + pub request: Option, /// Browser tests only - array of variables used for the test steps. #[serde(rename = "variables")] pub variables: Option>, @@ -31,6 +31,38 @@ impl SyntheticsTestConfig { variables: None, } } + + pub fn with_assertions( + &mut self, + value: Vec, + ) -> &mut Self { + self.assertions = Some(value); + self + } + + pub fn with_config_variables( + &mut self, + value: Vec, + ) -> &mut Self { + self.config_variables = Some(value); + self + } + + pub fn with_request( + &mut self, + value: crate::datadogV1::model::SyntheticsTestRequest, + ) -> &mut Self { + self.request = Some(value); + self + } + + pub fn with_variables( + &mut self, + value: Vec, + ) -> &mut Self { + self.variables = Some(value); + self + } } impl Default for SyntheticsTestConfig { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_test_details.rs b/src/datadogV1/model/model_synthetics_test_details.rs index a55fff02e..9111a22d7 100644 --- a/src/datadogV1/model/model_synthetics_test_details.rs +++ b/src/datadogV1/model/model_synthetics_test_details.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct SyntheticsTestDetails { /// Configuration object for a Synthetic test. #[serde(rename = "config")] - pub config: Option>, + pub config: Option, /// Object describing the creator of the shared element. #[serde(rename = "creator")] - pub creator: Option>, + pub creator: Option, /// Array of locations used to run the test. #[serde(rename = "locations")] pub locations: Option>, @@ -28,7 +28,7 @@ pub struct SyntheticsTestDetails { pub name: Option, /// Object describing the extra options for a Synthetic test. #[serde(rename = "options")] - pub options: Option>, + pub options: Option, /// The test public ID. #[serde(rename = "public_id")] pub public_id: Option, @@ -69,6 +69,86 @@ impl SyntheticsTestDetails { type_: None, } } + + pub fn with_config( + &mut self, + value: crate::datadogV1::model::SyntheticsTestConfig, + ) -> &mut Self { + self.config = Some(value); + self + } + + pub fn with_creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + self.creator = Some(value); + self + } + + pub fn with_locations(&mut self, value: Vec) -> &mut Self { + self.locations = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_monitor_id(&mut self, value: i64) -> &mut Self { + self.monitor_id = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_options( + &mut self, + value: crate::datadogV1::model::SyntheticsTestOptions, + ) -> &mut Self { + self.options = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_status( + &mut self, + value: crate::datadogV1::model::SyntheticsTestPauseStatus, + ) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_steps(&mut self, value: Vec) -> &mut Self { + self.steps = Some(value); + self + } + + pub fn with_subtype( + &mut self, + value: crate::datadogV1::model::SyntheticsTestDetailsSubType, + ) -> &mut Self { + self.subtype = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV1::model::SyntheticsTestDetailsType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SyntheticsTestDetails { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_test_options.rs b/src/datadogV1/model/model_synthetics_test_options.rs index 7a0cca632..d7b8b4a10 100644 --- a/src/datadogV1/model/model_synthetics_test_options.rs +++ b/src/datadogV1/model/model_synthetics_test_options.rs @@ -20,7 +20,7 @@ pub struct SyntheticsTestOptions { pub check_certificate_revocation: Option, /// CI/CD options for a Synthetic test. #[serde(rename = "ci")] - pub ci: Option>, + pub ci: Option, /// For browser test, array with the different device IDs used to run the test. #[serde(rename = "device_ids")] pub device_ids: Option>, @@ -55,7 +55,7 @@ pub struct SyntheticsTestOptions { /// Object containing the options for a Synthetic test as a monitor /// (for example, renotification). #[serde(rename = "monitor_options")] - pub monitor_options: Option>, + pub monitor_options: Option, /// Integer from 1 (high) to 5 (low) indicating alert severity. #[serde(rename = "monitor_priority")] pub monitor_priority: Option, @@ -67,7 +67,7 @@ pub struct SyntheticsTestOptions { pub restricted_roles: Option>, /// Object describing the retry strategy to apply to a Synthetic test. #[serde(rename = "retry")] - pub retry: Option>, + pub retry: Option, /// The RUM data collection settings for the Synthetic browser test. /// **Note:** There are 3 ways to format RUM settings: /// @@ -80,10 +80,10 @@ pub struct SyntheticsTestOptions { /// `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` /// RUM data is collected using the specified application. #[serde(rename = "rumSettings")] - pub rum_settings: Option>, + pub rum_settings: Option, /// Object containing timeframes and timezone used for advanced scheduling. #[serde(rename = "scheduling")] - pub scheduling: Option>, + pub scheduling: Option, /// The frequency at which to run the Synthetic test (in seconds). #[serde(rename = "tick_every")] pub tick_every: Option, @@ -116,6 +116,137 @@ impl SyntheticsTestOptions { tick_every: None, } } + + pub fn with_accept_self_signed(&mut self, value: bool) -> &mut Self { + self.accept_self_signed = Some(value); + self + } + + pub fn with_allow_insecure(&mut self, value: bool) -> &mut Self { + self.allow_insecure = Some(value); + self + } + + pub fn with_check_certificate_revocation(&mut self, value: bool) -> &mut Self { + self.check_certificate_revocation = Some(value); + self + } + + pub fn with_ci( + &mut self, + value: crate::datadogV1::model::SyntheticsTestCiOptions, + ) -> &mut Self { + self.ci = Some(value); + self + } + + pub fn with_device_ids( + &mut self, + value: Vec, + ) -> &mut Self { + self.device_ids = Some(value); + self + } + + pub fn with_disable_cors(&mut self, value: bool) -> &mut Self { + self.disable_cors = Some(value); + self + } + + pub fn with_disable_csp(&mut self, value: bool) -> &mut Self { + self.disable_csp = Some(value); + self + } + + pub fn with_follow_redirects(&mut self, value: bool) -> &mut Self { + self.follow_redirects = Some(value); + self + } + + pub fn with_http_version( + &mut self, + value: crate::datadogV1::model::SyntheticsTestOptionsHTTPVersion, + ) -> &mut Self { + self.http_version = Some(value); + self + } + + pub fn with_ignore_server_certificate_error(&mut self, value: bool) -> &mut Self { + self.ignore_server_certificate_error = Some(value); + self + } + + pub fn with_initial_navigation_timeout(&mut self, value: i64) -> &mut Self { + self.initial_navigation_timeout = Some(value); + self + } + + pub fn with_min_failure_duration(&mut self, value: i64) -> &mut Self { + self.min_failure_duration = Some(value); + self + } + + pub fn with_min_location_failed(&mut self, value: i64) -> &mut Self { + self.min_location_failed = Some(value); + self + } + + pub fn with_monitor_name(&mut self, value: String) -> &mut Self { + self.monitor_name = Some(value); + self + } + + pub fn with_monitor_options( + &mut self, + value: crate::datadogV1::model::SyntheticsTestOptionsMonitorOptions, + ) -> &mut Self { + self.monitor_options = Some(value); + self + } + + pub fn with_monitor_priority(&mut self, value: i32) -> &mut Self { + self.monitor_priority = Some(value); + self + } + + pub fn with_no_screenshot(&mut self, value: bool) -> &mut Self { + self.no_screenshot = Some(value); + self + } + + pub fn with_restricted_roles(&mut self, value: Vec) -> &mut Self { + self.restricted_roles = Some(value); + self + } + + pub fn with_retry( + &mut self, + value: crate::datadogV1::model::SyntheticsTestOptionsRetry, + ) -> &mut Self { + self.retry = Some(value); + self + } + + pub fn with_rum_settings( + &mut self, + value: crate::datadogV1::model::SyntheticsBrowserTestRumSettings, + ) -> &mut Self { + self.rum_settings = Some(value); + self + } + + pub fn with_scheduling( + &mut self, + value: crate::datadogV1::model::SyntheticsTestOptionsScheduling, + ) -> &mut Self { + self.scheduling = Some(value); + self + } + + pub fn with_tick_every(&mut self, value: i64) -> &mut Self { + self.tick_every = Some(value); + self + } } impl Default for SyntheticsTestOptions { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_test_options_monitor_options.rs b/src/datadogV1/model/model_synthetics_test_options_monitor_options.rs index da9ca66b9..0d7761e21 100644 --- a/src/datadogV1/model/model_synthetics_test_options_monitor_options.rs +++ b/src/datadogV1/model/model_synthetics_test_options_monitor_options.rs @@ -21,6 +21,11 @@ impl SyntheticsTestOptionsMonitorOptions { renotify_interval: None, } } + + pub fn with_renotify_interval(&mut self, value: i64) -> &mut Self { + self.renotify_interval = Some(value); + self + } } impl Default for SyntheticsTestOptionsMonitorOptions { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_test_options_retry.rs b/src/datadogV1/model/model_synthetics_test_options_retry.rs index d0bec6aea..61e862f14 100644 --- a/src/datadogV1/model/model_synthetics_test_options_retry.rs +++ b/src/datadogV1/model/model_synthetics_test_options_retry.rs @@ -25,6 +25,16 @@ impl SyntheticsTestOptionsRetry { interval: None, } } + + pub fn with_count(&mut self, value: i64) -> &mut Self { + self.count = Some(value); + self + } + + pub fn with_interval(&mut self, value: f64) -> &mut Self { + self.interval = Some(value); + self + } } impl Default for SyntheticsTestOptionsRetry { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_test_options_scheduling.rs b/src/datadogV1/model/model_synthetics_test_options_scheduling.rs index 607313fb1..6d301759f 100644 --- a/src/datadogV1/model/model_synthetics_test_options_scheduling.rs +++ b/src/datadogV1/model/model_synthetics_test_options_scheduling.rs @@ -23,6 +23,19 @@ impl SyntheticsTestOptionsScheduling { timezone: None, } } + + pub fn with_timeframes( + &mut self, + value: Vec, + ) -> &mut Self { + self.timeframes = Some(value); + self + } + + pub fn with_timezone(&mut self, value: String) -> &mut Self { + self.timezone = Some(value); + self + } } impl Default for SyntheticsTestOptionsScheduling { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_test_options_scheduling_timeframe.rs b/src/datadogV1/model/model_synthetics_test_options_scheduling_timeframe.rs index 6457aa1a2..1cc909a58 100644 --- a/src/datadogV1/model/model_synthetics_test_options_scheduling_timeframe.rs +++ b/src/datadogV1/model/model_synthetics_test_options_scheduling_timeframe.rs @@ -27,6 +27,21 @@ impl SyntheticsTestOptionsSchedulingTimeframe { to: None, } } + + pub fn with_day(&mut self, value: i32) -> &mut Self { + self.day = Some(value); + self + } + + pub fn with_from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + self + } + + pub fn with_to(&mut self, value: String) -> &mut Self { + self.to = Some(value); + self + } } impl Default for SyntheticsTestOptionsSchedulingTimeframe { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_test_request.rs b/src/datadogV1/model/model_synthetics_test_request.rs index 63527b442..e782e8fce 100644 --- a/src/datadogV1/model/model_synthetics_test_request.rs +++ b/src/datadogV1/model/model_synthetics_test_request.rs @@ -13,7 +13,7 @@ pub struct SyntheticsTestRequest { pub allow_insecure: Option, /// Object to handle basic authentication when performing the test. #[serde(rename = "basicAuth")] - pub basic_auth: Option>, + pub basic_auth: Option, /// Body to include in the test. #[serde(rename = "body")] pub body: Option, @@ -25,7 +25,7 @@ pub struct SyntheticsTestRequest { pub call_type: Option, /// Client certificate to use when performing the test request. #[serde(rename = "certificate")] - pub certificate: Option>, + pub certificate: Option, /// By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`. #[serde(rename = "certificateDomains")] pub certificate_domains: Option>, @@ -70,7 +70,7 @@ pub struct SyntheticsTestRequest { pub port: Option, /// The proxy to perform the test. #[serde(rename = "proxy")] - pub proxy: Option>, + pub proxy: Option, /// Query to use for the test. #[serde(rename = "query")] pub query: Option>, @@ -125,6 +125,162 @@ impl SyntheticsTestRequest { url: None, } } + + pub fn with_allow_insecure(&mut self, value: bool) -> &mut Self { + self.allow_insecure = Some(value); + self + } + + pub fn with_basic_auth( + &mut self, + value: crate::datadogV1::model::SyntheticsBasicAuth, + ) -> &mut Self { + self.basic_auth = Some(value); + self + } + + pub fn with_body(&mut self, value: String) -> &mut Self { + self.body = Some(value); + self + } + + pub fn with_body_type( + &mut self, + value: crate::datadogV1::model::SyntheticsTestRequestBodyType, + ) -> &mut Self { + self.body_type = Some(value); + self + } + + pub fn with_call_type( + &mut self, + value: crate::datadogV1::model::SyntheticsTestCallType, + ) -> &mut Self { + self.call_type = Some(value); + self + } + + pub fn with_certificate( + &mut self, + value: crate::datadogV1::model::SyntheticsTestRequestCertificate, + ) -> &mut Self { + self.certificate = Some(value); + self + } + + pub fn with_certificate_domains(&mut self, value: Vec) -> &mut Self { + self.certificate_domains = Some(value); + self + } + + pub fn with_compressed_json_descriptor(&mut self, value: String) -> &mut Self { + self.compressed_json_descriptor = Some(value); + self + } + + pub fn with_dns_server(&mut self, value: String) -> &mut Self { + self.dns_server = Some(value); + self + } + + pub fn with_dns_server_port(&mut self, value: i32) -> &mut Self { + self.dns_server_port = Some(value); + self + } + + pub fn with_follow_redirects(&mut self, value: bool) -> &mut Self { + self.follow_redirects = Some(value); + self + } + + pub fn with_headers(&mut self, value: std::collections::BTreeMap) -> &mut Self { + self.headers = Some(value); + self + } + + pub fn with_host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_metadata( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn with_method(&mut self, value: String) -> &mut Self { + self.method = Some(value); + self + } + + pub fn with_no_saving_response_body(&mut self, value: bool) -> &mut Self { + self.no_saving_response_body = Some(value); + self + } + + pub fn with_number_of_packets(&mut self, value: i32) -> &mut Self { + self.number_of_packets = Some(value); + self + } + + pub fn with_persist_cookies(&mut self, value: bool) -> &mut Self { + self.persist_cookies = Some(value); + self + } + + pub fn with_port(&mut self, value: i64) -> &mut Self { + self.port = Some(value); + self + } + + pub fn with_proxy( + &mut self, + value: crate::datadogV1::model::SyntheticsTestRequestProxy, + ) -> &mut Self { + self.proxy = Some(value); + self + } + + pub fn with_query( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_servername(&mut self, value: String) -> &mut Self { + self.servername = Some(value); + self + } + + pub fn with_service(&mut self, value: String) -> &mut Self { + self.service = Some(value); + self + } + + pub fn with_should_track_hops(&mut self, value: bool) -> &mut Self { + self.should_track_hops = Some(value); + self + } + + pub fn with_timeout(&mut self, value: f64) -> &mut Self { + self.timeout = Some(value); + self + } + + pub fn with_url(&mut self, value: String) -> &mut Self { + self.url = Some(value); + self + } } impl Default for SyntheticsTestRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_test_request_certificate.rs b/src/datadogV1/model/model_synthetics_test_request_certificate.rs index aba1c9951..9c5670a9d 100644 --- a/src/datadogV1/model/model_synthetics_test_request_certificate.rs +++ b/src/datadogV1/model/model_synthetics_test_request_certificate.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct SyntheticsTestRequestCertificate { /// Define a request certificate. #[serde(rename = "cert")] - pub cert: Option>, + pub cert: Option, /// Define a request certificate. #[serde(rename = "key")] - pub key: Option>, + pub key: Option, } impl SyntheticsTestRequestCertificate { @@ -23,6 +23,22 @@ impl SyntheticsTestRequestCertificate { key: None, } } + + pub fn with_cert( + &mut self, + value: crate::datadogV1::model::SyntheticsTestRequestCertificateItem, + ) -> &mut Self { + self.cert = Some(value); + self + } + + pub fn with_key( + &mut self, + value: crate::datadogV1::model::SyntheticsTestRequestCertificateItem, + ) -> &mut Self { + self.key = Some(value); + self + } } impl Default for SyntheticsTestRequestCertificate { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_test_request_certificate_item.rs b/src/datadogV1/model/model_synthetics_test_request_certificate_item.rs index 241c2ddb6..6df51ee49 100644 --- a/src/datadogV1/model/model_synthetics_test_request_certificate_item.rs +++ b/src/datadogV1/model/model_synthetics_test_request_certificate_item.rs @@ -27,6 +27,21 @@ impl SyntheticsTestRequestCertificateItem { updated_at: None, } } + + pub fn with_content(&mut self, value: String) -> &mut Self { + self.content = Some(value); + self + } + + pub fn with_filename(&mut self, value: String) -> &mut Self { + self.filename = Some(value); + self + } + + pub fn with_updated_at(&mut self, value: String) -> &mut Self { + self.updated_at = Some(value); + self + } } impl Default for SyntheticsTestRequestCertificateItem { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_test_request_proxy.rs b/src/datadogV1/model/model_synthetics_test_request_proxy.rs index 66cfdb381..9342930e4 100644 --- a/src/datadogV1/model/model_synthetics_test_request_proxy.rs +++ b/src/datadogV1/model/model_synthetics_test_request_proxy.rs @@ -20,4 +20,9 @@ impl SyntheticsTestRequestProxy { pub fn new(url: String) -> SyntheticsTestRequestProxy { SyntheticsTestRequestProxy { headers: None, url } } + + pub fn with_headers(&mut self, value: std::collections::BTreeMap) -> &mut Self { + self.headers = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_timing.rs b/src/datadogV1/model/model_synthetics_timing.rs index 2fc682e9b..bc58d2734 100644 --- a/src/datadogV1/model/model_synthetics_timing.rs +++ b/src/datadogV1/model/model_synthetics_timing.rs @@ -52,6 +52,51 @@ impl SyntheticsTiming { wait: None, } } + + pub fn with_dns(&mut self, value: f64) -> &mut Self { + self.dns = Some(value); + self + } + + pub fn with_download(&mut self, value: f64) -> &mut Self { + self.download = Some(value); + self + } + + pub fn with_first_byte(&mut self, value: f64) -> &mut Self { + self.first_byte = Some(value); + self + } + + pub fn with_handshake(&mut self, value: f64) -> &mut Self { + self.handshake = Some(value); + self + } + + pub fn with_redirect(&mut self, value: f64) -> &mut Self { + self.redirect = Some(value); + self + } + + pub fn with_ssl(&mut self, value: f64) -> &mut Self { + self.ssl = Some(value); + self + } + + pub fn with_tcp(&mut self, value: f64) -> &mut Self { + self.tcp = Some(value); + self + } + + pub fn with_total(&mut self, value: f64) -> &mut Self { + self.total = Some(value); + self + } + + pub fn with_wait(&mut self, value: f64) -> &mut Self { + self.wait = Some(value); + self + } } impl Default for SyntheticsTiming { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_trigger_ci_test_location.rs b/src/datadogV1/model/model_synthetics_trigger_ci_test_location.rs index 93a19f884..5b4e6d0b1 100644 --- a/src/datadogV1/model/model_synthetics_trigger_ci_test_location.rs +++ b/src/datadogV1/model/model_synthetics_trigger_ci_test_location.rs @@ -23,6 +23,16 @@ impl SyntheticsTriggerCITestLocation { name: None, } } + + pub fn with_id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } impl Default for SyntheticsTriggerCITestLocation { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_trigger_ci_test_run_result.rs b/src/datadogV1/model/model_synthetics_trigger_ci_test_run_result.rs index 240713986..3d6a7058e 100644 --- a/src/datadogV1/model/model_synthetics_trigger_ci_test_run_result.rs +++ b/src/datadogV1/model/model_synthetics_trigger_ci_test_run_result.rs @@ -31,6 +31,26 @@ impl SyntheticsTriggerCITestRunResult { result_id: None, } } + + pub fn with_device(&mut self, value: crate::datadogV1::model::SyntheticsDeviceID) -> &mut Self { + self.device = Some(value); + self + } + + pub fn with_location(&mut self, value: i64) -> &mut Self { + self.location = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_result_id(&mut self, value: String) -> &mut Self { + self.result_id = Some(value); + self + } } impl Default for SyntheticsTriggerCITestRunResult { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_trigger_ci_tests_response.rs b/src/datadogV1/model/model_synthetics_trigger_ci_tests_response.rs index d6676c203..03258d793 100644 --- a/src/datadogV1/model/model_synthetics_trigger_ci_tests_response.rs +++ b/src/datadogV1/model/model_synthetics_trigger_ci_tests_response.rs @@ -35,6 +35,32 @@ impl SyntheticsTriggerCITestsResponse { triggered_check_ids: None, } } + + pub fn with_batch_id(&mut self, value: Option) -> &mut Self { + self.batch_id = Some(value); + self + } + + pub fn with_locations( + &mut self, + value: Vec, + ) -> &mut Self { + self.locations = Some(value); + self + } + + pub fn with_results( + &mut self, + value: Vec, + ) -> &mut Self { + self.results = Some(value); + self + } + + pub fn with_triggered_check_ids(&mut self, value: Vec) -> &mut Self { + self.triggered_check_ids = Some(value); + self + } } impl Default for SyntheticsTriggerCITestsResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_trigger_test.rs b/src/datadogV1/model/model_synthetics_trigger_test.rs index 9c33e9562..7d278684a 100644 --- a/src/datadogV1/model/model_synthetics_trigger_test.rs +++ b/src/datadogV1/model/model_synthetics_trigger_test.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SyntheticsTriggerTest { /// Metadata for the Synthetic tests run. #[serde(rename = "metadata")] - pub metadata: Option>, + pub metadata: Option, /// The public ID of the Synthetic test to trigger. #[serde(rename = "public_id")] pub public_id: String, @@ -23,4 +23,12 @@ impl SyntheticsTriggerTest { public_id, } } + + pub fn with_metadata( + &mut self, + value: crate::datadogV1::model::SyntheticsCIBatchMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } } diff --git a/src/datadogV1/model/model_synthetics_update_test_pause_status_payload.rs b/src/datadogV1/model/model_synthetics_update_test_pause_status_payload.rs index 8aad187a8..f41660709 100644 --- a/src/datadogV1/model/model_synthetics_update_test_pause_status_payload.rs +++ b/src/datadogV1/model/model_synthetics_update_test_pause_status_payload.rs @@ -18,6 +18,14 @@ impl SyntheticsUpdateTestPauseStatusPayload { pub fn new() -> SyntheticsUpdateTestPauseStatusPayload { SyntheticsUpdateTestPauseStatusPayload { new_status: None } } + + pub fn with_new_status( + &mut self, + value: crate::datadogV1::model::SyntheticsTestPauseStatus, + ) -> &mut Self { + self.new_status = Some(value); + self + } } impl Default for SyntheticsUpdateTestPauseStatusPayload { fn default() -> Self { diff --git a/src/datadogV1/model/model_synthetics_variable_parser.rs b/src/datadogV1/model/model_synthetics_variable_parser.rs index a8818674a..207a0fd16 100644 --- a/src/datadogV1/model/model_synthetics_variable_parser.rs +++ b/src/datadogV1/model/model_synthetics_variable_parser.rs @@ -22,4 +22,9 @@ impl SyntheticsVariableParser { ) -> SyntheticsVariableParser { SyntheticsVariableParser { type_, value: None } } + + pub fn with_value(&mut self, value: String) -> &mut Self { + self.value = Some(value); + self + } } diff --git a/src/datadogV1/model/model_table_widget_definition.rs b/src/datadogV1/model/model_table_widget_definition.rs index 6b6cb53d7..40456e26a 100644 --- a/src/datadogV1/model/model_table_widget_definition.rs +++ b/src/datadogV1/model/model_table_widget_definition.rs @@ -19,7 +19,7 @@ pub struct TableWidgetDefinition { pub requests: Vec, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// Title of your widget. #[serde(rename = "title")] pub title: Option, @@ -50,4 +50,43 @@ impl TableWidgetDefinition { type_, } } + + pub fn with_custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn with_has_search_bar( + &mut self, + value: crate::datadogV1::model::TableWidgetHasSearchBar, + ) -> &mut Self { + self.has_search_bar = Some(value); + self + } + + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_table_widget_request.rs b/src/datadogV1/model/model_table_widget_request.rs index afe427f21..51158ebad 100644 --- a/src/datadogV1/model/model_table_widget_request.rs +++ b/src/datadogV1/model/model_table_widget_request.rs @@ -16,10 +16,10 @@ pub struct TableWidgetRequest { pub alias: Option, /// The log query. #[serde(rename = "apm_query")] - pub apm_query: Option>, + pub apm_query: Option, /// The APM stats query for table and distributions widgets. #[serde(rename = "apm_stats_query")] - pub apm_stats_query: Option>, + pub apm_stats_query: Option, /// A list of display modes for each table cell. #[serde(rename = "cell_display_mode")] pub cell_display_mode: Option>, @@ -28,7 +28,7 @@ pub struct TableWidgetRequest { pub conditional_formats: Option>, /// The log query. #[serde(rename = "event_query")] - pub event_query: Option>, + pub event_query: Option, /// List of formulas that operate on queries. #[serde(rename = "formulas")] pub formulas: Option>, @@ -37,19 +37,19 @@ pub struct TableWidgetRequest { pub limit: Option, /// The log query. #[serde(rename = "log_query")] - pub log_query: Option>, + pub log_query: Option, /// The log query. #[serde(rename = "network_query")] - pub network_query: Option>, + pub network_query: Option, /// Widget sorting methods. #[serde(rename = "order")] pub order: Option, /// The process query to use in the widget. #[serde(rename = "process_query")] - pub process_query: Option>, + pub process_query: Option, /// The log query. #[serde(rename = "profile_metrics_query")] - pub profile_metrics_query: Option>, + pub profile_metrics_query: Option, /// Query definition. #[serde(rename = "q")] pub q: Option, @@ -61,10 +61,10 @@ pub struct TableWidgetRequest { pub response_format: Option, /// The log query. #[serde(rename = "rum_query")] - pub rum_query: Option>, + pub rum_query: Option, /// The log query. #[serde(rename = "security_query")] - pub security_query: Option>, + pub security_query: Option, } impl TableWidgetRequest { @@ -91,6 +91,146 @@ impl TableWidgetRequest { security_query: None, } } + + pub fn with_aggregator( + &mut self, + value: crate::datadogV1::model::WidgetAggregator, + ) -> &mut Self { + self.aggregator = Some(value); + self + } + + pub fn with_alias(&mut self, value: String) -> &mut Self { + self.alias = Some(value); + self + } + + pub fn with_apm_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn with_apm_stats_query( + &mut self, + value: crate::datadogV1::model::ApmStatsQueryDefinition, + ) -> &mut Self { + self.apm_stats_query = Some(value); + self + } + + pub fn with_cell_display_mode( + &mut self, + value: Vec, + ) -> &mut Self { + self.cell_display_mode = Some(value); + self + } + + pub fn with_conditional_formats( + &mut self, + value: Vec, + ) -> &mut Self { + self.conditional_formats = Some(value); + self + } + + pub fn with_event_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn with_formulas( + &mut self, + value: Vec, + ) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn with_limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_log_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn with_network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn with_order(&mut self, value: crate::datadogV1::model::WidgetSort) -> &mut Self { + self.order = Some(value); + self + } + + pub fn with_process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn with_profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn with_q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn with_queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn with_response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + self + } + + pub fn with_rum_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn with_security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + self + } } impl Default for TableWidgetRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_tag_to_hosts.rs b/src/datadogV1/model/model_tag_to_hosts.rs index 5390cfaaf..cec218c2e 100644 --- a/src/datadogV1/model/model_tag_to_hosts.rs +++ b/src/datadogV1/model/model_tag_to_hosts.rs @@ -17,6 +17,14 @@ impl TagToHosts { pub fn new() -> TagToHosts { TagToHosts { tags: None } } + + pub fn with_tags( + &mut self, + value: std::collections::BTreeMap>, + ) -> &mut Self { + self.tags = Some(value); + self + } } impl Default for TagToHosts { fn default() -> Self { diff --git a/src/datadogV1/model/model_timeseries_background.rs b/src/datadogV1/model/model_timeseries_background.rs index 7479ac647..55eb89421 100644 --- a/src/datadogV1/model/model_timeseries_background.rs +++ b/src/datadogV1/model/model_timeseries_background.rs @@ -13,11 +13,16 @@ pub struct TimeseriesBackground { pub type_: crate::datadogV1::model::TimeseriesBackgroundType, /// Axis controls for the widget. #[serde(rename = "yaxis")] - pub yaxis: Option>, + pub yaxis: Option, } impl TimeseriesBackground { pub fn new(type_: crate::datadogV1::model::TimeseriesBackgroundType) -> TimeseriesBackground { TimeseriesBackground { type_, yaxis: None } } + + pub fn with_yaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { + self.yaxis = Some(value); + self + } } diff --git a/src/datadogV1/model/model_timeseries_widget_definition.rs b/src/datadogV1/model/model_timeseries_widget_definition.rs index cd234d1b4..4db120ce3 100644 --- a/src/datadogV1/model/model_timeseries_widget_definition.rs +++ b/src/datadogV1/model/model_timeseries_widget_definition.rs @@ -31,13 +31,13 @@ pub struct TimeseriesWidgetDefinition { pub requests: Vec, /// Axis controls for the widget. #[serde(rename = "right_yaxis")] - pub right_yaxis: Option>, + pub right_yaxis: Option, /// (screenboard only) Show the legend for this widget. #[serde(rename = "show_legend")] pub show_legend: Option, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// Title of your widget. #[serde(rename = "title")] pub title: Option, @@ -52,7 +52,7 @@ pub struct TimeseriesWidgetDefinition { pub type_: crate::datadogV1::model::TimeseriesWidgetDefinitionType, /// Axis controls for the widget. #[serde(rename = "yaxis")] - pub yaxis: Option>, + pub yaxis: Option, } impl TimeseriesWidgetDefinition { @@ -78,4 +78,81 @@ impl TimeseriesWidgetDefinition { yaxis: None, } } + + pub fn with_custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn with_events(&mut self, value: Vec) -> &mut Self { + self.events = Some(value); + self + } + + pub fn with_legend_columns( + &mut self, + value: Vec, + ) -> &mut Self { + self.legend_columns = Some(value); + self + } + + pub fn with_legend_layout( + &mut self, + value: crate::datadogV1::model::TimeseriesWidgetLegendLayout, + ) -> &mut Self { + self.legend_layout = Some(value); + self + } + + pub fn with_legend_size(&mut self, value: String) -> &mut Self { + self.legend_size = Some(value); + self + } + + pub fn with_markers(&mut self, value: Vec) -> &mut Self { + self.markers = Some(value); + self + } + + pub fn with_right_yaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { + self.right_yaxis = Some(value); + self + } + + pub fn with_show_legend(&mut self, value: bool) -> &mut Self { + self.show_legend = Some(value); + self + } + + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } + + pub fn with_yaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { + self.yaxis = Some(value); + self + } } diff --git a/src/datadogV1/model/model_timeseries_widget_expression_alias.rs b/src/datadogV1/model/model_timeseries_widget_expression_alias.rs index 61a072d0d..f7a2d2793 100644 --- a/src/datadogV1/model/model_timeseries_widget_expression_alias.rs +++ b/src/datadogV1/model/model_timeseries_widget_expression_alias.rs @@ -23,4 +23,9 @@ impl TimeseriesWidgetExpressionAlias { expression, } } + + pub fn with_alias_name(&mut self, value: String) -> &mut Self { + self.alias_name = Some(value); + self + } } diff --git a/src/datadogV1/model/model_timeseries_widget_request.rs b/src/datadogV1/model/model_timeseries_widget_request.rs index 7ed936c06..36e286f0b 100644 --- a/src/datadogV1/model/model_timeseries_widget_request.rs +++ b/src/datadogV1/model/model_timeseries_widget_request.rs @@ -10,37 +10,37 @@ use serde_with::skip_serializing_none; pub struct TimeseriesWidgetRequest { /// The log query. #[serde(rename = "apm_query")] - pub apm_query: Option>, + pub apm_query: Option, /// The log query. #[serde(rename = "audit_query")] - pub audit_query: Option>, + pub audit_query: Option, /// Type of display to use for the request. #[serde(rename = "display_type")] pub display_type: Option, /// The log query. #[serde(rename = "event_query")] - pub event_query: Option>, + pub event_query: Option, /// List of formulas that operate on queries. #[serde(rename = "formulas")] pub formulas: Option>, /// The log query. #[serde(rename = "log_query")] - pub log_query: Option>, + pub log_query: Option, /// Used to define expression aliases. #[serde(rename = "metadata")] pub metadata: Option>, /// The log query. #[serde(rename = "network_query")] - pub network_query: Option>, + pub network_query: Option, /// Whether or not to display a second y-axis on the right. #[serde(rename = "on_right_yaxis")] pub on_right_yaxis: Option, /// The process query to use in the widget. #[serde(rename = "process_query")] - pub process_query: Option>, + pub process_query: Option, /// The log query. #[serde(rename = "profile_metrics_query")] - pub profile_metrics_query: Option>, + pub profile_metrics_query: Option, /// Widget query. #[serde(rename = "q")] pub q: Option, @@ -52,13 +52,13 @@ pub struct TimeseriesWidgetRequest { pub response_format: Option, /// The log query. #[serde(rename = "rum_query")] - pub rum_query: Option>, + pub rum_query: Option, /// The log query. #[serde(rename = "security_query")] - pub security_query: Option>, + pub security_query: Option, /// Define request widget style. #[serde(rename = "style")] - pub style: Option>, + pub style: Option, } impl TimeseriesWidgetRequest { @@ -83,6 +83,133 @@ impl TimeseriesWidgetRequest { style: None, } } + + pub fn with_apm_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn with_audit_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.audit_query = Some(value); + self + } + + pub fn with_display_type( + &mut self, + value: crate::datadogV1::model::WidgetDisplayType, + ) -> &mut Self { + self.display_type = Some(value); + self + } + + pub fn with_event_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn with_formulas( + &mut self, + value: Vec, + ) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn with_log_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn with_metadata( + &mut self, + value: Vec, + ) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn with_network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn with_on_right_yaxis(&mut self, value: bool) -> &mut Self { + self.on_right_yaxis = Some(value); + self + } + + pub fn with_process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn with_profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn with_q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn with_queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn with_response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + self + } + + pub fn with_rum_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn with_security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + self + } + + pub fn with_style(&mut self, value: crate::datadogV1::model::WidgetRequestStyle) -> &mut Self { + self.style = Some(value); + self + } } impl Default for TimeseriesWidgetRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_toplist_widget_definition.rs b/src/datadogV1/model/model_toplist_widget_definition.rs index 4a9e28322..bca523ce1 100644 --- a/src/datadogV1/model/model_toplist_widget_definition.rs +++ b/src/datadogV1/model/model_toplist_widget_definition.rs @@ -16,10 +16,10 @@ pub struct ToplistWidgetDefinition { pub requests: Vec, /// Style customization for a top list widget. #[serde(rename = "style")] - pub style: Option>, + pub style: Option, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// Title of your widget. #[serde(rename = "title")] pub title: Option, @@ -50,4 +50,40 @@ impl ToplistWidgetDefinition { type_, } } + + pub fn with_custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn with_style(&mut self, value: crate::datadogV1::model::ToplistWidgetStyle) -> &mut Self { + self.style = Some(value); + self + } + + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_toplist_widget_display.rs b/src/datadogV1/model/model_toplist_widget_display.rs index 508b23690..e3c43c419 100644 --- a/src/datadogV1/model/model_toplist_widget_display.rs +++ b/src/datadogV1/model/model_toplist_widget_display.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ToplistWidgetDisplay { - ToplistWidgetStacked(Box), - ToplistWidgetFlat(Box), + ToplistWidgetStacked(crate::datadogV1::model::ToplistWidgetStacked), + ToplistWidgetFlat(crate::datadogV1::model::ToplistWidgetFlat), } diff --git a/src/datadogV1/model/model_toplist_widget_request.rs b/src/datadogV1/model/model_toplist_widget_request.rs index 700764672..102d7f9cb 100644 --- a/src/datadogV1/model/model_toplist_widget_request.rs +++ b/src/datadogV1/model/model_toplist_widget_request.rs @@ -10,31 +10,31 @@ use serde_with::skip_serializing_none; pub struct ToplistWidgetRequest { /// The log query. #[serde(rename = "apm_query")] - pub apm_query: Option>, + pub apm_query: Option, /// The log query. #[serde(rename = "audit_query")] - pub audit_query: Option>, + pub audit_query: Option, /// List of conditional formats. #[serde(rename = "conditional_formats")] pub conditional_formats: Option>, /// The log query. #[serde(rename = "event_query")] - pub event_query: Option>, + pub event_query: Option, /// List of formulas that operate on queries. #[serde(rename = "formulas")] pub formulas: Option>, /// The log query. #[serde(rename = "log_query")] - pub log_query: Option>, + pub log_query: Option, /// The log query. #[serde(rename = "network_query")] - pub network_query: Option>, + pub network_query: Option, /// The process query to use in the widget. #[serde(rename = "process_query")] - pub process_query: Option>, + pub process_query: Option, /// The log query. #[serde(rename = "profile_metrics_query")] - pub profile_metrics_query: Option>, + pub profile_metrics_query: Option, /// Widget query. #[serde(rename = "q")] pub q: Option, @@ -46,13 +46,13 @@ pub struct ToplistWidgetRequest { pub response_format: Option, /// The log query. #[serde(rename = "rum_query")] - pub rum_query: Option>, + pub rum_query: Option, /// The log query. #[serde(rename = "security_query")] - pub security_query: Option>, + pub security_query: Option, /// Define request widget style. #[serde(rename = "style")] - pub style: Option>, + pub style: Option, } impl ToplistWidgetRequest { @@ -75,6 +75,120 @@ impl ToplistWidgetRequest { style: None, } } + + pub fn with_apm_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn with_audit_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.audit_query = Some(value); + self + } + + pub fn with_conditional_formats( + &mut self, + value: Vec, + ) -> &mut Self { + self.conditional_formats = Some(value); + self + } + + pub fn with_event_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn with_formulas( + &mut self, + value: Vec, + ) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn with_log_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn with_network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn with_process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn with_profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn with_q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn with_queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn with_response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + self + } + + pub fn with_rum_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn with_security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + self + } + + pub fn with_style(&mut self, value: crate::datadogV1::model::WidgetRequestStyle) -> &mut Self { + self.style = Some(value); + self + } } impl Default for ToplistWidgetRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_toplist_widget_style.rs b/src/datadogV1/model/model_toplist_widget_style.rs index 4d00aa07d..9e7e55336 100644 --- a/src/datadogV1/model/model_toplist_widget_style.rs +++ b/src/datadogV1/model/model_toplist_widget_style.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ToplistWidgetStyle { /// Top list widget display options. #[serde(rename = "display")] - pub display: Option>, + pub display: Option, /// Top list widget scaling definition. #[serde(rename = "scaling")] pub scaling: Option, @@ -23,6 +23,22 @@ impl ToplistWidgetStyle { scaling: None, } } + + pub fn with_display( + &mut self, + value: crate::datadogV1::model::ToplistWidgetDisplay, + ) -> &mut Self { + self.display = Some(value); + self + } + + pub fn with_scaling( + &mut self, + value: crate::datadogV1::model::ToplistWidgetScaling, + ) -> &mut Self { + self.scaling = Some(value); + self + } } impl Default for ToplistWidgetStyle { fn default() -> Self { diff --git a/src/datadogV1/model/model_topology_map_widget_definition.rs b/src/datadogV1/model/model_topology_map_widget_definition.rs index 71fa2ced9..aa247549e 100644 --- a/src/datadogV1/model/model_topology_map_widget_definition.rs +++ b/src/datadogV1/model/model_topology_map_widget_definition.rs @@ -42,4 +42,30 @@ impl TopologyMapWidgetDefinition { type_, } } + + pub fn with_custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_title_align( + &mut self, + value: crate::datadogV1::model::WidgetTextAlign, + ) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn with_title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } } diff --git a/src/datadogV1/model/model_topology_query.rs b/src/datadogV1/model/model_topology_query.rs index 5c3637e21..eb82830c6 100644 --- a/src/datadogV1/model/model_topology_query.rs +++ b/src/datadogV1/model/model_topology_query.rs @@ -27,6 +27,24 @@ impl TopologyQuery { service: None, } } + + pub fn with_data_source( + &mut self, + value: crate::datadogV1::model::TopologyQueryDataSource, + ) -> &mut Self { + self.data_source = Some(value); + self + } + + pub fn with_filters(&mut self, value: Vec) -> &mut Self { + self.filters = Some(value); + self + } + + pub fn with_service(&mut self, value: String) -> &mut Self { + self.service = Some(value); + self + } } impl Default for TopologyQuery { fn default() -> Self { diff --git a/src/datadogV1/model/model_topology_request.rs b/src/datadogV1/model/model_topology_request.rs index cbd253297..c3598c300 100644 --- a/src/datadogV1/model/model_topology_request.rs +++ b/src/datadogV1/model/model_topology_request.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct TopologyRequest { /// Query to service-based topology data sources like the service map or data streams. #[serde(rename = "query")] - pub query: Option>, + pub query: Option, /// Widget request type. #[serde(rename = "request_type")] pub request_type: Option, @@ -23,6 +23,19 @@ impl TopologyRequest { request_type: None, } } + + pub fn with_query(&mut self, value: crate::datadogV1::model::TopologyQuery) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_request_type( + &mut self, + value: crate::datadogV1::model::TopologyRequestType, + ) -> &mut Self { + self.request_type = Some(value); + self + } } impl Default for TopologyRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_tree_map_widget_definition.rs b/src/datadogV1/model/model_tree_map_widget_definition.rs index f2de3d377..4f4282c01 100644 --- a/src/datadogV1/model/model_tree_map_widget_definition.rs +++ b/src/datadogV1/model/model_tree_map_widget_definition.rs @@ -28,7 +28,7 @@ pub struct TreeMapWidgetDefinition { pub size_by: Option, /// Time setting for the widget. #[serde(rename = "time")] - pub time: Option>, + pub time: Option, /// Title of your widget. #[serde(rename = "title")] pub title: Option, @@ -54,4 +54,43 @@ impl TreeMapWidgetDefinition { type_, } } + + #[allow(deprecated)] + pub fn with_color_by(&mut self, value: crate::datadogV1::model::TreeMapColorBy) -> &mut Self { + self.color_by = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_group_by(&mut self, value: crate::datadogV1::model::TreeMapGroupBy) -> &mut Self { + self.group_by = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_size_by(&mut self, value: crate::datadogV1::model::TreeMapSizeBy) -> &mut Self { + self.size_by = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } } diff --git a/src/datadogV1/model/model_tree_map_widget_request.rs b/src/datadogV1/model/model_tree_map_widget_request.rs index 3987ef91a..0e6262aaf 100644 --- a/src/datadogV1/model/model_tree_map_widget_request.rs +++ b/src/datadogV1/model/model_tree_map_widget_request.rs @@ -31,6 +31,35 @@ impl TreeMapWidgetRequest { response_format: None, } } + + pub fn with_formulas( + &mut self, + value: Vec, + ) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn with_q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn with_queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn with_response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + self + } } impl Default for TreeMapWidgetRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_analyzed_logs_hour.rs b/src/datadogV1/model/model_usage_analyzed_logs_hour.rs index 2c2f32731..ec96f6cbf 100644 --- a/src/datadogV1/model/model_usage_analyzed_logs_hour.rs +++ b/src/datadogV1/model/model_usage_analyzed_logs_hour.rs @@ -35,6 +35,26 @@ impl UsageAnalyzedLogsHour { public_id: None, } } + + pub fn with_analyzed_logs(&mut self, value: Option) -> &mut Self { + self.analyzed_logs = Some(value); + self + } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageAnalyzedLogsHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_analyzed_logs_response.rs b/src/datadogV1/model/model_usage_analyzed_logs_response.rs index 3ee01de79..cc9d694f0 100644 --- a/src/datadogV1/model/model_usage_analyzed_logs_response.rs +++ b/src/datadogV1/model/model_usage_analyzed_logs_response.rs @@ -17,6 +17,14 @@ impl UsageAnalyzedLogsResponse { pub fn new() -> UsageAnalyzedLogsResponse { UsageAnalyzedLogsResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageAnalyzedLogsResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_attribution_aggregates_body.rs b/src/datadogV1/model/model_usage_attribution_aggregates_body.rs index f5be3d3f9..4d61425c6 100644 --- a/src/datadogV1/model/model_usage_attribution_aggregates_body.rs +++ b/src/datadogV1/model/model_usage_attribution_aggregates_body.rs @@ -27,6 +27,21 @@ impl UsageAttributionAggregatesBody { value: None, } } + + pub fn with_agg_type(&mut self, value: String) -> &mut Self { + self.agg_type = Some(value); + self + } + + pub fn with_field(&mut self, value: String) -> &mut Self { + self.field = Some(value); + self + } + + pub fn with_value(&mut self, value: f64) -> &mut Self { + self.value = Some(value); + self + } } impl Default for UsageAttributionAggregatesBody { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_attribution_body.rs b/src/datadogV1/model/model_usage_attribution_body.rs index 29b3dab00..dd0f5f010 100644 --- a/src/datadogV1/model/model_usage_attribution_body.rs +++ b/src/datadogV1/model/model_usage_attribution_body.rs @@ -32,7 +32,7 @@ pub struct UsageAttributionBody { pub updated_at: Option, /// Fields in Usage Summary by tag(s). #[serde(rename = "values")] - pub values: Option>, + pub values: Option, } impl UsageAttributionBody { @@ -47,6 +47,47 @@ impl UsageAttributionBody { values: None, } } + + pub fn with_month(&mut self, value: String) -> &mut Self { + self.month = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_tag_config_source(&mut self, value: String) -> &mut Self { + self.tag_config_source = Some(value); + self + } + + pub fn with_tags( + &mut self, + value: Option>>>, + ) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_updated_at(&mut self, value: String) -> &mut Self { + self.updated_at = Some(value); + self + } + + pub fn with_values( + &mut self, + value: crate::datadogV1::model::UsageAttributionValues, + ) -> &mut Self { + self.values = Some(value); + self + } } impl Default for UsageAttributionBody { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_attribution_metadata.rs b/src/datadogV1/model/model_usage_attribution_metadata.rs index 9722d02ff..d14e5255f 100644 --- a/src/datadogV1/model/model_usage_attribution_metadata.rs +++ b/src/datadogV1/model/model_usage_attribution_metadata.rs @@ -13,7 +13,7 @@ pub struct UsageAttributionMetadata { pub aggregates: Option>, /// The metadata for the current pagination. #[serde(rename = "pagination")] - pub pagination: Option>, + pub pagination: Option, } impl UsageAttributionMetadata { @@ -23,6 +23,22 @@ impl UsageAttributionMetadata { pagination: None, } } + + pub fn with_aggregates( + &mut self, + value: Vec, + ) -> &mut Self { + self.aggregates = Some(value); + self + } + + pub fn with_pagination( + &mut self, + value: crate::datadogV1::model::UsageAttributionPagination, + ) -> &mut Self { + self.pagination = Some(value); + self + } } impl Default for UsageAttributionMetadata { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_attribution_pagination.rs b/src/datadogV1/model/model_usage_attribution_pagination.rs index 49fce7104..d3dae1fb4 100644 --- a/src/datadogV1/model/model_usage_attribution_pagination.rs +++ b/src/datadogV1/model/model_usage_attribution_pagination.rs @@ -35,6 +35,31 @@ impl UsageAttributionPagination { total_number_of_records: None, } } + + pub fn with_limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_offset(&mut self, value: i64) -> &mut Self { + self.offset = Some(value); + self + } + + pub fn with_sort_direction(&mut self, value: String) -> &mut Self { + self.sort_direction = Some(value); + self + } + + pub fn with_sort_name(&mut self, value: String) -> &mut Self { + self.sort_name = Some(value); + self + } + + pub fn with_total_number_of_records(&mut self, value: i64) -> &mut Self { + self.total_number_of_records = Some(value); + self + } } impl Default for UsageAttributionPagination { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_attribution_response.rs b/src/datadogV1/model/model_usage_attribution_response.rs index ec9bb6c02..b932a7b8a 100644 --- a/src/datadogV1/model/model_usage_attribution_response.rs +++ b/src/datadogV1/model/model_usage_attribution_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct UsageAttributionResponse { /// The object containing document metadata. #[serde(rename = "metadata")] - pub metadata: Option>, + pub metadata: Option, /// Get usage summary by tag(s). #[serde(rename = "usage")] pub usage: Option>, @@ -23,6 +23,22 @@ impl UsageAttributionResponse { usage: None, } } + + pub fn with_metadata( + &mut self, + value: crate::datadogV1::model::UsageAttributionMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageAttributionResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_attribution_values.rs b/src/datadogV1/model/model_usage_attribution_values.rs index e6d3f1b95..16a1169c9 100644 --- a/src/datadogV1/model/model_usage_attribution_values.rs +++ b/src/datadogV1/model/model_usage_attribution_values.rs @@ -223,6 +223,266 @@ impl UsageAttributionValues { snmp_usage: None, } } + + pub fn with_api_percentage(&mut self, value: f64) -> &mut Self { + self.api_percentage = Some(value); + self + } + + pub fn with_api_usage(&mut self, value: f64) -> &mut Self { + self.api_usage = Some(value); + self + } + + pub fn with_apm_fargate_percentage(&mut self, value: f64) -> &mut Self { + self.apm_fargate_percentage = Some(value); + self + } + + pub fn with_apm_fargate_usage(&mut self, value: f64) -> &mut Self { + self.apm_fargate_usage = Some(value); + self + } + + pub fn with_apm_host_percentage(&mut self, value: f64) -> &mut Self { + self.apm_host_percentage = Some(value); + self + } + + pub fn with_apm_host_usage(&mut self, value: f64) -> &mut Self { + self.apm_host_usage = Some(value); + self + } + + pub fn with_appsec_fargate_percentage(&mut self, value: f64) -> &mut Self { + self.appsec_fargate_percentage = Some(value); + self + } + + pub fn with_appsec_fargate_usage(&mut self, value: f64) -> &mut Self { + self.appsec_fargate_usage = Some(value); + self + } + + pub fn with_appsec_percentage(&mut self, value: f64) -> &mut Self { + self.appsec_percentage = Some(value); + self + } + + pub fn with_appsec_usage(&mut self, value: f64) -> &mut Self { + self.appsec_usage = Some(value); + self + } + + pub fn with_browser_percentage(&mut self, value: f64) -> &mut Self { + self.browser_percentage = Some(value); + self + } + + pub fn with_browser_usage(&mut self, value: f64) -> &mut Self { + self.browser_usage = Some(value); + self + } + + pub fn with_container_percentage(&mut self, value: f64) -> &mut Self { + self.container_percentage = Some(value); + self + } + + pub fn with_container_usage(&mut self, value: f64) -> &mut Self { + self.container_usage = Some(value); + self + } + + pub fn with_cspm_container_percentage(&mut self, value: f64) -> &mut Self { + self.cspm_container_percentage = Some(value); + self + } + + pub fn with_cspm_container_usage(&mut self, value: f64) -> &mut Self { + self.cspm_container_usage = Some(value); + self + } + + pub fn with_cspm_host_percentage(&mut self, value: f64) -> &mut Self { + self.cspm_host_percentage = Some(value); + self + } + + pub fn with_cspm_host_usage(&mut self, value: f64) -> &mut Self { + self.cspm_host_usage = Some(value); + self + } + + pub fn with_custom_timeseries_percentage(&mut self, value: f64) -> &mut Self { + self.custom_timeseries_percentage = Some(value); + self + } + + pub fn with_custom_timeseries_usage(&mut self, value: f64) -> &mut Self { + self.custom_timeseries_usage = Some(value); + self + } + + pub fn with_cws_container_percentage(&mut self, value: f64) -> &mut Self { + self.cws_container_percentage = Some(value); + self + } + + pub fn with_cws_container_usage(&mut self, value: f64) -> &mut Self { + self.cws_container_usage = Some(value); + self + } + + pub fn with_cws_host_percentage(&mut self, value: f64) -> &mut Self { + self.cws_host_percentage = Some(value); + self + } + + pub fn with_cws_host_usage(&mut self, value: f64) -> &mut Self { + self.cws_host_usage = Some(value); + self + } + + pub fn with_dbm_hosts_percentage(&mut self, value: f64) -> &mut Self { + self.dbm_hosts_percentage = Some(value); + self + } + + pub fn with_dbm_hosts_usage(&mut self, value: f64) -> &mut Self { + self.dbm_hosts_usage = Some(value); + self + } + + pub fn with_dbm_queries_percentage(&mut self, value: f64) -> &mut Self { + self.dbm_queries_percentage = Some(value); + self + } + + pub fn with_dbm_queries_usage(&mut self, value: f64) -> &mut Self { + self.dbm_queries_usage = Some(value); + self + } + + pub fn with_estimated_indexed_logs_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_indexed_logs_percentage = Some(value); + self + } + + pub fn with_estimated_indexed_logs_usage(&mut self, value: f64) -> &mut Self { + self.estimated_indexed_logs_usage = Some(value); + self + } + + pub fn with_estimated_indexed_spans_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_indexed_spans_percentage = Some(value); + self + } + + pub fn with_estimated_indexed_spans_usage(&mut self, value: f64) -> &mut Self { + self.estimated_indexed_spans_usage = Some(value); + self + } + + pub fn with_estimated_ingested_logs_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_ingested_logs_percentage = Some(value); + self + } + + pub fn with_estimated_ingested_logs_usage(&mut self, value: f64) -> &mut Self { + self.estimated_ingested_logs_usage = Some(value); + self + } + + pub fn with_estimated_ingested_spans_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_ingested_spans_percentage = Some(value); + self + } + + pub fn with_estimated_ingested_spans_usage(&mut self, value: f64) -> &mut Self { + self.estimated_ingested_spans_usage = Some(value); + self + } + + pub fn with_estimated_rum_sessions_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_rum_sessions_percentage = Some(value); + self + } + + pub fn with_estimated_rum_sessions_usage(&mut self, value: f64) -> &mut Self { + self.estimated_rum_sessions_usage = Some(value); + self + } + + pub fn with_infra_host_percentage(&mut self, value: f64) -> &mut Self { + self.infra_host_percentage = Some(value); + self + } + + pub fn with_infra_host_usage(&mut self, value: f64) -> &mut Self { + self.infra_host_usage = Some(value); + self + } + + pub fn with_lambda_functions_percentage(&mut self, value: f64) -> &mut Self { + self.lambda_functions_percentage = Some(value); + self + } + + pub fn with_lambda_functions_usage(&mut self, value: f64) -> &mut Self { + self.lambda_functions_usage = Some(value); + self + } + + pub fn with_lambda_invocations_percentage(&mut self, value: f64) -> &mut Self { + self.lambda_invocations_percentage = Some(value); + self + } + + pub fn with_lambda_invocations_usage(&mut self, value: f64) -> &mut Self { + self.lambda_invocations_usage = Some(value); + self + } + + pub fn with_npm_host_percentage(&mut self, value: f64) -> &mut Self { + self.npm_host_percentage = Some(value); + self + } + + pub fn with_npm_host_usage(&mut self, value: f64) -> &mut Self { + self.npm_host_usage = Some(value); + self + } + + pub fn with_profiled_container_percentage(&mut self, value: f64) -> &mut Self { + self.profiled_container_percentage = Some(value); + self + } + + pub fn with_profiled_container_usage(&mut self, value: f64) -> &mut Self { + self.profiled_container_usage = Some(value); + self + } + + pub fn with_profiled_hosts_percentage(&mut self, value: f64) -> &mut Self { + self.profiled_hosts_percentage = Some(value); + self + } + + pub fn with_profiled_hosts_usage(&mut self, value: f64) -> &mut Self { + self.profiled_hosts_usage = Some(value); + self + } + + pub fn with_snmp_percentage(&mut self, value: f64) -> &mut Self { + self.snmp_percentage = Some(value); + self + } + + pub fn with_snmp_usage(&mut self, value: f64) -> &mut Self { + self.snmp_usage = Some(value); + self + } } impl Default for UsageAttributionValues { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_audit_logs_hour.rs b/src/datadogV1/model/model_usage_audit_logs_hour.rs index bf1dd5a18..431958f83 100644 --- a/src/datadogV1/model/model_usage_audit_logs_hour.rs +++ b/src/datadogV1/model/model_usage_audit_logs_hour.rs @@ -35,6 +35,26 @@ impl UsageAuditLogsHour { public_id: None, } } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_lines_indexed(&mut self, value: Option) -> &mut Self { + self.lines_indexed = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageAuditLogsHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_audit_logs_response.rs b/src/datadogV1/model/model_usage_audit_logs_response.rs index 8df57c7fc..b30563023 100644 --- a/src/datadogV1/model/model_usage_audit_logs_response.rs +++ b/src/datadogV1/model/model_usage_audit_logs_response.rs @@ -17,6 +17,14 @@ impl UsageAuditLogsResponse { pub fn new() -> UsageAuditLogsResponse { UsageAuditLogsResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageAuditLogsResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_billable_summary_body.rs b/src/datadogV1/model/model_usage_billable_summary_body.rs index a32afb399..76a0bc6a6 100644 --- a/src/datadogV1/model/model_usage_billable_summary_body.rs +++ b/src/datadogV1/model/model_usage_billable_summary_body.rs @@ -43,6 +43,41 @@ impl UsageBillableSummaryBody { usage_unit: None, } } + + pub fn with_account_billable_usage(&mut self, value: i64) -> &mut Self { + self.account_billable_usage = Some(value); + self + } + + pub fn with_elapsed_usage_hours(&mut self, value: i64) -> &mut Self { + self.elapsed_usage_hours = Some(value); + self + } + + pub fn with_first_billable_usage_hour(&mut self, value: String) -> &mut Self { + self.first_billable_usage_hour = Some(value); + self + } + + pub fn with_last_billable_usage_hour(&mut self, value: String) -> &mut Self { + self.last_billable_usage_hour = Some(value); + self + } + + pub fn with_org_billable_usage(&mut self, value: i64) -> &mut Self { + self.org_billable_usage = Some(value); + self + } + + pub fn with_percentage_in_account(&mut self, value: f64) -> &mut Self { + self.percentage_in_account = Some(value); + self + } + + pub fn with_usage_unit(&mut self, value: String) -> &mut Self { + self.usage_unit = Some(value); + self + } } impl Default for UsageBillableSummaryBody { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_billable_summary_hour.rs b/src/datadogV1/model/model_usage_billable_summary_hour.rs index ecde186d1..3185a3ac7 100644 --- a/src/datadogV1/model/model_usage_billable_summary_hour.rs +++ b/src/datadogV1/model/model_usage_billable_summary_hour.rs @@ -34,7 +34,7 @@ pub struct UsageBillableSummaryHour { pub start_date: Option, /// Response with aggregated usage types. #[serde(rename = "usage")] - pub usage: Option>, + pub usage: Option, } impl UsageBillableSummaryHour { @@ -51,6 +51,54 @@ impl UsageBillableSummaryHour { usage: None, } } + + pub fn with_billing_plan(&mut self, value: String) -> &mut Self { + self.billing_plan = Some(value); + self + } + + pub fn with_end_date(&mut self, value: String) -> &mut Self { + self.end_date = Some(value); + self + } + + pub fn with_num_orgs(&mut self, value: i64) -> &mut Self { + self.num_orgs = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_ratio_in_month(&mut self, value: f64) -> &mut Self { + self.ratio_in_month = Some(value); + self + } + + pub fn with_region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } + + pub fn with_start_date(&mut self, value: String) -> &mut Self { + self.start_date = Some(value); + self + } + + pub fn with_usage( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryKeys, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageBillableSummaryHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_billable_summary_keys.rs b/src/datadogV1/model/model_usage_billable_summary_keys.rs index aa73a323d..ec00a3759 100644 --- a/src/datadogV1/model/model_usage_billable_summary_keys.rs +++ b/src/datadogV1/model/model_usage_billable_summary_keys.rs @@ -10,281 +10,273 @@ use serde_with::skip_serializing_none; pub struct UsageBillableSummaryKeys { /// Response with properties for each aggregated usage type. #[serde(rename = "apm_fargate_average")] - pub apm_fargate_average: Option>, + pub apm_fargate_average: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "apm_fargate_sum")] - pub apm_fargate_sum: Option>, + pub apm_fargate_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "apm_host_sum")] - pub apm_host_sum: Option>, + pub apm_host_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "apm_host_top99p")] - pub apm_host_top99p: Option>, + pub apm_host_top99p: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "apm_profiler_host_sum")] - pub apm_profiler_host_sum: Option>, + pub apm_profiler_host_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "apm_profiler_host_top99p")] - pub apm_profiler_host_top99p: Option>, + pub apm_profiler_host_top99p: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "apm_trace_search_sum")] - pub apm_trace_search_sum: Option>, + pub apm_trace_search_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "application_security_fargate_average")] pub application_security_fargate_average: - Option>, + Option, /// Response with properties for each aggregated usage type. #[serde(rename = "application_security_host_sum")] - pub application_security_host_sum: - Option>, + pub application_security_host_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "application_security_host_top99p")] - pub application_security_host_top99p: - Option>, + pub application_security_host_top99p: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "ci_pipeline_indexed_spans_sum")] - pub ci_pipeline_indexed_spans_sum: - Option>, + pub ci_pipeline_indexed_spans_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "ci_pipeline_maximum")] - pub ci_pipeline_maximum: Option>, + pub ci_pipeline_maximum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "ci_pipeline_sum")] - pub ci_pipeline_sum: Option>, + pub ci_pipeline_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "ci_test_indexed_spans_sum")] - pub ci_test_indexed_spans_sum: Option>, + pub ci_test_indexed_spans_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "ci_testing_maximum")] - pub ci_testing_maximum: Option>, + pub ci_testing_maximum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "ci_testing_sum")] - pub ci_testing_sum: Option>, + pub ci_testing_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "cloud_cost_management_average")] - pub cloud_cost_management_average: - Option>, + pub cloud_cost_management_average: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "cloud_cost_management_sum")] - pub cloud_cost_management_sum: Option>, + pub cloud_cost_management_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "cspm_container_sum")] - pub cspm_container_sum: Option>, + pub cspm_container_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "cspm_host_sum")] - pub cspm_host_sum: Option>, + pub cspm_host_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "cspm_host_top99p")] - pub cspm_host_top99p: Option>, + pub cspm_host_top99p: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "custom_event_sum")] - pub custom_event_sum: Option>, + pub custom_event_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "cws_container_sum")] - pub cws_container_sum: Option>, + pub cws_container_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "cws_host_sum")] - pub cws_host_sum: Option>, + pub cws_host_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "cws_host_top99p")] - pub cws_host_top99p: Option>, + pub cws_host_top99p: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "dbm_host_sum")] - pub dbm_host_sum: Option>, + pub dbm_host_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "dbm_host_top99p")] - pub dbm_host_top99p: Option>, + pub dbm_host_top99p: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "dbm_normalized_queries_average")] - pub dbm_normalized_queries_average: - Option>, + pub dbm_normalized_queries_average: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "dbm_normalized_queries_sum")] - pub dbm_normalized_queries_sum: Option>, + pub dbm_normalized_queries_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "fargate_container_apm_and_profiler_average")] pub fargate_container_apm_and_profiler_average: - Option>, + Option, /// Response with properties for each aggregated usage type. #[serde(rename = "fargate_container_apm_and_profiler_sum")] pub fargate_container_apm_and_profiler_sum: - Option>, + Option, /// Response with properties for each aggregated usage type. #[serde(rename = "fargate_container_average")] - pub fargate_container_average: Option>, + pub fargate_container_average: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "fargate_container_profiler_average")] pub fargate_container_profiler_average: - Option>, + Option, /// Response with properties for each aggregated usage type. #[serde(rename = "fargate_container_profiler_sum")] - pub fargate_container_profiler_sum: - Option>, + pub fargate_container_profiler_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "fargate_container_sum")] - pub fargate_container_sum: Option>, + pub fargate_container_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "incident_management_maximum")] - pub incident_management_maximum: Option>, + pub incident_management_maximum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "incident_management_sum")] - pub incident_management_sum: Option>, + pub incident_management_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "infra_and_apm_host_sum")] - pub infra_and_apm_host_sum: Option>, + pub infra_and_apm_host_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "infra_and_apm_host_top99p")] - pub infra_and_apm_host_top99p: Option>, + pub infra_and_apm_host_top99p: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "infra_container_sum")] - pub infra_container_sum: Option>, + pub infra_container_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "infra_host_sum")] - pub infra_host_sum: Option>, + pub infra_host_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "infra_host_top99p")] - pub infra_host_top99p: Option>, + pub infra_host_top99p: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "ingested_spans_sum")] - pub ingested_spans_sum: Option>, + pub ingested_spans_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "ingested_timeseries_average")] - pub ingested_timeseries_average: Option>, + pub ingested_timeseries_average: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "ingested_timeseries_sum")] - pub ingested_timeseries_sum: Option>, + pub ingested_timeseries_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "iot_sum")] - pub iot_sum: Option>, + pub iot_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "iot_top99p")] - pub iot_top99p: Option>, + pub iot_top99p: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "lambda_function_average")] - pub lambda_function_average: Option>, + pub lambda_function_average: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "lambda_function_sum")] - pub lambda_function_sum: Option>, + pub lambda_function_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "logs_forwarding_sum")] - pub logs_forwarding_sum: Option>, + pub logs_forwarding_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "logs_indexed_15day_sum")] - pub logs_indexed_15day_sum: Option>, + pub logs_indexed_15day_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "logs_indexed_180day_sum")] - pub logs_indexed_180day_sum: Option>, + pub logs_indexed_180day_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "logs_indexed_30day_sum")] - pub logs_indexed_30day_sum: Option>, + pub logs_indexed_30day_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "logs_indexed_360day_sum")] - pub logs_indexed_360day_sum: Option>, + pub logs_indexed_360day_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "logs_indexed_3day_sum")] - pub logs_indexed_3day_sum: Option>, + pub logs_indexed_3day_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "logs_indexed_45day_sum")] - pub logs_indexed_45day_sum: Option>, + pub logs_indexed_45day_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "logs_indexed_60day_sum")] - pub logs_indexed_60day_sum: Option>, + pub logs_indexed_60day_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "logs_indexed_7day_sum")] - pub logs_indexed_7day_sum: Option>, + pub logs_indexed_7day_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "logs_indexed_90day_sum")] - pub logs_indexed_90day_sum: Option>, + pub logs_indexed_90day_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "logs_indexed_custom_retention_sum")] pub logs_indexed_custom_retention_sum: - Option>, + Option, /// Response with properties for each aggregated usage type. #[serde(rename = "logs_indexed_sum")] - pub logs_indexed_sum: Option>, + pub logs_indexed_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "logs_ingested_sum")] - pub logs_ingested_sum: Option>, + pub logs_ingested_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "network_device_sum")] - pub network_device_sum: Option>, + pub network_device_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "network_device_top99p")] - pub network_device_top99p: Option>, + pub network_device_top99p: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "npm_flow_sum")] - pub npm_flow_sum: Option>, + pub npm_flow_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "npm_host_sum")] - pub npm_host_sum: Option>, + pub npm_host_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "npm_host_top99p")] - pub npm_host_top99p: Option>, + pub npm_host_top99p: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "observability_pipeline_sum")] - pub observability_pipeline_sum: Option>, + pub observability_pipeline_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "online_archive_sum")] - pub online_archive_sum: Option>, + pub online_archive_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "prof_container_sum")] - pub prof_container_sum: Option>, + pub prof_container_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "prof_host_sum")] - pub prof_host_sum: Option>, + pub prof_host_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "prof_host_top99p")] - pub prof_host_top99p: Option>, + pub prof_host_top99p: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "rum_lite_sum")] - pub rum_lite_sum: Option>, + pub rum_lite_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "rum_replay_sum")] - pub rum_replay_sum: Option>, + pub rum_replay_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "rum_sum")] - pub rum_sum: Option>, + pub rum_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "rum_units_sum")] - pub rum_units_sum: Option>, + pub rum_units_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "sensitive_data_scanner_sum")] - pub sensitive_data_scanner_sum: Option>, + pub sensitive_data_scanner_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "serverless_apm_sum")] - pub serverless_apm_sum: Option>, + pub serverless_apm_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "serverless_infra_average")] - pub serverless_infra_average: Option>, + pub serverless_infra_average: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "serverless_infra_sum")] - pub serverless_infra_sum: Option>, + pub serverless_infra_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "serverless_invocation_sum")] - pub serverless_invocation_sum: Option>, + pub serverless_invocation_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "siem_sum")] - pub siem_sum: Option>, + pub siem_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "standard_timeseries_average")] - pub standard_timeseries_average: Option>, + pub standard_timeseries_average: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "synthetics_api_tests_sum")] - pub synthetics_api_tests_sum: Option>, + pub synthetics_api_tests_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "synthetics_app_testing_maximum")] - pub synthetics_app_testing_maximum: - Option>, + pub synthetics_app_testing_maximum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "synthetics_browser_checks_sum")] - pub synthetics_browser_checks_sum: - Option>, + pub synthetics_browser_checks_sum: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "timeseries_average")] - pub timeseries_average: Option>, + pub timeseries_average: Option, /// Response with properties for each aggregated usage type. #[serde(rename = "timeseries_sum")] - pub timeseries_sum: Option>, + pub timeseries_sum: Option, } impl UsageBillableSummaryKeys { @@ -380,6 +372,710 @@ impl UsageBillableSummaryKeys { timeseries_sum: None, } } + + pub fn with_apm_fargate_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.apm_fargate_average = Some(value); + self + } + + pub fn with_apm_fargate_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.apm_fargate_sum = Some(value); + self + } + + pub fn with_apm_host_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.apm_host_sum = Some(value); + self + } + + pub fn with_apm_host_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.apm_host_top99p = Some(value); + self + } + + pub fn with_apm_profiler_host_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.apm_profiler_host_sum = Some(value); + self + } + + pub fn with_apm_profiler_host_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.apm_profiler_host_top99p = Some(value); + self + } + + pub fn with_apm_trace_search_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.apm_trace_search_sum = Some(value); + self + } + + pub fn with_application_security_fargate_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.application_security_fargate_average = Some(value); + self + } + + pub fn with_application_security_host_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.application_security_host_sum = Some(value); + self + } + + pub fn with_application_security_host_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.application_security_host_top99p = Some(value); + self + } + + pub fn with_ci_pipeline_indexed_spans_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.ci_pipeline_indexed_spans_sum = Some(value); + self + } + + pub fn with_ci_pipeline_maximum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.ci_pipeline_maximum = Some(value); + self + } + + pub fn with_ci_pipeline_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.ci_pipeline_sum = Some(value); + self + } + + pub fn with_ci_test_indexed_spans_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.ci_test_indexed_spans_sum = Some(value); + self + } + + pub fn with_ci_testing_maximum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.ci_testing_maximum = Some(value); + self + } + + pub fn with_ci_testing_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.ci_testing_sum = Some(value); + self + } + + pub fn with_cloud_cost_management_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.cloud_cost_management_average = Some(value); + self + } + + pub fn with_cloud_cost_management_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.cloud_cost_management_sum = Some(value); + self + } + + pub fn with_cspm_container_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.cspm_container_sum = Some(value); + self + } + + pub fn with_cspm_host_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.cspm_host_sum = Some(value); + self + } + + pub fn with_cspm_host_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.cspm_host_top99p = Some(value); + self + } + + pub fn with_custom_event_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.custom_event_sum = Some(value); + self + } + + pub fn with_cws_container_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.cws_container_sum = Some(value); + self + } + + pub fn with_cws_host_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.cws_host_sum = Some(value); + self + } + + pub fn with_cws_host_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.cws_host_top99p = Some(value); + self + } + + pub fn with_dbm_host_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.dbm_host_sum = Some(value); + self + } + + pub fn with_dbm_host_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.dbm_host_top99p = Some(value); + self + } + + pub fn with_dbm_normalized_queries_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.dbm_normalized_queries_average = Some(value); + self + } + + pub fn with_dbm_normalized_queries_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.dbm_normalized_queries_sum = Some(value); + self + } + + pub fn with_fargate_container_apm_and_profiler_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.fargate_container_apm_and_profiler_average = Some(value); + self + } + + pub fn with_fargate_container_apm_and_profiler_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.fargate_container_apm_and_profiler_sum = Some(value); + self + } + + pub fn with_fargate_container_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.fargate_container_average = Some(value); + self + } + + pub fn with_fargate_container_profiler_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.fargate_container_profiler_average = Some(value); + self + } + + pub fn with_fargate_container_profiler_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.fargate_container_profiler_sum = Some(value); + self + } + + pub fn with_fargate_container_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.fargate_container_sum = Some(value); + self + } + + pub fn with_incident_management_maximum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.incident_management_maximum = Some(value); + self + } + + pub fn with_incident_management_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.incident_management_sum = Some(value); + self + } + + pub fn with_infra_and_apm_host_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.infra_and_apm_host_sum = Some(value); + self + } + + pub fn with_infra_and_apm_host_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.infra_and_apm_host_top99p = Some(value); + self + } + + pub fn with_infra_container_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.infra_container_sum = Some(value); + self + } + + pub fn with_infra_host_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.infra_host_sum = Some(value); + self + } + + pub fn with_infra_host_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.infra_host_top99p = Some(value); + self + } + + pub fn with_ingested_spans_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.ingested_spans_sum = Some(value); + self + } + + pub fn with_ingested_timeseries_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.ingested_timeseries_average = Some(value); + self + } + + pub fn with_ingested_timeseries_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.ingested_timeseries_sum = Some(value); + self + } + + pub fn with_iot_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.iot_sum = Some(value); + self + } + + pub fn with_iot_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.iot_top99p = Some(value); + self + } + + pub fn with_lambda_function_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.lambda_function_average = Some(value); + self + } + + pub fn with_lambda_function_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.lambda_function_sum = Some(value); + self + } + + pub fn with_logs_forwarding_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_forwarding_sum = Some(value); + self + } + + pub fn with_logs_indexed_15day_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_15day_sum = Some(value); + self + } + + pub fn with_logs_indexed_180day_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_180day_sum = Some(value); + self + } + + pub fn with_logs_indexed_30day_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_30day_sum = Some(value); + self + } + + pub fn with_logs_indexed_360day_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_360day_sum = Some(value); + self + } + + pub fn with_logs_indexed_3day_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_3day_sum = Some(value); + self + } + + pub fn with_logs_indexed_45day_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_45day_sum = Some(value); + self + } + + pub fn with_logs_indexed_60day_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_60day_sum = Some(value); + self + } + + pub fn with_logs_indexed_7day_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_7day_sum = Some(value); + self + } + + pub fn with_logs_indexed_90day_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_90day_sum = Some(value); + self + } + + pub fn with_logs_indexed_custom_retention_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_custom_retention_sum = Some(value); + self + } + + pub fn with_logs_indexed_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_sum = Some(value); + self + } + + pub fn with_logs_ingested_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_ingested_sum = Some(value); + self + } + + pub fn with_network_device_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.network_device_sum = Some(value); + self + } + + pub fn with_network_device_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.network_device_top99p = Some(value); + self + } + + pub fn with_npm_flow_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.npm_flow_sum = Some(value); + self + } + + pub fn with_npm_host_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.npm_host_sum = Some(value); + self + } + + pub fn with_npm_host_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.npm_host_top99p = Some(value); + self + } + + pub fn with_observability_pipeline_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.observability_pipeline_sum = Some(value); + self + } + + pub fn with_online_archive_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.online_archive_sum = Some(value); + self + } + + pub fn with_prof_container_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.prof_container_sum = Some(value); + self + } + + pub fn with_prof_host_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.prof_host_sum = Some(value); + self + } + + pub fn with_prof_host_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.prof_host_top99p = Some(value); + self + } + + pub fn with_rum_lite_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.rum_lite_sum = Some(value); + self + } + + pub fn with_rum_replay_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.rum_replay_sum = Some(value); + self + } + + pub fn with_rum_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.rum_sum = Some(value); + self + } + + pub fn with_rum_units_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.rum_units_sum = Some(value); + self + } + + pub fn with_sensitive_data_scanner_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.sensitive_data_scanner_sum = Some(value); + self + } + + pub fn with_serverless_apm_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.serverless_apm_sum = Some(value); + self + } + + pub fn with_serverless_infra_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.serverless_infra_average = Some(value); + self + } + + pub fn with_serverless_infra_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.serverless_infra_sum = Some(value); + self + } + + pub fn with_serverless_invocation_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.serverless_invocation_sum = Some(value); + self + } + + pub fn with_siem_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.siem_sum = Some(value); + self + } + + pub fn with_standard_timeseries_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.standard_timeseries_average = Some(value); + self + } + + pub fn with_synthetics_api_tests_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.synthetics_api_tests_sum = Some(value); + self + } + + pub fn with_synthetics_app_testing_maximum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.synthetics_app_testing_maximum = Some(value); + self + } + + pub fn with_synthetics_browser_checks_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.synthetics_browser_checks_sum = Some(value); + self + } + + pub fn with_timeseries_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.timeseries_average = Some(value); + self + } + + pub fn with_timeseries_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.timeseries_sum = Some(value); + self + } } impl Default for UsageBillableSummaryKeys { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_billable_summary_response.rs b/src/datadogV1/model/model_usage_billable_summary_response.rs index df90583cc..27f8fdd94 100644 --- a/src/datadogV1/model/model_usage_billable_summary_response.rs +++ b/src/datadogV1/model/model_usage_billable_summary_response.rs @@ -17,6 +17,14 @@ impl UsageBillableSummaryResponse { pub fn new() -> UsageBillableSummaryResponse { UsageBillableSummaryResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageBillableSummaryResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_ci_visibility_hour.rs b/src/datadogV1/model/model_usage_ci_visibility_hour.rs index c0a99d349..ac9a855da 100644 --- a/src/datadogV1/model/model_usage_ci_visibility_hour.rs +++ b/src/datadogV1/model/model_usage_ci_visibility_hour.rs @@ -63,6 +63,41 @@ impl UsageCIVisibilityHour { public_id: None, } } + + pub fn with_ci_pipeline_indexed_spans(&mut self, value: Option) -> &mut Self { + self.ci_pipeline_indexed_spans = Some(value); + self + } + + pub fn with_ci_test_indexed_spans(&mut self, value: Option) -> &mut Self { + self.ci_test_indexed_spans = Some(value); + self + } + + pub fn with_ci_visibility_itr_committers(&mut self, value: Option) -> &mut Self { + self.ci_visibility_itr_committers = Some(value); + self + } + + pub fn with_ci_visibility_pipeline_committers(&mut self, value: Option) -> &mut Self { + self.ci_visibility_pipeline_committers = Some(value); + self + } + + pub fn with_ci_visibility_test_committers(&mut self, value: Option) -> &mut Self { + self.ci_visibility_test_committers = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageCIVisibilityHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_ci_visibility_response.rs b/src/datadogV1/model/model_usage_ci_visibility_response.rs index ac0851596..e609be5cb 100644 --- a/src/datadogV1/model/model_usage_ci_visibility_response.rs +++ b/src/datadogV1/model/model_usage_ci_visibility_response.rs @@ -17,6 +17,14 @@ impl UsageCIVisibilityResponse { pub fn new() -> UsageCIVisibilityResponse { UsageCIVisibilityResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageCIVisibilityResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_cloud_security_posture_management_hour.rs b/src/datadogV1/model/model_usage_cloud_security_posture_management_hour.rs index a80ab46c5..5ce3606e0 100644 --- a/src/datadogV1/model/model_usage_cloud_security_posture_management_hour.rs +++ b/src/datadogV1/model/model_usage_cloud_security_posture_management_hour.rs @@ -83,6 +83,56 @@ impl UsageCloudSecurityPostureManagementHour { public_id: None, } } + + pub fn with_aas_host_count(&mut self, value: Option) -> &mut Self { + self.aas_host_count = Some(value); + self + } + + pub fn with_aws_host_count(&mut self, value: Option) -> &mut Self { + self.aws_host_count = Some(value); + self + } + + pub fn with_azure_host_count(&mut self, value: Option) -> &mut Self { + self.azure_host_count = Some(value); + self + } + + pub fn with_compliance_host_count(&mut self, value: Option) -> &mut Self { + self.compliance_host_count = Some(value); + self + } + + pub fn with_container_count(&mut self, value: Option) -> &mut Self { + self.container_count = Some(value); + self + } + + pub fn with_gcp_host_count(&mut self, value: Option) -> &mut Self { + self.gcp_host_count = Some(value); + self + } + + pub fn with_host_count(&mut self, value: Option) -> &mut Self { + self.host_count = Some(value); + self + } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageCloudSecurityPostureManagementHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_cloud_security_posture_management_response.rs b/src/datadogV1/model/model_usage_cloud_security_posture_management_response.rs index e2a5973d8..e584070e2 100644 --- a/src/datadogV1/model/model_usage_cloud_security_posture_management_response.rs +++ b/src/datadogV1/model/model_usage_cloud_security_posture_management_response.rs @@ -17,6 +17,14 @@ impl UsageCloudSecurityPostureManagementResponse { pub fn new() -> UsageCloudSecurityPostureManagementResponse { UsageCloudSecurityPostureManagementResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageCloudSecurityPostureManagementResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_custom_reports_attributes.rs b/src/datadogV1/model/model_usage_custom_reports_attributes.rs index 457fc47b8..dbc6a5bbb 100644 --- a/src/datadogV1/model/model_usage_custom_reports_attributes.rs +++ b/src/datadogV1/model/model_usage_custom_reports_attributes.rs @@ -35,6 +35,31 @@ impl UsageCustomReportsAttributes { tags: None, } } + + pub fn with_computed_on(&mut self, value: String) -> &mut Self { + self.computed_on = Some(value); + self + } + + pub fn with_end_date(&mut self, value: String) -> &mut Self { + self.end_date = Some(value); + self + } + + pub fn with_size(&mut self, value: i64) -> &mut Self { + self.size = Some(value); + self + } + + pub fn with_start_date(&mut self, value: String) -> &mut Self { + self.start_date = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } impl Default for UsageCustomReportsAttributes { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_custom_reports_data.rs b/src/datadogV1/model/model_usage_custom_reports_data.rs index 12ed91edd..6dc5ebbb8 100644 --- a/src/datadogV1/model/model_usage_custom_reports_data.rs +++ b/src/datadogV1/model/model_usage_custom_reports_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct UsageCustomReportsData { /// The response containing attributes for custom reports. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The date for specified custom reports. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl UsageCustomReportsData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV1::model::UsageCustomReportsAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV1::model::UsageReportsType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for UsageCustomReportsData { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_custom_reports_meta.rs b/src/datadogV1/model/model_usage_custom_reports_meta.rs index 2194794ef..b7dcd4a53 100644 --- a/src/datadogV1/model/model_usage_custom_reports_meta.rs +++ b/src/datadogV1/model/model_usage_custom_reports_meta.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct UsageCustomReportsMeta { /// The object containing page total count. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, } impl UsageCustomReportsMeta { pub fn new() -> UsageCustomReportsMeta { UsageCustomReportsMeta { page: None } } + + pub fn with_page( + &mut self, + value: crate::datadogV1::model::UsageCustomReportsPage, + ) -> &mut Self { + self.page = Some(value); + self + } } impl Default for UsageCustomReportsMeta { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_custom_reports_page.rs b/src/datadogV1/model/model_usage_custom_reports_page.rs index 2d3d32fab..e3c153f63 100644 --- a/src/datadogV1/model/model_usage_custom_reports_page.rs +++ b/src/datadogV1/model/model_usage_custom_reports_page.rs @@ -17,6 +17,11 @@ impl UsageCustomReportsPage { pub fn new() -> UsageCustomReportsPage { UsageCustomReportsPage { total_count: None } } + + pub fn with_total_count(&mut self, value: i64) -> &mut Self { + self.total_count = Some(value); + self + } } impl Default for UsageCustomReportsPage { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_custom_reports_response.rs b/src/datadogV1/model/model_usage_custom_reports_response.rs index 5181dc864..6b9623567 100644 --- a/src/datadogV1/model/model_usage_custom_reports_response.rs +++ b/src/datadogV1/model/model_usage_custom_reports_response.rs @@ -13,7 +13,7 @@ pub struct UsageCustomReportsResponse { pub data: Option>, /// The object containing document metadata. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl UsageCustomReportsResponse { @@ -23,6 +23,22 @@ impl UsageCustomReportsResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV1::model::UsageCustomReportsMeta, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for UsageCustomReportsResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_cws_hour.rs b/src/datadogV1/model/model_usage_cws_hour.rs index 69ad8f001..e786c4745 100644 --- a/src/datadogV1/model/model_usage_cws_hour.rs +++ b/src/datadogV1/model/model_usage_cws_hour.rs @@ -43,6 +43,31 @@ impl UsageCWSHour { public_id: None, } } + + pub fn with_cws_container_count(&mut self, value: Option) -> &mut Self { + self.cws_container_count = Some(value); + self + } + + pub fn with_cws_host_count(&mut self, value: Option) -> &mut Self { + self.cws_host_count = Some(value); + self + } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageCWSHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_cws_response.rs b/src/datadogV1/model/model_usage_cws_response.rs index d2c24dde8..b7379f222 100644 --- a/src/datadogV1/model/model_usage_cws_response.rs +++ b/src/datadogV1/model/model_usage_cws_response.rs @@ -17,6 +17,11 @@ impl UsageCWSResponse { pub fn new() -> UsageCWSResponse { UsageCWSResponse { usage: None } } + + pub fn with_usage(&mut self, value: Vec) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageCWSResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_dbm_hour.rs b/src/datadogV1/model/model_usage_dbm_hour.rs index f6f1ebdab..30f426b50 100644 --- a/src/datadogV1/model/model_usage_dbm_hour.rs +++ b/src/datadogV1/model/model_usage_dbm_hour.rs @@ -43,6 +43,31 @@ impl UsageDBMHour { public_id: None, } } + + pub fn with_dbm_host_count(&mut self, value: Option) -> &mut Self { + self.dbm_host_count = Some(value); + self + } + + pub fn with_dbm_queries_count(&mut self, value: Option) -> &mut Self { + self.dbm_queries_count = Some(value); + self + } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageDBMHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_dbm_response.rs b/src/datadogV1/model/model_usage_dbm_response.rs index 23cfd5894..8085b65b1 100644 --- a/src/datadogV1/model/model_usage_dbm_response.rs +++ b/src/datadogV1/model/model_usage_dbm_response.rs @@ -17,6 +17,11 @@ impl UsageDBMResponse { pub fn new() -> UsageDBMResponse { UsageDBMResponse { usage: None } } + + pub fn with_usage(&mut self, value: Vec) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageDBMResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_fargate_hour.rs b/src/datadogV1/model/model_usage_fargate_hour.rs index 2cf6156f4..b70d7661e 100644 --- a/src/datadogV1/model/model_usage_fargate_hour.rs +++ b/src/datadogV1/model/model_usage_fargate_hour.rs @@ -59,6 +59,41 @@ impl UsageFargateHour { tasks_count: None, } } + + pub fn with_apm_fargate_count(&mut self, value: Option) -> &mut Self { + self.apm_fargate_count = Some(value); + self + } + + pub fn with_appsec_fargate_count(&mut self, value: Option) -> &mut Self { + self.appsec_fargate_count = Some(value); + self + } + + pub fn with_avg_profiled_fargate_tasks(&mut self, value: Option) -> &mut Self { + self.avg_profiled_fargate_tasks = Some(value); + self + } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_tasks_count(&mut self, value: Option) -> &mut Self { + self.tasks_count = Some(value); + self + } } impl Default for UsageFargateHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_fargate_response.rs b/src/datadogV1/model/model_usage_fargate_response.rs index 9d35cec27..8256f8d63 100644 --- a/src/datadogV1/model/model_usage_fargate_response.rs +++ b/src/datadogV1/model/model_usage_fargate_response.rs @@ -17,6 +17,14 @@ impl UsageFargateResponse { pub fn new() -> UsageFargateResponse { UsageFargateResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageFargateResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_host_hour.rs b/src/datadogV1/model/model_usage_host_hour.rs index 3cc400b6a..ced0729f6 100644 --- a/src/datadogV1/model/model_usage_host_hour.rs +++ b/src/datadogV1/model/model_usage_host_hour.rs @@ -148,6 +148,91 @@ impl UsageHostHour { vsphere_host_count: None, } } + + pub fn with_agent_host_count(&mut self, value: Option) -> &mut Self { + self.agent_host_count = Some(value); + self + } + + pub fn with_alibaba_host_count(&mut self, value: Option) -> &mut Self { + self.alibaba_host_count = Some(value); + self + } + + pub fn with_apm_azure_app_service_host_count(&mut self, value: Option) -> &mut Self { + self.apm_azure_app_service_host_count = Some(value); + self + } + + pub fn with_apm_host_count(&mut self, value: Option) -> &mut Self { + self.apm_host_count = Some(value); + self + } + + pub fn with_aws_host_count(&mut self, value: Option) -> &mut Self { + self.aws_host_count = Some(value); + self + } + + pub fn with_azure_host_count(&mut self, value: Option) -> &mut Self { + self.azure_host_count = Some(value); + self + } + + pub fn with_container_count(&mut self, value: Option) -> &mut Self { + self.container_count = Some(value); + self + } + + pub fn with_gcp_host_count(&mut self, value: Option) -> &mut Self { + self.gcp_host_count = Some(value); + self + } + + pub fn with_heroku_host_count(&mut self, value: Option) -> &mut Self { + self.heroku_host_count = Some(value); + self + } + + pub fn with_host_count(&mut self, value: Option) -> &mut Self { + self.host_count = Some(value); + self + } + + pub fn with_hour(&mut self, value: Option) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_infra_azure_app_service(&mut self, value: Option) -> &mut Self { + self.infra_azure_app_service = Some(value); + self + } + + pub fn with_opentelemetry_apm_host_count(&mut self, value: Option) -> &mut Self { + self.opentelemetry_apm_host_count = Some(value); + self + } + + pub fn with_opentelemetry_host_count(&mut self, value: Option) -> &mut Self { + self.opentelemetry_host_count = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_vsphere_host_count(&mut self, value: Option) -> &mut Self { + self.vsphere_host_count = Some(value); + self + } } impl Default for UsageHostHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_hosts_response.rs b/src/datadogV1/model/model_usage_hosts_response.rs index fefe352ef..9b5d0c207 100644 --- a/src/datadogV1/model/model_usage_hosts_response.rs +++ b/src/datadogV1/model/model_usage_hosts_response.rs @@ -17,6 +17,11 @@ impl UsageHostsResponse { pub fn new() -> UsageHostsResponse { UsageHostsResponse { usage: None } } + + pub fn with_usage(&mut self, value: Vec) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageHostsResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_incident_management_hour.rs b/src/datadogV1/model/model_usage_incident_management_hour.rs index 348047aeb..48f63b960 100644 --- a/src/datadogV1/model/model_usage_incident_management_hour.rs +++ b/src/datadogV1/model/model_usage_incident_management_hour.rs @@ -35,6 +35,26 @@ impl UsageIncidentManagementHour { public_id: None, } } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_monthly_active_users(&mut self, value: Option) -> &mut Self { + self.monthly_active_users = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageIncidentManagementHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_incident_management_response.rs b/src/datadogV1/model/model_usage_incident_management_response.rs index dfeeed42e..3fa82c2bf 100644 --- a/src/datadogV1/model/model_usage_incident_management_response.rs +++ b/src/datadogV1/model/model_usage_incident_management_response.rs @@ -17,6 +17,14 @@ impl UsageIncidentManagementResponse { pub fn new() -> UsageIncidentManagementResponse { UsageIncidentManagementResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageIncidentManagementResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_indexed_spans_hour.rs b/src/datadogV1/model/model_usage_indexed_spans_hour.rs index 9df233311..ada34170e 100644 --- a/src/datadogV1/model/model_usage_indexed_spans_hour.rs +++ b/src/datadogV1/model/model_usage_indexed_spans_hour.rs @@ -35,6 +35,26 @@ impl UsageIndexedSpansHour { public_id: None, } } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_indexed_events_count(&mut self, value: Option) -> &mut Self { + self.indexed_events_count = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageIndexedSpansHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_indexed_spans_response.rs b/src/datadogV1/model/model_usage_indexed_spans_response.rs index b5712ea2d..d8afbce97 100644 --- a/src/datadogV1/model/model_usage_indexed_spans_response.rs +++ b/src/datadogV1/model/model_usage_indexed_spans_response.rs @@ -17,6 +17,14 @@ impl UsageIndexedSpansResponse { pub fn new() -> UsageIndexedSpansResponse { UsageIndexedSpansResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageIndexedSpansResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_ingested_spans_hour.rs b/src/datadogV1/model/model_usage_ingested_spans_hour.rs index c6c779234..421c89496 100644 --- a/src/datadogV1/model/model_usage_ingested_spans_hour.rs +++ b/src/datadogV1/model/model_usage_ingested_spans_hour.rs @@ -35,6 +35,26 @@ impl UsageIngestedSpansHour { public_id: None, } } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_ingested_events_bytes(&mut self, value: Option) -> &mut Self { + self.ingested_events_bytes = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageIngestedSpansHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_ingested_spans_response.rs b/src/datadogV1/model/model_usage_ingested_spans_response.rs index 2f68db4e8..706b7393a 100644 --- a/src/datadogV1/model/model_usage_ingested_spans_response.rs +++ b/src/datadogV1/model/model_usage_ingested_spans_response.rs @@ -17,6 +17,14 @@ impl UsageIngestedSpansResponse { pub fn new() -> UsageIngestedSpansResponse { UsageIngestedSpansResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageIngestedSpansResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_io_t_hour.rs b/src/datadogV1/model/model_usage_io_t_hour.rs index 95fd93b55..a67d17a0b 100644 --- a/src/datadogV1/model/model_usage_io_t_hour.rs +++ b/src/datadogV1/model/model_usage_io_t_hour.rs @@ -35,6 +35,26 @@ impl UsageIoTHour { public_id: None, } } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_iot_device_count(&mut self, value: Option) -> &mut Self { + self.iot_device_count = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageIoTHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_io_t_response.rs b/src/datadogV1/model/model_usage_io_t_response.rs index de17aca5e..dcb545770 100644 --- a/src/datadogV1/model/model_usage_io_t_response.rs +++ b/src/datadogV1/model/model_usage_io_t_response.rs @@ -17,6 +17,11 @@ impl UsageIoTResponse { pub fn new() -> UsageIoTResponse { UsageIoTResponse { usage: None } } + + pub fn with_usage(&mut self, value: Vec) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageIoTResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_lambda_hour.rs b/src/datadogV1/model/model_usage_lambda_hour.rs index cc3bfcdd6..860292f3c 100644 --- a/src/datadogV1/model/model_usage_lambda_hour.rs +++ b/src/datadogV1/model/model_usage_lambda_hour.rs @@ -44,6 +44,31 @@ impl UsageLambdaHour { public_id: None, } } + + pub fn with_func_count(&mut self, value: Option) -> &mut Self { + self.func_count = Some(value); + self + } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_invocations_sum(&mut self, value: Option) -> &mut Self { + self.invocations_sum = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageLambdaHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_lambda_response.rs b/src/datadogV1/model/model_usage_lambda_response.rs index 627010b8d..a74601059 100644 --- a/src/datadogV1/model/model_usage_lambda_response.rs +++ b/src/datadogV1/model/model_usage_lambda_response.rs @@ -18,6 +18,14 @@ impl UsageLambdaResponse { pub fn new() -> UsageLambdaResponse { UsageLambdaResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageLambdaResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_logs_by_index_hour.rs b/src/datadogV1/model/model_usage_logs_by_index_hour.rs index 5dfed955c..6eb79e085 100644 --- a/src/datadogV1/model/model_usage_logs_by_index_hour.rs +++ b/src/datadogV1/model/model_usage_logs_by_index_hour.rs @@ -43,6 +43,41 @@ impl UsageLogsByIndexHour { retention: None, } } + + pub fn with_event_count(&mut self, value: i64) -> &mut Self { + self.event_count = Some(value); + self + } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_index_id(&mut self, value: String) -> &mut Self { + self.index_id = Some(value); + self + } + + pub fn with_index_name(&mut self, value: String) -> &mut Self { + self.index_name = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_retention(&mut self, value: i64) -> &mut Self { + self.retention = Some(value); + self + } } impl Default for UsageLogsByIndexHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_logs_by_index_response.rs b/src/datadogV1/model/model_usage_logs_by_index_response.rs index da8875db8..aa5854b87 100644 --- a/src/datadogV1/model/model_usage_logs_by_index_response.rs +++ b/src/datadogV1/model/model_usage_logs_by_index_response.rs @@ -17,6 +17,14 @@ impl UsageLogsByIndexResponse { pub fn new() -> UsageLogsByIndexResponse { UsageLogsByIndexResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageLogsByIndexResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_logs_by_retention_hour.rs b/src/datadogV1/model/model_usage_logs_by_retention_hour.rs index ddc591043..25cc9d4af 100644 --- a/src/datadogV1/model/model_usage_logs_by_retention_hour.rs +++ b/src/datadogV1/model/model_usage_logs_by_retention_hour.rs @@ -55,6 +55,36 @@ impl UsageLogsByRetentionHour { retention: None, } } + + pub fn with_indexed_events_count(&mut self, value: Option) -> &mut Self { + self.indexed_events_count = Some(value); + self + } + + pub fn with_live_indexed_events_count(&mut self, value: Option) -> &mut Self { + self.live_indexed_events_count = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_rehydrated_indexed_events_count(&mut self, value: Option) -> &mut Self { + self.rehydrated_indexed_events_count = Some(value); + self + } + + pub fn with_retention(&mut self, value: Option) -> &mut Self { + self.retention = Some(value); + self + } } impl Default for UsageLogsByRetentionHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_logs_by_retention_response.rs b/src/datadogV1/model/model_usage_logs_by_retention_response.rs index 78da0a76d..3c1e515d9 100644 --- a/src/datadogV1/model/model_usage_logs_by_retention_response.rs +++ b/src/datadogV1/model/model_usage_logs_by_retention_response.rs @@ -17,6 +17,14 @@ impl UsageLogsByRetentionResponse { pub fn new() -> UsageLogsByRetentionResponse { UsageLogsByRetentionResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageLogsByRetentionResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_logs_hour.rs b/src/datadogV1/model/model_usage_logs_hour.rs index bf449f5e0..0652ecb3d 100644 --- a/src/datadogV1/model/model_usage_logs_hour.rs +++ b/src/datadogV1/model/model_usage_logs_hour.rs @@ -91,6 +91,61 @@ impl UsageLogsHour { public_id: None, } } + + pub fn with_billable_ingested_bytes(&mut self, value: Option) -> &mut Self { + self.billable_ingested_bytes = Some(value); + self + } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_indexed_events_count(&mut self, value: Option) -> &mut Self { + self.indexed_events_count = Some(value); + self + } + + pub fn with_ingested_events_bytes(&mut self, value: Option) -> &mut Self { + self.ingested_events_bytes = Some(value); + self + } + + pub fn with_logs_forwarding_events_bytes(&mut self, value: Option) -> &mut Self { + self.logs_forwarding_events_bytes = Some(value); + self + } + + pub fn with_logs_live_indexed_count(&mut self, value: Option) -> &mut Self { + self.logs_live_indexed_count = Some(value); + self + } + + pub fn with_logs_live_ingested_bytes(&mut self, value: Option) -> &mut Self { + self.logs_live_ingested_bytes = Some(value); + self + } + + pub fn with_logs_rehydrated_indexed_count(&mut self, value: Option) -> &mut Self { + self.logs_rehydrated_indexed_count = Some(value); + self + } + + pub fn with_logs_rehydrated_ingested_bytes(&mut self, value: Option) -> &mut Self { + self.logs_rehydrated_ingested_bytes = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageLogsHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_logs_response.rs b/src/datadogV1/model/model_usage_logs_response.rs index d377b6b50..3a581ae84 100644 --- a/src/datadogV1/model/model_usage_logs_response.rs +++ b/src/datadogV1/model/model_usage_logs_response.rs @@ -17,6 +17,11 @@ impl UsageLogsResponse { pub fn new() -> UsageLogsResponse { UsageLogsResponse { usage: None } } + + pub fn with_usage(&mut self, value: Vec) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageLogsResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_network_flows_hour.rs b/src/datadogV1/model/model_usage_network_flows_hour.rs index 16add087d..4649973c0 100644 --- a/src/datadogV1/model/model_usage_network_flows_hour.rs +++ b/src/datadogV1/model/model_usage_network_flows_hour.rs @@ -35,6 +35,26 @@ impl UsageNetworkFlowsHour { public_id: None, } } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_indexed_events_count(&mut self, value: Option) -> &mut Self { + self.indexed_events_count = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageNetworkFlowsHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_network_flows_response.rs b/src/datadogV1/model/model_usage_network_flows_response.rs index daad4815e..3d6612f3c 100644 --- a/src/datadogV1/model/model_usage_network_flows_response.rs +++ b/src/datadogV1/model/model_usage_network_flows_response.rs @@ -17,6 +17,14 @@ impl UsageNetworkFlowsResponse { pub fn new() -> UsageNetworkFlowsResponse { UsageNetworkFlowsResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageNetworkFlowsResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_network_hosts_hour.rs b/src/datadogV1/model/model_usage_network_hosts_hour.rs index 2d5b6dce2..f74b0a1b1 100644 --- a/src/datadogV1/model/model_usage_network_hosts_hour.rs +++ b/src/datadogV1/model/model_usage_network_hosts_hour.rs @@ -35,6 +35,26 @@ impl UsageNetworkHostsHour { public_id: None, } } + + pub fn with_host_count(&mut self, value: Option) -> &mut Self { + self.host_count = Some(value); + self + } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageNetworkHostsHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_network_hosts_response.rs b/src/datadogV1/model/model_usage_network_hosts_response.rs index dbe88bcbf..dff527d86 100644 --- a/src/datadogV1/model/model_usage_network_hosts_response.rs +++ b/src/datadogV1/model/model_usage_network_hosts_response.rs @@ -17,6 +17,14 @@ impl UsageNetworkHostsResponse { pub fn new() -> UsageNetworkHostsResponse { UsageNetworkHostsResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageNetworkHostsResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_online_archive_hour.rs b/src/datadogV1/model/model_usage_online_archive_hour.rs index 290a763c5..a40f4597d 100644 --- a/src/datadogV1/model/model_usage_online_archive_hour.rs +++ b/src/datadogV1/model/model_usage_online_archive_hour.rs @@ -35,6 +35,26 @@ impl UsageOnlineArchiveHour { public_id: None, } } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_online_archive_events_count(&mut self, value: Option) -> &mut Self { + self.online_archive_events_count = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageOnlineArchiveHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_online_archive_response.rs b/src/datadogV1/model/model_usage_online_archive_response.rs index 0d9fc4a2e..caffcf2d8 100644 --- a/src/datadogV1/model/model_usage_online_archive_response.rs +++ b/src/datadogV1/model/model_usage_online_archive_response.rs @@ -17,6 +17,14 @@ impl UsageOnlineArchiveResponse { pub fn new() -> UsageOnlineArchiveResponse { UsageOnlineArchiveResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageOnlineArchiveResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_profiling_hour.rs b/src/datadogV1/model/model_usage_profiling_hour.rs index fceeefd92..d8ea85b1d 100644 --- a/src/datadogV1/model/model_usage_profiling_hour.rs +++ b/src/datadogV1/model/model_usage_profiling_hour.rs @@ -51,6 +51,36 @@ impl UsageProfilingHour { public_id: None, } } + + pub fn with_aas_count(&mut self, value: Option) -> &mut Self { + self.aas_count = Some(value); + self + } + + pub fn with_avg_container_agent_count(&mut self, value: Option) -> &mut Self { + self.avg_container_agent_count = Some(value); + self + } + + pub fn with_host_count(&mut self, value: Option) -> &mut Self { + self.host_count = Some(value); + self + } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageProfilingHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_profiling_response.rs b/src/datadogV1/model/model_usage_profiling_response.rs index b673ae2a8..0d8a24e97 100644 --- a/src/datadogV1/model/model_usage_profiling_response.rs +++ b/src/datadogV1/model/model_usage_profiling_response.rs @@ -17,6 +17,14 @@ impl UsageProfilingResponse { pub fn new() -> UsageProfilingResponse { UsageProfilingResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageProfilingResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_rum_sessions_hour.rs b/src/datadogV1/model/model_usage_rum_sessions_hour.rs index e148e2f4c..8ad812c27 100644 --- a/src/datadogV1/model/model_usage_rum_sessions_hour.rs +++ b/src/datadogV1/model/model_usage_rum_sessions_hour.rs @@ -71,6 +71,51 @@ impl UsageRumSessionsHour { session_count_reactnative: None, } } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_replay_session_count(&mut self, value: i64) -> &mut Self { + self.replay_session_count = Some(value); + self + } + + pub fn with_session_count(&mut self, value: Option) -> &mut Self { + self.session_count = Some(value); + self + } + + pub fn with_session_count_android(&mut self, value: Option) -> &mut Self { + self.session_count_android = Some(value); + self + } + + pub fn with_session_count_flutter(&mut self, value: Option) -> &mut Self { + self.session_count_flutter = Some(value); + self + } + + pub fn with_session_count_ios(&mut self, value: Option) -> &mut Self { + self.session_count_ios = Some(value); + self + } + + pub fn with_session_count_reactnative(&mut self, value: Option) -> &mut Self { + self.session_count_reactnative = Some(value); + self + } } impl Default for UsageRumSessionsHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_rum_sessions_response.rs b/src/datadogV1/model/model_usage_rum_sessions_response.rs index a885f15c4..320b01f3c 100644 --- a/src/datadogV1/model/model_usage_rum_sessions_response.rs +++ b/src/datadogV1/model/model_usage_rum_sessions_response.rs @@ -17,6 +17,14 @@ impl UsageRumSessionsResponse { pub fn new() -> UsageRumSessionsResponse { UsageRumSessionsResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageRumSessionsResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_rum_units_hour.rs b/src/datadogV1/model/model_usage_rum_units_hour.rs index 474e32003..a9da8bf92 100644 --- a/src/datadogV1/model/model_usage_rum_units_hour.rs +++ b/src/datadogV1/model/model_usage_rum_units_hour.rs @@ -47,6 +47,31 @@ impl UsageRumUnitsHour { rum_units: None, } } + + pub fn with_browser_rum_units(&mut self, value: Option) -> &mut Self { + self.browser_rum_units = Some(value); + self + } + + pub fn with_mobile_rum_units(&mut self, value: Option) -> &mut Self { + self.mobile_rum_units = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_rum_units(&mut self, value: Option) -> &mut Self { + self.rum_units = Some(value); + self + } } impl Default for UsageRumUnitsHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_rum_units_response.rs b/src/datadogV1/model/model_usage_rum_units_response.rs index 3d7ba65f3..08d15a9ec 100644 --- a/src/datadogV1/model/model_usage_rum_units_response.rs +++ b/src/datadogV1/model/model_usage_rum_units_response.rs @@ -17,6 +17,14 @@ impl UsageRumUnitsResponse { pub fn new() -> UsageRumUnitsResponse { UsageRumUnitsResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageRumUnitsResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_sds_hour.rs b/src/datadogV1/model/model_usage_sds_hour.rs index 8e425436f..7642f95b2 100644 --- a/src/datadogV1/model/model_usage_sds_hour.rs +++ b/src/datadogV1/model/model_usage_sds_hour.rs @@ -67,6 +67,46 @@ impl UsageSDSHour { total_scanned_bytes: None, } } + + pub fn with_apm_scanned_bytes(&mut self, value: Option) -> &mut Self { + self.apm_scanned_bytes = Some(value); + self + } + + pub fn with_events_scanned_bytes(&mut self, value: Option) -> &mut Self { + self.events_scanned_bytes = Some(value); + self + } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_logs_scanned_bytes(&mut self, value: Option) -> &mut Self { + self.logs_scanned_bytes = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_rum_scanned_bytes(&mut self, value: Option) -> &mut Self { + self.rum_scanned_bytes = Some(value); + self + } + + pub fn with_total_scanned_bytes(&mut self, value: Option) -> &mut Self { + self.total_scanned_bytes = Some(value); + self + } } impl Default for UsageSDSHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_sds_response.rs b/src/datadogV1/model/model_usage_sds_response.rs index eebbf6baa..74bfdbd38 100644 --- a/src/datadogV1/model/model_usage_sds_response.rs +++ b/src/datadogV1/model/model_usage_sds_response.rs @@ -17,6 +17,11 @@ impl UsageSDSResponse { pub fn new() -> UsageSDSResponse { UsageSDSResponse { usage: None } } + + pub fn with_usage(&mut self, value: Vec) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageSDSResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_snmp_hour.rs b/src/datadogV1/model/model_usage_snmp_hour.rs index d215af582..3fd335273 100644 --- a/src/datadogV1/model/model_usage_snmp_hour.rs +++ b/src/datadogV1/model/model_usage_snmp_hour.rs @@ -35,6 +35,26 @@ impl UsageSNMPHour { snmp_devices: None, } } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_snmp_devices(&mut self, value: Option) -> &mut Self { + self.snmp_devices = Some(value); + self + } } impl Default for UsageSNMPHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_snmp_response.rs b/src/datadogV1/model/model_usage_snmp_response.rs index 32a58f604..ed208b5d5 100644 --- a/src/datadogV1/model/model_usage_snmp_response.rs +++ b/src/datadogV1/model/model_usage_snmp_response.rs @@ -17,6 +17,11 @@ impl UsageSNMPResponse { pub fn new() -> UsageSNMPResponse { UsageSNMPResponse { usage: None } } + + pub fn with_usage(&mut self, value: Vec) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageSNMPResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_specified_custom_reports_attributes.rs b/src/datadogV1/model/model_usage_specified_custom_reports_attributes.rs index 0a5300cea..6aa085aa7 100644 --- a/src/datadogV1/model/model_usage_specified_custom_reports_attributes.rs +++ b/src/datadogV1/model/model_usage_specified_custom_reports_attributes.rs @@ -39,6 +39,36 @@ impl UsageSpecifiedCustomReportsAttributes { tags: None, } } + + pub fn with_computed_on(&mut self, value: String) -> &mut Self { + self.computed_on = Some(value); + self + } + + pub fn with_end_date(&mut self, value: String) -> &mut Self { + self.end_date = Some(value); + self + } + + pub fn with_location(&mut self, value: String) -> &mut Self { + self.location = Some(value); + self + } + + pub fn with_size(&mut self, value: i64) -> &mut Self { + self.size = Some(value); + self + } + + pub fn with_start_date(&mut self, value: String) -> &mut Self { + self.start_date = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } impl Default for UsageSpecifiedCustomReportsAttributes { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_specified_custom_reports_data.rs b/src/datadogV1/model/model_usage_specified_custom_reports_data.rs index 8f0b1c46f..ed5231b9e 100644 --- a/src/datadogV1/model/model_usage_specified_custom_reports_data.rs +++ b/src/datadogV1/model/model_usage_specified_custom_reports_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct UsageSpecifiedCustomReportsData { /// The response containing attributes for specified custom reports. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The date for specified custom reports. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl UsageSpecifiedCustomReportsData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV1::model::UsageSpecifiedCustomReportsAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV1::model::UsageReportsType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for UsageSpecifiedCustomReportsData { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_specified_custom_reports_meta.rs b/src/datadogV1/model/model_usage_specified_custom_reports_meta.rs index db476ddeb..e67dd4298 100644 --- a/src/datadogV1/model/model_usage_specified_custom_reports_meta.rs +++ b/src/datadogV1/model/model_usage_specified_custom_reports_meta.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct UsageSpecifiedCustomReportsMeta { /// The object containing page total count for specified ID. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, } impl UsageSpecifiedCustomReportsMeta { pub fn new() -> UsageSpecifiedCustomReportsMeta { UsageSpecifiedCustomReportsMeta { page: None } } + + pub fn with_page( + &mut self, + value: crate::datadogV1::model::UsageSpecifiedCustomReportsPage, + ) -> &mut Self { + self.page = Some(value); + self + } } impl Default for UsageSpecifiedCustomReportsMeta { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_specified_custom_reports_page.rs b/src/datadogV1/model/model_usage_specified_custom_reports_page.rs index c595be67d..0ed7579aa 100644 --- a/src/datadogV1/model/model_usage_specified_custom_reports_page.rs +++ b/src/datadogV1/model/model_usage_specified_custom_reports_page.rs @@ -17,6 +17,11 @@ impl UsageSpecifiedCustomReportsPage { pub fn new() -> UsageSpecifiedCustomReportsPage { UsageSpecifiedCustomReportsPage { total_count: None } } + + pub fn with_total_count(&mut self, value: i64) -> &mut Self { + self.total_count = Some(value); + self + } } impl Default for UsageSpecifiedCustomReportsPage { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_specified_custom_reports_response.rs b/src/datadogV1/model/model_usage_specified_custom_reports_response.rs index 103918f90..1cc7f3af7 100644 --- a/src/datadogV1/model/model_usage_specified_custom_reports_response.rs +++ b/src/datadogV1/model/model_usage_specified_custom_reports_response.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct UsageSpecifiedCustomReportsResponse { /// Response containing date and type for specified custom reports. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// The object containing document metadata. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl UsageSpecifiedCustomReportsResponse { @@ -23,6 +23,22 @@ impl UsageSpecifiedCustomReportsResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: crate::datadogV1::model::UsageSpecifiedCustomReportsData, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV1::model::UsageSpecifiedCustomReportsMeta, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for UsageSpecifiedCustomReportsResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_summary_date.rs b/src/datadogV1/model/model_usage_summary_date.rs index eced71d68..6164b57a8 100644 --- a/src/datadogV1/model/model_usage_summary_date.rs +++ b/src/datadogV1/model/model_usage_summary_date.rs @@ -425,6 +425,624 @@ impl UsageSummaryDate { workflow_executions_usage_sum: None, } } + + #[allow(deprecated)] + pub fn with_agent_host_top99p(&mut self, value: i64) -> &mut Self { + self.agent_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_apm_azure_app_service_host_top99p(&mut self, value: i64) -> &mut Self { + self.apm_azure_app_service_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_apm_fargate_count_avg(&mut self, value: i64) -> &mut Self { + self.apm_fargate_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_apm_host_top99p(&mut self, value: i64) -> &mut Self { + self.apm_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_appsec_fargate_count_avg(&mut self, value: i64) -> &mut Self { + self.appsec_fargate_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_audit_logs_lines_indexed_sum(&mut self, value: i64) -> &mut Self { + self.audit_logs_lines_indexed_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_audit_trail_enabled_hwm(&mut self, value: i64) -> &mut Self { + self.audit_trail_enabled_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_avg_profiled_fargate_tasks(&mut self, value: i64) -> &mut Self { + self.avg_profiled_fargate_tasks = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_aws_host_top99p(&mut self, value: i64) -> &mut Self { + self.aws_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_aws_lambda_func_count(&mut self, value: i64) -> &mut Self { + self.aws_lambda_func_count = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_aws_lambda_invocations_sum(&mut self, value: i64) -> &mut Self { + self.aws_lambda_invocations_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_azure_app_service_top99p(&mut self, value: i64) -> &mut Self { + self.azure_app_service_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_billable_ingested_bytes_sum(&mut self, value: i64) -> &mut Self { + self.billable_ingested_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_browser_rum_lite_session_count_sum(&mut self, value: i64) -> &mut Self { + self.browser_rum_lite_session_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_browser_rum_replay_session_count_sum(&mut self, value: i64) -> &mut Self { + self.browser_rum_replay_session_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_browser_rum_units_sum(&mut self, value: i64) -> &mut Self { + self.browser_rum_units_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ci_pipeline_indexed_spans_sum(&mut self, value: i64) -> &mut Self { + self.ci_pipeline_indexed_spans_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ci_test_indexed_spans_sum(&mut self, value: i64) -> &mut Self { + self.ci_test_indexed_spans_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ci_visibility_itr_committers_hwm(&mut self, value: i64) -> &mut Self { + self.ci_visibility_itr_committers_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ci_visibility_pipeline_committers_hwm(&mut self, value: i64) -> &mut Self { + self.ci_visibility_pipeline_committers_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ci_visibility_test_committers_hwm(&mut self, value: i64) -> &mut Self { + self.ci_visibility_test_committers_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cloud_cost_management_aws_host_count_avg(&mut self, value: i64) -> &mut Self { + self.cloud_cost_management_aws_host_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cloud_cost_management_azure_host_count_avg(&mut self, value: i64) -> &mut Self { + self.cloud_cost_management_azure_host_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cloud_cost_management_host_count_avg(&mut self, value: i64) -> &mut Self { + self.cloud_cost_management_host_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cloud_siem_events_sum(&mut self, value: i64) -> &mut Self { + self.cloud_siem_events_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_container_avg(&mut self, value: i64) -> &mut Self { + self.container_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_container_excl_agent_avg(&mut self, value: i64) -> &mut Self { + self.container_excl_agent_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_container_hwm(&mut self, value: i64) -> &mut Self { + self.container_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_container_enterprise_compliance_count_sum(&mut self, value: i64) -> &mut Self { + self.csm_container_enterprise_compliance_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_container_enterprise_cws_count_sum(&mut self, value: i64) -> &mut Self { + self.csm_container_enterprise_cws_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_container_enterprise_total_count_sum(&mut self, value: i64) -> &mut Self { + self.csm_container_enterprise_total_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_aas_host_count_top99p(&mut self, value: i64) -> &mut Self { + self.csm_host_enterprise_aas_host_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_aws_host_count_top99p(&mut self, value: i64) -> &mut Self { + self.csm_host_enterprise_aws_host_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_azure_host_count_top99p(&mut self, value: i64) -> &mut Self { + self.csm_host_enterprise_azure_host_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_compliance_host_count_top99p( + &mut self, + value: i64, + ) -> &mut Self { + self.csm_host_enterprise_compliance_host_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_cws_host_count_top99p(&mut self, value: i64) -> &mut Self { + self.csm_host_enterprise_cws_host_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_gcp_host_count_top99p(&mut self, value: i64) -> &mut Self { + self.csm_host_enterprise_gcp_host_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_total_host_count_top99p(&mut self, value: i64) -> &mut Self { + self.csm_host_enterprise_total_host_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_aas_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_aas_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_aws_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_aws_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_azure_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_azure_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_container_avg(&mut self, value: i64) -> &mut Self { + self.cspm_container_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_container_hwm(&mut self, value: i64) -> &mut Self { + self.cspm_container_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_gcp_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_gcp_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_custom_ts_avg(&mut self, value: i64) -> &mut Self { + self.custom_ts_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cws_container_count_avg(&mut self, value: i64) -> &mut Self { + self.cws_container_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cws_host_top99p(&mut self, value: i64) -> &mut Self { + self.cws_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_date(&mut self, value: String) -> &mut Self { + self.date = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_dbm_host_top99p(&mut self, value: i64) -> &mut Self { + self.dbm_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_dbm_queries_count_avg(&mut self, value: i64) -> &mut Self { + self.dbm_queries_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_fargate_tasks_count_avg(&mut self, value: i64) -> &mut Self { + self.fargate_tasks_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_fargate_tasks_count_hwm(&mut self, value: i64) -> &mut Self { + self.fargate_tasks_count_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_forwarding_events_bytes_sum(&mut self, value: i64) -> &mut Self { + self.forwarding_events_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_gcp_host_top99p(&mut self, value: i64) -> &mut Self { + self.gcp_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_heroku_host_top99p(&mut self, value: i64) -> &mut Self { + self.heroku_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_incident_management_monthly_active_users_hwm(&mut self, value: i64) -> &mut Self { + self.incident_management_monthly_active_users_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_indexed_events_count_sum(&mut self, value: i64) -> &mut Self { + self.indexed_events_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_infra_host_top99p(&mut self, value: i64) -> &mut Self { + self.infra_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ingested_events_bytes_sum(&mut self, value: i64) -> &mut Self { + self.ingested_events_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_iot_device_sum(&mut self, value: i64) -> &mut Self { + self.iot_device_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_iot_device_top99p(&mut self, value: i64) -> &mut Self { + self.iot_device_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_lite_session_count_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_lite_session_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_session_count_android_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_android_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_session_count_flutter_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_flutter_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_session_count_ios_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_ios_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_session_count_reactnative_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_reactnative_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_session_count_roku_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_roku_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_session_count_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_units_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_units_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ndm_netflow_events_sum(&mut self, value: i64) -> &mut Self { + self.ndm_netflow_events_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_netflow_indexed_events_count_sum(&mut self, value: i64) -> &mut Self { + self.netflow_indexed_events_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_npm_host_top99p(&mut self, value: i64) -> &mut Self { + self.npm_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_observability_pipelines_bytes_processed_sum(&mut self, value: i64) -> &mut Self { + self.observability_pipelines_bytes_processed_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_online_archive_events_count_sum(&mut self, value: i64) -> &mut Self { + self.online_archive_events_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_opentelemetry_apm_host_top99p(&mut self, value: i64) -> &mut Self { + self.opentelemetry_apm_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_opentelemetry_host_top99p(&mut self, value: i64) -> &mut Self { + self.opentelemetry_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_orgs( + &mut self, + value: Vec, + ) -> &mut Self { + self.orgs = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_profiling_aas_count_top99p(&mut self, value: i64) -> &mut Self { + self.profiling_aas_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_profiling_host_top99p(&mut self, value: i64) -> &mut Self { + self.profiling_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_rum_browser_and_mobile_session_count(&mut self, value: i64) -> &mut Self { + self.rum_browser_and_mobile_session_count = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_rum_session_count_sum(&mut self, value: i64) -> &mut Self { + self.rum_session_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_rum_total_session_count_sum(&mut self, value: i64) -> &mut Self { + self.rum_total_session_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_rum_units_sum(&mut self, value: i64) -> &mut Self { + self.rum_units_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_sds_apm_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_apm_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_sds_events_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_events_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_sds_logs_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_logs_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_sds_rum_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_rum_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_sds_total_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_total_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_serverless_apps_azure_count_avg(&mut self, value: i64) -> &mut Self { + self.serverless_apps_azure_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_serverless_apps_google_count_avg(&mut self, value: i64) -> &mut Self { + self.serverless_apps_google_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_serverless_apps_total_count_avg(&mut self, value: i64) -> &mut Self { + self.serverless_apps_total_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_synthetics_browser_check_calls_count_sum(&mut self, value: i64) -> &mut Self { + self.synthetics_browser_check_calls_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_synthetics_check_calls_count_sum(&mut self, value: i64) -> &mut Self { + self.synthetics_check_calls_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_synthetics_mobile_test_runs_sum(&mut self, value: i64) -> &mut Self { + self.synthetics_mobile_test_runs_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_synthetics_parallel_testing_max_slots_hwm(&mut self, value: i64) -> &mut Self { + self.synthetics_parallel_testing_max_slots_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_trace_search_indexed_events_count_sum(&mut self, value: i64) -> &mut Self { + self.trace_search_indexed_events_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_twol_ingested_events_bytes_sum(&mut self, value: i64) -> &mut Self { + self.twol_ingested_events_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_universal_service_monitoring_host_top99p(&mut self, value: i64) -> &mut Self { + self.universal_service_monitoring_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_vsphere_host_top99p(&mut self, value: i64) -> &mut Self { + self.vsphere_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_vuln_management_host_count_top99p(&mut self, value: i64) -> &mut Self { + self.vuln_management_host_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_workflow_executions_usage_sum(&mut self, value: i64) -> &mut Self { + self.workflow_executions_usage_sum = Some(value); + self + } } impl Default for UsageSummaryDate { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_summary_date_org.rs b/src/datadogV1/model/model_usage_summary_date_org.rs index a7c41ebf7..3bd52b70c 100644 --- a/src/datadogV1/model/model_usage_summary_date_org.rs +++ b/src/datadogV1/model/model_usage_summary_date_org.rs @@ -441,6 +441,645 @@ impl UsageSummaryDateOrg { workflow_executions_usage_sum: None, } } + + #[allow(deprecated)] + pub fn with_agent_host_top99p(&mut self, value: i64) -> &mut Self { + self.agent_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_apm_azure_app_service_host_top99p(&mut self, value: i64) -> &mut Self { + self.apm_azure_app_service_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_apm_fargate_count_avg(&mut self, value: i64) -> &mut Self { + self.apm_fargate_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_apm_host_top99p(&mut self, value: i64) -> &mut Self { + self.apm_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_appsec_fargate_count_avg(&mut self, value: i64) -> &mut Self { + self.appsec_fargate_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_audit_logs_lines_indexed_sum(&mut self, value: i64) -> &mut Self { + self.audit_logs_lines_indexed_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_audit_trail_enabled_hwm(&mut self, value: i64) -> &mut Self { + self.audit_trail_enabled_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_avg_profiled_fargate_tasks(&mut self, value: i64) -> &mut Self { + self.avg_profiled_fargate_tasks = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_aws_host_top99p(&mut self, value: i64) -> &mut Self { + self.aws_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_aws_lambda_func_count(&mut self, value: i64) -> &mut Self { + self.aws_lambda_func_count = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_aws_lambda_invocations_sum(&mut self, value: i64) -> &mut Self { + self.aws_lambda_invocations_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_azure_app_service_top99p(&mut self, value: i64) -> &mut Self { + self.azure_app_service_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_billable_ingested_bytes_sum(&mut self, value: i64) -> &mut Self { + self.billable_ingested_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_browser_rum_lite_session_count_sum(&mut self, value: i64) -> &mut Self { + self.browser_rum_lite_session_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_browser_rum_replay_session_count_sum(&mut self, value: i64) -> &mut Self { + self.browser_rum_replay_session_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_browser_rum_units_sum(&mut self, value: i64) -> &mut Self { + self.browser_rum_units_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ci_pipeline_indexed_spans_sum(&mut self, value: i64) -> &mut Self { + self.ci_pipeline_indexed_spans_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ci_test_indexed_spans_sum(&mut self, value: i64) -> &mut Self { + self.ci_test_indexed_spans_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ci_visibility_itr_committers_hwm(&mut self, value: i64) -> &mut Self { + self.ci_visibility_itr_committers_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ci_visibility_pipeline_committers_hwm(&mut self, value: i64) -> &mut Self { + self.ci_visibility_pipeline_committers_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ci_visibility_test_committers_hwm(&mut self, value: i64) -> &mut Self { + self.ci_visibility_test_committers_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cloud_cost_management_aws_host_count_avg(&mut self, value: i64) -> &mut Self { + self.cloud_cost_management_aws_host_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cloud_cost_management_azure_host_count_avg(&mut self, value: i64) -> &mut Self { + self.cloud_cost_management_azure_host_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cloud_cost_management_host_count_avg(&mut self, value: i64) -> &mut Self { + self.cloud_cost_management_host_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cloud_siem_events_sum(&mut self, value: i64) -> &mut Self { + self.cloud_siem_events_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_container_avg(&mut self, value: i64) -> &mut Self { + self.container_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_container_excl_agent_avg(&mut self, value: i64) -> &mut Self { + self.container_excl_agent_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_container_hwm(&mut self, value: i64) -> &mut Self { + self.container_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_container_enterprise_compliance_count_sum(&mut self, value: i64) -> &mut Self { + self.csm_container_enterprise_compliance_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_container_enterprise_cws_count_sum(&mut self, value: i64) -> &mut Self { + self.csm_container_enterprise_cws_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_container_enterprise_total_count_sum(&mut self, value: i64) -> &mut Self { + self.csm_container_enterprise_total_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_aas_host_count_top99p(&mut self, value: i64) -> &mut Self { + self.csm_host_enterprise_aas_host_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_aws_host_count_top99p(&mut self, value: i64) -> &mut Self { + self.csm_host_enterprise_aws_host_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_azure_host_count_top99p(&mut self, value: i64) -> &mut Self { + self.csm_host_enterprise_azure_host_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_compliance_host_count_top99p( + &mut self, + value: i64, + ) -> &mut Self { + self.csm_host_enterprise_compliance_host_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_cws_host_count_top99p(&mut self, value: i64) -> &mut Self { + self.csm_host_enterprise_cws_host_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_gcp_host_count_top99p(&mut self, value: i64) -> &mut Self { + self.csm_host_enterprise_gcp_host_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_total_host_count_top99p(&mut self, value: i64) -> &mut Self { + self.csm_host_enterprise_total_host_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_aas_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_aas_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_aws_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_aws_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_azure_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_azure_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_container_avg(&mut self, value: i64) -> &mut Self { + self.cspm_container_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_container_hwm(&mut self, value: i64) -> &mut Self { + self.cspm_container_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_gcp_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_gcp_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_custom_historical_ts_avg(&mut self, value: i64) -> &mut Self { + self.custom_historical_ts_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_custom_live_ts_avg(&mut self, value: i64) -> &mut Self { + self.custom_live_ts_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_custom_ts_avg(&mut self, value: i64) -> &mut Self { + self.custom_ts_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cws_container_count_avg(&mut self, value: i64) -> &mut Self { + self.cws_container_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cws_host_top99p(&mut self, value: i64) -> &mut Self { + self.cws_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_dbm_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.dbm_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_dbm_queries_avg_sum(&mut self, value: i64) -> &mut Self { + self.dbm_queries_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_fargate_tasks_count_avg(&mut self, value: i64) -> &mut Self { + self.fargate_tasks_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_fargate_tasks_count_hwm(&mut self, value: i64) -> &mut Self { + self.fargate_tasks_count_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_forwarding_events_bytes_sum(&mut self, value: i64) -> &mut Self { + self.forwarding_events_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_gcp_host_top99p(&mut self, value: i64) -> &mut Self { + self.gcp_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_heroku_host_top99p(&mut self, value: i64) -> &mut Self { + self.heroku_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_incident_management_monthly_active_users_hwm(&mut self, value: i64) -> &mut Self { + self.incident_management_monthly_active_users_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_indexed_events_count_sum(&mut self, value: i64) -> &mut Self { + self.indexed_events_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_infra_host_top99p(&mut self, value: i64) -> &mut Self { + self.infra_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ingested_events_bytes_sum(&mut self, value: i64) -> &mut Self { + self.ingested_events_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_iot_device_agg_sum(&mut self, value: i64) -> &mut Self { + self.iot_device_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_iot_device_top99p_sum(&mut self, value: i64) -> &mut Self { + self.iot_device_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_lite_session_count_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_lite_session_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_session_count_android_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_android_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_session_count_flutter_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_flutter_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_session_count_ios_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_ios_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_session_count_reactnative_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_reactnative_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_session_count_roku_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_roku_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_session_count_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_units_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_units_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ndm_netflow_events_sum(&mut self, value: i64) -> &mut Self { + self.ndm_netflow_events_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_netflow_indexed_events_count_sum(&mut self, value: i64) -> &mut Self { + self.netflow_indexed_events_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_npm_host_top99p(&mut self, value: i64) -> &mut Self { + self.npm_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_observability_pipelines_bytes_processed_sum(&mut self, value: i64) -> &mut Self { + self.observability_pipelines_bytes_processed_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_online_archive_events_count_sum(&mut self, value: i64) -> &mut Self { + self.online_archive_events_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_opentelemetry_apm_host_top99p(&mut self, value: i64) -> &mut Self { + self.opentelemetry_apm_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_opentelemetry_host_top99p(&mut self, value: i64) -> &mut Self { + self.opentelemetry_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_profiling_aas_count_top99p(&mut self, value: i64) -> &mut Self { + self.profiling_aas_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_profiling_host_top99p(&mut self, value: i64) -> &mut Self { + self.profiling_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_rum_browser_and_mobile_session_count(&mut self, value: i64) -> &mut Self { + self.rum_browser_and_mobile_session_count = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_rum_session_count_sum(&mut self, value: i64) -> &mut Self { + self.rum_session_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_rum_total_session_count_sum(&mut self, value: i64) -> &mut Self { + self.rum_total_session_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_rum_units_sum(&mut self, value: i64) -> &mut Self { + self.rum_units_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_sds_apm_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_apm_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_sds_events_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_events_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_sds_logs_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_logs_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_sds_rum_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_rum_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_sds_total_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_total_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_serverless_apps_azure_count_avg(&mut self, value: i64) -> &mut Self { + self.serverless_apps_azure_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_serverless_apps_google_count_avg(&mut self, value: i64) -> &mut Self { + self.serverless_apps_google_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_serverless_apps_total_count_avg(&mut self, value: i64) -> &mut Self { + self.serverless_apps_total_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_synthetics_browser_check_calls_count_sum(&mut self, value: i64) -> &mut Self { + self.synthetics_browser_check_calls_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_synthetics_check_calls_count_sum(&mut self, value: i64) -> &mut Self { + self.synthetics_check_calls_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_synthetics_mobile_test_runs_sum(&mut self, value: i64) -> &mut Self { + self.synthetics_mobile_test_runs_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_synthetics_parallel_testing_max_slots_hwm(&mut self, value: i64) -> &mut Self { + self.synthetics_parallel_testing_max_slots_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_trace_search_indexed_events_count_sum(&mut self, value: i64) -> &mut Self { + self.trace_search_indexed_events_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_twol_ingested_events_bytes_sum(&mut self, value: i64) -> &mut Self { + self.twol_ingested_events_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_universal_service_monitoring_host_top99p(&mut self, value: i64) -> &mut Self { + self.universal_service_monitoring_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_vsphere_host_top99p(&mut self, value: i64) -> &mut Self { + self.vsphere_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_vuln_management_host_count_top99p(&mut self, value: i64) -> &mut Self { + self.vuln_management_host_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_workflow_executions_usage_sum(&mut self, value: i64) -> &mut Self { + self.workflow_executions_usage_sum = Some(value); + self + } } impl Default for UsageSummaryDateOrg { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_summary_response.rs b/src/datadogV1/model/model_usage_summary_response.rs index 8280d1456..7abf87eac 100644 --- a/src/datadogV1/model/model_usage_summary_response.rs +++ b/src/datadogV1/model/model_usage_summary_response.rs @@ -215,7 +215,7 @@ pub struct UsageSummaryResponse { pub live_ingested_bytes_agg_sum: Option, /// Object containing logs usage data broken down by retention period. #[serde(rename = "logs_by_retention")] - pub logs_by_retention: Option>, + pub logs_by_retention: Option, /// Shows the sum of all mobile lite sessions over all hours in the current months for all organizations. #[serde(rename = "mobile_rum_lite_session_count_agg_sum")] pub mobile_rum_lite_session_count_agg_sum: Option, @@ -469,6 +469,708 @@ impl UsageSummaryResponse { workflow_executions_usage_agg_sum: None, } } + + #[allow(deprecated)] + pub fn with_agent_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.agent_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_apm_azure_app_service_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.apm_azure_app_service_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_apm_fargate_count_avg_sum(&mut self, value: i64) -> &mut Self { + self.apm_fargate_count_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_apm_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.apm_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_appsec_fargate_count_avg_sum(&mut self, value: i64) -> &mut Self { + self.appsec_fargate_count_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_audit_logs_lines_indexed_agg_sum(&mut self, value: i64) -> &mut Self { + self.audit_logs_lines_indexed_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_audit_trail_enabled_hwm_sum(&mut self, value: i64) -> &mut Self { + self.audit_trail_enabled_hwm_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_avg_profiled_fargate_tasks_sum(&mut self, value: i64) -> &mut Self { + self.avg_profiled_fargate_tasks_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_aws_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.aws_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_aws_lambda_func_count(&mut self, value: i64) -> &mut Self { + self.aws_lambda_func_count = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_aws_lambda_invocations_sum(&mut self, value: i64) -> &mut Self { + self.aws_lambda_invocations_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_azure_app_service_top99p_sum(&mut self, value: i64) -> &mut Self { + self.azure_app_service_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_azure_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.azure_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_billable_ingested_bytes_agg_sum(&mut self, value: i64) -> &mut Self { + self.billable_ingested_bytes_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_browser_rum_lite_session_count_agg_sum(&mut self, value: i64) -> &mut Self { + self.browser_rum_lite_session_count_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_browser_rum_replay_session_count_agg_sum(&mut self, value: i64) -> &mut Self { + self.browser_rum_replay_session_count_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_browser_rum_units_agg_sum(&mut self, value: i64) -> &mut Self { + self.browser_rum_units_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ci_pipeline_indexed_spans_agg_sum(&mut self, value: i64) -> &mut Self { + self.ci_pipeline_indexed_spans_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ci_test_indexed_spans_agg_sum(&mut self, value: i64) -> &mut Self { + self.ci_test_indexed_spans_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ci_visibility_itr_committers_hwm_sum(&mut self, value: i64) -> &mut Self { + self.ci_visibility_itr_committers_hwm_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ci_visibility_pipeline_committers_hwm_sum(&mut self, value: i64) -> &mut Self { + self.ci_visibility_pipeline_committers_hwm_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ci_visibility_test_committers_hwm_sum(&mut self, value: i64) -> &mut Self { + self.ci_visibility_test_committers_hwm_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cloud_cost_management_aws_host_count_avg_sum(&mut self, value: i64) -> &mut Self { + self.cloud_cost_management_aws_host_count_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cloud_cost_management_azure_host_count_avg_sum(&mut self, value: i64) -> &mut Self { + self.cloud_cost_management_azure_host_count_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cloud_cost_management_host_count_avg_sum(&mut self, value: i64) -> &mut Self { + self.cloud_cost_management_host_count_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cloud_siem_events_agg_sum(&mut self, value: i64) -> &mut Self { + self.cloud_siem_events_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_container_avg_sum(&mut self, value: i64) -> &mut Self { + self.container_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_container_excl_agent_avg_sum(&mut self, value: i64) -> &mut Self { + self.container_excl_agent_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_container_hwm_sum(&mut self, value: i64) -> &mut Self { + self.container_hwm_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_container_enterprise_compliance_count_agg_sum( + &mut self, + value: i64, + ) -> &mut Self { + self.csm_container_enterprise_compliance_count_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_container_enterprise_cws_count_agg_sum(&mut self, value: i64) -> &mut Self { + self.csm_container_enterprise_cws_count_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_container_enterprise_total_count_agg_sum(&mut self, value: i64) -> &mut Self { + self.csm_container_enterprise_total_count_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_aas_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { + self.csm_host_enterprise_aas_host_count_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_aws_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { + self.csm_host_enterprise_aws_host_count_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_azure_host_count_top99p_sum( + &mut self, + value: i64, + ) -> &mut Self { + self.csm_host_enterprise_azure_host_count_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_compliance_host_count_top99p_sum( + &mut self, + value: i64, + ) -> &mut Self { + self.csm_host_enterprise_compliance_host_count_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_cws_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { + self.csm_host_enterprise_cws_host_count_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_gcp_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { + self.csm_host_enterprise_gcp_host_count_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_csm_host_enterprise_total_host_count_top99p_sum( + &mut self, + value: i64, + ) -> &mut Self { + self.csm_host_enterprise_total_host_count_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_aas_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.cspm_aas_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_aws_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.cspm_aws_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_azure_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.cspm_azure_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_container_avg_sum(&mut self, value: i64) -> &mut Self { + self.cspm_container_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_container_hwm_sum(&mut self, value: i64) -> &mut Self { + self.cspm_container_hwm_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_gcp_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.cspm_gcp_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cspm_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.cspm_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_custom_historical_ts_sum(&mut self, value: i64) -> &mut Self { + self.custom_historical_ts_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_custom_live_ts_sum(&mut self, value: i64) -> &mut Self { + self.custom_live_ts_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_custom_ts_sum(&mut self, value: i64) -> &mut Self { + self.custom_ts_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cws_containers_avg_sum(&mut self, value: i64) -> &mut Self { + self.cws_containers_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_cws_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.cws_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_dbm_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.dbm_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_dbm_queries_avg_sum(&mut self, value: i64) -> &mut Self { + self.dbm_queries_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_end_date(&mut self, value: String) -> &mut Self { + self.end_date = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_fargate_tasks_count_avg_sum(&mut self, value: i64) -> &mut Self { + self.fargate_tasks_count_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_fargate_tasks_count_hwm_sum(&mut self, value: i64) -> &mut Self { + self.fargate_tasks_count_hwm_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_forwarding_events_bytes_agg_sum(&mut self, value: i64) -> &mut Self { + self.forwarding_events_bytes_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_gcp_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.gcp_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_heroku_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.heroku_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_incident_management_monthly_active_users_hwm_sum( + &mut self, + value: i64, + ) -> &mut Self { + self.incident_management_monthly_active_users_hwm_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_indexed_events_count_agg_sum(&mut self, value: i64) -> &mut Self { + self.indexed_events_count_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_infra_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.infra_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ingested_events_bytes_agg_sum(&mut self, value: i64) -> &mut Self { + self.ingested_events_bytes_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_iot_device_agg_sum(&mut self, value: i64) -> &mut Self { + self.iot_device_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_iot_device_top99p_sum(&mut self, value: i64) -> &mut Self { + self.iot_device_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_last_updated(&mut self, value: String) -> &mut Self { + self.last_updated = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_live_indexed_events_agg_sum(&mut self, value: i64) -> &mut Self { + self.live_indexed_events_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_live_ingested_bytes_agg_sum(&mut self, value: i64) -> &mut Self { + self.live_ingested_bytes_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_logs_by_retention( + &mut self, + value: crate::datadogV1::model::LogsByRetention, + ) -> &mut Self { + self.logs_by_retention = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_lite_session_count_agg_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_lite_session_count_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_session_count_agg_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_session_count_android_agg_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_android_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_session_count_flutter_agg_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_flutter_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_session_count_ios_agg_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_ios_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_session_count_reactnative_agg_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_reactnative_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_session_count_roku_agg_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_roku_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_mobile_rum_units_agg_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_units_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_ndm_netflow_events_agg_sum(&mut self, value: i64) -> &mut Self { + self.ndm_netflow_events_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_netflow_indexed_events_count_agg_sum(&mut self, value: i64) -> &mut Self { + self.netflow_indexed_events_count_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_npm_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.npm_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_observability_pipelines_bytes_processed_agg_sum( + &mut self, + value: i64, + ) -> &mut Self { + self.observability_pipelines_bytes_processed_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_online_archive_events_count_agg_sum(&mut self, value: i64) -> &mut Self { + self.online_archive_events_count_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_opentelemetry_apm_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.opentelemetry_apm_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_opentelemetry_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.opentelemetry_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_profiling_aas_count_top99p_sum(&mut self, value: i64) -> &mut Self { + self.profiling_aas_count_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_profiling_container_agent_count_avg(&mut self, value: i64) -> &mut Self { + self.profiling_container_agent_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_profiling_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { + self.profiling_host_count_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_rehydrated_indexed_events_agg_sum(&mut self, value: i64) -> &mut Self { + self.rehydrated_indexed_events_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_rehydrated_ingested_bytes_agg_sum(&mut self, value: i64) -> &mut Self { + self.rehydrated_ingested_bytes_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_rum_browser_and_mobile_session_count(&mut self, value: i64) -> &mut Self { + self.rum_browser_and_mobile_session_count = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_rum_session_count_agg_sum(&mut self, value: i64) -> &mut Self { + self.rum_session_count_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_rum_total_session_count_agg_sum(&mut self, value: i64) -> &mut Self { + self.rum_total_session_count_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_rum_units_agg_sum(&mut self, value: i64) -> &mut Self { + self.rum_units_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_sds_apm_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_apm_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_sds_events_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_events_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_sds_logs_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_logs_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_sds_rum_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_rum_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_sds_total_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_total_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_serverless_apps_azure_count_avg_sum(&mut self, value: i64) -> &mut Self { + self.serverless_apps_azure_count_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_serverless_apps_google_count_avg_sum(&mut self, value: i64) -> &mut Self { + self.serverless_apps_google_count_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_serverless_apps_total_count_avg_sum(&mut self, value: i64) -> &mut Self { + self.serverless_apps_total_count_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_start_date(&mut self, value: String) -> &mut Self { + self.start_date = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_synthetics_browser_check_calls_count_agg_sum(&mut self, value: i64) -> &mut Self { + self.synthetics_browser_check_calls_count_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_synthetics_check_calls_count_agg_sum(&mut self, value: i64) -> &mut Self { + self.synthetics_check_calls_count_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_synthetics_mobile_test_runs_agg_sum(&mut self, value: i64) -> &mut Self { + self.synthetics_mobile_test_runs_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_synthetics_parallel_testing_max_slots_hwm_sum(&mut self, value: i64) -> &mut Self { + self.synthetics_parallel_testing_max_slots_hwm_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_trace_search_indexed_events_count_agg_sum(&mut self, value: i64) -> &mut Self { + self.trace_search_indexed_events_count_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_twol_ingested_events_bytes_agg_sum(&mut self, value: i64) -> &mut Self { + self.twol_ingested_events_bytes_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_universal_service_monitoring_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.universal_service_monitoring_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_vsphere_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.vsphere_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_vuln_management_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { + self.vuln_management_host_count_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_workflow_executions_usage_agg_sum(&mut self, value: i64) -> &mut Self { + self.workflow_executions_usage_agg_sum = Some(value); + self + } } impl Default for UsageSummaryResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_synthetics_api_hour.rs b/src/datadogV1/model/model_usage_synthetics_api_hour.rs index 651fc6771..d5f372934 100644 --- a/src/datadogV1/model/model_usage_synthetics_api_hour.rs +++ b/src/datadogV1/model/model_usage_synthetics_api_hour.rs @@ -35,6 +35,26 @@ impl UsageSyntheticsAPIHour { public_id: None, } } + + pub fn with_check_calls_count(&mut self, value: Option) -> &mut Self { + self.check_calls_count = Some(value); + self + } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageSyntheticsAPIHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_synthetics_api_response.rs b/src/datadogV1/model/model_usage_synthetics_api_response.rs index 9e76b51a8..ff4ee586d 100644 --- a/src/datadogV1/model/model_usage_synthetics_api_response.rs +++ b/src/datadogV1/model/model_usage_synthetics_api_response.rs @@ -17,6 +17,14 @@ impl UsageSyntheticsAPIResponse { pub fn new() -> UsageSyntheticsAPIResponse { UsageSyntheticsAPIResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageSyntheticsAPIResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_synthetics_browser_hour.rs b/src/datadogV1/model/model_usage_synthetics_browser_hour.rs index 48cf67e16..7dd5d2de1 100644 --- a/src/datadogV1/model/model_usage_synthetics_browser_hour.rs +++ b/src/datadogV1/model/model_usage_synthetics_browser_hour.rs @@ -35,6 +35,26 @@ impl UsageSyntheticsBrowserHour { public_id: None, } } + + pub fn with_browser_check_calls_count(&mut self, value: Option) -> &mut Self { + self.browser_check_calls_count = Some(value); + self + } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageSyntheticsBrowserHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_synthetics_browser_response.rs b/src/datadogV1/model/model_usage_synthetics_browser_response.rs index 5da7567f7..7fe082b78 100644 --- a/src/datadogV1/model/model_usage_synthetics_browser_response.rs +++ b/src/datadogV1/model/model_usage_synthetics_browser_response.rs @@ -17,6 +17,14 @@ impl UsageSyntheticsBrowserResponse { pub fn new() -> UsageSyntheticsBrowserResponse { UsageSyntheticsBrowserResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageSyntheticsBrowserResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_synthetics_hour.rs b/src/datadogV1/model/model_usage_synthetics_hour.rs index e5f44f96b..a4a9235ba 100644 --- a/src/datadogV1/model/model_usage_synthetics_hour.rs +++ b/src/datadogV1/model/model_usage_synthetics_hour.rs @@ -31,6 +31,26 @@ impl UsageSyntheticsHour { public_id: None, } } + + pub fn with_check_calls_count(&mut self, value: i64) -> &mut Self { + self.check_calls_count = Some(value); + self + } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageSyntheticsHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_synthetics_response.rs b/src/datadogV1/model/model_usage_synthetics_response.rs index d76855dbd..e02b4edf0 100644 --- a/src/datadogV1/model/model_usage_synthetics_response.rs +++ b/src/datadogV1/model/model_usage_synthetics_response.rs @@ -17,6 +17,14 @@ impl UsageSyntheticsResponse { pub fn new() -> UsageSyntheticsResponse { UsageSyntheticsResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageSyntheticsResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_timeseries_hour.rs b/src/datadogV1/model/model_usage_timeseries_hour.rs index 796149133..4db35ab7c 100644 --- a/src/datadogV1/model/model_usage_timeseries_hour.rs +++ b/src/datadogV1/model/model_usage_timeseries_hour.rs @@ -39,6 +39,36 @@ impl UsageTimeseriesHour { public_id: None, } } + + pub fn with_hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn with_num_custom_input_timeseries(&mut self, value: i64) -> &mut Self { + self.num_custom_input_timeseries = Some(value); + self + } + + pub fn with_num_custom_output_timeseries(&mut self, value: i64) -> &mut Self { + self.num_custom_output_timeseries = Some(value); + self + } + + pub fn with_num_custom_timeseries(&mut self, value: i64) -> &mut Self { + self.num_custom_timeseries = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } } impl Default for UsageTimeseriesHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_timeseries_response.rs b/src/datadogV1/model/model_usage_timeseries_response.rs index 7affaf206..1bd6c89f8 100644 --- a/src/datadogV1/model/model_usage_timeseries_response.rs +++ b/src/datadogV1/model/model_usage_timeseries_response.rs @@ -17,6 +17,14 @@ impl UsageTimeseriesResponse { pub fn new() -> UsageTimeseriesResponse { UsageTimeseriesResponse { usage: None } } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageTimeseriesResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_top_avg_metrics_hour.rs b/src/datadogV1/model/model_usage_top_avg_metrics_hour.rs index c1b923f86..1df7205c7 100644 --- a/src/datadogV1/model/model_usage_top_avg_metrics_hour.rs +++ b/src/datadogV1/model/model_usage_top_avg_metrics_hour.rs @@ -31,6 +31,29 @@ impl UsageTopAvgMetricsHour { metric_name: None, } } + + pub fn with_avg_metric_hour(&mut self, value: i64) -> &mut Self { + self.avg_metric_hour = Some(value); + self + } + + pub fn with_max_metric_hour(&mut self, value: i64) -> &mut Self { + self.max_metric_hour = Some(value); + self + } + + pub fn with_metric_category( + &mut self, + value: crate::datadogV1::model::UsageMetricCategory, + ) -> &mut Self { + self.metric_category = Some(value); + self + } + + pub fn with_metric_name(&mut self, value: String) -> &mut Self { + self.metric_name = Some(value); + self + } } impl Default for UsageTopAvgMetricsHour { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_top_avg_metrics_metadata.rs b/src/datadogV1/model/model_usage_top_avg_metrics_metadata.rs index 35122e08e..a43597701 100644 --- a/src/datadogV1/model/model_usage_top_avg_metrics_metadata.rs +++ b/src/datadogV1/model/model_usage_top_avg_metrics_metadata.rs @@ -16,7 +16,7 @@ pub struct UsageTopAvgMetricsMetadata { pub month: Option, /// The metadata for the current pagination. #[serde(rename = "pagination")] - pub pagination: Option>, + pub pagination: Option, } impl UsageTopAvgMetricsMetadata { @@ -27,6 +27,24 @@ impl UsageTopAvgMetricsMetadata { pagination: None, } } + + pub fn with_day(&mut self, value: String) -> &mut Self { + self.day = Some(value); + self + } + + pub fn with_month(&mut self, value: String) -> &mut Self { + self.month = Some(value); + self + } + + pub fn with_pagination( + &mut self, + value: crate::datadogV1::model::UsageTopAvgMetricsPagination, + ) -> &mut Self { + self.pagination = Some(value); + self + } } impl Default for UsageTopAvgMetricsMetadata { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_top_avg_metrics_pagination.rs b/src/datadogV1/model/model_usage_top_avg_metrics_pagination.rs index 8741d78b3..ba116d792 100644 --- a/src/datadogV1/model/model_usage_top_avg_metrics_pagination.rs +++ b/src/datadogV1/model/model_usage_top_avg_metrics_pagination.rs @@ -35,6 +35,21 @@ impl UsageTopAvgMetricsPagination { total_number_of_records: None, } } + + pub fn with_limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_next_record_id(&mut self, value: Option) -> &mut Self { + self.next_record_id = Some(value); + self + } + + pub fn with_total_number_of_records(&mut self, value: Option) -> &mut Self { + self.total_number_of_records = Some(value); + self + } } impl Default for UsageTopAvgMetricsPagination { fn default() -> Self { diff --git a/src/datadogV1/model/model_usage_top_avg_metrics_response.rs b/src/datadogV1/model/model_usage_top_avg_metrics_response.rs index ad8e08193..bdff412ea 100644 --- a/src/datadogV1/model/model_usage_top_avg_metrics_response.rs +++ b/src/datadogV1/model/model_usage_top_avg_metrics_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct UsageTopAvgMetricsResponse { /// The object containing document metadata. #[serde(rename = "metadata")] - pub metadata: Option>, + pub metadata: Option, /// Number of hourly recorded custom metrics for a given organization. #[serde(rename = "usage")] pub usage: Option>, @@ -23,6 +23,22 @@ impl UsageTopAvgMetricsResponse { usage: None, } } + + pub fn with_metadata( + &mut self, + value: crate::datadogV1::model::UsageTopAvgMetricsMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn with_usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } } impl Default for UsageTopAvgMetricsResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_user.rs b/src/datadogV1/model/model_user.rs index cb5192b66..372c4d96f 100644 --- a/src/datadogV1/model/model_user.rs +++ b/src/datadogV1/model/model_user.rs @@ -47,6 +47,44 @@ impl User { verified: None, } } + + pub fn with_access_role( + &mut self, + value: Option, + ) -> &mut Self { + self.access_role = Some(value); + self + } + + pub fn with_disabled(&mut self, value: bool) -> &mut Self { + self.disabled = Some(value); + self + } + + pub fn with_email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn with_handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + self + } + + pub fn with_icon(&mut self, value: String) -> &mut Self { + self.icon = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_verified(&mut self, value: bool) -> &mut Self { + self.verified = Some(value); + self + } } impl Default for User { fn default() -> Self { diff --git a/src/datadogV1/model/model_user_disable_response.rs b/src/datadogV1/model/model_user_disable_response.rs index c7062dc9f..06ff2237a 100644 --- a/src/datadogV1/model/model_user_disable_response.rs +++ b/src/datadogV1/model/model_user_disable_response.rs @@ -17,6 +17,11 @@ impl UserDisableResponse { pub fn new() -> UserDisableResponse { UserDisableResponse { message: None } } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } } impl Default for UserDisableResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_user_list_response.rs b/src/datadogV1/model/model_user_list_response.rs index 7f6726f8d..e292b65ee 100644 --- a/src/datadogV1/model/model_user_list_response.rs +++ b/src/datadogV1/model/model_user_list_response.rs @@ -17,6 +17,11 @@ impl UserListResponse { pub fn new() -> UserListResponse { UserListResponse { users: None } } + + pub fn with_users(&mut self, value: Vec) -> &mut Self { + self.users = Some(value); + self + } } impl Default for UserListResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_user_response.rs b/src/datadogV1/model/model_user_response.rs index e3fa2a536..a9eaeca46 100644 --- a/src/datadogV1/model/model_user_response.rs +++ b/src/datadogV1/model/model_user_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct UserResponse { /// Create, edit, and disable users. #[serde(rename = "user")] - pub user: Option>, + pub user: Option, } impl UserResponse { pub fn new() -> UserResponse { UserResponse { user: None } } + + pub fn with_user(&mut self, value: crate::datadogV1::model::User) -> &mut Self { + self.user = Some(value); + self + } } impl Default for UserResponse { fn default() -> Self { diff --git a/src/datadogV1/model/model_webhooks_integration.rs b/src/datadogV1/model/model_webhooks_integration.rs index d780c57e1..87fe0430b 100644 --- a/src/datadogV1/model/model_webhooks_integration.rs +++ b/src/datadogV1/model/model_webhooks_integration.rs @@ -49,4 +49,22 @@ impl WebhooksIntegration { url, } } + + pub fn with_custom_headers(&mut self, value: Option) -> &mut Self { + self.custom_headers = Some(value); + self + } + + pub fn with_encode_as( + &mut self, + value: crate::datadogV1::model::WebhooksIntegrationEncoding, + ) -> &mut Self { + self.encode_as = Some(value); + self + } + + pub fn with_payload(&mut self, value: Option) -> &mut Self { + self.payload = Some(value); + self + } } diff --git a/src/datadogV1/model/model_webhooks_integration_custom_variable_response.rs b/src/datadogV1/model/model_webhooks_integration_custom_variable_response.rs index b1d5c4cd3..0d0385128 100644 --- a/src/datadogV1/model/model_webhooks_integration_custom_variable_response.rs +++ b/src/datadogV1/model/model_webhooks_integration_custom_variable_response.rs @@ -28,4 +28,9 @@ impl WebhooksIntegrationCustomVariableResponse { value: None, } } + + pub fn with_value(&mut self, value: String) -> &mut Self { + self.value = Some(value); + self + } } diff --git a/src/datadogV1/model/model_webhooks_integration_custom_variable_update_request.rs b/src/datadogV1/model/model_webhooks_integration_custom_variable_update_request.rs index 885b8af6e..7162a5368 100644 --- a/src/datadogV1/model/model_webhooks_integration_custom_variable_update_request.rs +++ b/src/datadogV1/model/model_webhooks_integration_custom_variable_update_request.rs @@ -30,6 +30,21 @@ impl WebhooksIntegrationCustomVariableUpdateRequest { value: None, } } + + pub fn with_is_secret(&mut self, value: bool) -> &mut Self { + self.is_secret = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_value(&mut self, value: String) -> &mut Self { + self.value = Some(value); + self + } } impl Default for WebhooksIntegrationCustomVariableUpdateRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_webhooks_integration_update_request.rs b/src/datadogV1/model/model_webhooks_integration_update_request.rs index 149f43c6e..7030d931d 100644 --- a/src/datadogV1/model/model_webhooks_integration_update_request.rs +++ b/src/datadogV1/model/model_webhooks_integration_update_request.rs @@ -47,6 +47,34 @@ impl WebhooksIntegrationUpdateRequest { url: None, } } + + pub fn with_custom_headers(&mut self, value: String) -> &mut Self { + self.custom_headers = Some(value); + self + } + + pub fn with_encode_as( + &mut self, + value: crate::datadogV1::model::WebhooksIntegrationEncoding, + ) -> &mut Self { + self.encode_as = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_payload(&mut self, value: Option) -> &mut Self { + self.payload = Some(value); + self + } + + pub fn with_url(&mut self, value: String) -> &mut Self { + self.url = Some(value); + self + } } impl Default for WebhooksIntegrationUpdateRequest { fn default() -> Self { diff --git a/src/datadogV1/model/model_widget.rs b/src/datadogV1/model/model_widget.rs index 038bbd054..2b52b1522 100644 --- a/src/datadogV1/model/model_widget.rs +++ b/src/datadogV1/model/model_widget.rs @@ -15,21 +15,31 @@ use serde_with::skip_serializing_none; pub struct Widget { /// [Definition of the widget](). #[serde(rename = "definition")] - pub definition: Box, + pub definition: crate::datadogV1::model::WidgetDefinition, /// ID of the widget. #[serde(rename = "id")] pub id: Option, /// The layout for a widget on a `free` or **new dashboard layout** dashboard. #[serde(rename = "layout")] - pub layout: Option>, + pub layout: Option, } impl Widget { - pub fn new(definition: Box) -> Widget { + pub fn new(definition: crate::datadogV1::model::WidgetDefinition) -> Widget { Widget { definition, id: None, layout: None, } } + + pub fn with_id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_layout(&mut self, value: crate::datadogV1::model::WidgetLayout) -> &mut Self { + self.layout = Some(value); + self + } } diff --git a/src/datadogV1/model/model_widget_axis.rs b/src/datadogV1/model/model_widget_axis.rs index e2bfb4f83..9f1cf952c 100644 --- a/src/datadogV1/model/model_widget_axis.rs +++ b/src/datadogV1/model/model_widget_axis.rs @@ -35,6 +35,31 @@ impl WidgetAxis { scale: None, } } + + pub fn with_include_zero(&mut self, value: bool) -> &mut Self { + self.include_zero = Some(value); + self + } + + pub fn with_label(&mut self, value: String) -> &mut Self { + self.label = Some(value); + self + } + + pub fn with_max(&mut self, value: String) -> &mut Self { + self.max = Some(value); + self + } + + pub fn with_min(&mut self, value: String) -> &mut Self { + self.min = Some(value); + self + } + + pub fn with_scale(&mut self, value: String) -> &mut Self { + self.scale = Some(value); + self + } } impl Default for WidgetAxis { fn default() -> Self { diff --git a/src/datadogV1/model/model_widget_conditional_format.rs b/src/datadogV1/model/model_widget_conditional_format.rs index c4c705e8a..dc89e4c52 100644 --- a/src/datadogV1/model/model_widget_conditional_format.rs +++ b/src/datadogV1/model/model_widget_conditional_format.rs @@ -55,4 +55,34 @@ impl WidgetConditionalFormat { value, } } + + pub fn with_custom_bg_color(&mut self, value: String) -> &mut Self { + self.custom_bg_color = Some(value); + self + } + + pub fn with_custom_fg_color(&mut self, value: String) -> &mut Self { + self.custom_fg_color = Some(value); + self + } + + pub fn with_hide_value(&mut self, value: bool) -> &mut Self { + self.hide_value = Some(value); + self + } + + pub fn with_image_url(&mut self, value: String) -> &mut Self { + self.image_url = Some(value); + self + } + + pub fn with_metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn with_timeframe(&mut self, value: String) -> &mut Self { + self.timeframe = Some(value); + self + } } diff --git a/src/datadogV1/model/model_widget_custom_link.rs b/src/datadogV1/model/model_widget_custom_link.rs index 7011dfedd..6099705ed 100644 --- a/src/datadogV1/model/model_widget_custom_link.rs +++ b/src/datadogV1/model/model_widget_custom_link.rs @@ -31,6 +31,26 @@ impl WidgetCustomLink { override_label: None, } } + + pub fn with_is_hidden(&mut self, value: bool) -> &mut Self { + self.is_hidden = Some(value); + self + } + + pub fn with_label(&mut self, value: String) -> &mut Self { + self.label = Some(value); + self + } + + pub fn with_link(&mut self, value: String) -> &mut Self { + self.link = Some(value); + self + } + + pub fn with_override_label(&mut self, value: String) -> &mut Self { + self.override_label = Some(value); + self + } } impl Default for WidgetCustomLink { fn default() -> Self { diff --git a/src/datadogV1/model/model_widget_definition.rs b/src/datadogV1/model/model_widget_definition.rs index 4b0a7e77f..bf211fb8c 100644 --- a/src/datadogV1/model/model_widget_definition.rs +++ b/src/datadogV1/model/model_widget_definition.rs @@ -7,38 +7,38 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum WidgetDefinition { - AlertGraphWidgetDefinition(Box), - AlertValueWidgetDefinition(Box), - ChangeWidgetDefinition(Box), - CheckStatusWidgetDefinition(Box), - DistributionWidgetDefinition(Box), - EventStreamWidgetDefinition(Box), - EventTimelineWidgetDefinition(Box), - FreeTextWidgetDefinition(Box), - FunnelWidgetDefinition(Box), - GeomapWidgetDefinition(Box), - GroupWidgetDefinition(Box), - HeatMapWidgetDefinition(Box), - HostMapWidgetDefinition(Box), - IFrameWidgetDefinition(Box), - ImageWidgetDefinition(Box), - ListStreamWidgetDefinition(Box), - LogStreamWidgetDefinition(Box), - MonitorSummaryWidgetDefinition(Box), - NoteWidgetDefinition(Box), - PowerpackWidgetDefinition(Box), - QueryValueWidgetDefinition(Box), - RunWorkflowWidgetDefinition(Box), - SLOListWidgetDefinition(Box), - SLOWidgetDefinition(Box), - ScatterPlotWidgetDefinition(Box), - ServiceMapWidgetDefinition(Box), - ServiceSummaryWidgetDefinition(Box), - SplitGraphWidgetDefinition(Box), - SunburstWidgetDefinition(Box), - TableWidgetDefinition(Box), - TimeseriesWidgetDefinition(Box), - ToplistWidgetDefinition(Box), - TopologyMapWidgetDefinition(Box), - TreeMapWidgetDefinition(Box), + AlertGraphWidgetDefinition(crate::datadogV1::model::AlertGraphWidgetDefinition), + AlertValueWidgetDefinition(crate::datadogV1::model::AlertValueWidgetDefinition), + ChangeWidgetDefinition(crate::datadogV1::model::ChangeWidgetDefinition), + CheckStatusWidgetDefinition(crate::datadogV1::model::CheckStatusWidgetDefinition), + DistributionWidgetDefinition(crate::datadogV1::model::DistributionWidgetDefinition), + EventStreamWidgetDefinition(crate::datadogV1::model::EventStreamWidgetDefinition), + EventTimelineWidgetDefinition(crate::datadogV1::model::EventTimelineWidgetDefinition), + FreeTextWidgetDefinition(crate::datadogV1::model::FreeTextWidgetDefinition), + FunnelWidgetDefinition(crate::datadogV1::model::FunnelWidgetDefinition), + GeomapWidgetDefinition(crate::datadogV1::model::GeomapWidgetDefinition), + GroupWidgetDefinition(crate::datadogV1::model::GroupWidgetDefinition), + HeatMapWidgetDefinition(crate::datadogV1::model::HeatMapWidgetDefinition), + HostMapWidgetDefinition(crate::datadogV1::model::HostMapWidgetDefinition), + IFrameWidgetDefinition(crate::datadogV1::model::IFrameWidgetDefinition), + ImageWidgetDefinition(crate::datadogV1::model::ImageWidgetDefinition), + ListStreamWidgetDefinition(crate::datadogV1::model::ListStreamWidgetDefinition), + LogStreamWidgetDefinition(crate::datadogV1::model::LogStreamWidgetDefinition), + MonitorSummaryWidgetDefinition(crate::datadogV1::model::MonitorSummaryWidgetDefinition), + NoteWidgetDefinition(crate::datadogV1::model::NoteWidgetDefinition), + PowerpackWidgetDefinition(crate::datadogV1::model::PowerpackWidgetDefinition), + QueryValueWidgetDefinition(crate::datadogV1::model::QueryValueWidgetDefinition), + RunWorkflowWidgetDefinition(crate::datadogV1::model::RunWorkflowWidgetDefinition), + SLOListWidgetDefinition(crate::datadogV1::model::SLOListWidgetDefinition), + SLOWidgetDefinition(crate::datadogV1::model::SLOWidgetDefinition), + ScatterPlotWidgetDefinition(crate::datadogV1::model::ScatterPlotWidgetDefinition), + ServiceMapWidgetDefinition(crate::datadogV1::model::ServiceMapWidgetDefinition), + ServiceSummaryWidgetDefinition(crate::datadogV1::model::ServiceSummaryWidgetDefinition), + SplitGraphWidgetDefinition(crate::datadogV1::model::SplitGraphWidgetDefinition), + SunburstWidgetDefinition(crate::datadogV1::model::SunburstWidgetDefinition), + TableWidgetDefinition(crate::datadogV1::model::TableWidgetDefinition), + TimeseriesWidgetDefinition(crate::datadogV1::model::TimeseriesWidgetDefinition), + ToplistWidgetDefinition(crate::datadogV1::model::ToplistWidgetDefinition), + TopologyMapWidgetDefinition(crate::datadogV1::model::TopologyMapWidgetDefinition), + TreeMapWidgetDefinition(crate::datadogV1::model::TreeMapWidgetDefinition), } diff --git a/src/datadogV1/model/model_widget_event.rs b/src/datadogV1/model/model_widget_event.rs index 8d171f71d..ae987a259 100644 --- a/src/datadogV1/model/model_widget_event.rs +++ b/src/datadogV1/model/model_widget_event.rs @@ -26,4 +26,9 @@ impl WidgetEvent { tags_execution: None, } } + + pub fn with_tags_execution(&mut self, value: String) -> &mut Self { + self.tags_execution = Some(value); + self + } } diff --git a/src/datadogV1/model/model_widget_formula.rs b/src/datadogV1/model/model_widget_formula.rs index e5b6edb24..0cb776e35 100644 --- a/src/datadogV1/model/model_widget_formula.rs +++ b/src/datadogV1/model/model_widget_formula.rs @@ -22,10 +22,10 @@ pub struct WidgetFormula { pub formula: String, /// Options for limiting results returned. #[serde(rename = "limit")] - pub limit: Option>, + pub limit: Option, /// Styling options for widget formulas. #[serde(rename = "style")] - pub style: Option>, + pub style: Option, } impl WidgetFormula { @@ -39,4 +39,35 @@ impl WidgetFormula { style: None, } } + + pub fn with_alias(&mut self, value: String) -> &mut Self { + self.alias = Some(value); + self + } + + pub fn with_cell_display_mode( + &mut self, + value: crate::datadogV1::model::TableWidgetCellDisplayMode, + ) -> &mut Self { + self.cell_display_mode = Some(value); + self + } + + pub fn with_conditional_formats( + &mut self, + value: Vec, + ) -> &mut Self { + self.conditional_formats = Some(value); + self + } + + pub fn with_limit(&mut self, value: crate::datadogV1::model::WidgetFormulaLimit) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_style(&mut self, value: crate::datadogV1::model::WidgetFormulaStyle) -> &mut Self { + self.style = Some(value); + self + } } diff --git a/src/datadogV1/model/model_widget_formula_limit.rs b/src/datadogV1/model/model_widget_formula_limit.rs index a007fd7f0..b90752971 100644 --- a/src/datadogV1/model/model_widget_formula_limit.rs +++ b/src/datadogV1/model/model_widget_formula_limit.rs @@ -23,6 +23,16 @@ impl WidgetFormulaLimit { order: None, } } + + pub fn with_count(&mut self, value: i64) -> &mut Self { + self.count = Some(value); + self + } + + pub fn with_order(&mut self, value: crate::datadogV1::model::QuerySortOrder) -> &mut Self { + self.order = Some(value); + self + } } impl Default for WidgetFormulaLimit { fn default() -> Self { diff --git a/src/datadogV1/model/model_widget_formula_style.rs b/src/datadogV1/model/model_widget_formula_style.rs index 7b7adfdb0..da2c947cc 100644 --- a/src/datadogV1/model/model_widget_formula_style.rs +++ b/src/datadogV1/model/model_widget_formula_style.rs @@ -23,6 +23,16 @@ impl WidgetFormulaStyle { palette_index: None, } } + + pub fn with_palette(&mut self, value: String) -> &mut Self { + self.palette = Some(value); + self + } + + pub fn with_palette_index(&mut self, value: i64) -> &mut Self { + self.palette_index = Some(value); + self + } } impl Default for WidgetFormulaStyle { fn default() -> Self { diff --git a/src/datadogV1/model/model_widget_layout.rs b/src/datadogV1/model/model_widget_layout.rs index e6b677c3c..74b5d1655 100644 --- a/src/datadogV1/model/model_widget_layout.rs +++ b/src/datadogV1/model/model_widget_layout.rs @@ -36,4 +36,9 @@ impl WidgetLayout { y, } } + + pub fn with_is_column_break(&mut self, value: bool) -> &mut Self { + self.is_column_break = Some(value); + self + } } diff --git a/src/datadogV1/model/model_widget_marker.rs b/src/datadogV1/model/model_widget_marker.rs index 25ba10ad4..01a4114bf 100644 --- a/src/datadogV1/model/model_widget_marker.rs +++ b/src/datadogV1/model/model_widget_marker.rs @@ -35,4 +35,19 @@ impl WidgetMarker { value, } } + + pub fn with_display_type(&mut self, value: String) -> &mut Self { + self.display_type = Some(value); + self + } + + pub fn with_label(&mut self, value: String) -> &mut Self { + self.label = Some(value); + self + } + + pub fn with_time(&mut self, value: String) -> &mut Self { + self.time = Some(value); + self + } } diff --git a/src/datadogV1/model/model_widget_request_style.rs b/src/datadogV1/model/model_widget_request_style.rs index 499d57190..54e0be234 100644 --- a/src/datadogV1/model/model_widget_request_style.rs +++ b/src/datadogV1/model/model_widget_request_style.rs @@ -27,6 +27,24 @@ impl WidgetRequestStyle { palette: None, } } + + pub fn with_line_type(&mut self, value: crate::datadogV1::model::WidgetLineType) -> &mut Self { + self.line_type = Some(value); + self + } + + pub fn with_line_width( + &mut self, + value: crate::datadogV1::model::WidgetLineWidth, + ) -> &mut Self { + self.line_width = Some(value); + self + } + + pub fn with_palette(&mut self, value: String) -> &mut Self { + self.palette = Some(value); + self + } } impl Default for WidgetRequestStyle { fn default() -> Self { diff --git a/src/datadogV1/model/model_widget_style.rs b/src/datadogV1/model/model_widget_style.rs index 39c3a30b4..221834e31 100644 --- a/src/datadogV1/model/model_widget_style.rs +++ b/src/datadogV1/model/model_widget_style.rs @@ -17,6 +17,11 @@ impl WidgetStyle { pub fn new() -> WidgetStyle { WidgetStyle { palette: None } } + + pub fn with_palette(&mut self, value: String) -> &mut Self { + self.palette = Some(value); + self + } } impl Default for WidgetStyle { fn default() -> Self { diff --git a/src/datadogV1/model/model_widget_time.rs b/src/datadogV1/model/model_widget_time.rs index 726ee65f7..c4a9592c9 100644 --- a/src/datadogV1/model/model_widget_time.rs +++ b/src/datadogV1/model/model_widget_time.rs @@ -17,6 +17,11 @@ impl WidgetTime { pub fn new() -> WidgetTime { WidgetTime { live_span: None } } + + pub fn with_live_span(&mut self, value: crate::datadogV1::model::WidgetLiveSpan) -> &mut Self { + self.live_span = Some(value); + self + } } impl Default for WidgetTime { fn default() -> Self { diff --git a/src/datadogV2/api/api_apm_retention_filters.rs b/src/datadogV2/api/api_apm_retention_filters.rs index 8f9c41ced..5cec2d781 100644 --- a/src/datadogV2/api/api_apm_retention_filters.rs +++ b/src/datadogV2/api/api_apm_retention_filters.rs @@ -5,43 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateApmRetentionFilterParams is a struct for passing parameters to the method [`APMRetentionFiltersAPI::create_apm_retention_filter`] -#[derive(Clone, Debug)] -pub struct CreateApmRetentionFilterParams { - /// The definition of the new retention filter. - pub body: crate::datadogV2::model::RetentionFilterCreateRequest, -} - -/// DeleteApmRetentionFilterParams is a struct for passing parameters to the method [`APMRetentionFiltersAPI::delete_apm_retention_filter`] -#[derive(Clone, Debug)] -pub struct DeleteApmRetentionFilterParams { - /// The ID of the retention filter. - pub filter_id: String, -} - -/// GetApmRetentionFilterParams is a struct for passing parameters to the method [`APMRetentionFiltersAPI::get_apm_retention_filter`] -#[derive(Clone, Debug)] -pub struct GetApmRetentionFilterParams { - /// The ID of the retention filter. - pub filter_id: String, -} - -/// ReorderApmRetentionFiltersParams is a struct for passing parameters to the method [`APMRetentionFiltersAPI::reorder_apm_retention_filters`] -#[derive(Clone, Debug)] -pub struct ReorderApmRetentionFiltersParams { - /// The list of retention filters in the new order. - pub body: crate::datadogV2::model::ReorderRetentionFiltersRequest, -} - -/// UpdateApmRetentionFilterParams is a struct for passing parameters to the method [`APMRetentionFiltersAPI::update_apm_retention_filter`] -#[derive(Clone, Debug)] -pub struct UpdateApmRetentionFilterParams { - /// The ID of the retention filter. - pub filter_id: String, - /// The updated definition of the retention filter. - pub body: crate::datadogV2::model::RetentionFilterUpdateRequest, -} - /// CreateApmRetentionFilterError is a struct for typed errors of method [`APMRetentionFiltersAPI::create_apm_retention_filter`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -128,15 +91,12 @@ impl APMRetentionFiltersAPI { /// Returns the retention filter definition when the request is successful. pub async fn create_apm_retention_filter( &self, - params: CreateApmRetentionFilterParams, + body: crate::datadogV2::model::RetentionFilterCreateRequest, ) -> Result< Option, Error, > { - match self - .create_apm_retention_filter_with_http_info(params) - .await - { + match self.create_apm_retention_filter_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -146,16 +106,13 @@ impl APMRetentionFiltersAPI { /// Returns the retention filter definition when the request is successful. pub async fn create_apm_retention_filter_with_http_info( &self, - params: CreateApmRetentionFilterParams, + body: crate::datadogV2::model::RetentionFilterCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -215,10 +172,10 @@ impl APMRetentionFiltersAPI { /// Delete a specific retention filter from your organization. pub async fn delete_apm_retention_filter( &self, - params: DeleteApmRetentionFilterParams, + filter_id: String, ) -> Result, Error> { match self - .delete_apm_retention_filter_with_http_info(params) + .delete_apm_retention_filter_with_http_info(filter_id) .await { Ok(response_content) => Ok(response_content.entity), @@ -229,13 +186,10 @@ impl APMRetentionFiltersAPI { /// Delete a specific retention filter from your organization. pub async fn delete_apm_retention_filter_with_http_info( &self, - params: DeleteApmRetentionFilterParams, + filter_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let filter_id = params.filter_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -287,12 +241,15 @@ impl APMRetentionFiltersAPI { /// Get an APM retention filter. pub async fn get_apm_retention_filter( &self, - params: GetApmRetentionFilterParams, + filter_id: String, ) -> Result< Option, Error, > { - match self.get_apm_retention_filter_with_http_info(params).await { + match self + .get_apm_retention_filter_with_http_info(filter_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -301,16 +258,13 @@ impl APMRetentionFiltersAPI { /// Get an APM retention filter. pub async fn get_apm_retention_filter_with_http_info( &self, - params: GetApmRetentionFilterParams, + filter_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let filter_id = params.filter_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -383,8 +337,6 @@ impl APMRetentionFiltersAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -437,10 +389,10 @@ impl APMRetentionFiltersAPI { /// Re-order the execution order of retention filters. pub async fn reorder_apm_retention_filters( &self, - params: ReorderApmRetentionFiltersParams, + body: crate::datadogV2::model::ReorderRetentionFiltersRequest, ) -> Result, Error> { match self - .reorder_apm_retention_filters_with_http_info(params) + .reorder_apm_retention_filters_with_http_info(body) .await { Ok(response_content) => Ok(response_content.entity), @@ -451,13 +403,10 @@ impl APMRetentionFiltersAPI { /// Re-order the execution order of retention filters. pub async fn reorder_apm_retention_filters_with_http_info( &self, - params: ReorderApmRetentionFiltersParams, + body: crate::datadogV2::model::ReorderRetentionFiltersRequest, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -515,13 +464,14 @@ impl APMRetentionFiltersAPI { /// Update a retention filter from your organization. pub async fn update_apm_retention_filter( &self, - params: UpdateApmRetentionFilterParams, + filter_id: String, + body: crate::datadogV2::model::RetentionFilterUpdateRequest, ) -> Result< Option, Error, > { match self - .update_apm_retention_filter_with_http_info(params) + .update_apm_retention_filter_with_http_info(filter_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -532,17 +482,14 @@ impl APMRetentionFiltersAPI { /// Update a retention filter from your organization. pub async fn update_apm_retention_filter_with_http_info( &self, - params: UpdateApmRetentionFilterParams, + filter_id: String, + body: crate::datadogV2::model::RetentionFilterUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let filter_id = params.filter_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_audit.rs b/src/datadogV2/api/api_audit.rs index 0ca6e3a5a..173c280c7 100644 --- a/src/datadogV2/api/api_audit.rs +++ b/src/datadogV2/api/api_audit.rs @@ -5,9 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// ListAuditLogsParams is a struct for passing parameters to the method [`AuditAPI::list_audit_logs`] +/// ListAuditLogsOptionalParams is a struct for passing parameters to the method [`AuditAPI::list_audit_logs`] #[derive(Clone, Debug)] -pub struct ListAuditLogsParams { +pub struct ListAuditLogsOptionalParams { /// Search query following Audit Logs syntax. pub filter_query: Option, /// Minimum timestamp for requested events. @@ -22,10 +22,10 @@ pub struct ListAuditLogsParams { pub page_limit: Option, } -/// SearchAuditLogsParams is a struct for passing parameters to the method [`AuditAPI::search_audit_logs`] +/// SearchAuditLogsOptionalParams is a struct for passing parameters to the method [`AuditAPI::search_audit_logs`] #[derive(Clone, Debug)] -pub struct SearchAuditLogsParams { - pub body: Option>, +pub struct SearchAuditLogsOptionalParams { + pub body: Option, } /// ListAuditLogsError is a struct for typed errors of method [`AuditAPI::list_audit_logs`] @@ -77,7 +77,7 @@ impl AuditAPI { /// [1]: pub async fn list_audit_logs( &self, - params: ListAuditLogsParams, + params: ListAuditLogsOptionalParams, ) -> Result, Error> { match self.list_audit_logs_with_http_info(params).await { @@ -94,14 +94,14 @@ impl AuditAPI { /// [1]: pub async fn list_audit_logs_with_http_info( &self, - params: ListAuditLogsParams, + params: ListAuditLogsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let filter_query = params.filter_query; let filter_from = params.filter_from; let filter_to = params.filter_to; @@ -115,26 +115,29 @@ impl AuditAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = filter_query { + if let Some(ref local_query_param) = filter_query { local_req_builder = - local_req_builder.query(&[("filter[query]", &local_str.to_string())]); + local_req_builder.query(&[("filter[query]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_from { + if let Some(ref local_query_param) = filter_from { local_req_builder = - local_req_builder.query(&[("filter[from]", &local_str.to_string())]); + local_req_builder.query(&[("filter[from]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_to { - local_req_builder = local_req_builder.query(&[("filter[to]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_to { + local_req_builder = + local_req_builder.query(&[("filter[to]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_cursor { + if let Some(ref local_query_param) = page_cursor { local_req_builder = - local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + local_req_builder.query(&[("page[cursor]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_limit { - local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_limit { + local_req_builder = + local_req_builder.query(&[("page[limit]", &local_query_param.to_string())]); }; // build user agent @@ -185,7 +188,7 @@ impl AuditAPI { /// [1]: pub async fn search_audit_logs( &self, - params: SearchAuditLogsParams, + params: SearchAuditLogsOptionalParams, ) -> Result, Error> { match self.search_audit_logs_with_http_info(params).await { @@ -202,14 +205,14 @@ impl AuditAPI { /// [1]: pub async fn search_audit_logs_with_http_info( &self, - params: SearchAuditLogsParams, + params: SearchAuditLogsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let body = params.body; let local_client = &local_configuration.client; diff --git a/src/datadogV2/api/api_auth_n_mappings.rs b/src/datadogV2/api/api_auth_n_mappings.rs index 2667f7d3c..f40c953b7 100644 --- a/src/datadogV2/api/api_auth_n_mappings.rs +++ b/src/datadogV2/api/api_auth_n_mappings.rs @@ -5,29 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateAuthNMappingParams is a struct for passing parameters to the method [`AuthNMappingsAPI::create_auth_n_mapping`] +/// ListAuthNMappingsOptionalParams is a struct for passing parameters to the method [`AuthNMappingsAPI::list_auth_n_mappings`] #[derive(Clone, Debug)] -pub struct CreateAuthNMappingParams { - pub body: crate::datadogV2::model::AuthNMappingCreateRequest, -} - -/// DeleteAuthNMappingParams is a struct for passing parameters to the method [`AuthNMappingsAPI::delete_auth_n_mapping`] -#[derive(Clone, Debug)] -pub struct DeleteAuthNMappingParams { - /// The UUID of the AuthN Mapping. - pub authn_mapping_id: String, -} - -/// GetAuthNMappingParams is a struct for passing parameters to the method [`AuthNMappingsAPI::get_auth_n_mapping`] -#[derive(Clone, Debug)] -pub struct GetAuthNMappingParams { - /// The UUID of the AuthN Mapping. - pub authn_mapping_id: String, -} - -/// ListAuthNMappingsParams is a struct for passing parameters to the method [`AuthNMappingsAPI::list_auth_n_mappings`] -#[derive(Clone, Debug)] -pub struct ListAuthNMappingsParams { +pub struct ListAuthNMappingsOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, /// Specific page number to return. @@ -38,14 +18,6 @@ pub struct ListAuthNMappingsParams { pub filter: Option, } -/// UpdateAuthNMappingParams is a struct for passing parameters to the method [`AuthNMappingsAPI::update_auth_n_mapping`] -#[derive(Clone, Debug)] -pub struct UpdateAuthNMappingParams { - /// The UUID of the AuthN Mapping. - pub authn_mapping_id: String, - pub body: crate::datadogV2::model::AuthNMappingUpdateRequest, -} - /// CreateAuthNMappingError is a struct for typed errors of method [`AuthNMappingsAPI::create_auth_n_mapping`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -123,10 +95,10 @@ impl AuthNMappingsAPI { /// Create an AuthN Mapping. pub async fn create_auth_n_mapping( &self, - params: CreateAuthNMappingParams, + body: crate::datadogV2::model::AuthNMappingCreateRequest, ) -> Result, Error> { - match self.create_auth_n_mapping_with_http_info(params).await { + match self.create_auth_n_mapping_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -135,16 +107,13 @@ impl AuthNMappingsAPI { /// Create an AuthN Mapping. pub async fn create_auth_n_mapping_with_http_info( &self, - params: CreateAuthNMappingParams, + body: crate::datadogV2::model::AuthNMappingCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/authn_mappings", local_configuration.base_path); @@ -201,9 +170,12 @@ impl AuthNMappingsAPI { /// Delete an AuthN Mapping specified by AuthN Mapping UUID. pub async fn delete_auth_n_mapping( &self, - params: DeleteAuthNMappingParams, + authn_mapping_id: String, ) -> Result, Error> { - match self.delete_auth_n_mapping_with_http_info(params).await { + match self + .delete_auth_n_mapping_with_http_info(authn_mapping_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -212,13 +184,10 @@ impl AuthNMappingsAPI { /// Delete an AuthN Mapping specified by AuthN Mapping UUID. pub async fn delete_auth_n_mapping_with_http_info( &self, - params: DeleteAuthNMappingParams, + authn_mapping_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let authn_mapping_id = params.authn_mapping_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -270,10 +239,13 @@ impl AuthNMappingsAPI { /// Get an AuthN Mapping specified by the AuthN Mapping UUID. pub async fn get_auth_n_mapping( &self, - params: GetAuthNMappingParams, + authn_mapping_id: String, ) -> Result, Error> { - match self.get_auth_n_mapping_with_http_info(params).await { + match self + .get_auth_n_mapping_with_http_info(authn_mapping_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -282,16 +254,13 @@ impl AuthNMappingsAPI { /// Get an AuthN Mapping specified by the AuthN Mapping UUID. pub async fn get_auth_n_mapping_with_http_info( &self, - params: GetAuthNMappingParams, + authn_mapping_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let authn_mapping_id = params.authn_mapping_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -345,7 +314,7 @@ impl AuthNMappingsAPI { /// List all AuthN Mappings in the org. pub async fn list_auth_n_mappings( &self, - params: ListAuthNMappingsParams, + params: ListAuthNMappingsOptionalParams, ) -> Result, Error> { match self.list_auth_n_mappings_with_http_info(params).await { @@ -357,14 +326,14 @@ impl AuthNMappingsAPI { /// List all AuthN Mappings in the org. pub async fn list_auth_n_mappings_with_http_info( &self, - params: ListAuthNMappingsParams, + params: ListAuthNMappingsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let page_size = params.page_size; let page_number = params.page_number; let sort = params.sort; @@ -376,18 +345,21 @@ impl AuthNMappingsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_number { + if let Some(ref local_query_param) = page_number { local_req_builder = - local_req_builder.query(&[("page[number]", &local_str.to_string())]); + local_req_builder.query(&[("page[number]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter { - local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + if let Some(ref local_query_param) = filter { + local_req_builder = + local_req_builder.query(&[("filter", &local_query_param.to_string())]); }; // build user agent @@ -433,10 +405,14 @@ impl AuthNMappingsAPI { /// Edit an AuthN Mapping. pub async fn update_auth_n_mapping( &self, - params: UpdateAuthNMappingParams, + authn_mapping_id: String, + body: crate::datadogV2::model::AuthNMappingUpdateRequest, ) -> Result, Error> { - match self.update_auth_n_mapping_with_http_info(params).await { + match self + .update_auth_n_mapping_with_http_info(authn_mapping_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -445,17 +421,14 @@ impl AuthNMappingsAPI { /// Edit an AuthN Mapping. pub async fn update_auth_n_mapping_with_http_info( &self, - params: UpdateAuthNMappingParams, + authn_mapping_id: String, + body: crate::datadogV2::model::AuthNMappingUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let authn_mapping_id = params.authn_mapping_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_ci_visibility_pipelines.rs b/src/datadogV2/api/api_ci_visibility_pipelines.rs index 2304f0180..369c79001 100644 --- a/src/datadogV2/api/api_ci_visibility_pipelines.rs +++ b/src/datadogV2/api/api_ci_visibility_pipelines.rs @@ -5,21 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// AggregateCIAppPipelineEventsParams is a struct for passing parameters to the method [`CIVisibilityPipelinesAPI::aggregate_ci_app_pipeline_events`] +/// ListCIAppPipelineEventsOptionalParams is a struct for passing parameters to the method [`CIVisibilityPipelinesAPI::list_ci_app_pipeline_events`] #[derive(Clone, Debug)] -pub struct AggregateCIAppPipelineEventsParams { - pub body: crate::datadogV2::model::CIAppPipelinesAggregateRequest, -} - -/// CreateCIAppPipelineEventParams is a struct for passing parameters to the method [`CIVisibilityPipelinesAPI::create_ci_app_pipeline_event`] -#[derive(Clone, Debug)] -pub struct CreateCIAppPipelineEventParams { - pub body: crate::datadogV2::model::CIAppCreatePipelineEventRequest, -} - -/// ListCIAppPipelineEventsParams is a struct for passing parameters to the method [`CIVisibilityPipelinesAPI::list_ci_app_pipeline_events`] -#[derive(Clone, Debug)] -pub struct ListCIAppPipelineEventsParams { +pub struct ListCIAppPipelineEventsOptionalParams { /// Search query following log syntax. pub filter_query: Option, /// Minimum timestamp for requested events. @@ -34,10 +22,10 @@ pub struct ListCIAppPipelineEventsParams { pub page_limit: Option, } -/// SearchCIAppPipelineEventsParams is a struct for passing parameters to the method [`CIVisibilityPipelinesAPI::search_ci_app_pipeline_events`] +/// SearchCIAppPipelineEventsOptionalParams is a struct for passing parameters to the method [`CIVisibilityPipelinesAPI::search_ci_app_pipeline_events`] #[derive(Clone, Debug)] -pub struct SearchCIAppPipelineEventsParams { - pub body: Option>, +pub struct SearchCIAppPipelineEventsOptionalParams { + pub body: Option, } /// AggregateCIAppPipelineEventsError is a struct for typed errors of method [`CIVisibilityPipelinesAPI::aggregate_ci_app_pipeline_events`] @@ -109,13 +97,13 @@ impl CIVisibilityPipelinesAPI { /// Use this API endpoint to aggregate CI Visibility pipeline events into buckets of computed metrics and timeseries. pub async fn aggregate_ci_app_pipeline_events( &self, - params: AggregateCIAppPipelineEventsParams, + body: crate::datadogV2::model::CIAppPipelinesAggregateRequest, ) -> Result< Option, Error, > { match self - .aggregate_ci_app_pipeline_events_with_http_info(params) + .aggregate_ci_app_pipeline_events_with_http_info(body) .await { Ok(response_content) => Ok(response_content.entity), @@ -126,16 +114,13 @@ impl CIVisibilityPipelinesAPI { /// Use this API endpoint to aggregate CI Visibility pipeline events into buckets of computed metrics and timeseries. pub async fn aggregate_ci_app_pipeline_events_with_http_info( &self, - params: AggregateCIAppPipelineEventsParams, + body: crate::datadogV2::model::CIAppPipelinesAggregateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -198,15 +183,12 @@ impl CIVisibilityPipelinesAPI { /// Pipeline events can be submitted with a timestamp that is up to 18 hours in the past. pub async fn create_ci_app_pipeline_event( &self, - params: CreateCIAppPipelineEventParams, + body: crate::datadogV2::model::CIAppCreatePipelineEventRequest, ) -> Result< Option>, Error, > { - match self - .create_ci_app_pipeline_event_with_http_info(params) - .await - { + match self.create_ci_app_pipeline_event_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -217,16 +199,13 @@ impl CIVisibilityPipelinesAPI { /// Pipeline events can be submitted with a timestamp that is up to 18 hours in the past. pub async fn create_ci_app_pipeline_event_with_http_info( &self, - params: CreateCIAppPipelineEventParams, + body: crate::datadogV2::model::CIAppCreatePipelineEventRequest, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/ci/pipeline", local_configuration.base_path); @@ -283,7 +262,7 @@ impl CIVisibilityPipelinesAPI { /// Use this endpoint to see your latest pipeline events. pub async fn list_ci_app_pipeline_events( &self, - params: ListCIAppPipelineEventsParams, + params: ListCIAppPipelineEventsOptionalParams, ) -> Result< Option, Error, @@ -303,14 +282,14 @@ impl CIVisibilityPipelinesAPI { /// Use this endpoint to see your latest pipeline events. pub async fn list_ci_app_pipeline_events_with_http_info( &self, - params: ListCIAppPipelineEventsParams, + params: ListCIAppPipelineEventsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let filter_query = params.filter_query; let filter_from = params.filter_from; let filter_to = params.filter_to; @@ -327,26 +306,29 @@ impl CIVisibilityPipelinesAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = filter_query { + if let Some(ref local_query_param) = filter_query { local_req_builder = - local_req_builder.query(&[("filter[query]", &local_str.to_string())]); + local_req_builder.query(&[("filter[query]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_from { + if let Some(ref local_query_param) = filter_from { local_req_builder = - local_req_builder.query(&[("filter[from]", &local_str.to_string())]); + local_req_builder.query(&[("filter[from]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_to { - local_req_builder = local_req_builder.query(&[("filter[to]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_to { + local_req_builder = + local_req_builder.query(&[("filter[to]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_cursor { + if let Some(ref local_query_param) = page_cursor { local_req_builder = - local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + local_req_builder.query(&[("page[cursor]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_limit { - local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_limit { + local_req_builder = + local_req_builder.query(&[("page[limit]", &local_query_param.to_string())]); }; // build user agent @@ -395,7 +377,7 @@ impl CIVisibilityPipelinesAPI { /// Use this endpoint to build complex events filtering and search. pub async fn search_ci_app_pipeline_events( &self, - params: SearchCIAppPipelineEventsParams, + params: SearchCIAppPipelineEventsOptionalParams, ) -> Result< Option, Error, @@ -415,14 +397,14 @@ impl CIVisibilityPipelinesAPI { /// Use this endpoint to build complex events filtering and search. pub async fn search_ci_app_pipeline_events_with_http_info( &self, - params: SearchCIAppPipelineEventsParams, + params: SearchCIAppPipelineEventsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let body = params.body; let local_client = &local_configuration.client; diff --git a/src/datadogV2/api/api_ci_visibility_tests.rs b/src/datadogV2/api/api_ci_visibility_tests.rs index 0e703d7e9..5f73a54d1 100644 --- a/src/datadogV2/api/api_ci_visibility_tests.rs +++ b/src/datadogV2/api/api_ci_visibility_tests.rs @@ -5,15 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// AggregateCIAppTestEventsParams is a struct for passing parameters to the method [`CIVisibilityTestsAPI::aggregate_ci_app_test_events`] +/// ListCIAppTestEventsOptionalParams is a struct for passing parameters to the method [`CIVisibilityTestsAPI::list_ci_app_test_events`] #[derive(Clone, Debug)] -pub struct AggregateCIAppTestEventsParams { - pub body: crate::datadogV2::model::CIAppTestsAggregateRequest, -} - -/// ListCIAppTestEventsParams is a struct for passing parameters to the method [`CIVisibilityTestsAPI::list_ci_app_test_events`] -#[derive(Clone, Debug)] -pub struct ListCIAppTestEventsParams { +pub struct ListCIAppTestEventsOptionalParams { /// Search query following log syntax. pub filter_query: Option, /// Minimum timestamp for requested events. @@ -28,10 +22,10 @@ pub struct ListCIAppTestEventsParams { pub page_limit: Option, } -/// SearchCIAppTestEventsParams is a struct for passing parameters to the method [`CIVisibilityTestsAPI::search_ci_app_test_events`] +/// SearchCIAppTestEventsOptionalParams is a struct for passing parameters to the method [`CIVisibilityTestsAPI::search_ci_app_test_events`] #[derive(Clone, Debug)] -pub struct SearchCIAppTestEventsParams { - pub body: Option>, +pub struct SearchCIAppTestEventsOptionalParams { + pub body: Option, } /// AggregateCIAppTestEventsError is a struct for typed errors of method [`CIVisibilityTestsAPI::aggregate_ci_app_test_events`] @@ -88,15 +82,12 @@ impl CIVisibilityTestsAPI { /// The API endpoint to aggregate CI Visibility test events into buckets of computed metrics and timeseries. pub async fn aggregate_ci_app_test_events( &self, - params: AggregateCIAppTestEventsParams, + body: crate::datadogV2::model::CIAppTestsAggregateRequest, ) -> Result< Option, Error, > { - match self - .aggregate_ci_app_test_events_with_http_info(params) - .await - { + match self.aggregate_ci_app_test_events_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -105,16 +96,13 @@ impl CIVisibilityTestsAPI { /// The API endpoint to aggregate CI Visibility test events into buckets of computed metrics and timeseries. pub async fn aggregate_ci_app_test_events_with_http_info( &self, - params: AggregateCIAppTestEventsParams, + body: crate::datadogV2::model::CIAppTestsAggregateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -178,7 +166,7 @@ impl CIVisibilityTestsAPI { /// Use this endpoint to see your latest test events. pub async fn list_ci_app_test_events( &self, - params: ListCIAppTestEventsParams, + params: ListCIAppTestEventsOptionalParams, ) -> Result< Option, Error, @@ -195,14 +183,14 @@ impl CIVisibilityTestsAPI { /// Use this endpoint to see your latest test events. pub async fn list_ci_app_test_events_with_http_info( &self, - params: ListCIAppTestEventsParams, + params: ListCIAppTestEventsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let filter_query = params.filter_query; let filter_from = params.filter_from; let filter_to = params.filter_to; @@ -216,26 +204,29 @@ impl CIVisibilityTestsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = filter_query { + if let Some(ref local_query_param) = filter_query { local_req_builder = - local_req_builder.query(&[("filter[query]", &local_str.to_string())]); + local_req_builder.query(&[("filter[query]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_from { + if let Some(ref local_query_param) = filter_from { local_req_builder = - local_req_builder.query(&[("filter[from]", &local_str.to_string())]); + local_req_builder.query(&[("filter[from]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_to { - local_req_builder = local_req_builder.query(&[("filter[to]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_to { + local_req_builder = + local_req_builder.query(&[("filter[to]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_cursor { + if let Some(ref local_query_param) = page_cursor { local_req_builder = - local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + local_req_builder.query(&[("page[cursor]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_limit { - local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_limit { + local_req_builder = + local_req_builder.query(&[("page[limit]", &local_query_param.to_string())]); }; // build user agent @@ -284,7 +275,7 @@ impl CIVisibilityTestsAPI { /// Use this endpoint to build complex events filtering and search. pub async fn search_ci_app_test_events( &self, - params: SearchCIAppTestEventsParams, + params: SearchCIAppTestEventsOptionalParams, ) -> Result< Option, Error, @@ -301,14 +292,14 @@ impl CIVisibilityTestsAPI { /// Use this endpoint to build complex events filtering and search. pub async fn search_ci_app_test_events_with_http_info( &self, - params: SearchCIAppTestEventsParams, + params: SearchCIAppTestEventsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let body = params.body; let local_client = &local_configuration.client; diff --git a/src/datadogV2/api/api_cloud_cost_management.rs b/src/datadogV2/api/api_cloud_cost_management.rs index 2564c53e4..2e417058f 100644 --- a/src/datadogV2/api/api_cloud_cost_management.rs +++ b/src/datadogV2/api/api_cloud_cost_management.rs @@ -5,55 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateCostAWSCURConfigParams is a struct for passing parameters to the method [`CloudCostManagementAPI::create_cost_awscur_config`] -#[derive(Clone, Debug)] -pub struct CreateCostAWSCURConfigParams { - pub body: crate::datadogV2::model::AwsCURConfigPostRequest, -} - -/// CreateCostAzureUCConfigsParams is a struct for passing parameters to the method [`CloudCostManagementAPI::create_cost_azure_uc_configs`] -#[derive(Clone, Debug)] -pub struct CreateCostAzureUCConfigsParams { - pub body: crate::datadogV2::model::AzureUCConfigPostRequest, -} - -/// DeleteCostAWSCURConfigParams is a struct for passing parameters to the method [`CloudCostManagementAPI::delete_cost_awscur_config`] -#[derive(Clone, Debug)] -pub struct DeleteCostAWSCURConfigParams { - /// Cloud Account id. - pub cloud_account_id: String, -} - -/// DeleteCostAzureUCConfigParams is a struct for passing parameters to the method [`CloudCostManagementAPI::delete_cost_azure_uc_config`] -#[derive(Clone, Debug)] -pub struct DeleteCostAzureUCConfigParams { - /// Cloud Account id. - pub cloud_account_id: String, -} - -/// ListAWSRelatedAccountsParams is a struct for passing parameters to the method [`CloudCostManagementAPI::list_aws_related_accounts`] -#[derive(Clone, Debug)] -pub struct ListAWSRelatedAccountsParams { - /// The ID of the management account to filter by. - pub filter_management_account_id: String, -} - -/// UpdateCostAWSCURConfigParams is a struct for passing parameters to the method [`CloudCostManagementAPI::update_cost_awscur_config`] -#[derive(Clone, Debug)] -pub struct UpdateCostAWSCURConfigParams { - /// Cloud Account id. - pub cloud_account_id: String, - pub body: crate::datadogV2::model::AwsCURConfigPatchRequest, -} - -/// UpdateCostAzureUCConfigsParams is a struct for passing parameters to the method [`CloudCostManagementAPI::update_cost_azure_uc_configs`] -#[derive(Clone, Debug)] -pub struct UpdateCostAzureUCConfigsParams { - /// Cloud Account id. - pub cloud_account_id: String, - pub body: crate::datadogV2::model::AzureUCConfigPatchRequest, -} - /// CreateCostAWSCURConfigError is a struct for typed errors of method [`CloudCostManagementAPI::create_cost_awscur_config`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -174,12 +125,12 @@ impl CloudCostManagementAPI { /// Create a Cloud Cost Management account for an AWS CUR config. pub async fn create_cost_awscur_config( &self, - params: CreateCostAWSCURConfigParams, + body: crate::datadogV2::model::AwsCURConfigPostRequest, ) -> Result< Option, Error, > { - match self.create_cost_awscur_config_with_http_info(params).await { + match self.create_cost_awscur_config_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -188,16 +139,13 @@ impl CloudCostManagementAPI { /// Create a Cloud Cost Management account for an AWS CUR config. pub async fn create_cost_awscur_config_with_http_info( &self, - params: CreateCostAWSCURConfigParams, + body: crate::datadogV2::model::AwsCURConfigPostRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -257,15 +205,12 @@ impl CloudCostManagementAPI { /// Create a Cloud Cost Management account for an Azure config. pub async fn create_cost_azure_uc_configs( &self, - params: CreateCostAzureUCConfigsParams, + body: crate::datadogV2::model::AzureUCConfigPostRequest, ) -> Result< Option, Error, > { - match self - .create_cost_azure_uc_configs_with_http_info(params) - .await - { + match self.create_cost_azure_uc_configs_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -274,16 +219,13 @@ impl CloudCostManagementAPI { /// Create a Cloud Cost Management account for an Azure config. pub async fn create_cost_azure_uc_configs_with_http_info( &self, - params: CreateCostAzureUCConfigsParams, + body: crate::datadogV2::model::AzureUCConfigPostRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -343,9 +285,12 @@ impl CloudCostManagementAPI { /// Archive a Cloud Cost Management Account. pub async fn delete_cost_awscur_config( &self, - params: DeleteCostAWSCURConfigParams, + cloud_account_id: String, ) -> Result, Error> { - match self.delete_cost_awscur_config_with_http_info(params).await { + match self + .delete_cost_awscur_config_with_http_info(cloud_account_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -354,13 +299,10 @@ impl CloudCostManagementAPI { /// Archive a Cloud Cost Management Account. pub async fn delete_cost_awscur_config_with_http_info( &self, - params: DeleteCostAWSCURConfigParams, + cloud_account_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let cloud_account_id = params.cloud_account_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -412,10 +354,10 @@ impl CloudCostManagementAPI { /// Archive a Cloud Cost Management Account. pub async fn delete_cost_azure_uc_config( &self, - params: DeleteCostAzureUCConfigParams, + cloud_account_id: String, ) -> Result, Error> { match self - .delete_cost_azure_uc_config_with_http_info(params) + .delete_cost_azure_uc_config_with_http_info(cloud_account_id) .await { Ok(response_content) => Ok(response_content.entity), @@ -426,13 +368,10 @@ impl CloudCostManagementAPI { /// Archive a Cloud Cost Management Account. pub async fn delete_cost_azure_uc_config_with_http_info( &self, - params: DeleteCostAzureUCConfigParams, + cloud_account_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let cloud_account_id = params.cloud_account_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -503,8 +442,6 @@ impl CloudCostManagementAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/cost/enabled", local_configuration.base_path); @@ -554,12 +491,15 @@ impl CloudCostManagementAPI { /// List the AWS accounts in an organization by calling 'organizations:ListAccounts' from the specified management account. pub async fn list_aws_related_accounts( &self, - params: ListAWSRelatedAccountsParams, + filter_management_account_id: String, ) -> Result< Option, Error, > { - match self.list_aws_related_accounts_with_http_info(params).await { + match self + .list_aws_related_accounts_with_http_info(filter_management_account_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -568,16 +508,13 @@ impl CloudCostManagementAPI { /// List the AWS accounts in an organization by calling 'organizations:ListAccounts' from the specified management account. pub async fn list_aws_related_accounts_with_http_info( &self, - params: ListAWSRelatedAccountsParams, + filter_management_account_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let filter_management_account_id = params.filter_management_account_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -654,8 +591,6 @@ impl CloudCostManagementAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -727,8 +662,6 @@ impl CloudCostManagementAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -781,12 +714,16 @@ impl CloudCostManagementAPI { /// Update the status of an AWS CUR config (active/archived). pub async fn update_cost_awscur_config( &self, - params: UpdateCostAWSCURConfigParams, + cloud_account_id: String, + body: crate::datadogV2::model::AwsCURConfigPatchRequest, ) -> Result< Option, Error, > { - match self.update_cost_awscur_config_with_http_info(params).await { + match self + .update_cost_awscur_config_with_http_info(cloud_account_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -795,17 +732,14 @@ impl CloudCostManagementAPI { /// Update the status of an AWS CUR config (active/archived). pub async fn update_cost_awscur_config_with_http_info( &self, - params: UpdateCostAWSCURConfigParams, + cloud_account_id: String, + body: crate::datadogV2::model::AwsCURConfigPatchRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let cloud_account_id = params.cloud_account_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -866,13 +800,14 @@ impl CloudCostManagementAPI { /// Update the status of an Azure config (active/archived). pub async fn update_cost_azure_uc_configs( &self, - params: UpdateCostAzureUCConfigsParams, + cloud_account_id: String, + body: crate::datadogV2::model::AzureUCConfigPatchRequest, ) -> Result< Option, Error, > { match self - .update_cost_azure_uc_configs_with_http_info(params) + .update_cost_azure_uc_configs_with_http_info(cloud_account_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -883,17 +818,14 @@ impl CloudCostManagementAPI { /// Update the status of an Azure config (active/archived). pub async fn update_cost_azure_uc_configs_with_http_info( &self, - params: UpdateCostAzureUCConfigsParams, + cloud_account_id: String, + body: crate::datadogV2::model::AzureUCConfigPatchRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let cloud_account_id = params.cloud_account_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_cloud_workload_security.rs b/src/datadogV2/api/api_cloud_workload_security.rs index 354ea4be9..1d8f95eb8 100644 --- a/src/datadogV2/api/api_cloud_workload_security.rs +++ b/src/datadogV2/api/api_cloud_workload_security.rs @@ -5,36 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateCloudWorkloadSecurityAgentRuleParams is a struct for passing parameters to the method [`CloudWorkloadSecurityAPI::create_cloud_workload_security_agent_rule`] -#[derive(Clone, Debug)] -pub struct CreateCloudWorkloadSecurityAgentRuleParams { - /// The definition of the new Agent rule. - pub body: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleCreateRequest, -} - -/// DeleteCloudWorkloadSecurityAgentRuleParams is a struct for passing parameters to the method [`CloudWorkloadSecurityAPI::delete_cloud_workload_security_agent_rule`] -#[derive(Clone, Debug)] -pub struct DeleteCloudWorkloadSecurityAgentRuleParams { - /// The ID of the Agent rule. - pub agent_rule_id: String, -} - -/// GetCloudWorkloadSecurityAgentRuleParams is a struct for passing parameters to the method [`CloudWorkloadSecurityAPI::get_cloud_workload_security_agent_rule`] -#[derive(Clone, Debug)] -pub struct GetCloudWorkloadSecurityAgentRuleParams { - /// The ID of the Agent rule. - pub agent_rule_id: String, -} - -/// UpdateCloudWorkloadSecurityAgentRuleParams is a struct for passing parameters to the method [`CloudWorkloadSecurityAPI::update_cloud_workload_security_agent_rule`] -#[derive(Clone, Debug)] -pub struct UpdateCloudWorkloadSecurityAgentRuleParams { - /// The ID of the Agent rule. - pub agent_rule_id: String, - /// New definition of the Agent rule. - pub body: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleUpdateRequest, -} - /// CreateCloudWorkloadSecurityAgentRuleError is a struct for typed errors of method [`CloudWorkloadSecurityAPI::create_cloud_workload_security_agent_rule`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -120,13 +90,13 @@ impl CloudWorkloadSecurityAPI { /// Create a new Agent rule with the given parameters. pub async fn create_cloud_workload_security_agent_rule( &self, - params: CreateCloudWorkloadSecurityAgentRuleParams, + body: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleCreateRequest, ) -> Result< Option, Error, > { match self - .create_cloud_workload_security_agent_rule_with_http_info(params) + .create_cloud_workload_security_agent_rule_with_http_info(body) .await { Ok(response_content) => Ok(response_content.entity), @@ -137,16 +107,13 @@ impl CloudWorkloadSecurityAPI { /// Create a new Agent rule with the given parameters. pub async fn create_cloud_workload_security_agent_rule_with_http_info( &self, - params: CreateCloudWorkloadSecurityAgentRuleParams, + body: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -207,10 +174,10 @@ impl CloudWorkloadSecurityAPI { /// Delete a specific Agent rule. pub async fn delete_cloud_workload_security_agent_rule( &self, - params: DeleteCloudWorkloadSecurityAgentRuleParams, + agent_rule_id: String, ) -> Result, Error> { match self - .delete_cloud_workload_security_agent_rule_with_http_info(params) + .delete_cloud_workload_security_agent_rule_with_http_info(agent_rule_id) .await { Ok(response_content) => Ok(response_content.entity), @@ -221,13 +188,10 @@ impl CloudWorkloadSecurityAPI { /// Delete a specific Agent rule. pub async fn delete_cloud_workload_security_agent_rule_with_http_info( &self, - params: DeleteCloudWorkloadSecurityAgentRuleParams, + agent_rule_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let agent_rule_id = params.agent_rule_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -299,8 +263,6 @@ impl CloudWorkloadSecurityAPI { ) -> Result>, Error> { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -352,13 +314,13 @@ impl CloudWorkloadSecurityAPI { /// Get the details of a specific Agent rule. pub async fn get_cloud_workload_security_agent_rule( &self, - params: GetCloudWorkloadSecurityAgentRuleParams, + agent_rule_id: String, ) -> Result< Option, Error, > { match self - .get_cloud_workload_security_agent_rule_with_http_info(params) + .get_cloud_workload_security_agent_rule_with_http_info(agent_rule_id) .await { Ok(response_content) => Ok(response_content.entity), @@ -369,16 +331,13 @@ impl CloudWorkloadSecurityAPI { /// Get the details of a specific Agent rule. pub async fn get_cloud_workload_security_agent_rule_with_http_info( &self, - params: GetCloudWorkloadSecurityAgentRuleParams, + agent_rule_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let agent_rule_id = params.agent_rule_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -455,8 +414,6 @@ impl CloudWorkloadSecurityAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -511,13 +468,14 @@ impl CloudWorkloadSecurityAPI { /// Returns the Agent rule object when the request is successful. pub async fn update_cloud_workload_security_agent_rule( &self, - params: UpdateCloudWorkloadSecurityAgentRuleParams, + agent_rule_id: String, + body: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleUpdateRequest, ) -> Result< Option, Error, > { match self - .update_cloud_workload_security_agent_rule_with_http_info(params) + .update_cloud_workload_security_agent_rule_with_http_info(agent_rule_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -529,17 +487,14 @@ impl CloudWorkloadSecurityAPI { /// Returns the Agent rule object when the request is successful. pub async fn update_cloud_workload_security_agent_rule_with_http_info( &self, - params: UpdateCloudWorkloadSecurityAgentRuleParams, + agent_rule_id: String, + body: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let agent_rule_id = params.agent_rule_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_cloudflare_integration.rs b/src/datadogV2/api/api_cloudflare_integration.rs index e4e44e408..33d5d3083 100644 --- a/src/datadogV2/api/api_cloudflare_integration.rs +++ b/src/datadogV2/api/api_cloudflare_integration.rs @@ -5,34 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateCloudflareAccountParams is a struct for passing parameters to the method [`CloudflareIntegrationAPI::create_cloudflare_account`] -#[derive(Clone, Debug)] -pub struct CreateCloudflareAccountParams { - pub body: crate::datadogV2::model::CloudflareAccountCreateRequest, -} - -/// DeleteCloudflareAccountParams is a struct for passing parameters to the method [`CloudflareIntegrationAPI::delete_cloudflare_account`] -#[derive(Clone, Debug)] -pub struct DeleteCloudflareAccountParams { - /// None - pub account_id: String, -} - -/// GetCloudflareAccountParams is a struct for passing parameters to the method [`CloudflareIntegrationAPI::get_cloudflare_account`] -#[derive(Clone, Debug)] -pub struct GetCloudflareAccountParams { - /// None - pub account_id: String, -} - -/// UpdateCloudflareAccountParams is a struct for passing parameters to the method [`CloudflareIntegrationAPI::update_cloudflare_account`] -#[derive(Clone, Debug)] -pub struct UpdateCloudflareAccountParams { - /// None - pub account_id: String, - pub body: crate::datadogV2::model::CloudflareAccountUpdateRequest, -} - /// CreateCloudflareAccountError is a struct for typed errors of method [`CloudflareIntegrationAPI::create_cloudflare_account`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -112,12 +84,12 @@ impl CloudflareIntegrationAPI { /// Create a Cloudflare account. pub async fn create_cloudflare_account( &self, - params: CreateCloudflareAccountParams, + body: crate::datadogV2::model::CloudflareAccountCreateRequest, ) -> Result< Option, Error, > { - match self.create_cloudflare_account_with_http_info(params).await { + match self.create_cloudflare_account_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -126,16 +98,13 @@ impl CloudflareIntegrationAPI { /// Create a Cloudflare account. pub async fn create_cloudflare_account_with_http_info( &self, - params: CreateCloudflareAccountParams, + body: crate::datadogV2::model::CloudflareAccountCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -195,9 +164,12 @@ impl CloudflareIntegrationAPI { /// Delete a Cloudflare account. pub async fn delete_cloudflare_account( &self, - params: DeleteCloudflareAccountParams, + account_id: String, ) -> Result, Error> { - match self.delete_cloudflare_account_with_http_info(params).await { + match self + .delete_cloudflare_account_with_http_info(account_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -206,13 +178,10 @@ impl CloudflareIntegrationAPI { /// Delete a Cloudflare account. pub async fn delete_cloudflare_account_with_http_info( &self, - params: DeleteCloudflareAccountParams, + account_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -264,12 +233,12 @@ impl CloudflareIntegrationAPI { /// Get a Cloudflare account. pub async fn get_cloudflare_account( &self, - params: GetCloudflareAccountParams, + account_id: String, ) -> Result< Option, Error, > { - match self.get_cloudflare_account_with_http_info(params).await { + match self.get_cloudflare_account_with_http_info(account_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -278,16 +247,13 @@ impl CloudflareIntegrationAPI { /// Get a Cloudflare account. pub async fn get_cloudflare_account_with_http_info( &self, - params: GetCloudflareAccountParams, + account_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -360,8 +326,6 @@ impl CloudflareIntegrationAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -414,12 +378,16 @@ impl CloudflareIntegrationAPI { /// Update a Cloudflare account. pub async fn update_cloudflare_account( &self, - params: UpdateCloudflareAccountParams, + account_id: String, + body: crate::datadogV2::model::CloudflareAccountUpdateRequest, ) -> Result< Option, Error, > { - match self.update_cloudflare_account_with_http_info(params).await { + match self + .update_cloudflare_account_with_http_info(account_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -428,17 +396,14 @@ impl CloudflareIntegrationAPI { /// Update a Cloudflare account. pub async fn update_cloudflare_account_with_http_info( &self, - params: UpdateCloudflareAccountParams, + account_id: String, + body: crate::datadogV2::model::CloudflareAccountUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_confluent_cloud.rs b/src/datadogV2/api/api_confluent_cloud.rs index 2812a1b2e..50d23b225 100644 --- a/src/datadogV2/api/api_confluent_cloud.rs +++ b/src/datadogV2/api/api_confluent_cloud.rs @@ -5,81 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateConfluentAccountParams is a struct for passing parameters to the method [`ConfluentCloudAPI::create_confluent_account`] -#[derive(Clone, Debug)] -pub struct CreateConfluentAccountParams { - /// Confluent payload - pub body: crate::datadogV2::model::ConfluentAccountCreateRequest, -} - -/// CreateConfluentResourceParams is a struct for passing parameters to the method [`ConfluentCloudAPI::create_confluent_resource`] -#[derive(Clone, Debug)] -pub struct CreateConfluentResourceParams { - /// Confluent Account id. - pub account_id: String, - /// Confluent payload - pub body: crate::datadogV2::model::ConfluentResourceRequest, -} - -/// DeleteConfluentAccountParams is a struct for passing parameters to the method [`ConfluentCloudAPI::delete_confluent_account`] -#[derive(Clone, Debug)] -pub struct DeleteConfluentAccountParams { - /// Confluent Account id. - pub account_id: String, -} - -/// DeleteConfluentResourceParams is a struct for passing parameters to the method [`ConfluentCloudAPI::delete_confluent_resource`] -#[derive(Clone, Debug)] -pub struct DeleteConfluentResourceParams { - /// Confluent Account id. - pub account_id: String, - /// Confluent Account Resource ID. - pub resource_id: String, -} - -/// GetConfluentAccountParams is a struct for passing parameters to the method [`ConfluentCloudAPI::get_confluent_account`] -#[derive(Clone, Debug)] -pub struct GetConfluentAccountParams { - /// Confluent Account id. - pub account_id: String, -} - -/// GetConfluentResourceParams is a struct for passing parameters to the method [`ConfluentCloudAPI::get_confluent_resource`] -#[derive(Clone, Debug)] -pub struct GetConfluentResourceParams { - /// Confluent Account id. - pub account_id: String, - /// Confluent Account Resource ID. - pub resource_id: String, -} - -/// ListConfluentResourceParams is a struct for passing parameters to the method [`ConfluentCloudAPI::list_confluent_resource`] -#[derive(Clone, Debug)] -pub struct ListConfluentResourceParams { - /// Confluent Account id. - pub account_id: String, -} - -/// UpdateConfluentAccountParams is a struct for passing parameters to the method [`ConfluentCloudAPI::update_confluent_account`] -#[derive(Clone, Debug)] -pub struct UpdateConfluentAccountParams { - /// Confluent Account id. - pub account_id: String, - /// Confluent payload - pub body: crate::datadogV2::model::ConfluentAccountUpdateRequest, -} - -/// UpdateConfluentResourceParams is a struct for passing parameters to the method [`ConfluentCloudAPI::update_confluent_resource`] -#[derive(Clone, Debug)] -pub struct UpdateConfluentResourceParams { - /// Confluent Account id. - pub account_id: String, - /// Confluent Account Resource ID. - pub resource_id: String, - /// Confluent payload - pub body: crate::datadogV2::model::ConfluentResourceRequest, -} - /// CreateConfluentAccountError is a struct for typed errors of method [`ConfluentCloudAPI::create_confluent_account`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -214,12 +139,12 @@ impl ConfluentCloudAPI { /// Create a Confluent account. pub async fn create_confluent_account( &self, - params: CreateConfluentAccountParams, + body: crate::datadogV2::model::ConfluentAccountCreateRequest, ) -> Result< Option, Error, > { - match self.create_confluent_account_with_http_info(params).await { + match self.create_confluent_account_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -228,16 +153,13 @@ impl ConfluentCloudAPI { /// Create a Confluent account. pub async fn create_confluent_account_with_http_info( &self, - params: CreateConfluentAccountParams, + body: crate::datadogV2::model::ConfluentAccountCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -297,12 +219,16 @@ impl ConfluentCloudAPI { /// Create a Confluent resource for the account associated with the provided ID. pub async fn create_confluent_resource( &self, - params: CreateConfluentResourceParams, + account_id: String, + body: crate::datadogV2::model::ConfluentResourceRequest, ) -> Result< Option, Error, > { - match self.create_confluent_resource_with_http_info(params).await { + match self + .create_confluent_resource_with_http_info(account_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -311,17 +237,14 @@ impl ConfluentCloudAPI { /// Create a Confluent resource for the account associated with the provided ID. pub async fn create_confluent_resource_with_http_info( &self, - params: CreateConfluentResourceParams, + account_id: String, + body: crate::datadogV2::model::ConfluentResourceRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -382,9 +305,12 @@ impl ConfluentCloudAPI { /// Delete a Confluent account with the provided account ID. pub async fn delete_confluent_account( &self, - params: DeleteConfluentAccountParams, + account_id: String, ) -> Result, Error> { - match self.delete_confluent_account_with_http_info(params).await { + match self + .delete_confluent_account_with_http_info(account_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -393,13 +319,10 @@ impl ConfluentCloudAPI { /// Delete a Confluent account with the provided account ID. pub async fn delete_confluent_account_with_http_info( &self, - params: DeleteConfluentAccountParams, + account_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -451,9 +374,13 @@ impl ConfluentCloudAPI { /// Delete a Confluent resource with the provided resource id for the account associated with the provided account ID. pub async fn delete_confluent_resource( &self, - params: DeleteConfluentResourceParams, + account_id: String, + resource_id: String, ) -> Result, Error> { - match self.delete_confluent_resource_with_http_info(params).await { + match self + .delete_confluent_resource_with_http_info(account_id, resource_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -462,14 +389,11 @@ impl ConfluentCloudAPI { /// Delete a Confluent resource with the provided resource id for the account associated with the provided account ID. pub async fn delete_confluent_resource_with_http_info( &self, - params: DeleteConfluentResourceParams, + account_id: String, + resource_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let resource_id = params.resource_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -522,12 +446,12 @@ impl ConfluentCloudAPI { /// Get the Confluent account with the provided account ID. pub async fn get_confluent_account( &self, - params: GetConfluentAccountParams, + account_id: String, ) -> Result< Option, Error, > { - match self.get_confluent_account_with_http_info(params).await { + match self.get_confluent_account_with_http_info(account_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -536,16 +460,13 @@ impl ConfluentCloudAPI { /// Get the Confluent account with the provided account ID. pub async fn get_confluent_account_with_http_info( &self, - params: GetConfluentAccountParams, + account_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -599,12 +520,16 @@ impl ConfluentCloudAPI { /// Get a Confluent resource with the provided resource id for the account associated with the provided account ID. pub async fn get_confluent_resource( &self, - params: GetConfluentResourceParams, + account_id: String, + resource_id: String, ) -> Result< Option, Error, > { - match self.get_confluent_resource_with_http_info(params).await { + match self + .get_confluent_resource_with_http_info(account_id, resource_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -613,17 +538,14 @@ impl ConfluentCloudAPI { /// Get a Confluent resource with the provided resource id for the account associated with the provided account ID. pub async fn get_confluent_resource_with_http_info( &self, - params: GetConfluentResourceParams, + account_id: String, + resource_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let resource_id = params.resource_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -697,8 +619,6 @@ impl ConfluentCloudAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -751,12 +671,15 @@ impl ConfluentCloudAPI { /// Get a Confluent resource for the account associated with the provided ID. pub async fn list_confluent_resource( &self, - params: ListConfluentResourceParams, + account_id: String, ) -> Result< Option, Error, > { - match self.list_confluent_resource_with_http_info(params).await { + match self + .list_confluent_resource_with_http_info(account_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -765,16 +688,13 @@ impl ConfluentCloudAPI { /// Get a Confluent resource for the account associated with the provided ID. pub async fn list_confluent_resource_with_http_info( &self, - params: ListConfluentResourceParams, + account_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -828,12 +748,16 @@ impl ConfluentCloudAPI { /// Update the Confluent account with the provided account ID. pub async fn update_confluent_account( &self, - params: UpdateConfluentAccountParams, + account_id: String, + body: crate::datadogV2::model::ConfluentAccountUpdateRequest, ) -> Result< Option, Error, > { - match self.update_confluent_account_with_http_info(params).await { + match self + .update_confluent_account_with_http_info(account_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -842,17 +766,14 @@ impl ConfluentCloudAPI { /// Update the Confluent account with the provided account ID. pub async fn update_confluent_account_with_http_info( &self, - params: UpdateConfluentAccountParams, + account_id: String, + body: crate::datadogV2::model::ConfluentAccountUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -913,12 +834,17 @@ impl ConfluentCloudAPI { /// Update a Confluent resource with the provided resource id for the account associated with the provided account ID. pub async fn update_confluent_resource( &self, - params: UpdateConfluentResourceParams, + account_id: String, + resource_id: String, + body: crate::datadogV2::model::ConfluentResourceRequest, ) -> Result< Option, Error, > { - match self.update_confluent_resource_with_http_info(params).await { + match self + .update_confluent_resource_with_http_info(account_id, resource_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -927,18 +853,15 @@ impl ConfluentCloudAPI { /// Update a Confluent resource with the provided resource id for the account associated with the provided account ID. pub async fn update_confluent_resource_with_http_info( &self, - params: UpdateConfluentResourceParams, + account_id: String, + resource_id: String, + body: crate::datadogV2::model::ConfluentResourceRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let resource_id = params.resource_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_container_images.rs b/src/datadogV2/api/api_container_images.rs index ae3fb7e86..f123a967c 100644 --- a/src/datadogV2/api/api_container_images.rs +++ b/src/datadogV2/api/api_container_images.rs @@ -5,9 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// ListContainerImagesParams is a struct for passing parameters to the method [`ContainerImagesAPI::list_container_images`] +/// ListContainerImagesOptionalParams is a struct for passing parameters to the method [`ContainerImagesAPI::list_container_images`] #[derive(Clone, Debug)] -pub struct ListContainerImagesParams { +pub struct ListContainerImagesOptionalParams { /// Comma-separated list of tags to filter Container Images by. pub filter_tags: Option, /// Comma-separated list of tags to group Container Images by. @@ -55,7 +55,7 @@ impl ContainerImagesAPI { /// Get all Container Images for your organization. pub async fn list_container_images( &self, - params: ListContainerImagesParams, + params: ListContainerImagesOptionalParams, ) -> Result< Option, Error, @@ -69,14 +69,14 @@ impl ContainerImagesAPI { /// Get all Container Images for your organization. pub async fn list_container_images_with_http_info( &self, - params: ListContainerImagesParams, + params: ListContainerImagesOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let filter_tags = params.filter_tags; let group_by = params.group_by; let sort = params.sort; @@ -89,22 +89,25 @@ impl ContainerImagesAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = filter_tags { + if let Some(ref local_query_param) = filter_tags { local_req_builder = - local_req_builder.query(&[("filter[tags]", &local_str.to_string())]); + local_req_builder.query(&[("filter[tags]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = group_by { - local_req_builder = local_req_builder.query(&[("group_by", &local_str.to_string())]); + if let Some(ref local_query_param) = group_by { + local_req_builder = + local_req_builder.query(&[("group_by", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_cursor { + if let Some(ref local_query_param) = page_cursor { local_req_builder = - local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + local_req_builder.query(&[("page[cursor]", &local_query_param.to_string())]); }; // build user agent diff --git a/src/datadogV2/api/api_containers.rs b/src/datadogV2/api/api_containers.rs index d5ed30f6b..a2ca0f8cf 100644 --- a/src/datadogV2/api/api_containers.rs +++ b/src/datadogV2/api/api_containers.rs @@ -5,9 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// ListContainersParams is a struct for passing parameters to the method [`ContainersAPI::list_containers`] +/// ListContainersOptionalParams is a struct for passing parameters to the method [`ContainersAPI::list_containers`] #[derive(Clone, Debug)] -pub struct ListContainersParams { +pub struct ListContainersOptionalParams { /// Comma-separated list of tags to filter containers by. pub filter_tags: Option, /// Comma-separated list of tags to group containers by. @@ -55,7 +55,7 @@ impl ContainersAPI { /// Get all containers for your organization. pub async fn list_containers( &self, - params: ListContainersParams, + params: ListContainersOptionalParams, ) -> Result, Error> { match self.list_containers_with_http_info(params).await { @@ -67,14 +67,14 @@ impl ContainersAPI { /// Get all containers for your organization. pub async fn list_containers_with_http_info( &self, - params: ListContainersParams, + params: ListContainersOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let filter_tags = params.filter_tags; let group_by = params.group_by; let sort = params.sort; @@ -87,22 +87,25 @@ impl ContainersAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = filter_tags { + if let Some(ref local_query_param) = filter_tags { local_req_builder = - local_req_builder.query(&[("filter[tags]", &local_str.to_string())]); + local_req_builder.query(&[("filter[tags]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = group_by { - local_req_builder = local_req_builder.query(&[("group_by", &local_str.to_string())]); + if let Some(ref local_query_param) = group_by { + local_req_builder = + local_req_builder.query(&[("group_by", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_cursor { + if let Some(ref local_query_param) = page_cursor { local_req_builder = - local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + local_req_builder.query(&[("page[cursor]", &local_query_param.to_string())]); }; // build user agent diff --git a/src/datadogV2/api/api_dashboard_lists.rs b/src/datadogV2/api/api_dashboard_lists.rs index c60fe299c..60f344f79 100644 --- a/src/datadogV2/api/api_dashboard_lists.rs +++ b/src/datadogV2/api/api_dashboard_lists.rs @@ -5,40 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateDashboardListItemsParams is a struct for passing parameters to the method [`DashboardListsAPI::create_dashboard_list_items`] -#[derive(Clone, Debug)] -pub struct CreateDashboardListItemsParams { - /// ID of the dashboard list to add items to. - pub dashboard_list_id: i64, - /// Dashboards to add to the dashboard list. - pub body: crate::datadogV2::model::DashboardListAddItemsRequest, -} - -/// DeleteDashboardListItemsParams is a struct for passing parameters to the method [`DashboardListsAPI::delete_dashboard_list_items`] -#[derive(Clone, Debug)] -pub struct DeleteDashboardListItemsParams { - /// ID of the dashboard list to delete items from. - pub dashboard_list_id: i64, - /// Dashboards to delete from the dashboard list. - pub body: crate::datadogV2::model::DashboardListDeleteItemsRequest, -} - -/// GetDashboardListItemsParams is a struct for passing parameters to the method [`DashboardListsAPI::get_dashboard_list_items`] -#[derive(Clone, Debug)] -pub struct GetDashboardListItemsParams { - /// ID of the dashboard list to get items from. - pub dashboard_list_id: i64, -} - -/// UpdateDashboardListItemsParams is a struct for passing parameters to the method [`DashboardListsAPI::update_dashboard_list_items`] -#[derive(Clone, Debug)] -pub struct UpdateDashboardListItemsParams { - /// ID of the dashboard list to update items from. - pub dashboard_list_id: i64, - /// New dashboards of the dashboard list. - pub body: crate::datadogV2::model::DashboardListUpdateItemsRequest, -} - /// CreateDashboardListItemsError is a struct for typed errors of method [`DashboardListsAPI::create_dashboard_list_items`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -106,13 +72,14 @@ impl DashboardListsAPI { /// Add dashboards to an existing dashboard list. pub async fn create_dashboard_list_items( &self, - params: CreateDashboardListItemsParams, + dashboard_list_id: i64, + body: crate::datadogV2::model::DashboardListAddItemsRequest, ) -> Result< Option, Error, > { match self - .create_dashboard_list_items_with_http_info(params) + .create_dashboard_list_items_with_http_info(dashboard_list_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -123,17 +90,14 @@ impl DashboardListsAPI { /// Add dashboards to an existing dashboard list. pub async fn create_dashboard_list_items_with_http_info( &self, - params: CreateDashboardListItemsParams, + dashboard_list_id: i64, + body: crate::datadogV2::model::DashboardListAddItemsRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let dashboard_list_id = params.dashboard_list_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -194,13 +158,14 @@ impl DashboardListsAPI { /// Delete dashboards from an existing dashboard list. pub async fn delete_dashboard_list_items( &self, - params: DeleteDashboardListItemsParams, + dashboard_list_id: i64, + body: crate::datadogV2::model::DashboardListDeleteItemsRequest, ) -> Result< Option, Error, > { match self - .delete_dashboard_list_items_with_http_info(params) + .delete_dashboard_list_items_with_http_info(dashboard_list_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -211,17 +176,14 @@ impl DashboardListsAPI { /// Delete dashboards from an existing dashboard list. pub async fn delete_dashboard_list_items_with_http_info( &self, - params: DeleteDashboardListItemsParams, + dashboard_list_id: i64, + body: crate::datadogV2::model::DashboardListDeleteItemsRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let dashboard_list_id = params.dashboard_list_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -282,12 +244,15 @@ impl DashboardListsAPI { /// Fetch the dashboard list’s dashboard definitions. pub async fn get_dashboard_list_items( &self, - params: GetDashboardListItemsParams, + dashboard_list_id: i64, ) -> Result< Option, Error, > { - match self.get_dashboard_list_items_with_http_info(params).await { + match self + .get_dashboard_list_items_with_http_info(dashboard_list_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -296,16 +261,13 @@ impl DashboardListsAPI { /// Fetch the dashboard list’s dashboard definitions. pub async fn get_dashboard_list_items_with_http_info( &self, - params: GetDashboardListItemsParams, + dashboard_list_id: i64, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let dashboard_list_id = params.dashboard_list_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -359,13 +321,14 @@ impl DashboardListsAPI { /// Update dashboards of an existing dashboard list. pub async fn update_dashboard_list_items( &self, - params: UpdateDashboardListItemsParams, + dashboard_list_id: i64, + body: crate::datadogV2::model::DashboardListUpdateItemsRequest, ) -> Result< Option, Error, > { match self - .update_dashboard_list_items_with_http_info(params) + .update_dashboard_list_items_with_http_info(dashboard_list_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -376,17 +339,14 @@ impl DashboardListsAPI { /// Update dashboards of an existing dashboard list. pub async fn update_dashboard_list_items_with_http_info( &self, - params: UpdateDashboardListItemsParams, + dashboard_list_id: i64, + body: crate::datadogV2::model::DashboardListUpdateItemsRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let dashboard_list_id = params.dashboard_list_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_dora_metrics.rs b/src/datadogV2/api/api_dora_metrics.rs index 82486f5dc..b8507a11c 100644 --- a/src/datadogV2/api/api_dora_metrics.rs +++ b/src/datadogV2/api/api_dora_metrics.rs @@ -5,18 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateDORADeploymentParams is a struct for passing parameters to the method [`DORAMetricsAPI::create_dora_deployment`] -#[derive(Clone, Debug)] -pub struct CreateDORADeploymentParams { - pub body: crate::datadogV2::model::DORADeploymentRequest, -} - -/// CreateDORAIncidentParams is a struct for passing parameters to the method [`DORAMetricsAPI::create_dora_incident`] -#[derive(Clone, Debug)] -pub struct CreateDORAIncidentParams { - pub body: crate::datadogV2::model::DORAIncidentRequest, -} - /// CreateDORADeploymentError is a struct for typed errors of method [`DORAMetricsAPI::create_dora_deployment`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -66,12 +54,12 @@ impl DORAMetricsAPI { /// - Change Failure Rate pub async fn create_dora_deployment( &self, - params: CreateDORADeploymentParams, + body: crate::datadogV2::model::DORADeploymentRequest, ) -> Result< Option, Error, > { - match self.create_dora_deployment_with_http_info(params).await { + match self.create_dora_deployment_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -85,16 +73,13 @@ impl DORAMetricsAPI { /// - Change Failure Rate pub async fn create_dora_deployment_with_http_info( &self, - params: CreateDORADeploymentParams, + body: crate::datadogV2::model::DORADeploymentRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/dora/deployment", local_configuration.base_path); @@ -152,10 +137,10 @@ impl DORAMetricsAPI { /// - Time to Restore pub async fn create_dora_incident( &self, - params: CreateDORAIncidentParams, + body: crate::datadogV2::model::DORAIncidentRequest, ) -> Result, Error> { - match self.create_dora_incident_with_http_info(params).await { + match self.create_dora_incident_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -168,16 +153,13 @@ impl DORAMetricsAPI { /// - Time to Restore pub async fn create_dora_incident_with_http_info( &self, - params: CreateDORAIncidentParams, + body: crate::datadogV2::model::DORAIncidentRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/dora/incident", local_configuration.base_path); diff --git a/src/datadogV2/api/api_downtimes.rs b/src/datadogV2/api/api_downtimes.rs index 76c404a95..b774c6f1f 100644 --- a/src/datadogV2/api/api_downtimes.rs +++ b/src/datadogV2/api/api_downtimes.rs @@ -5,33 +5,17 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CancelDowntimeParams is a struct for passing parameters to the method [`DowntimesAPI::cancel_downtime`] +/// GetDowntimeOptionalParams is a struct for passing parameters to the method [`DowntimesAPI::get_downtime`] #[derive(Clone, Debug)] -pub struct CancelDowntimeParams { - /// ID of the downtime to cancel. - pub downtime_id: String, -} - -/// CreateDowntimeParams is a struct for passing parameters to the method [`DowntimesAPI::create_downtime`] -#[derive(Clone, Debug)] -pub struct CreateDowntimeParams { - /// Schedule a downtime request body. - pub body: crate::datadogV2::model::DowntimeCreateRequest, -} - -/// GetDowntimeParams is a struct for passing parameters to the method [`DowntimesAPI::get_downtime`] -#[derive(Clone, Debug)] -pub struct GetDowntimeParams { - /// ID of the downtime to fetch. - pub downtime_id: String, +pub struct GetDowntimeOptionalParams { /// Comma-separated list of resource paths for related resources to include in the response. Supported resource /// paths are `created_by` and `monitor`. pub include: Option, } -/// ListDowntimesParams is a struct for passing parameters to the method [`DowntimesAPI::list_downtimes`] +/// ListDowntimesOptionalParams is a struct for passing parameters to the method [`DowntimesAPI::list_downtimes`] #[derive(Clone, Debug)] -pub struct ListDowntimesParams { +pub struct ListDowntimesOptionalParams { /// Only return downtimes that are active when the request is made. pub current_only: Option, /// Comma-separated list of resource paths for related resources to include in the response. Supported resource @@ -43,26 +27,15 @@ pub struct ListDowntimesParams { pub page_limit: Option, } -/// ListMonitorDowntimesParams is a struct for passing parameters to the method [`DowntimesAPI::list_monitor_downtimes`] +/// ListMonitorDowntimesOptionalParams is a struct for passing parameters to the method [`DowntimesAPI::list_monitor_downtimes`] #[derive(Clone, Debug)] -pub struct ListMonitorDowntimesParams { - /// The id of the monitor. - pub monitor_id: i64, +pub struct ListMonitorDowntimesOptionalParams { /// Specific offset to use as the beginning of the returned page. pub page_offset: Option, /// Maximum number of downtimes in the response. pub page_limit: Option, } -/// UpdateDowntimeParams is a struct for passing parameters to the method [`DowntimesAPI::update_downtime`] -#[derive(Clone, Debug)] -pub struct UpdateDowntimeParams { - /// ID of the downtime to update. - pub downtime_id: String, - /// Update a downtime request body. - pub body: crate::datadogV2::model::DowntimeUpdateRequest, -} - /// CancelDowntimeError is a struct for typed errors of method [`DowntimesAPI::cancel_downtime`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -147,9 +120,9 @@ impl DowntimesAPI { /// Cancel a downtime. pub async fn cancel_downtime( &self, - params: CancelDowntimeParams, + downtime_id: String, ) -> Result, Error> { - match self.cancel_downtime_with_http_info(params).await { + match self.cancel_downtime_with_http_info(downtime_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -158,13 +131,10 @@ impl DowntimesAPI { /// Cancel a downtime. pub async fn cancel_downtime_with_http_info( &self, - params: CancelDowntimeParams, + downtime_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let downtime_id = params.downtime_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -216,9 +186,9 @@ impl DowntimesAPI { /// Schedule a downtime. pub async fn create_downtime( &self, - params: CreateDowntimeParams, + body: crate::datadogV2::model::DowntimeCreateRequest, ) -> Result, Error> { - match self.create_downtime_with_http_info(params).await { + match self.create_downtime_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -227,16 +197,13 @@ impl DowntimesAPI { /// Schedule a downtime. pub async fn create_downtime_with_http_info( &self, - params: CreateDowntimeParams, + body: crate::datadogV2::model::DowntimeCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/downtime", local_configuration.base_path); @@ -293,9 +260,10 @@ impl DowntimesAPI { /// Get downtime detail by `downtime_id`. pub async fn get_downtime( &self, - params: GetDowntimeParams, + downtime_id: String, + params: GetDowntimeOptionalParams, ) -> Result, Error> { - match self.get_downtime_with_http_info(params).await { + match self.get_downtime_with_http_info(downtime_id, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -304,13 +272,13 @@ impl DowntimesAPI { /// Get downtime detail by `downtime_id`. pub async fn get_downtime_with_http_info( &self, - params: GetDowntimeParams, + downtime_id: String, + params: GetDowntimeOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let downtime_id = params.downtime_id; + // unbox and build optional parameters let include = params.include; let local_client = &local_configuration.client; @@ -323,8 +291,9 @@ impl DowntimesAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = include { - local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + if let Some(ref local_query_param) = include { + local_req_builder = + local_req_builder.query(&[("include", &local_query_param.to_string())]); }; // build user agent @@ -369,7 +338,7 @@ impl DowntimesAPI { /// Get all scheduled downtimes. pub async fn list_downtimes( &self, - params: ListDowntimesParams, + params: ListDowntimesOptionalParams, ) -> Result, Error> { match self.list_downtimes_with_http_info(params).await { @@ -381,14 +350,14 @@ impl DowntimesAPI { /// Get all scheduled downtimes. pub async fn list_downtimes_with_http_info( &self, - params: ListDowntimesParams, + params: ListDowntimesOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let current_only = params.current_only; let include = params.include; let page_offset = params.page_offset; @@ -400,19 +369,21 @@ impl DowntimesAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = current_only { + if let Some(ref local_query_param) = current_only { local_req_builder = - local_req_builder.query(&[("current_only", &local_str.to_string())]); + local_req_builder.query(&[("current_only", &local_query_param.to_string())]); }; - if let Some(ref local_str) = include { - local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + if let Some(ref local_query_param) = include { + local_req_builder = + local_req_builder.query(&[("include", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_offset { + if let Some(ref local_query_param) = page_offset { local_req_builder = - local_req_builder.query(&[("page[offset]", &local_str.to_string())]); + local_req_builder.query(&[("page[offset]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_limit { - local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_limit { + local_req_builder = + local_req_builder.query(&[("page[limit]", &local_query_param.to_string())]); }; // build user agent @@ -458,12 +429,16 @@ impl DowntimesAPI { /// Get all active downtimes for the specified monitor. pub async fn list_monitor_downtimes( &self, - params: ListMonitorDowntimesParams, + monitor_id: i64, + params: ListMonitorDowntimesOptionalParams, ) -> Result< Option, Error, > { - match self.list_monitor_downtimes_with_http_info(params).await { + match self + .list_monitor_downtimes_with_http_info(monitor_id, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -472,15 +447,15 @@ impl DowntimesAPI { /// Get all active downtimes for the specified monitor. pub async fn list_monitor_downtimes_with_http_info( &self, - params: ListMonitorDowntimesParams, + monitor_id: i64, + params: ListMonitorDowntimesOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let monitor_id = params.monitor_id; + // unbox and build optional parameters let page_offset = params.page_offset; let page_limit = params.page_limit; @@ -494,12 +469,13 @@ impl DowntimesAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_offset { + if let Some(ref local_query_param) = page_offset { local_req_builder = - local_req_builder.query(&[("page[offset]", &local_str.to_string())]); + local_req_builder.query(&[("page[offset]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_limit { - local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_limit { + local_req_builder = + local_req_builder.query(&[("page[limit]", &local_query_param.to_string())]); }; // build user agent @@ -545,9 +521,10 @@ impl DowntimesAPI { /// Update a downtime by `downtime_id`. pub async fn update_downtime( &self, - params: UpdateDowntimeParams, + downtime_id: String, + body: crate::datadogV2::model::DowntimeUpdateRequest, ) -> Result, Error> { - match self.update_downtime_with_http_info(params).await { + match self.update_downtime_with_http_info(downtime_id, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -556,17 +533,14 @@ impl DowntimesAPI { /// Update a downtime by `downtime_id`. pub async fn update_downtime_with_http_info( &self, - params: UpdateDowntimeParams, + downtime_id: String, + body: crate::datadogV2::model::DowntimeUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let downtime_id = params.downtime_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_events.rs b/src/datadogV2/api/api_events.rs index 46466ea53..32f2e7a6e 100644 --- a/src/datadogV2/api/api_events.rs +++ b/src/datadogV2/api/api_events.rs @@ -5,9 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// ListEventsParams is a struct for passing parameters to the method [`EventsAPI::list_events`] +/// ListEventsOptionalParams is a struct for passing parameters to the method [`EventsAPI::list_events`] #[derive(Clone, Debug)] -pub struct ListEventsParams { +pub struct ListEventsOptionalParams { /// Search query following events syntax. pub filter_query: Option, /// Minimum timestamp for requested events. @@ -22,10 +22,10 @@ pub struct ListEventsParams { pub page_limit: Option, } -/// SearchEventsParams is a struct for passing parameters to the method [`EventsAPI::search_events`] +/// SearchEventsOptionalParams is a struct for passing parameters to the method [`EventsAPI::search_events`] #[derive(Clone, Debug)] -pub struct SearchEventsParams { - pub body: Option>, +pub struct SearchEventsOptionalParams { + pub body: Option, } /// ListEventsError is a struct for typed errors of method [`EventsAPI::list_events`] @@ -75,7 +75,7 @@ impl EventsAPI { /// Use this endpoint to see your latest events. pub async fn list_events( &self, - params: ListEventsParams, + params: ListEventsOptionalParams, ) -> Result, Error> { match self.list_events_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -89,12 +89,12 @@ impl EventsAPI { /// Use this endpoint to see your latest events. pub async fn list_events_with_http_info( &self, - params: ListEventsParams, + params: ListEventsOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let filter_query = params.filter_query; let filter_from = params.filter_from; let filter_to = params.filter_to; @@ -108,26 +108,29 @@ impl EventsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = filter_query { + if let Some(ref local_query_param) = filter_query { local_req_builder = - local_req_builder.query(&[("filter[query]", &local_str.to_string())]); + local_req_builder.query(&[("filter[query]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_from { + if let Some(ref local_query_param) = filter_from { local_req_builder = - local_req_builder.query(&[("filter[from]", &local_str.to_string())]); + local_req_builder.query(&[("filter[from]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_to { - local_req_builder = local_req_builder.query(&[("filter[to]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_to { + local_req_builder = + local_req_builder.query(&[("filter[to]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_cursor { + if let Some(ref local_query_param) = page_cursor { local_req_builder = - local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + local_req_builder.query(&[("page[cursor]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_limit { - local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_limit { + local_req_builder = + local_req_builder.query(&[("page[limit]", &local_query_param.to_string())]); }; // build user agent @@ -175,7 +178,7 @@ impl EventsAPI { /// Use this endpoint to build complex events filtering and search. pub async fn search_events( &self, - params: SearchEventsParams, + params: SearchEventsOptionalParams, ) -> Result, Error> { match self.search_events_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -189,14 +192,14 @@ impl EventsAPI { /// Use this endpoint to build complex events filtering and search. pub async fn search_events_with_http_info( &self, - params: SearchEventsParams, + params: SearchEventsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let body = params.body; let local_client = &local_configuration.client; diff --git a/src/datadogV2/api/api_fastly_integration.rs b/src/datadogV2/api/api_fastly_integration.rs index f9d970c28..e61dce249 100644 --- a/src/datadogV2/api/api_fastly_integration.rs +++ b/src/datadogV2/api/api_fastly_integration.rs @@ -5,77 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateFastlyAccountParams is a struct for passing parameters to the method [`FastlyIntegrationAPI::create_fastly_account`] -#[derive(Clone, Debug)] -pub struct CreateFastlyAccountParams { - pub body: crate::datadogV2::model::FastlyAccountCreateRequest, -} - -/// CreateFastlyServiceParams is a struct for passing parameters to the method [`FastlyIntegrationAPI::create_fastly_service`] -#[derive(Clone, Debug)] -pub struct CreateFastlyServiceParams { - /// Fastly Account id. - pub account_id: String, - pub body: crate::datadogV2::model::FastlyServiceRequest, -} - -/// DeleteFastlyAccountParams is a struct for passing parameters to the method [`FastlyIntegrationAPI::delete_fastly_account`] -#[derive(Clone, Debug)] -pub struct DeleteFastlyAccountParams { - /// Fastly Account id. - pub account_id: String, -} - -/// DeleteFastlyServiceParams is a struct for passing parameters to the method [`FastlyIntegrationAPI::delete_fastly_service`] -#[derive(Clone, Debug)] -pub struct DeleteFastlyServiceParams { - /// Fastly Account id. - pub account_id: String, - /// Fastly Service ID. - pub service_id: String, -} - -/// GetFastlyAccountParams is a struct for passing parameters to the method [`FastlyIntegrationAPI::get_fastly_account`] -#[derive(Clone, Debug)] -pub struct GetFastlyAccountParams { - /// Fastly Account id. - pub account_id: String, -} - -/// GetFastlyServiceParams is a struct for passing parameters to the method [`FastlyIntegrationAPI::get_fastly_service`] -#[derive(Clone, Debug)] -pub struct GetFastlyServiceParams { - /// Fastly Account id. - pub account_id: String, - /// Fastly Service ID. - pub service_id: String, -} - -/// ListFastlyServicesParams is a struct for passing parameters to the method [`FastlyIntegrationAPI::list_fastly_services`] -#[derive(Clone, Debug)] -pub struct ListFastlyServicesParams { - /// Fastly Account id. - pub account_id: String, -} - -/// UpdateFastlyAccountParams is a struct for passing parameters to the method [`FastlyIntegrationAPI::update_fastly_account`] -#[derive(Clone, Debug)] -pub struct UpdateFastlyAccountParams { - /// Fastly Account id. - pub account_id: String, - pub body: crate::datadogV2::model::FastlyAccountUpdateRequest, -} - -/// UpdateFastlyServiceParams is a struct for passing parameters to the method [`FastlyIntegrationAPI::update_fastly_service`] -#[derive(Clone, Debug)] -pub struct UpdateFastlyServiceParams { - /// Fastly Account id. - pub account_id: String, - /// Fastly Service ID. - pub service_id: String, - pub body: crate::datadogV2::model::FastlyServiceRequest, -} - /// CreateFastlyAccountError is a struct for typed errors of method [`FastlyIntegrationAPI::create_fastly_account`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -210,12 +139,12 @@ impl FastlyIntegrationAPI { /// Create a Fastly account. pub async fn create_fastly_account( &self, - params: CreateFastlyAccountParams, + body: crate::datadogV2::model::FastlyAccountCreateRequest, ) -> Result< Option, Error, > { - match self.create_fastly_account_with_http_info(params).await { + match self.create_fastly_account_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -224,16 +153,13 @@ impl FastlyIntegrationAPI { /// Create a Fastly account. pub async fn create_fastly_account_with_http_info( &self, - params: CreateFastlyAccountParams, + body: crate::datadogV2::model::FastlyAccountCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -293,12 +219,16 @@ impl FastlyIntegrationAPI { /// Create a Fastly service for an account. pub async fn create_fastly_service( &self, - params: CreateFastlyServiceParams, + account_id: String, + body: crate::datadogV2::model::FastlyServiceRequest, ) -> Result< Option, Error, > { - match self.create_fastly_service_with_http_info(params).await { + match self + .create_fastly_service_with_http_info(account_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -307,17 +237,14 @@ impl FastlyIntegrationAPI { /// Create a Fastly service for an account. pub async fn create_fastly_service_with_http_info( &self, - params: CreateFastlyServiceParams, + account_id: String, + body: crate::datadogV2::model::FastlyServiceRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -378,9 +305,9 @@ impl FastlyIntegrationAPI { /// Delete a Fastly account. pub async fn delete_fastly_account( &self, - params: DeleteFastlyAccountParams, + account_id: String, ) -> Result, Error> { - match self.delete_fastly_account_with_http_info(params).await { + match self.delete_fastly_account_with_http_info(account_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -389,13 +316,10 @@ impl FastlyIntegrationAPI { /// Delete a Fastly account. pub async fn delete_fastly_account_with_http_info( &self, - params: DeleteFastlyAccountParams, + account_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -447,9 +371,13 @@ impl FastlyIntegrationAPI { /// Delete a Fastly service for an account. pub async fn delete_fastly_service( &self, - params: DeleteFastlyServiceParams, + account_id: String, + service_id: String, ) -> Result, Error> { - match self.delete_fastly_service_with_http_info(params).await { + match self + .delete_fastly_service_with_http_info(account_id, service_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -458,14 +386,11 @@ impl FastlyIntegrationAPI { /// Delete a Fastly service for an account. pub async fn delete_fastly_service_with_http_info( &self, - params: DeleteFastlyServiceParams, + account_id: String, + service_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let service_id = params.service_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -518,10 +443,10 @@ impl FastlyIntegrationAPI { /// Get a Fastly account. pub async fn get_fastly_account( &self, - params: GetFastlyAccountParams, + account_id: String, ) -> Result, Error> { - match self.get_fastly_account_with_http_info(params).await { + match self.get_fastly_account_with_http_info(account_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -530,16 +455,13 @@ impl FastlyIntegrationAPI { /// Get a Fastly account. pub async fn get_fastly_account_with_http_info( &self, - params: GetFastlyAccountParams, + account_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -593,10 +515,14 @@ impl FastlyIntegrationAPI { /// Get a Fastly service for an account. pub async fn get_fastly_service( &self, - params: GetFastlyServiceParams, + account_id: String, + service_id: String, ) -> Result, Error> { - match self.get_fastly_service_with_http_info(params).await { + match self + .get_fastly_service_with_http_info(account_id, service_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -605,17 +531,14 @@ impl FastlyIntegrationAPI { /// Get a Fastly service for an account. pub async fn get_fastly_service_with_http_info( &self, - params: GetFastlyServiceParams, + account_id: String, + service_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let service_id = params.service_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -689,8 +612,6 @@ impl FastlyIntegrationAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -743,12 +664,12 @@ impl FastlyIntegrationAPI { /// List Fastly services for an account. pub async fn list_fastly_services( &self, - params: ListFastlyServicesParams, + account_id: String, ) -> Result< Option, Error, > { - match self.list_fastly_services_with_http_info(params).await { + match self.list_fastly_services_with_http_info(account_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -757,16 +678,13 @@ impl FastlyIntegrationAPI { /// List Fastly services for an account. pub async fn list_fastly_services_with_http_info( &self, - params: ListFastlyServicesParams, + account_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -820,12 +738,16 @@ impl FastlyIntegrationAPI { /// Update a Fastly account. pub async fn update_fastly_account( &self, - params: UpdateFastlyAccountParams, + account_id: String, + body: crate::datadogV2::model::FastlyAccountUpdateRequest, ) -> Result< Option, Error, > { - match self.update_fastly_account_with_http_info(params).await { + match self + .update_fastly_account_with_http_info(account_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -834,17 +756,14 @@ impl FastlyIntegrationAPI { /// Update a Fastly account. pub async fn update_fastly_account_with_http_info( &self, - params: UpdateFastlyAccountParams, + account_id: String, + body: crate::datadogV2::model::FastlyAccountUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -905,12 +824,17 @@ impl FastlyIntegrationAPI { /// Update a Fastly service for an account. pub async fn update_fastly_service( &self, - params: UpdateFastlyServiceParams, + account_id: String, + service_id: String, + body: crate::datadogV2::model::FastlyServiceRequest, ) -> Result< Option, Error, > { - match self.update_fastly_service_with_http_info(params).await { + match self + .update_fastly_service_with_http_info(account_id, service_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -919,18 +843,15 @@ impl FastlyIntegrationAPI { /// Update a Fastly service for an account. pub async fn update_fastly_service_with_http_info( &self, - params: UpdateFastlyServiceParams, + account_id: String, + service_id: String, + body: crate::datadogV2::model::FastlyServiceRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let service_id = params.service_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_gcp_integration.rs b/src/datadogV2/api/api_gcp_integration.rs index 85677b73c..a4281c7ea 100644 --- a/src/datadogV2/api/api_gcp_integration.rs +++ b/src/datadogV2/api/api_gcp_integration.rs @@ -5,32 +5,11 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateGCPSTSAccountParams is a struct for passing parameters to the method [`GCPIntegrationAPI::create_gcpsts_account`] +/// MakeGCPSTSDelegateOptionalParams is a struct for passing parameters to the method [`GCPIntegrationAPI::make_gcpsts_delegate`] #[derive(Clone, Debug)] -pub struct CreateGCPSTSAccountParams { - pub body: crate::datadogV2::model::GCPSTSServiceAccountCreateRequest, -} - -/// DeleteGCPSTSAccountParams is a struct for passing parameters to the method [`GCPIntegrationAPI::delete_gcpsts_account`] -#[derive(Clone, Debug)] -pub struct DeleteGCPSTSAccountParams { - /// Your GCP STS enabled service account's unique ID. - pub account_id: String, -} - -/// MakeGCPSTSDelegateParams is a struct for passing parameters to the method [`GCPIntegrationAPI::make_gcpsts_delegate`] -#[derive(Clone, Debug)] -pub struct MakeGCPSTSDelegateParams { +pub struct MakeGCPSTSDelegateOptionalParams { /// Create a delegate service account within Datadog. - pub body: Option>>, -} - -/// UpdateGCPSTSAccountParams is a struct for passing parameters to the method [`GCPIntegrationAPI::update_gcpsts_account`] -#[derive(Clone, Debug)] -pub struct UpdateGCPSTSAccountParams { - /// Your GCP STS enabled service account's unique ID. - pub account_id: String, - pub body: crate::datadogV2::model::GCPSTSServiceAccountUpdateRequest, + pub body: Option>, } /// CreateGCPSTSAccountError is a struct for typed errors of method [`GCPIntegrationAPI::create_gcpsts_account`] @@ -119,12 +98,12 @@ impl GCPIntegrationAPI { /// Create a new entry within Datadog for your STS enabled service account. pub async fn create_gcpsts_account( &self, - params: CreateGCPSTSAccountParams, + body: crate::datadogV2::model::GCPSTSServiceAccountCreateRequest, ) -> Result< Option, Error, > { - match self.create_gcpsts_account_with_http_info(params).await { + match self.create_gcpsts_account_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -133,16 +112,13 @@ impl GCPIntegrationAPI { /// Create a new entry within Datadog for your STS enabled service account. pub async fn create_gcpsts_account_with_http_info( &self, - params: CreateGCPSTSAccountParams, + body: crate::datadogV2::model::GCPSTSServiceAccountCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -202,9 +178,9 @@ impl GCPIntegrationAPI { /// Delete an STS enabled GCP account from within Datadog. pub async fn delete_gcpsts_account( &self, - params: DeleteGCPSTSAccountParams, + account_id: String, ) -> Result, Error> { - match self.delete_gcpsts_account_with_http_info(params).await { + match self.delete_gcpsts_account_with_http_info(account_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -213,13 +189,10 @@ impl GCPIntegrationAPI { /// Delete an STS enabled GCP account from within Datadog. pub async fn delete_gcpsts_account_with_http_info( &self, - params: DeleteGCPSTSAccountParams, + account_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -290,8 +263,6 @@ impl GCPIntegrationAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -363,8 +334,6 @@ impl GCPIntegrationAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -417,7 +386,7 @@ impl GCPIntegrationAPI { /// Create a Datadog GCP principal. pub async fn make_gcpsts_delegate( &self, - params: MakeGCPSTSDelegateParams, + params: MakeGCPSTSDelegateOptionalParams, ) -> Result< Option, Error, @@ -431,14 +400,14 @@ impl GCPIntegrationAPI { /// Create a Datadog GCP principal. pub async fn make_gcpsts_delegate_with_http_info( &self, - params: MakeGCPSTSDelegateParams, + params: MakeGCPSTSDelegateOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let body = params.body; let local_client = &local_configuration.client; @@ -500,12 +469,16 @@ impl GCPIntegrationAPI { /// Update an STS enabled service account. pub async fn update_gcpsts_account( &self, - params: UpdateGCPSTSAccountParams, + account_id: String, + body: crate::datadogV2::model::GCPSTSServiceAccountUpdateRequest, ) -> Result< Option, Error, > { - match self.update_gcpsts_account_with_http_info(params).await { + match self + .update_gcpsts_account_with_http_info(account_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -514,17 +487,14 @@ impl GCPIntegrationAPI { /// Update an STS enabled service account. pub async fn update_gcpsts_account_with_http_info( &self, - params: UpdateGCPSTSAccountParams, + account_id: String, + body: crate::datadogV2::model::GCPSTSServiceAccountUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_incident_services.rs b/src/datadogV2/api/api_incident_services.rs index c90102aba..c23a3a493 100644 --- a/src/datadogV2/api/api_incident_services.rs +++ b/src/datadogV2/api/api_incident_services.rs @@ -5,32 +5,16 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateIncidentServiceParams is a struct for passing parameters to the method [`IncidentServicesAPI::create_incident_service`] +/// GetIncidentServiceOptionalParams is a struct for passing parameters to the method [`IncidentServicesAPI::get_incident_service`] #[derive(Clone, Debug)] -pub struct CreateIncidentServiceParams { - /// Incident Service Payload. - pub body: crate::datadogV2::model::IncidentServiceCreateRequest, -} - -/// DeleteIncidentServiceParams is a struct for passing parameters to the method [`IncidentServicesAPI::delete_incident_service`] -#[derive(Clone, Debug)] -pub struct DeleteIncidentServiceParams { - /// The ID of the incident service. - pub service_id: String, -} - -/// GetIncidentServiceParams is a struct for passing parameters to the method [`IncidentServicesAPI::get_incident_service`] -#[derive(Clone, Debug)] -pub struct GetIncidentServiceParams { - /// The ID of the incident service. - pub service_id: String, +pub struct GetIncidentServiceOptionalParams { /// Specifies which types of related objects should be included in the response. pub include: Option, } -/// ListIncidentServicesParams is a struct for passing parameters to the method [`IncidentServicesAPI::list_incident_services`] +/// ListIncidentServicesOptionalParams is a struct for passing parameters to the method [`IncidentServicesAPI::list_incident_services`] #[derive(Clone, Debug)] -pub struct ListIncidentServicesParams { +pub struct ListIncidentServicesOptionalParams { /// Specifies which types of related objects should be included in the response. pub include: Option, /// Size for a given page. The maximum allowed value is 100. @@ -41,15 +25,6 @@ pub struct ListIncidentServicesParams { pub filter: Option, } -/// UpdateIncidentServiceParams is a struct for passing parameters to the method [`IncidentServicesAPI::update_incident_service`] -#[derive(Clone, Debug)] -pub struct UpdateIncidentServiceParams { - /// The ID of the incident service. - pub service_id: String, - /// Incident Service Payload. - pub body: crate::datadogV2::model::IncidentServiceUpdateRequest, -} - /// CreateIncidentServiceError is a struct for typed errors of method [`IncidentServicesAPI::create_incident_service`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -134,12 +109,12 @@ impl IncidentServicesAPI { /// Creates a new incident service. pub async fn create_incident_service( &self, - params: CreateIncidentServiceParams, + body: crate::datadogV2::model::IncidentServiceCreateRequest, ) -> Result< Option, Error, > { - match self.create_incident_service_with_http_info(params).await { + match self.create_incident_service_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -148,16 +123,13 @@ impl IncidentServicesAPI { /// Creates a new incident service. pub async fn create_incident_service_with_http_info( &self, - params: CreateIncidentServiceParams, + body: crate::datadogV2::model::IncidentServiceCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/services", local_configuration.base_path); @@ -214,9 +186,12 @@ impl IncidentServicesAPI { /// Deletes an existing incident service. pub async fn delete_incident_service( &self, - params: DeleteIncidentServiceParams, + service_id: String, ) -> Result, Error> { - match self.delete_incident_service_with_http_info(params).await { + match self + .delete_incident_service_with_http_info(service_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -225,13 +200,10 @@ impl IncidentServicesAPI { /// Deletes an existing incident service. pub async fn delete_incident_service_with_http_info( &self, - params: DeleteIncidentServiceParams, + service_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let service_id = params.service_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -284,12 +256,16 @@ impl IncidentServicesAPI { /// the included attribute will contain the users related to these incident services. pub async fn get_incident_service( &self, - params: GetIncidentServiceParams, + service_id: String, + params: GetIncidentServiceOptionalParams, ) -> Result< Option, Error, > { - match self.get_incident_service_with_http_info(params).await { + match self + .get_incident_service_with_http_info(service_id, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -299,15 +275,15 @@ impl IncidentServicesAPI { /// the included attribute will contain the users related to these incident services. pub async fn get_incident_service_with_http_info( &self, - params: GetIncidentServiceParams, + service_id: String, + params: GetIncidentServiceOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let service_id = params.service_id; + // unbox and build optional parameters let include = params.include; let local_client = &local_configuration.client; @@ -320,8 +296,9 @@ impl IncidentServicesAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = include { - local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + if let Some(ref local_query_param) = include { + local_req_builder = + local_req_builder.query(&[("include", &local_query_param.to_string())]); }; // build user agent @@ -367,7 +344,7 @@ impl IncidentServicesAPI { /// Get all incident services uploaded for the requesting user's organization. If the `include[users]` query parameter is provided, the included attribute will contain the users related to these incident services. pub async fn list_incident_services( &self, - params: ListIncidentServicesParams, + params: ListIncidentServicesOptionalParams, ) -> Result< Option, Error, @@ -381,14 +358,14 @@ impl IncidentServicesAPI { /// Get all incident services uploaded for the requesting user's organization. If the `include[users]` query parameter is provided, the included attribute will contain the users related to these incident services. pub async fn list_incident_services_with_http_info( &self, - params: ListIncidentServicesParams, + params: ListIncidentServicesOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let include = params.include; let page_size = params.page_size; let page_offset = params.page_offset; @@ -400,18 +377,21 @@ impl IncidentServicesAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = include { - local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + if let Some(ref local_query_param) = include { + local_req_builder = + local_req_builder.query(&[("include", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_offset { + if let Some(ref local_query_param) = page_offset { local_req_builder = - local_req_builder.query(&[("page[offset]", &local_str.to_string())]); + local_req_builder.query(&[("page[offset]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter { - local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + if let Some(ref local_query_param) = filter { + local_req_builder = + local_req_builder.query(&[("filter", &local_query_param.to_string())]); }; // build user agent @@ -457,12 +437,16 @@ impl IncidentServicesAPI { /// Updates an existing incident service. Only provide the attributes which should be updated as this request is a partial update. pub async fn update_incident_service( &self, - params: UpdateIncidentServiceParams, + service_id: String, + body: crate::datadogV2::model::IncidentServiceUpdateRequest, ) -> Result< Option, Error, > { - match self.update_incident_service_with_http_info(params).await { + match self + .update_incident_service_with_http_info(service_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -471,17 +455,14 @@ impl IncidentServicesAPI { /// Updates an existing incident service. Only provide the attributes which should be updated as this request is a partial update. pub async fn update_incident_service_with_http_info( &self, - params: UpdateIncidentServiceParams, + service_id: String, + body: crate::datadogV2::model::IncidentServiceUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let service_id = params.service_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_incident_teams.rs b/src/datadogV2/api/api_incident_teams.rs index 036676008..d58911c67 100644 --- a/src/datadogV2/api/api_incident_teams.rs +++ b/src/datadogV2/api/api_incident_teams.rs @@ -5,32 +5,16 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateIncidentTeamParams is a struct for passing parameters to the method [`IncidentTeamsAPI::create_incident_team`] +/// GetIncidentTeamOptionalParams is a struct for passing parameters to the method [`IncidentTeamsAPI::get_incident_team`] #[derive(Clone, Debug)] -pub struct CreateIncidentTeamParams { - /// Incident Team Payload. - pub body: crate::datadogV2::model::IncidentTeamCreateRequest, -} - -/// DeleteIncidentTeamParams is a struct for passing parameters to the method [`IncidentTeamsAPI::delete_incident_team`] -#[derive(Clone, Debug)] -pub struct DeleteIncidentTeamParams { - /// The ID of the incident team. - pub team_id: String, -} - -/// GetIncidentTeamParams is a struct for passing parameters to the method [`IncidentTeamsAPI::get_incident_team`] -#[derive(Clone, Debug)] -pub struct GetIncidentTeamParams { - /// The ID of the incident team. - pub team_id: String, +pub struct GetIncidentTeamOptionalParams { /// Specifies which types of related objects should be included in the response. pub include: Option, } -/// ListIncidentTeamsParams is a struct for passing parameters to the method [`IncidentTeamsAPI::list_incident_teams`] +/// ListIncidentTeamsOptionalParams is a struct for passing parameters to the method [`IncidentTeamsAPI::list_incident_teams`] #[derive(Clone, Debug)] -pub struct ListIncidentTeamsParams { +pub struct ListIncidentTeamsOptionalParams { /// Specifies which types of related objects should be included in the response. pub include: Option, /// Size for a given page. The maximum allowed value is 100. @@ -41,15 +25,6 @@ pub struct ListIncidentTeamsParams { pub filter: Option, } -/// UpdateIncidentTeamParams is a struct for passing parameters to the method [`IncidentTeamsAPI::update_incident_team`] -#[derive(Clone, Debug)] -pub struct UpdateIncidentTeamParams { - /// The ID of the incident team. - pub team_id: String, - /// Incident Team Payload. - pub body: crate::datadogV2::model::IncidentTeamUpdateRequest, -} - /// CreateIncidentTeamError is a struct for typed errors of method [`IncidentTeamsAPI::create_incident_team`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -134,10 +109,10 @@ impl IncidentTeamsAPI { /// Creates a new incident team. pub async fn create_incident_team( &self, - params: CreateIncidentTeamParams, + body: crate::datadogV2::model::IncidentTeamCreateRequest, ) -> Result, Error> { - match self.create_incident_team_with_http_info(params).await { + match self.create_incident_team_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -146,16 +121,13 @@ impl IncidentTeamsAPI { /// Creates a new incident team. pub async fn create_incident_team_with_http_info( &self, - params: CreateIncidentTeamParams, + body: crate::datadogV2::model::IncidentTeamCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/teams", local_configuration.base_path); @@ -212,9 +184,9 @@ impl IncidentTeamsAPI { /// Deletes an existing incident team. pub async fn delete_incident_team( &self, - params: DeleteIncidentTeamParams, + team_id: String, ) -> Result, Error> { - match self.delete_incident_team_with_http_info(params).await { + match self.delete_incident_team_with_http_info(team_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -223,13 +195,10 @@ impl IncidentTeamsAPI { /// Deletes an existing incident team. pub async fn delete_incident_team_with_http_info( &self, - params: DeleteIncidentTeamParams, + team_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let team_id = params.team_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -282,10 +251,11 @@ impl IncidentTeamsAPI { /// the included attribute will contain the users related to these incident teams. pub async fn get_incident_team( &self, - params: GetIncidentTeamParams, + team_id: String, + params: GetIncidentTeamOptionalParams, ) -> Result, Error> { - match self.get_incident_team_with_http_info(params).await { + match self.get_incident_team_with_http_info(team_id, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -295,15 +265,15 @@ impl IncidentTeamsAPI { /// the included attribute will contain the users related to these incident teams. pub async fn get_incident_team_with_http_info( &self, - params: GetIncidentTeamParams, + team_id: String, + params: GetIncidentTeamOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let team_id = params.team_id; + // unbox and build optional parameters let include = params.include; let local_client = &local_configuration.client; @@ -316,8 +286,9 @@ impl IncidentTeamsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = include { - local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + if let Some(ref local_query_param) = include { + local_req_builder = + local_req_builder.query(&[("include", &local_query_param.to_string())]); }; // build user agent @@ -363,7 +334,7 @@ impl IncidentTeamsAPI { /// Get all incident teams for the requesting user's organization. If the `include[users]` query parameter is provided, the included attribute will contain the users related to these incident teams. pub async fn list_incident_teams( &self, - params: ListIncidentTeamsParams, + params: ListIncidentTeamsOptionalParams, ) -> Result, Error> { match self.list_incident_teams_with_http_info(params).await { @@ -375,14 +346,14 @@ impl IncidentTeamsAPI { /// Get all incident teams for the requesting user's organization. If the `include[users]` query parameter is provided, the included attribute will contain the users related to these incident teams. pub async fn list_incident_teams_with_http_info( &self, - params: ListIncidentTeamsParams, + params: ListIncidentTeamsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let include = params.include; let page_size = params.page_size; let page_offset = params.page_offset; @@ -394,18 +365,21 @@ impl IncidentTeamsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = include { - local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + if let Some(ref local_query_param) = include { + local_req_builder = + local_req_builder.query(&[("include", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_offset { + if let Some(ref local_query_param) = page_offset { local_req_builder = - local_req_builder.query(&[("page[offset]", &local_str.to_string())]); + local_req_builder.query(&[("page[offset]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter { - local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + if let Some(ref local_query_param) = filter { + local_req_builder = + local_req_builder.query(&[("filter", &local_query_param.to_string())]); }; // build user agent @@ -451,10 +425,14 @@ impl IncidentTeamsAPI { /// Updates an existing incident team. Only provide the attributes which should be updated as this request is a partial update. pub async fn update_incident_team( &self, - params: UpdateIncidentTeamParams, + team_id: String, + body: crate::datadogV2::model::IncidentTeamUpdateRequest, ) -> Result, Error> { - match self.update_incident_team_with_http_info(params).await { + match self + .update_incident_team_with_http_info(team_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -463,17 +441,14 @@ impl IncidentTeamsAPI { /// Updates an existing incident team. Only provide the attributes which should be updated as this request is a partial update. pub async fn update_incident_team_with_http_info( &self, - params: UpdateIncidentTeamParams, + team_id: String, + body: crate::datadogV2::model::IncidentTeamUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let team_id = params.team_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_incidents.rs b/src/datadogV2/api/api_incidents.rs index a41caf845..c7f5cf35a 100644 --- a/src/datadogV2/api/api_incidents.rs +++ b/src/datadogV2/api/api_incidents.rs @@ -5,88 +5,16 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateIncidentParams is a struct for passing parameters to the method [`IncidentsAPI::create_incident`] +/// GetIncidentOptionalParams is a struct for passing parameters to the method [`IncidentsAPI::get_incident`] #[derive(Clone, Debug)] -pub struct CreateIncidentParams { - /// Incident payload. - pub body: crate::datadogV2::model::IncidentCreateRequest, -} - -/// CreateIncidentIntegrationParams is a struct for passing parameters to the method [`IncidentsAPI::create_incident_integration`] -#[derive(Clone, Debug)] -pub struct CreateIncidentIntegrationParams { - /// The UUID of the incident. - pub incident_id: String, - /// Incident integration metadata payload. - pub body: crate::datadogV2::model::IncidentIntegrationMetadataCreateRequest, -} - -/// CreateIncidentTodoParams is a struct for passing parameters to the method [`IncidentsAPI::create_incident_todo`] -#[derive(Clone, Debug)] -pub struct CreateIncidentTodoParams { - /// The UUID of the incident. - pub incident_id: String, - /// Incident todo payload. - pub body: crate::datadogV2::model::IncidentTodoCreateRequest, -} - -/// DeleteIncidentParams is a struct for passing parameters to the method [`IncidentsAPI::delete_incident`] -#[derive(Clone, Debug)] -pub struct DeleteIncidentParams { - /// The UUID of the incident. - pub incident_id: String, -} - -/// DeleteIncidentIntegrationParams is a struct for passing parameters to the method [`IncidentsAPI::delete_incident_integration`] -#[derive(Clone, Debug)] -pub struct DeleteIncidentIntegrationParams { - /// The UUID of the incident. - pub incident_id: String, - /// The UUID of the incident integration metadata. - pub integration_metadata_id: String, -} - -/// DeleteIncidentTodoParams is a struct for passing parameters to the method [`IncidentsAPI::delete_incident_todo`] -#[derive(Clone, Debug)] -pub struct DeleteIncidentTodoParams { - /// The UUID of the incident. - pub incident_id: String, - /// The UUID of the incident todo. - pub todo_id: String, -} - -/// GetIncidentParams is a struct for passing parameters to the method [`IncidentsAPI::get_incident`] -#[derive(Clone, Debug)] -pub struct GetIncidentParams { - /// The UUID of the incident. - pub incident_id: String, +pub struct GetIncidentOptionalParams { /// Specifies which types of related objects should be included in the response. pub include: Option>, } -/// GetIncidentIntegrationParams is a struct for passing parameters to the method [`IncidentsAPI::get_incident_integration`] -#[derive(Clone, Debug)] -pub struct GetIncidentIntegrationParams { - /// The UUID of the incident. - pub incident_id: String, - /// The UUID of the incident integration metadata. - pub integration_metadata_id: String, -} - -/// GetIncidentTodoParams is a struct for passing parameters to the method [`IncidentsAPI::get_incident_todo`] -#[derive(Clone, Debug)] -pub struct GetIncidentTodoParams { - /// The UUID of the incident. - pub incident_id: String, - /// The UUID of the incident todo. - pub todo_id: String, -} - -/// ListIncidentAttachmentsParams is a struct for passing parameters to the method [`IncidentsAPI::list_incident_attachments`] +/// ListIncidentAttachmentsOptionalParams is a struct for passing parameters to the method [`IncidentsAPI::list_incident_attachments`] #[derive(Clone, Debug)] -pub struct ListIncidentAttachmentsParams { - /// The UUID of the incident. - pub incident_id: String, +pub struct ListIncidentAttachmentsOptionalParams { /// Specifies which types of related objects are included in the response. pub include: Option>, /// Specifies which types of attachments are included in the response. @@ -94,23 +22,9 @@ pub struct ListIncidentAttachmentsParams { Option>, } -/// ListIncidentIntegrationsParams is a struct for passing parameters to the method [`IncidentsAPI::list_incident_integrations`] +/// ListIncidentsOptionalParams is a struct for passing parameters to the method [`IncidentsAPI::list_incidents`] #[derive(Clone, Debug)] -pub struct ListIncidentIntegrationsParams { - /// The UUID of the incident. - pub incident_id: String, -} - -/// ListIncidentTodosParams is a struct for passing parameters to the method [`IncidentsAPI::list_incident_todos`] -#[derive(Clone, Debug)] -pub struct ListIncidentTodosParams { - /// The UUID of the incident. - pub incident_id: String, -} - -/// ListIncidentsParams is a struct for passing parameters to the method [`IncidentsAPI::list_incidents`] -#[derive(Clone, Debug)] -pub struct ListIncidentsParams { +pub struct ListIncidentsOptionalParams { /// Specifies which types of related objects should be included in the response. pub include: Option>, /// Size for a given page. The maximum allowed value is 100. @@ -119,13 +33,9 @@ pub struct ListIncidentsParams { pub page_offset: Option, } -/// SearchIncidentsParams is a struct for passing parameters to the method [`IncidentsAPI::search_incidents`] +/// SearchIncidentsOptionalParams is a struct for passing parameters to the method [`IncidentsAPI::search_incidents`] #[derive(Clone, Debug)] -pub struct SearchIncidentsParams { - /// Specifies which incidents should be returned. The query can contain any number of incident facets - /// joined by `ANDs`, along with multiple values for each of those facets joined by `OR`s. For - /// example: `state:active AND severity:(SEV-2 OR SEV-1)`. - pub query: String, +pub struct SearchIncidentsOptionalParams { /// Specifies which types of related objects should be included in the response. pub include: Option, /// Specifies the order of returned incidents. @@ -136,50 +46,20 @@ pub struct SearchIncidentsParams { pub page_offset: Option, } -/// UpdateIncidentParams is a struct for passing parameters to the method [`IncidentsAPI::update_incident`] +/// UpdateIncidentOptionalParams is a struct for passing parameters to the method [`IncidentsAPI::update_incident`] #[derive(Clone, Debug)] -pub struct UpdateIncidentParams { - /// The UUID of the incident. - pub incident_id: String, - /// Incident Payload. - pub body: crate::datadogV2::model::IncidentUpdateRequest, +pub struct UpdateIncidentOptionalParams { /// Specifies which types of related objects should be included in the response. pub include: Option>, } -/// UpdateIncidentAttachmentsParams is a struct for passing parameters to the method [`IncidentsAPI::update_incident_attachments`] +/// UpdateIncidentAttachmentsOptionalParams is a struct for passing parameters to the method [`IncidentsAPI::update_incident_attachments`] #[derive(Clone, Debug)] -pub struct UpdateIncidentAttachmentsParams { - /// The UUID of the incident. - pub incident_id: String, - /// Incident Attachment Payload. - pub body: crate::datadogV2::model::IncidentAttachmentUpdateRequest, +pub struct UpdateIncidentAttachmentsOptionalParams { /// Specifies which types of related objects are included in the response. pub include: Option>, } -/// UpdateIncidentIntegrationParams is a struct for passing parameters to the method [`IncidentsAPI::update_incident_integration`] -#[derive(Clone, Debug)] -pub struct UpdateIncidentIntegrationParams { - /// The UUID of the incident. - pub incident_id: String, - /// The UUID of the incident integration metadata. - pub integration_metadata_id: String, - /// Incident integration metadata payload. - pub body: crate::datadogV2::model::IncidentIntegrationMetadataPatchRequest, -} - -/// UpdateIncidentTodoParams is a struct for passing parameters to the method [`IncidentsAPI::update_incident_todo`] -#[derive(Clone, Debug)] -pub struct UpdateIncidentTodoParams { - /// The UUID of the incident. - pub incident_id: String, - /// The UUID of the incident todo. - pub todo_id: String, - /// Incident todo payload. - pub body: crate::datadogV2::model::IncidentTodoPatchRequest, -} - /// CreateIncidentError is a struct for typed errors of method [`IncidentsAPI::create_incident`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -420,9 +300,9 @@ impl IncidentsAPI { /// Create an incident. pub async fn create_incident( &self, - params: CreateIncidentParams, + body: crate::datadogV2::model::IncidentCreateRequest, ) -> Result, Error> { - match self.create_incident_with_http_info(params).await { + match self.create_incident_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -431,16 +311,13 @@ impl IncidentsAPI { /// Create an incident. pub async fn create_incident_with_http_info( &self, - params: CreateIncidentParams, + body: crate::datadogV2::model::IncidentCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/incidents", local_configuration.base_path); @@ -497,13 +374,14 @@ impl IncidentsAPI { /// Create an incident integration metadata. pub async fn create_incident_integration( &self, - params: CreateIncidentIntegrationParams, + incident_id: String, + body: crate::datadogV2::model::IncidentIntegrationMetadataCreateRequest, ) -> Result< Option, Error, > { match self - .create_incident_integration_with_http_info(params) + .create_incident_integration_with_http_info(incident_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -514,17 +392,14 @@ impl IncidentsAPI { /// Create an incident integration metadata. pub async fn create_incident_integration_with_http_info( &self, - params: CreateIncidentIntegrationParams, + incident_id: String, + body: crate::datadogV2::model::IncidentIntegrationMetadataCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let incident_id = params.incident_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -585,10 +460,14 @@ impl IncidentsAPI { /// Create an incident todo. pub async fn create_incident_todo( &self, - params: CreateIncidentTodoParams, + incident_id: String, + body: crate::datadogV2::model::IncidentTodoCreateRequest, ) -> Result, Error> { - match self.create_incident_todo_with_http_info(params).await { + match self + .create_incident_todo_with_http_info(incident_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -597,17 +476,14 @@ impl IncidentsAPI { /// Create an incident todo. pub async fn create_incident_todo_with_http_info( &self, - params: CreateIncidentTodoParams, + incident_id: String, + body: crate::datadogV2::model::IncidentTodoCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let incident_id = params.incident_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -668,9 +544,9 @@ impl IncidentsAPI { /// Deletes an existing incident from the users organization. pub async fn delete_incident( &self, - params: DeleteIncidentParams, + incident_id: String, ) -> Result, Error> { - match self.delete_incident_with_http_info(params).await { + match self.delete_incident_with_http_info(incident_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -679,13 +555,10 @@ impl IncidentsAPI { /// Deletes an existing incident from the users organization. pub async fn delete_incident_with_http_info( &self, - params: DeleteIncidentParams, + incident_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let incident_id = params.incident_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -737,10 +610,11 @@ impl IncidentsAPI { /// Delete an incident integration metadata. pub async fn delete_incident_integration( &self, - params: DeleteIncidentIntegrationParams, + incident_id: String, + integration_metadata_id: String, ) -> Result, Error> { match self - .delete_incident_integration_with_http_info(params) + .delete_incident_integration_with_http_info(incident_id, integration_metadata_id) .await { Ok(response_content) => Ok(response_content.entity), @@ -751,14 +625,11 @@ impl IncidentsAPI { /// Delete an incident integration metadata. pub async fn delete_incident_integration_with_http_info( &self, - params: DeleteIncidentIntegrationParams, + incident_id: String, + integration_metadata_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let incident_id = params.incident_id; - let integration_metadata_id = params.integration_metadata_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -812,9 +683,13 @@ impl IncidentsAPI { /// Delete an incident todo. pub async fn delete_incident_todo( &self, - params: DeleteIncidentTodoParams, + incident_id: String, + todo_id: String, ) -> Result, Error> { - match self.delete_incident_todo_with_http_info(params).await { + match self + .delete_incident_todo_with_http_info(incident_id, todo_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -823,14 +698,11 @@ impl IncidentsAPI { /// Delete an incident todo. pub async fn delete_incident_todo_with_http_info( &self, - params: DeleteIncidentTodoParams, + incident_id: String, + todo_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let incident_id = params.incident_id; - let todo_id = params.todo_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -883,9 +755,10 @@ impl IncidentsAPI { /// Get the details of an incident by `incident_id`. pub async fn get_incident( &self, - params: GetIncidentParams, + incident_id: String, + params: GetIncidentOptionalParams, ) -> Result, Error> { - match self.get_incident_with_http_info(params).await { + match self.get_incident_with_http_info(incident_id, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -894,13 +767,13 @@ impl IncidentsAPI { /// Get the details of an incident by `incident_id`. pub async fn get_incident_with_http_info( &self, - params: GetIncidentParams, + incident_id: String, + params: GetIncidentOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let incident_id = params.incident_id; + // unbox and build optional parameters let include = params.include; let local_client = &local_configuration.client; @@ -917,7 +790,7 @@ impl IncidentsAPI { local_req_builder = local_req_builder.query(&[( "include", &local - .into_iter() + .iter() .map(|p| p.to_string()) .collect::>() .join(",") @@ -967,12 +840,16 @@ impl IncidentsAPI { /// Get incident integration metadata details. pub async fn get_incident_integration( &self, - params: GetIncidentIntegrationParams, + incident_id: String, + integration_metadata_id: String, ) -> Result< Option, Error, > { - match self.get_incident_integration_with_http_info(params).await { + match self + .get_incident_integration_with_http_info(incident_id, integration_metadata_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -981,17 +858,14 @@ impl IncidentsAPI { /// Get incident integration metadata details. pub async fn get_incident_integration_with_http_info( &self, - params: GetIncidentIntegrationParams, + incident_id: String, + integration_metadata_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let incident_id = params.incident_id; - let integration_metadata_id = params.integration_metadata_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1047,10 +921,14 @@ impl IncidentsAPI { /// Get incident todo details. pub async fn get_incident_todo( &self, - params: GetIncidentTodoParams, + incident_id: String, + todo_id: String, ) -> Result, Error> { - match self.get_incident_todo_with_http_info(params).await { + match self + .get_incident_todo_with_http_info(incident_id, todo_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1059,17 +937,14 @@ impl IncidentsAPI { /// Get incident todo details. pub async fn get_incident_todo_with_http_info( &self, - params: GetIncidentTodoParams, + incident_id: String, + todo_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let incident_id = params.incident_id; - let todo_id = params.todo_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1124,12 +999,16 @@ impl IncidentsAPI { /// Get all attachments for a given incident. pub async fn list_incident_attachments( &self, - params: ListIncidentAttachmentsParams, + incident_id: String, + params: ListIncidentAttachmentsOptionalParams, ) -> Result< Option, Error, > { - match self.list_incident_attachments_with_http_info(params).await { + match self + .list_incident_attachments_with_http_info(incident_id, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1138,15 +1017,15 @@ impl IncidentsAPI { /// Get all attachments for a given incident. pub async fn list_incident_attachments_with_http_info( &self, - params: ListIncidentAttachmentsParams, + incident_id: String, + params: ListIncidentAttachmentsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let incident_id = params.incident_id; + // unbox and build optional parameters let include = params.include; let filter_attachment_type = params.filter_attachment_type; @@ -1164,7 +1043,7 @@ impl IncidentsAPI { local_req_builder = local_req_builder.query(&[( "include", &local - .into_iter() + .iter() .map(|p| p.to_string()) .collect::>() .join(",") @@ -1175,7 +1054,7 @@ impl IncidentsAPI { local_req_builder = local_req_builder.query(&[( "filter[attachment_type]", &local - .into_iter() + .iter() .map(|p| p.to_string()) .collect::>() .join(",") @@ -1226,12 +1105,15 @@ impl IncidentsAPI { /// Get all integration metadata for an incident. pub async fn list_incident_integrations( &self, - params: ListIncidentIntegrationsParams, + incident_id: String, ) -> Result< Option, Error, > { - match self.list_incident_integrations_with_http_info(params).await { + match self + .list_incident_integrations_with_http_info(incident_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1240,16 +1122,13 @@ impl IncidentsAPI { /// Get all integration metadata for an incident. pub async fn list_incident_integrations_with_http_info( &self, - params: ListIncidentIntegrationsParams, + incident_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let incident_id = params.incident_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1304,12 +1183,12 @@ impl IncidentsAPI { /// Get all todos for an incident. pub async fn list_incident_todos( &self, - params: ListIncidentTodosParams, + incident_id: String, ) -> Result< Option, Error, > { - match self.list_incident_todos_with_http_info(params).await { + match self.list_incident_todos_with_http_info(incident_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1318,16 +1197,13 @@ impl IncidentsAPI { /// Get all todos for an incident. pub async fn list_incident_todos_with_http_info( &self, - params: ListIncidentTodosParams, + incident_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let incident_id = params.incident_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1381,7 +1257,7 @@ impl IncidentsAPI { /// Get all incidents for the user's organization. pub async fn list_incidents( &self, - params: ListIncidentsParams, + params: ListIncidentsOptionalParams, ) -> Result, Error> { match self.list_incidents_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -1392,14 +1268,14 @@ impl IncidentsAPI { /// Get all incidents for the user's organization. pub async fn list_incidents_with_http_info( &self, - params: ListIncidentsParams, + params: ListIncidentsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let include = params.include; let page_size = params.page_size; let page_offset = params.page_offset; @@ -1414,19 +1290,20 @@ impl IncidentsAPI { local_req_builder = local_req_builder.query(&[( "include", &local - .into_iter() + .iter() .map(|p| p.to_string()) .collect::>() .join(",") .to_string(), )]); }; - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_offset { + if let Some(ref local_query_param) = page_offset { local_req_builder = - local_req_builder.query(&[("page[offset]", &local_str.to_string())]); + local_req_builder.query(&[("page[offset]", &local_query_param.to_string())]); }; // build user agent @@ -1472,10 +1349,11 @@ impl IncidentsAPI { /// Search for incidents matching a certain query. pub async fn search_incidents( &self, - params: SearchIncidentsParams, + query: String, + params: SearchIncidentsOptionalParams, ) -> Result, Error> { - match self.search_incidents_with_http_info(params).await { + match self.search_incidents_with_http_info(query, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1484,15 +1362,15 @@ impl IncidentsAPI { /// Search for incidents matching a certain query. pub async fn search_incidents_with_http_info( &self, - params: SearchIncidentsParams, + query: String, + params: SearchIncidentsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let query = params.query; + // unbox and build optional parameters let include = params.include; let sort = params.sort; let page_size = params.page_size; @@ -1505,18 +1383,21 @@ impl IncidentsAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("query", &query.to_string())]); - if let Some(ref local_str) = include { - local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + if let Some(ref local_query_param) = include { + local_req_builder = + local_req_builder.query(&[("include", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_offset { + if let Some(ref local_query_param) = page_offset { local_req_builder = - local_req_builder.query(&[("page[offset]", &local_str.to_string())]); + local_req_builder.query(&[("page[offset]", &local_query_param.to_string())]); }; // build user agent @@ -1562,9 +1443,14 @@ impl IncidentsAPI { /// Updates an incident. Provide only the attributes that should be updated as this request is a partial update. pub async fn update_incident( &self, - params: UpdateIncidentParams, + incident_id: String, + body: crate::datadogV2::model::IncidentUpdateRequest, + params: UpdateIncidentOptionalParams, ) -> Result, Error> { - match self.update_incident_with_http_info(params).await { + match self + .update_incident_with_http_info(incident_id, body, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1573,16 +1459,16 @@ impl IncidentsAPI { /// Updates an incident. Provide only the attributes that should be updated as this request is a partial update. pub async fn update_incident_with_http_info( &self, - params: UpdateIncidentParams, + incident_id: String, + body: crate::datadogV2::model::IncidentUpdateRequest, + params: UpdateIncidentOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let incident_id = params.incident_id; - let body = params.body; + // unbox and build optional parameters let include = params.include; let local_client = &local_configuration.client; @@ -1599,7 +1485,7 @@ impl IncidentsAPI { local_req_builder = local_req_builder.query(&[( "include", &local - .into_iter() + .iter() .map(|p| p.to_string()) .collect::>() .join(",") @@ -1657,13 +1543,15 @@ impl IncidentsAPI { /// The bulk update endpoint for creating, updating, and deleting attachments for a given incident. pub async fn update_incident_attachments( &self, - params: UpdateIncidentAttachmentsParams, + incident_id: String, + body: crate::datadogV2::model::IncidentAttachmentUpdateRequest, + params: UpdateIncidentAttachmentsOptionalParams, ) -> Result< Option, Error, > { match self - .update_incident_attachments_with_http_info(params) + .update_incident_attachments_with_http_info(incident_id, body, params) .await { Ok(response_content) => Ok(response_content.entity), @@ -1674,16 +1562,16 @@ impl IncidentsAPI { /// The bulk update endpoint for creating, updating, and deleting attachments for a given incident. pub async fn update_incident_attachments_with_http_info( &self, - params: UpdateIncidentAttachmentsParams, + incident_id: String, + body: crate::datadogV2::model::IncidentAttachmentUpdateRequest, + params: UpdateIncidentAttachmentsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let incident_id = params.incident_id; - let body = params.body; + // unbox and build optional parameters let include = params.include; let local_client = &local_configuration.client; @@ -1700,7 +1588,7 @@ impl IncidentsAPI { local_req_builder = local_req_builder.query(&[( "include", &local - .into_iter() + .iter() .map(|p| p.to_string()) .collect::>() .join(",") @@ -1758,13 +1646,15 @@ impl IncidentsAPI { /// Update an existing incident integration metadata. pub async fn update_incident_integration( &self, - params: UpdateIncidentIntegrationParams, + incident_id: String, + integration_metadata_id: String, + body: crate::datadogV2::model::IncidentIntegrationMetadataPatchRequest, ) -> Result< Option, Error, > { match self - .update_incident_integration_with_http_info(params) + .update_incident_integration_with_http_info(incident_id, integration_metadata_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -1775,18 +1665,15 @@ impl IncidentsAPI { /// Update an existing incident integration metadata. pub async fn update_incident_integration_with_http_info( &self, - params: UpdateIncidentIntegrationParams, + incident_id: String, + integration_metadata_id: String, + body: crate::datadogV2::model::IncidentIntegrationMetadataPatchRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let incident_id = params.incident_id; - let integration_metadata_id = params.integration_metadata_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1849,10 +1736,15 @@ impl IncidentsAPI { /// Update an incident todo. pub async fn update_incident_todo( &self, - params: UpdateIncidentTodoParams, + incident_id: String, + todo_id: String, + body: crate::datadogV2::model::IncidentTodoPatchRequest, ) -> Result, Error> { - match self.update_incident_todo_with_http_info(params).await { + match self + .update_incident_todo_with_http_info(incident_id, todo_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1861,18 +1753,15 @@ impl IncidentsAPI { /// Update an incident todo. pub async fn update_incident_todo_with_http_info( &self, - params: UpdateIncidentTodoParams, + incident_id: String, + todo_id: String, + body: crate::datadogV2::model::IncidentTodoPatchRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let incident_id = params.incident_id; - let todo_id = params.todo_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_ip_allowlist.rs b/src/datadogV2/api/api_ip_allowlist.rs index ffa71b7f6..84308c8c0 100644 --- a/src/datadogV2/api/api_ip_allowlist.rs +++ b/src/datadogV2/api/api_ip_allowlist.rs @@ -5,12 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// UpdateIPAllowlistParams is a struct for passing parameters to the method [`IPAllowlistAPI::update_ip_allowlist`] -#[derive(Clone, Debug)] -pub struct UpdateIPAllowlistParams { - pub body: crate::datadogV2::model::IPAllowlistUpdateRequest, -} - /// GetIPAllowlistError is a struct for typed errors of method [`IPAllowlistAPI::get_ip_allowlist`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -73,8 +67,6 @@ impl IPAllowlistAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/ip_allowlist", local_configuration.base_path); @@ -124,10 +116,10 @@ impl IPAllowlistAPI { /// Edit the entries in the IP allowlist, and enable or disable it. pub async fn update_ip_allowlist( &self, - params: UpdateIPAllowlistParams, + body: crate::datadogV2::model::IPAllowlistUpdateRequest, ) -> Result, Error> { - match self.update_ip_allowlist_with_http_info(params).await { + match self.update_ip_allowlist_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -136,16 +128,13 @@ impl IPAllowlistAPI { /// Edit the entries in the IP allowlist, and enable or disable it. pub async fn update_ip_allowlist_with_http_info( &self, - params: UpdateIPAllowlistParams, + body: crate::datadogV2::model::IPAllowlistUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/ip_allowlist", local_configuration.base_path); diff --git a/src/datadogV2/api/api_key_management.rs b/src/datadogV2/api/api_key_management.rs index 0e4094f12..5059461e4 100644 --- a/src/datadogV2/api/api_key_management.rs +++ b/src/datadogV2/api/api_key_management.rs @@ -5,67 +5,23 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateAPIKeyParams is a struct for passing parameters to the method [`KeyManagementAPI::create_api_key`] +/// GetAPIKeyOptionalParams is a struct for passing parameters to the method [`KeyManagementAPI::get_api_key`] #[derive(Clone, Debug)] -pub struct CreateAPIKeyParams { - pub body: crate::datadogV2::model::APIKeyCreateRequest, -} - -/// CreateCurrentUserApplicationKeyParams is a struct for passing parameters to the method [`KeyManagementAPI::create_current_user_application_key`] -#[derive(Clone, Debug)] -pub struct CreateCurrentUserApplicationKeyParams { - pub body: crate::datadogV2::model::ApplicationKeyCreateRequest, -} - -/// DeleteAPIKeyParams is a struct for passing parameters to the method [`KeyManagementAPI::delete_api_key`] -#[derive(Clone, Debug)] -pub struct DeleteAPIKeyParams { - /// The ID of the API key. - pub api_key_id: String, -} - -/// DeleteApplicationKeyParams is a struct for passing parameters to the method [`KeyManagementAPI::delete_application_key`] -#[derive(Clone, Debug)] -pub struct DeleteApplicationKeyParams { - /// The ID of the application key. - pub app_key_id: String, -} - -/// DeleteCurrentUserApplicationKeyParams is a struct for passing parameters to the method [`KeyManagementAPI::delete_current_user_application_key`] -#[derive(Clone, Debug)] -pub struct DeleteCurrentUserApplicationKeyParams { - /// The ID of the application key. - pub app_key_id: String, -} - -/// GetAPIKeyParams is a struct for passing parameters to the method [`KeyManagementAPI::get_api_key`] -#[derive(Clone, Debug)] -pub struct GetAPIKeyParams { - /// The ID of the API key. - pub api_key_id: String, +pub struct GetAPIKeyOptionalParams { /// Comma separated list of resource paths for related resources to include in the response. Supported resource paths are `created_by` and `modified_by`. pub include: Option, } -/// GetApplicationKeyParams is a struct for passing parameters to the method [`KeyManagementAPI::get_application_key`] +/// GetApplicationKeyOptionalParams is a struct for passing parameters to the method [`KeyManagementAPI::get_application_key`] #[derive(Clone, Debug)] -pub struct GetApplicationKeyParams { - /// The ID of the application key. - pub app_key_id: String, +pub struct GetApplicationKeyOptionalParams { /// Resource path for related resources to include in the response. Only `owned_by` is supported. pub include: Option, } -/// GetCurrentUserApplicationKeyParams is a struct for passing parameters to the method [`KeyManagementAPI::get_current_user_application_key`] -#[derive(Clone, Debug)] -pub struct GetCurrentUserApplicationKeyParams { - /// The ID of the application key. - pub app_key_id: String, -} - -/// ListAPIKeysParams is a struct for passing parameters to the method [`KeyManagementAPI::list_api_keys`] +/// ListAPIKeysOptionalParams is a struct for passing parameters to the method [`KeyManagementAPI::list_api_keys`] #[derive(Clone, Debug)] -pub struct ListAPIKeysParams { +pub struct ListAPIKeysOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, /// Specific page number to return. @@ -92,9 +48,9 @@ pub struct ListAPIKeysParams { pub filter_category: Option, } -/// ListApplicationKeysParams is a struct for passing parameters to the method [`KeyManagementAPI::list_application_keys`] +/// ListApplicationKeysOptionalParams is a struct for passing parameters to the method [`KeyManagementAPI::list_application_keys`] #[derive(Clone, Debug)] -pub struct ListApplicationKeysParams { +pub struct ListApplicationKeysOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, /// Specific page number to return. @@ -113,9 +69,9 @@ pub struct ListApplicationKeysParams { pub include: Option, } -/// ListCurrentUserApplicationKeysParams is a struct for passing parameters to the method [`KeyManagementAPI::list_current_user_application_keys`] +/// ListCurrentUserApplicationKeysOptionalParams is a struct for passing parameters to the method [`KeyManagementAPI::list_current_user_application_keys`] #[derive(Clone, Debug)] -pub struct ListCurrentUserApplicationKeysParams { +pub struct ListCurrentUserApplicationKeysOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, /// Specific page number to return. @@ -134,30 +90,6 @@ pub struct ListCurrentUserApplicationKeysParams { pub include: Option, } -/// UpdateAPIKeyParams is a struct for passing parameters to the method [`KeyManagementAPI::update_api_key`] -#[derive(Clone, Debug)] -pub struct UpdateAPIKeyParams { - /// The ID of the API key. - pub api_key_id: String, - pub body: crate::datadogV2::model::APIKeyUpdateRequest, -} - -/// UpdateApplicationKeyParams is a struct for passing parameters to the method [`KeyManagementAPI::update_application_key`] -#[derive(Clone, Debug)] -pub struct UpdateApplicationKeyParams { - /// The ID of the application key. - pub app_key_id: String, - pub body: crate::datadogV2::model::ApplicationKeyUpdateRequest, -} - -/// UpdateCurrentUserApplicationKeyParams is a struct for passing parameters to the method [`KeyManagementAPI::update_current_user_application_key`] -#[derive(Clone, Debug)] -pub struct UpdateCurrentUserApplicationKeyParams { - /// The ID of the application key. - pub app_key_id: String, - pub body: crate::datadogV2::model::ApplicationKeyUpdateRequest, -} - /// CreateAPIKeyError is a struct for typed errors of method [`KeyManagementAPI::create_api_key`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -328,9 +260,9 @@ impl KeyManagementAPI { /// Create an API key. pub async fn create_api_key( &self, - params: CreateAPIKeyParams, + body: crate::datadogV2::model::APIKeyCreateRequest, ) -> Result, Error> { - match self.create_api_key_with_http_info(params).await { + match self.create_api_key_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -339,14 +271,11 @@ impl KeyManagementAPI { /// Create an API key. pub async fn create_api_key_with_http_info( &self, - params: CreateAPIKeyParams, + body: crate::datadogV2::model::APIKeyCreateRequest, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/api_keys", local_configuration.base_path); @@ -402,13 +331,13 @@ impl KeyManagementAPI { /// Create an application key for current user pub async fn create_current_user_application_key( &self, - params: CreateCurrentUserApplicationKeyParams, + body: crate::datadogV2::model::ApplicationKeyCreateRequest, ) -> Result< Option, Error, > { match self - .create_current_user_application_key_with_http_info(params) + .create_current_user_application_key_with_http_info(body) .await { Ok(response_content) => Ok(response_content.entity), @@ -419,16 +348,13 @@ impl KeyManagementAPI { /// Create an application key for current user pub async fn create_current_user_application_key_with_http_info( &self, - params: CreateCurrentUserApplicationKeyParams, + body: crate::datadogV2::model::ApplicationKeyCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -488,9 +414,9 @@ impl KeyManagementAPI { /// Delete an API key. pub async fn delete_api_key( &self, - params: DeleteAPIKeyParams, + api_key_id: String, ) -> Result, Error> { - match self.delete_api_key_with_http_info(params).await { + match self.delete_api_key_with_http_info(api_key_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -499,13 +425,10 @@ impl KeyManagementAPI { /// Delete an API key. pub async fn delete_api_key_with_http_info( &self, - params: DeleteAPIKeyParams, + api_key_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let api_key_id = params.api_key_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -556,9 +479,9 @@ impl KeyManagementAPI { /// Delete an application key pub async fn delete_application_key( &self, - params: DeleteApplicationKeyParams, + app_key_id: String, ) -> Result, Error> { - match self.delete_application_key_with_http_info(params).await { + match self.delete_application_key_with_http_info(app_key_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -567,13 +490,10 @@ impl KeyManagementAPI { /// Delete an application key pub async fn delete_application_key_with_http_info( &self, - params: DeleteApplicationKeyParams, + app_key_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let app_key_id = params.app_key_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -625,10 +545,10 @@ impl KeyManagementAPI { /// Delete an application key owned by current user pub async fn delete_current_user_application_key( &self, - params: DeleteCurrentUserApplicationKeyParams, + app_key_id: String, ) -> Result, Error> { match self - .delete_current_user_application_key_with_http_info(params) + .delete_current_user_application_key_with_http_info(app_key_id) .await { Ok(response_content) => Ok(response_content.entity), @@ -639,13 +559,10 @@ impl KeyManagementAPI { /// Delete an application key owned by current user pub async fn delete_current_user_application_key_with_http_info( &self, - params: DeleteCurrentUserApplicationKeyParams, + app_key_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let app_key_id = params.app_key_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -697,9 +614,10 @@ impl KeyManagementAPI { /// Get an API key. pub async fn get_api_key( &self, - params: GetAPIKeyParams, + api_key_id: String, + params: GetAPIKeyOptionalParams, ) -> Result, Error> { - match self.get_api_key_with_http_info(params).await { + match self.get_api_key_with_http_info(api_key_id, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -708,13 +626,13 @@ impl KeyManagementAPI { /// Get an API key. pub async fn get_api_key_with_http_info( &self, - params: GetAPIKeyParams, + api_key_id: String, + params: GetAPIKeyOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let api_key_id = params.api_key_id; + // unbox and build optional parameters let include = params.include; let local_client = &local_configuration.client; @@ -727,8 +645,9 @@ impl KeyManagementAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = include { - local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + if let Some(ref local_query_param) = include { + local_req_builder = + local_req_builder.query(&[("include", &local_query_param.to_string())]); }; // build user agent @@ -773,12 +692,16 @@ impl KeyManagementAPI { /// Get an application key for your org. pub async fn get_application_key( &self, - params: GetApplicationKeyParams, + app_key_id: String, + params: GetApplicationKeyOptionalParams, ) -> Result< Option, Error, > { - match self.get_application_key_with_http_info(params).await { + match self + .get_application_key_with_http_info(app_key_id, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -787,15 +710,15 @@ impl KeyManagementAPI { /// Get an application key for your org. pub async fn get_application_key_with_http_info( &self, - params: GetApplicationKeyParams, + app_key_id: String, + params: GetApplicationKeyOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let app_key_id = params.app_key_id; + // unbox and build optional parameters let include = params.include; let local_client = &local_configuration.client; @@ -808,8 +731,9 @@ impl KeyManagementAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = include { - local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + if let Some(ref local_query_param) = include { + local_req_builder = + local_req_builder.query(&[("include", &local_query_param.to_string())]); }; // build user agent @@ -855,13 +779,13 @@ impl KeyManagementAPI { /// Get an application key owned by current user pub async fn get_current_user_application_key( &self, - params: GetCurrentUserApplicationKeyParams, + app_key_id: String, ) -> Result< Option, Error, > { match self - .get_current_user_application_key_with_http_info(params) + .get_current_user_application_key_with_http_info(app_key_id) .await { Ok(response_content) => Ok(response_content.entity), @@ -872,16 +796,13 @@ impl KeyManagementAPI { /// Get an application key owned by current user pub async fn get_current_user_application_key_with_http_info( &self, - params: GetCurrentUserApplicationKeyParams, + app_key_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let app_key_id = params.app_key_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -935,7 +856,7 @@ impl KeyManagementAPI { /// List all API keys available for your account. pub async fn list_api_keys( &self, - params: ListAPIKeysParams, + params: ListAPIKeysOptionalParams, ) -> Result, Error> { match self.list_api_keys_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -946,12 +867,12 @@ impl KeyManagementAPI { /// List all API keys available for your account. pub async fn list_api_keys_with_http_info( &self, - params: ListAPIKeysParams, + params: ListAPIKeysOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let page_size = params.page_size; let page_number = params.page_number; let sort = params.sort; @@ -970,45 +891,51 @@ impl KeyManagementAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); - }; - if let Some(ref local_str) = page_number { + if let Some(ref local_query_param) = page_size { local_req_builder = - local_req_builder.query(&[("page[number]", &local_str.to_string())]); - }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); - }; - if let Some(ref local_str) = filter { - local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_created_at_start { + if let Some(ref local_query_param) = page_number { local_req_builder = - local_req_builder.query(&[("filter[created_at][start]", &local_str.to_string())]); + local_req_builder.query(&[("page[number]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_created_at_end { + if let Some(ref local_query_param) = sort { local_req_builder = - local_req_builder.query(&[("filter[created_at][end]", &local_str.to_string())]); + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_modified_at_start { + if let Some(ref local_query_param) = filter { local_req_builder = - local_req_builder.query(&[("filter[modified_at][start]", &local_str.to_string())]); + local_req_builder.query(&[("filter", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_modified_at_end { - local_req_builder = - local_req_builder.query(&[("filter[modified_at][end]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_created_at_start { + local_req_builder = local_req_builder + .query(&[("filter[created_at][start]", &local_query_param.to_string())]); + }; + if let Some(ref local_query_param) = filter_created_at_end { + local_req_builder = local_req_builder + .query(&[("filter[created_at][end]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = include { - local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_modified_at_start { + local_req_builder = local_req_builder + .query(&[("filter[modified_at][start]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_remote_config_read_enabled { + if let Some(ref local_query_param) = filter_modified_at_end { local_req_builder = local_req_builder - .query(&[("filter[remote_config_read_enabled]", &local_str.to_string())]); + .query(&[("filter[modified_at][end]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_category { + if let Some(ref local_query_param) = include { local_req_builder = - local_req_builder.query(&[("filter[category]", &local_str.to_string())]); + local_req_builder.query(&[("include", &local_query_param.to_string())]); + }; + if let Some(ref local_query_param) = filter_remote_config_read_enabled { + local_req_builder = local_req_builder.query(&[( + "filter[remote_config_read_enabled]", + &local_query_param.to_string(), + )]); + }; + if let Some(ref local_query_param) = filter_category { + local_req_builder = + local_req_builder.query(&[("filter[category]", &local_query_param.to_string())]); }; // build user agent @@ -1053,7 +980,7 @@ impl KeyManagementAPI { /// List all application keys available for your org pub async fn list_application_keys( &self, - params: ListApplicationKeysParams, + params: ListApplicationKeysOptionalParams, ) -> Result< Option, Error, @@ -1067,14 +994,14 @@ impl KeyManagementAPI { /// List all application keys available for your org pub async fn list_application_keys_with_http_info( &self, - params: ListApplicationKeysParams, + params: ListApplicationKeysOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let page_size = params.page_size; let page_number = params.page_number; let sort = params.sort; @@ -1089,29 +1016,33 @@ impl KeyManagementAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); - }; - if let Some(ref local_str) = page_number { + if let Some(ref local_query_param) = page_size { local_req_builder = - local_req_builder.query(&[("page[number]", &local_str.to_string())]); + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); - }; - if let Some(ref local_str) = filter { - local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + if let Some(ref local_query_param) = page_number { + local_req_builder = + local_req_builder.query(&[("page[number]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_created_at_start { + if let Some(ref local_query_param) = sort { local_req_builder = - local_req_builder.query(&[("filter[created_at][start]", &local_str.to_string())]); + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_created_at_end { + if let Some(ref local_query_param) = filter { local_req_builder = - local_req_builder.query(&[("filter[created_at][end]", &local_str.to_string())]); + local_req_builder.query(&[("filter", &local_query_param.to_string())]); }; - if let Some(ref local_str) = include { - local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_created_at_start { + local_req_builder = local_req_builder + .query(&[("filter[created_at][start]", &local_query_param.to_string())]); + }; + if let Some(ref local_query_param) = filter_created_at_end { + local_req_builder = local_req_builder + .query(&[("filter[created_at][end]", &local_query_param.to_string())]); + }; + if let Some(ref local_query_param) = include { + local_req_builder = + local_req_builder.query(&[("include", &local_query_param.to_string())]); }; // build user agent @@ -1157,7 +1088,7 @@ impl KeyManagementAPI { /// List all application keys available for current user pub async fn list_current_user_application_keys( &self, - params: ListCurrentUserApplicationKeysParams, + params: ListCurrentUserApplicationKeysOptionalParams, ) -> Result< Option, Error, @@ -1174,14 +1105,14 @@ impl KeyManagementAPI { /// List all application keys available for current user pub async fn list_current_user_application_keys_with_http_info( &self, - params: ListCurrentUserApplicationKeysParams, + params: ListCurrentUserApplicationKeysOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let page_size = params.page_size; let page_number = params.page_number; let sort = params.sort; @@ -1199,29 +1130,33 @@ impl KeyManagementAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); - }; - if let Some(ref local_str) = page_number { + if let Some(ref local_query_param) = page_size { local_req_builder = - local_req_builder.query(&[("page[number]", &local_str.to_string())]); - }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter { - local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + if let Some(ref local_query_param) = page_number { + local_req_builder = + local_req_builder.query(&[("page[number]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_created_at_start { + if let Some(ref local_query_param) = sort { local_req_builder = - local_req_builder.query(&[("filter[created_at][start]", &local_str.to_string())]); + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_created_at_end { + if let Some(ref local_query_param) = filter { local_req_builder = - local_req_builder.query(&[("filter[created_at][end]", &local_str.to_string())]); + local_req_builder.query(&[("filter", &local_query_param.to_string())]); + }; + if let Some(ref local_query_param) = filter_created_at_start { + local_req_builder = local_req_builder + .query(&[("filter[created_at][start]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = include { - local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_created_at_end { + local_req_builder = local_req_builder + .query(&[("filter[created_at][end]", &local_query_param.to_string())]); + }; + if let Some(ref local_query_param) = include { + local_req_builder = + local_req_builder.query(&[("include", &local_query_param.to_string())]); }; // build user agent @@ -1267,9 +1202,10 @@ impl KeyManagementAPI { /// Update an API key. pub async fn update_api_key( &self, - params: UpdateAPIKeyParams, + api_key_id: String, + body: crate::datadogV2::model::APIKeyUpdateRequest, ) -> Result, Error> { - match self.update_api_key_with_http_info(params).await { + match self.update_api_key_with_http_info(api_key_id, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1278,15 +1214,12 @@ impl KeyManagementAPI { /// Update an API key. pub async fn update_api_key_with_http_info( &self, - params: UpdateAPIKeyParams, + api_key_id: String, + body: crate::datadogV2::model::APIKeyUpdateRequest, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let api_key_id = params.api_key_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1346,12 +1279,16 @@ impl KeyManagementAPI { /// Edit an application key pub async fn update_application_key( &self, - params: UpdateApplicationKeyParams, + app_key_id: String, + body: crate::datadogV2::model::ApplicationKeyUpdateRequest, ) -> Result< Option, Error, > { - match self.update_application_key_with_http_info(params).await { + match self + .update_application_key_with_http_info(app_key_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1360,17 +1297,14 @@ impl KeyManagementAPI { /// Edit an application key pub async fn update_application_key_with_http_info( &self, - params: UpdateApplicationKeyParams, + app_key_id: String, + body: crate::datadogV2::model::ApplicationKeyUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let app_key_id = params.app_key_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1431,13 +1365,14 @@ impl KeyManagementAPI { /// Edit an application key owned by current user pub async fn update_current_user_application_key( &self, - params: UpdateCurrentUserApplicationKeyParams, + app_key_id: String, + body: crate::datadogV2::model::ApplicationKeyUpdateRequest, ) -> Result< Option, Error, > { match self - .update_current_user_application_key_with_http_info(params) + .update_current_user_application_key_with_http_info(app_key_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -1448,17 +1383,14 @@ impl KeyManagementAPI { /// Edit an application key owned by current user pub async fn update_current_user_application_key_with_http_info( &self, - params: UpdateCurrentUserApplicationKeyParams, + app_key_id: String, + body: crate::datadogV2::model::ApplicationKeyUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let app_key_id = params.app_key_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_logs.rs b/src/datadogV2/api/api_logs.rs index df856e013..cbf2af390 100644 --- a/src/datadogV2/api/api_logs.rs +++ b/src/datadogV2/api/api_logs.rs @@ -5,21 +5,15 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// AggregateLogsParams is a struct for passing parameters to the method [`LogsAPI::aggregate_logs`] +/// ListLogsOptionalParams is a struct for passing parameters to the method [`LogsAPI::list_logs`] #[derive(Clone, Debug)] -pub struct AggregateLogsParams { - pub body: crate::datadogV2::model::LogsAggregateRequest, +pub struct ListLogsOptionalParams { + pub body: Option, } -/// ListLogsParams is a struct for passing parameters to the method [`LogsAPI::list_logs`] +/// ListLogsGetOptionalParams is a struct for passing parameters to the method [`LogsAPI::list_logs_get`] #[derive(Clone, Debug)] -pub struct ListLogsParams { - pub body: Option>, -} - -/// ListLogsGetParams is a struct for passing parameters to the method [`LogsAPI::list_logs_get`] -#[derive(Clone, Debug)] -pub struct ListLogsGetParams { +pub struct ListLogsGetOptionalParams { /// Search query following logs syntax. pub filter_query: Option, /// For customers with multiple indexes, the indexes to search. @@ -39,11 +33,9 @@ pub struct ListLogsGetParams { pub page_limit: Option, } -/// SubmitLogParams is a struct for passing parameters to the method [`LogsAPI::submit_log`] +/// SubmitLogOptionalParams is a struct for passing parameters to the method [`LogsAPI::submit_log`] #[derive(Clone, Debug)] -pub struct SubmitLogParams { - /// Log to send (JSON format). - pub body: Vec, +pub struct SubmitLogOptionalParams { /// HTTP header used to compress the media-type. pub content_encoding: Option, /// Log tags can be passed as query parameters with `text/plain` content type. @@ -119,10 +111,10 @@ impl LogsAPI { /// The API endpoint to aggregate events into buckets and compute metrics and timeseries. pub async fn aggregate_logs( &self, - params: AggregateLogsParams, + body: crate::datadogV2::model::LogsAggregateRequest, ) -> Result, Error> { - match self.aggregate_logs_with_http_info(params).await { + match self.aggregate_logs_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -131,16 +123,13 @@ impl LogsAPI { /// The API endpoint to aggregate events into buckets and compute metrics and timeseries. pub async fn aggregate_logs_with_http_info( &self, - params: AggregateLogsParams, + body: crate::datadogV2::model::LogsAggregateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -210,7 +199,7 @@ impl LogsAPI { /// [2]: pub async fn list_logs( &self, - params: ListLogsParams, + params: ListLogsOptionalParams, ) -> Result, Error> { match self.list_logs_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -231,12 +220,12 @@ impl LogsAPI { /// [2]: pub async fn list_logs_with_http_info( &self, - params: ListLogsParams, + params: ListLogsOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let body = params.body; let local_client = &local_configuration.client; @@ -307,7 +296,7 @@ impl LogsAPI { /// [2]: pub async fn list_logs_get( &self, - params: ListLogsGetParams, + params: ListLogsGetOptionalParams, ) -> Result, Error> { match self.list_logs_get_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -328,12 +317,12 @@ impl LogsAPI { /// [2]: pub async fn list_logs_get_with_http_info( &self, - params: ListLogsGetParams, + params: ListLogsGetOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let filter_query = params.filter_query; let filter_indexes = params.filter_indexes; let filter_from = params.filter_from; @@ -349,41 +338,44 @@ impl LogsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = filter_query { + if let Some(ref local_query_param) = filter_query { local_req_builder = - local_req_builder.query(&[("filter[query]", &local_str.to_string())]); + local_req_builder.query(&[("filter[query]", &local_query_param.to_string())]); }; if let Some(ref local) = filter_indexes { local_req_builder = local_req_builder.query(&[( "filter[indexes]", &local - .into_iter() + .iter() .map(|p| p.to_string()) .collect::>() .join(",") .to_string(), )]); }; - if let Some(ref local_str) = filter_from { + if let Some(ref local_query_param) = filter_from { local_req_builder = - local_req_builder.query(&[("filter[from]", &local_str.to_string())]); - }; - if let Some(ref local_str) = filter_to { - local_req_builder = local_req_builder.query(&[("filter[to]", &local_str.to_string())]); + local_req_builder.query(&[("filter[from]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_storage_tier { + if let Some(ref local_query_param) = filter_to { local_req_builder = - local_req_builder.query(&[("filter[storage_tier]", &local_str.to_string())]); + local_req_builder.query(&[("filter[to]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_storage_tier { + local_req_builder = local_req_builder + .query(&[("filter[storage_tier]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_cursor { + if let Some(ref local_query_param) = sort { local_req_builder = - local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_limit { - local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_cursor { + local_req_builder = + local_req_builder.query(&[("page[cursor]", &local_query_param.to_string())]); + }; + if let Some(ref local_query_param) = page_limit { + local_req_builder = + local_req_builder.query(&[("page[limit]", &local_query_param.to_string())]); }; // build user agent @@ -451,10 +443,11 @@ impl LogsAPI { /// - 503: Service Unavailable, the server is not ready to handle the request probably because it is overloaded, request should be retried after some time pub async fn submit_log( &self, - params: SubmitLogParams, + body: Vec, + params: SubmitLogOptionalParams, ) -> Result>, Error> { - match self.submit_log_with_http_info(params).await { + match self.submit_log_with_http_info(body, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -486,15 +479,15 @@ impl LogsAPI { /// - 503: Service Unavailable, the server is not ready to handle the request probably because it is overloaded, request should be retried after some time pub async fn submit_log_with_http_info( &self, - params: SubmitLogParams, + body: Vec, + params: SubmitLogOptionalParams, ) -> Result< ResponseContent>, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; + // unbox and build optional parameters let content_encoding = params.content_encoding; let ddtags = params.ddtags; @@ -504,8 +497,9 @@ impl LogsAPI { let mut local_req_builder = local_client.request(reqwest::Method::POST, local_uri_str.as_str()); - if let Some(ref local_str) = ddtags { - local_req_builder = local_req_builder.query(&[("ddtags", &local_str.to_string())]); + if let Some(ref local_query_param) = ddtags { + local_req_builder = + local_req_builder.query(&[("ddtags", &local_query_param.to_string())]); }; if let Some(ref local) = content_encoding { diff --git a/src/datadogV2/api/api_logs_archives.rs b/src/datadogV2/api/api_logs_archives.rs index 2c13ffcaf..1b4a75b65 100644 --- a/src/datadogV2/api/api_logs_archives.rs +++ b/src/datadogV2/api/api_logs_archives.rs @@ -5,66 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// AddReadRoleToArchiveParams is a struct for passing parameters to the method [`LogsArchivesAPI::add_read_role_to_archive`] -#[derive(Clone, Debug)] -pub struct AddReadRoleToArchiveParams { - /// The ID of the archive. - pub archive_id: String, - pub body: crate::datadogV2::model::RelationshipToRole, -} - -/// CreateLogsArchiveParams is a struct for passing parameters to the method [`LogsArchivesAPI::create_logs_archive`] -#[derive(Clone, Debug)] -pub struct CreateLogsArchiveParams { - /// The definition of the new archive. - pub body: crate::datadogV2::model::LogsArchiveCreateRequest, -} - -/// DeleteLogsArchiveParams is a struct for passing parameters to the method [`LogsArchivesAPI::delete_logs_archive`] -#[derive(Clone, Debug)] -pub struct DeleteLogsArchiveParams { - /// The ID of the archive. - pub archive_id: String, -} - -/// GetLogsArchiveParams is a struct for passing parameters to the method [`LogsArchivesAPI::get_logs_archive`] -#[derive(Clone, Debug)] -pub struct GetLogsArchiveParams { - /// The ID of the archive. - pub archive_id: String, -} - -/// ListArchiveReadRolesParams is a struct for passing parameters to the method [`LogsArchivesAPI::list_archive_read_roles`] -#[derive(Clone, Debug)] -pub struct ListArchiveReadRolesParams { - /// The ID of the archive. - pub archive_id: String, -} - -/// RemoveRoleFromArchiveParams is a struct for passing parameters to the method [`LogsArchivesAPI::remove_role_from_archive`] -#[derive(Clone, Debug)] -pub struct RemoveRoleFromArchiveParams { - /// The ID of the archive. - pub archive_id: String, - pub body: crate::datadogV2::model::RelationshipToRole, -} - -/// UpdateLogsArchiveParams is a struct for passing parameters to the method [`LogsArchivesAPI::update_logs_archive`] -#[derive(Clone, Debug)] -pub struct UpdateLogsArchiveParams { - /// The ID of the archive. - pub archive_id: String, - /// New definition of the archive. - pub body: crate::datadogV2::model::LogsArchiveCreateRequest, -} - -/// UpdateLogsArchiveOrderParams is a struct for passing parameters to the method [`LogsArchivesAPI::update_logs_archive_order`] -#[derive(Clone, Debug)] -pub struct UpdateLogsArchiveOrderParams { - /// An object containing the new ordered list of archive IDs. - pub body: crate::datadogV2::model::LogsArchiveOrder, -} - /// AddReadRoleToArchiveError is a struct for typed errors of method [`LogsArchivesAPI::add_read_role_to_archive`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -194,9 +134,13 @@ impl LogsArchivesAPI { /// Adds a read role to an archive. ([Roles API]()) pub async fn add_read_role_to_archive( &self, - params: AddReadRoleToArchiveParams, + archive_id: String, + body: crate::datadogV2::model::RelationshipToRole, ) -> Result, Error> { - match self.add_read_role_to_archive_with_http_info(params).await { + match self + .add_read_role_to_archive_with_http_info(archive_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -205,14 +149,11 @@ impl LogsArchivesAPI { /// Adds a read role to an archive. ([Roles API]()) pub async fn add_read_role_to_archive_with_http_info( &self, - params: AddReadRoleToArchiveParams, + archive_id: String, + body: crate::datadogV2::model::RelationshipToRole, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let archive_id = params.archive_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -271,9 +212,9 @@ impl LogsArchivesAPI { /// Create an archive in your organization. pub async fn create_logs_archive( &self, - params: CreateLogsArchiveParams, + body: crate::datadogV2::model::LogsArchiveCreateRequest, ) -> Result, Error> { - match self.create_logs_archive_with_http_info(params).await { + match self.create_logs_archive_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -282,14 +223,11 @@ impl LogsArchivesAPI { /// Create an archive in your organization. pub async fn create_logs_archive_with_http_info( &self, - params: CreateLogsArchiveParams, + body: crate::datadogV2::model::LogsArchiveCreateRequest, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -349,9 +287,9 @@ impl LogsArchivesAPI { /// Delete a given archive from your organization. pub async fn delete_logs_archive( &self, - params: DeleteLogsArchiveParams, + archive_id: String, ) -> Result, Error> { - match self.delete_logs_archive_with_http_info(params).await { + match self.delete_logs_archive_with_http_info(archive_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -360,13 +298,10 @@ impl LogsArchivesAPI { /// Delete a given archive from your organization. pub async fn delete_logs_archive_with_http_info( &self, - params: DeleteLogsArchiveParams, + archive_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let archive_id = params.archive_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -418,9 +353,9 @@ impl LogsArchivesAPI { /// Get a specific archive from your organization. pub async fn get_logs_archive( &self, - params: GetLogsArchiveParams, + archive_id: String, ) -> Result, Error> { - match self.get_logs_archive_with_http_info(params).await { + match self.get_logs_archive_with_http_info(archive_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -429,14 +364,11 @@ impl LogsArchivesAPI { /// Get a specific archive from your organization. pub async fn get_logs_archive_with_http_info( &self, - params: GetLogsArchiveParams, + archive_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let archive_id = params.archive_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -509,8 +441,6 @@ impl LogsArchivesAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -563,10 +493,13 @@ impl LogsArchivesAPI { /// Returns all read roles a given archive is restricted to. pub async fn list_archive_read_roles( &self, - params: ListArchiveReadRolesParams, + archive_id: String, ) -> Result, Error> { - match self.list_archive_read_roles_with_http_info(params).await { + match self + .list_archive_read_roles_with_http_info(archive_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -575,16 +508,13 @@ impl LogsArchivesAPI { /// Returns all read roles a given archive is restricted to. pub async fn list_archive_read_roles_with_http_info( &self, - params: ListArchiveReadRolesParams, + archive_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let archive_id = params.archive_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -652,8 +582,6 @@ impl LogsArchivesAPI { { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -706,9 +634,13 @@ impl LogsArchivesAPI { /// Removes a role from an archive. ([Roles API]()) pub async fn remove_role_from_archive( &self, - params: RemoveRoleFromArchiveParams, + archive_id: String, + body: crate::datadogV2::model::RelationshipToRole, ) -> Result, Error> { - match self.remove_role_from_archive_with_http_info(params).await { + match self + .remove_role_from_archive_with_http_info(archive_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -717,14 +649,11 @@ impl LogsArchivesAPI { /// Removes a role from an archive. ([Roles API]()) pub async fn remove_role_from_archive_with_http_info( &self, - params: RemoveRoleFromArchiveParams, + archive_id: String, + body: crate::datadogV2::model::RelationshipToRole, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let archive_id = params.archive_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -786,9 +715,13 @@ impl LogsArchivesAPI { /// your current configuration with the new one sent to your Datadog organization. pub async fn update_logs_archive( &self, - params: UpdateLogsArchiveParams, + archive_id: String, + body: crate::datadogV2::model::LogsArchiveCreateRequest, ) -> Result, Error> { - match self.update_logs_archive_with_http_info(params).await { + match self + .update_logs_archive_with_http_info(archive_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -800,15 +733,12 @@ impl LogsArchivesAPI { /// your current configuration with the new one sent to your Datadog organization. pub async fn update_logs_archive_with_http_info( &self, - params: UpdateLogsArchiveParams, + archive_id: String, + body: crate::datadogV2::model::LogsArchiveCreateRequest, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let archive_id = params.archive_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -873,10 +803,10 @@ impl LogsArchivesAPI { /// with the new one. pub async fn update_logs_archive_order( &self, - params: UpdateLogsArchiveOrderParams, + body: crate::datadogV2::model::LogsArchiveOrder, ) -> Result, Error> { - match self.update_logs_archive_order_with_http_info(params).await { + match self.update_logs_archive_order_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -889,16 +819,13 @@ impl LogsArchivesAPI { /// with the new one. pub async fn update_logs_archive_order_with_http_info( &self, - params: UpdateLogsArchiveOrderParams, + body: crate::datadogV2::model::LogsArchiveOrder, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_logs_metrics.rs b/src/datadogV2/api/api_logs_metrics.rs index e8c2ea15d..848339f59 100644 --- a/src/datadogV2/api/api_logs_metrics.rs +++ b/src/datadogV2/api/api_logs_metrics.rs @@ -5,36 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateLogsMetricParams is a struct for passing parameters to the method [`LogsMetricsAPI::create_logs_metric`] -#[derive(Clone, Debug)] -pub struct CreateLogsMetricParams { - /// The definition of the new log-based metric. - pub body: crate::datadogV2::model::LogsMetricCreateRequest, -} - -/// DeleteLogsMetricParams is a struct for passing parameters to the method [`LogsMetricsAPI::delete_logs_metric`] -#[derive(Clone, Debug)] -pub struct DeleteLogsMetricParams { - /// The name of the log-based metric. - pub metric_id: String, -} - -/// GetLogsMetricParams is a struct for passing parameters to the method [`LogsMetricsAPI::get_logs_metric`] -#[derive(Clone, Debug)] -pub struct GetLogsMetricParams { - /// The name of the log-based metric. - pub metric_id: String, -} - -/// UpdateLogsMetricParams is a struct for passing parameters to the method [`LogsMetricsAPI::update_logs_metric`] -#[derive(Clone, Debug)] -pub struct UpdateLogsMetricParams { - /// The name of the log-based metric. - pub metric_id: String, - /// New definition of the log-based metric. - pub body: crate::datadogV2::model::LogsMetricUpdateRequest, -} - /// CreateLogsMetricError is a struct for typed errors of method [`LogsMetricsAPI::create_logs_metric`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -111,10 +81,10 @@ impl LogsMetricsAPI { /// Returns the log-based metric object from the request body when the request is successful. pub async fn create_logs_metric( &self, - params: CreateLogsMetricParams, + body: crate::datadogV2::model::LogsMetricCreateRequest, ) -> Result, Error> { - match self.create_logs_metric_with_http_info(params).await { + match self.create_logs_metric_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -124,16 +94,13 @@ impl LogsMetricsAPI { /// Returns the log-based metric object from the request body when the request is successful. pub async fn create_logs_metric_with_http_info( &self, - params: CreateLogsMetricParams, + body: crate::datadogV2::model::LogsMetricCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -193,9 +160,9 @@ impl LogsMetricsAPI { /// Delete a specific log-based metric from your organization. pub async fn delete_logs_metric( &self, - params: DeleteLogsMetricParams, + metric_id: String, ) -> Result, Error> { - match self.delete_logs_metric_with_http_info(params).await { + match self.delete_logs_metric_with_http_info(metric_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -204,13 +171,10 @@ impl LogsMetricsAPI { /// Delete a specific log-based metric from your organization. pub async fn delete_logs_metric_with_http_info( &self, - params: DeleteLogsMetricParams, + metric_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let metric_id = params.metric_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -262,10 +226,10 @@ impl LogsMetricsAPI { /// Get a specific log-based metric from your organization. pub async fn get_logs_metric( &self, - params: GetLogsMetricParams, + metric_id: String, ) -> Result, Error> { - match self.get_logs_metric_with_http_info(params).await { + match self.get_logs_metric_with_http_info(metric_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -274,16 +238,13 @@ impl LogsMetricsAPI { /// Get a specific log-based metric from your organization. pub async fn get_logs_metric_with_http_info( &self, - params: GetLogsMetricParams, + metric_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let metric_id = params.metric_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -354,8 +315,6 @@ impl LogsMetricsAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -409,10 +368,14 @@ impl LogsMetricsAPI { /// Returns the log-based metric object from the request body when the request is successful. pub async fn update_logs_metric( &self, - params: UpdateLogsMetricParams, + metric_id: String, + body: crate::datadogV2::model::LogsMetricUpdateRequest, ) -> Result, Error> { - match self.update_logs_metric_with_http_info(params).await { + match self + .update_logs_metric_with_http_info(metric_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -422,17 +385,14 @@ impl LogsMetricsAPI { /// Returns the log-based metric object from the request body when the request is successful. pub async fn update_logs_metric_with_http_info( &self, - params: UpdateLogsMetricParams, + metric_id: String, + body: crate::datadogV2::model::LogsMetricUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let metric_id = params.metric_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_metrics.rs b/src/datadogV2/api/api_metrics.rs index 1ae9a57fd..20c7d5056 100644 --- a/src/datadogV2/api/api_metrics.rs +++ b/src/datadogV2/api/api_metrics.rs @@ -5,38 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateBulkTagsMetricsConfigurationParams is a struct for passing parameters to the method [`MetricsAPI::create_bulk_tags_metrics_configuration`] +/// EstimateMetricsOutputSeriesOptionalParams is a struct for passing parameters to the method [`MetricsAPI::estimate_metrics_output_series`] #[derive(Clone, Debug)] -pub struct CreateBulkTagsMetricsConfigurationParams { - pub body: crate::datadogV2::model::MetricBulkTagConfigCreateRequest, -} - -/// CreateTagConfigurationParams is a struct for passing parameters to the method [`MetricsAPI::create_tag_configuration`] -#[derive(Clone, Debug)] -pub struct CreateTagConfigurationParams { - /// The name of the metric. - pub metric_name: String, - pub body: crate::datadogV2::model::MetricTagConfigurationCreateRequest, -} - -/// DeleteBulkTagsMetricsConfigurationParams is a struct for passing parameters to the method [`MetricsAPI::delete_bulk_tags_metrics_configuration`] -#[derive(Clone, Debug)] -pub struct DeleteBulkTagsMetricsConfigurationParams { - pub body: crate::datadogV2::model::MetricBulkTagConfigDeleteRequest, -} - -/// DeleteTagConfigurationParams is a struct for passing parameters to the method [`MetricsAPI::delete_tag_configuration`] -#[derive(Clone, Debug)] -pub struct DeleteTagConfigurationParams { - /// The name of the metric. - pub metric_name: String, -} - -/// EstimateMetricsOutputSeriesParams is a struct for passing parameters to the method [`MetricsAPI::estimate_metrics_output_series`] -#[derive(Clone, Debug)] -pub struct EstimateMetricsOutputSeriesParams { - /// The name of the metric. - pub metric_name: String, +pub struct EstimateMetricsOutputSeriesOptionalParams { /// Filtered tag keys that the metric is configured to query with. pub filter_groups: Option, /// The number of hours of look back (from now) to estimate cardinality with. @@ -49,26 +20,17 @@ pub struct EstimateMetricsOutputSeriesParams { pub filter_timespan_h: Option, } -/// ListActiveMetricConfigurationsParams is a struct for passing parameters to the method [`MetricsAPI::list_active_metric_configurations`] +/// ListActiveMetricConfigurationsOptionalParams is a struct for passing parameters to the method [`MetricsAPI::list_active_metric_configurations`] #[derive(Clone, Debug)] -pub struct ListActiveMetricConfigurationsParams { - /// The name of the metric. - pub metric_name: String, +pub struct ListActiveMetricConfigurationsOptionalParams { /// The number of seconds of look back (from now). /// Default value is 604,800 (1 week), minimum value is 7200 (2 hours), maximum value is 2,630,000 (1 month). pub window_seconds: Option, } -/// ListTagConfigurationByNameParams is a struct for passing parameters to the method [`MetricsAPI::list_tag_configuration_by_name`] -#[derive(Clone, Debug)] -pub struct ListTagConfigurationByNameParams { - /// The name of the metric. - pub metric_name: String, -} - -/// ListTagConfigurationsParams is a struct for passing parameters to the method [`MetricsAPI::list_tag_configurations`] +/// ListTagConfigurationsOptionalParams is a struct for passing parameters to the method [`MetricsAPI::list_tag_configurations`] #[derive(Clone, Debug)] -pub struct ListTagConfigurationsParams { +pub struct ListTagConfigurationsOptionalParams { /// Filter custom metrics that have configured tags. pub filter_configured: Option, /// Filter tag configurations by configured tags. @@ -89,48 +51,13 @@ pub struct ListTagConfigurationsParams { pub window_seconds: Option, } -/// ListTagsByMetricNameParams is a struct for passing parameters to the method [`MetricsAPI::list_tags_by_metric_name`] -#[derive(Clone, Debug)] -pub struct ListTagsByMetricNameParams { - /// The name of the metric. - pub metric_name: String, -} - -/// ListVolumesByMetricNameParams is a struct for passing parameters to the method [`MetricsAPI::list_volumes_by_metric_name`] -#[derive(Clone, Debug)] -pub struct ListVolumesByMetricNameParams { - /// The name of the metric. - pub metric_name: String, -} - -/// QueryScalarDataParams is a struct for passing parameters to the method [`MetricsAPI::query_scalar_data`] +/// SubmitMetricsOptionalParams is a struct for passing parameters to the method [`MetricsAPI::submit_metrics`] #[derive(Clone, Debug)] -pub struct QueryScalarDataParams { - pub body: crate::datadogV2::model::ScalarFormulaQueryRequest, -} - -/// QueryTimeseriesDataParams is a struct for passing parameters to the method [`MetricsAPI::query_timeseries_data`] -#[derive(Clone, Debug)] -pub struct QueryTimeseriesDataParams { - pub body: crate::datadogV2::model::TimeseriesFormulaQueryRequest, -} - -/// SubmitMetricsParams is a struct for passing parameters to the method [`MetricsAPI::submit_metrics`] -#[derive(Clone, Debug)] -pub struct SubmitMetricsParams { - pub body: crate::datadogV2::model::MetricPayload, +pub struct SubmitMetricsOptionalParams { /// HTTP header used to compress the media-type. pub content_encoding: Option, } -/// UpdateTagConfigurationParams is a struct for passing parameters to the method [`MetricsAPI::update_tag_configuration`] -#[derive(Clone, Debug)] -pub struct UpdateTagConfigurationParams { - /// The name of the metric. - pub metric_name: String, - pub body: crate::datadogV2::model::MetricTagConfigurationUpdateRequest, -} - /// CreateBulkTagsMetricsConfigurationError is a struct for typed errors of method [`MetricsAPI::create_bulk_tags_metrics_configuration`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -313,13 +240,13 @@ impl MetricsAPI { /// Can only be used with application keys of users with the `Manage Tags for Metrics` permission. pub async fn create_bulk_tags_metrics_configuration( &self, - params: CreateBulkTagsMetricsConfigurationParams, + body: crate::datadogV2::model::MetricBulkTagConfigCreateRequest, ) -> Result< Option, Error, > { match self - .create_bulk_tags_metrics_configuration_with_http_info(params) + .create_bulk_tags_metrics_configuration_with_http_info(body) .await { Ok(response_content) => Ok(response_content.entity), @@ -336,16 +263,13 @@ impl MetricsAPI { /// Can only be used with application keys of users with the `Manage Tags for Metrics` permission. pub async fn create_bulk_tags_metrics_configuration_with_http_info( &self, - params: CreateBulkTagsMetricsConfigurationParams, + body: crate::datadogV2::model::MetricBulkTagConfigCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -409,12 +333,16 @@ impl MetricsAPI { /// Can only be used with application keys of users with the `Manage Tags for Metrics` permission. pub async fn create_tag_configuration( &self, - params: CreateTagConfigurationParams, + metric_name: String, + body: crate::datadogV2::model::MetricTagConfigurationCreateRequest, ) -> Result< Option, Error, > { - match self.create_tag_configuration_with_http_info(params).await { + match self + .create_tag_configuration_with_http_info(metric_name, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -427,17 +355,14 @@ impl MetricsAPI { /// Can only be used with application keys of users with the `Manage Tags for Metrics` permission. pub async fn create_tag_configuration_with_http_info( &self, - params: CreateTagConfigurationParams, + metric_name: String, + body: crate::datadogV2::model::MetricTagConfigurationCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let metric_name = params.metric_name; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -501,13 +426,13 @@ impl MetricsAPI { /// Can only be used with application keys of users with the `Manage Tags for Metrics` permission. pub async fn delete_bulk_tags_metrics_configuration( &self, - params: DeleteBulkTagsMetricsConfigurationParams, + body: crate::datadogV2::model::MetricBulkTagConfigDeleteRequest, ) -> Result< Option, Error, > { match self - .delete_bulk_tags_metrics_configuration_with_http_info(params) + .delete_bulk_tags_metrics_configuration_with_http_info(body) .await { Ok(response_content) => Ok(response_content.entity), @@ -521,16 +446,13 @@ impl MetricsAPI { /// Can only be used with application keys of users with the `Manage Tags for Metrics` permission. pub async fn delete_bulk_tags_metrics_configuration_with_http_info( &self, - params: DeleteBulkTagsMetricsConfigurationParams, + body: crate::datadogV2::model::MetricBulkTagConfigDeleteRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -591,9 +513,12 @@ impl MetricsAPI { /// keys from users with the `Manage Tags for Metrics` permission. pub async fn delete_tag_configuration( &self, - params: DeleteTagConfigurationParams, + metric_name: String, ) -> Result, Error> { - match self.delete_tag_configuration_with_http_info(params).await { + match self + .delete_tag_configuration_with_http_info(metric_name) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -603,13 +528,10 @@ impl MetricsAPI { /// keys from users with the `Manage Tags for Metrics` permission. pub async fn delete_tag_configuration_with_http_info( &self, - params: DeleteTagConfigurationParams, + metric_name: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let metric_name = params.metric_name; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -661,13 +583,14 @@ impl MetricsAPI { /// Returns the estimated cardinality for a metric with a given tag, percentile and number of aggregations configuration using Metrics without Limits™. pub async fn estimate_metrics_output_series( &self, - params: EstimateMetricsOutputSeriesParams, + metric_name: String, + params: EstimateMetricsOutputSeriesOptionalParams, ) -> Result< Option, Error, > { match self - .estimate_metrics_output_series_with_http_info(params) + .estimate_metrics_output_series_with_http_info(metric_name, params) .await { Ok(response_content) => Ok(response_content.entity), @@ -678,15 +601,15 @@ impl MetricsAPI { /// Returns the estimated cardinality for a metric with a given tag, percentile and number of aggregations configuration using Metrics without Limits™. pub async fn estimate_metrics_output_series_with_http_info( &self, - params: EstimateMetricsOutputSeriesParams, + metric_name: String, + params: EstimateMetricsOutputSeriesOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let metric_name = params.metric_name; + // unbox and build optional parameters let filter_groups = params.filter_groups; let filter_hours_ago = params.filter_hours_ago; let filter_num_aggregations = params.filter_num_aggregations; @@ -703,24 +626,25 @@ impl MetricsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = filter_groups { + if let Some(ref local_query_param) = filter_groups { local_req_builder = - local_req_builder.query(&[("filter[groups]", &local_str.to_string())]); + local_req_builder.query(&[("filter[groups]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_hours_ago { + if let Some(ref local_query_param) = filter_hours_ago { local_req_builder = - local_req_builder.query(&[("filter[hours_ago]", &local_str.to_string())]); + local_req_builder.query(&[("filter[hours_ago]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_num_aggregations { - local_req_builder = - local_req_builder.query(&[("filter[num_aggregations]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_num_aggregations { + local_req_builder = local_req_builder + .query(&[("filter[num_aggregations]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_pct { - local_req_builder = local_req_builder.query(&[("filter[pct]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_pct { + local_req_builder = + local_req_builder.query(&[("filter[pct]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_timespan_h { + if let Some(ref local_query_param) = filter_timespan_h { local_req_builder = - local_req_builder.query(&[("filter[timespan_h]", &local_str.to_string())]); + local_req_builder.query(&[("filter[timespan_h]", &local_query_param.to_string())]); }; // build user agent @@ -766,13 +690,14 @@ impl MetricsAPI { /// List tags and aggregations that are actively queried on dashboards and monitors for a given metric name. pub async fn list_active_metric_configurations( &self, - params: ListActiveMetricConfigurationsParams, + metric_name: String, + params: ListActiveMetricConfigurationsOptionalParams, ) -> Result< Option, Error, > { match self - .list_active_metric_configurations_with_http_info(params) + .list_active_metric_configurations_with_http_info(metric_name, params) .await { Ok(response_content) => Ok(response_content.entity), @@ -783,15 +708,15 @@ impl MetricsAPI { /// List tags and aggregations that are actively queried on dashboards and monitors for a given metric name. pub async fn list_active_metric_configurations_with_http_info( &self, - params: ListActiveMetricConfigurationsParams, + metric_name: String, + params: ListActiveMetricConfigurationsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let metric_name = params.metric_name; + // unbox and build optional parameters let window_seconds = params.window_seconds; let local_client = &local_configuration.client; @@ -804,9 +729,9 @@ impl MetricsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = window_seconds { + if let Some(ref local_query_param) = window_seconds { local_req_builder = - local_req_builder.query(&[("window[seconds]", &local_str.to_string())]); + local_req_builder.query(&[("window[seconds]", &local_query_param.to_string())]); }; // build user agent @@ -853,13 +778,13 @@ impl MetricsAPI { /// Returns the tag configuration for the given metric name. pub async fn list_tag_configuration_by_name( &self, - params: ListTagConfigurationByNameParams, + metric_name: String, ) -> Result< Option, Error, > { match self - .list_tag_configuration_by_name_with_http_info(params) + .list_tag_configuration_by_name_with_http_info(metric_name) .await { Ok(response_content) => Ok(response_content.entity), @@ -870,16 +795,13 @@ impl MetricsAPI { /// Returns the tag configuration for the given metric name. pub async fn list_tag_configuration_by_name_with_http_info( &self, - params: ListTagConfigurationByNameParams, + metric_name: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let metric_name = params.metric_name; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -933,7 +855,7 @@ impl MetricsAPI { /// Returns all metrics that can be configured in the Metrics Summary page or with Metrics without Limits™ (matching additional filters if specified). pub async fn list_tag_configurations( &self, - params: ListTagConfigurationsParams, + params: ListTagConfigurationsOptionalParams, ) -> Result< Option, Error, @@ -947,14 +869,14 @@ impl MetricsAPI { /// Returns all metrics that can be configured in the Metrics Summary page or with Metrics without Limits™ (matching additional filters if specified). pub async fn list_tag_configurations_with_http_info( &self, - params: ListTagConfigurationsParams, + params: ListTagConfigurationsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let filter_configured = params.filter_configured; let filter_tags_configured = params.filter_tags_configured; let filter_metric_type = params.filter_metric_type; @@ -969,33 +891,35 @@ impl MetricsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = filter_configured { + if let Some(ref local_query_param) = filter_configured { local_req_builder = - local_req_builder.query(&[("filter[configured]", &local_str.to_string())]); + local_req_builder.query(&[("filter[configured]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_tags_configured { - local_req_builder = - local_req_builder.query(&[("filter[tags_configured]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_tags_configured { + local_req_builder = local_req_builder + .query(&[("filter[tags_configured]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_metric_type { + if let Some(ref local_query_param) = filter_metric_type { local_req_builder = - local_req_builder.query(&[("filter[metric_type]", &local_str.to_string())]); + local_req_builder.query(&[("filter[metric_type]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_include_percentiles { - local_req_builder = - local_req_builder.query(&[("filter[include_percentiles]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_include_percentiles { + local_req_builder = local_req_builder.query(&[( + "filter[include_percentiles]", + &local_query_param.to_string(), + )]); }; - if let Some(ref local_str) = filter_queried { + if let Some(ref local_query_param) = filter_queried { local_req_builder = - local_req_builder.query(&[("filter[queried]", &local_str.to_string())]); + local_req_builder.query(&[("filter[queried]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_tags { + if let Some(ref local_query_param) = filter_tags { local_req_builder = - local_req_builder.query(&[("filter[tags]", &local_str.to_string())]); + local_req_builder.query(&[("filter[tags]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = window_seconds { + if let Some(ref local_query_param) = window_seconds { local_req_builder = - local_req_builder.query(&[("window[seconds]", &local_str.to_string())]); + local_req_builder.query(&[("window[seconds]", &local_query_param.to_string())]); }; // build user agent @@ -1042,12 +966,15 @@ impl MetricsAPI { /// View indexed tag key-value pairs for a given metric name. pub async fn list_tags_by_metric_name( &self, - params: ListTagsByMetricNameParams, + metric_name: String, ) -> Result< Option, Error, > { - match self.list_tags_by_metric_name_with_http_info(params).await { + match self + .list_tags_by_metric_name_with_http_info(metric_name) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1056,16 +983,13 @@ impl MetricsAPI { /// View indexed tag key-value pairs for a given metric name. pub async fn list_tags_by_metric_name_with_http_info( &self, - params: ListTagsByMetricNameParams, + metric_name: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let metric_name = params.metric_name; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1121,13 +1045,13 @@ impl MetricsAPI { /// Custom metrics generated in-app from other products will return `null` for ingested volumes. pub async fn list_volumes_by_metric_name( &self, - params: ListVolumesByMetricNameParams, + metric_name: String, ) -> Result< Option, Error, > { match self - .list_volumes_by_metric_name_with_http_info(params) + .list_volumes_by_metric_name_with_http_info(metric_name) .await { Ok(response_content) => Ok(response_content.entity), @@ -1140,16 +1064,13 @@ impl MetricsAPI { /// Custom metrics generated in-app from other products will return `null` for ingested volumes. pub async fn list_volumes_by_metric_name_with_http_info( &self, - params: ListVolumesByMetricNameParams, + metric_name: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let metric_name = params.metric_name; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1205,12 +1126,12 @@ impl MetricsAPI { /// process the data using formulas and functions. pub async fn query_scalar_data( &self, - params: QueryScalarDataParams, + body: crate::datadogV2::model::ScalarFormulaQueryRequest, ) -> Result< Option, Error, > { - match self.query_scalar_data_with_http_info(params).await { + match self.query_scalar_data_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1221,16 +1142,13 @@ impl MetricsAPI { /// process the data using formulas and functions. pub async fn query_scalar_data_with_http_info( &self, - params: QueryScalarDataParams, + body: crate::datadogV2::model::ScalarFormulaQueryRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/query/scalar", local_configuration.base_path); @@ -1288,12 +1206,12 @@ impl MetricsAPI { /// process the data by applying formulas and functions. pub async fn query_timeseries_data( &self, - params: QueryTimeseriesDataParams, + body: crate::datadogV2::model::TimeseriesFormulaQueryRequest, ) -> Result< Option, Error, > { - match self.query_timeseries_data_with_http_info(params).await { + match self.query_timeseries_data_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1303,16 +1221,13 @@ impl MetricsAPI { /// process the data by applying formulas and functions. pub async fn query_timeseries_data_with_http_info( &self, - params: QueryTimeseriesDataParams, + body: crate::datadogV2::model::TimeseriesFormulaQueryRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/query/timeseries", local_configuration.base_path); @@ -1380,10 +1295,11 @@ impl MetricsAPI { /// Host name is one of the resources in the Resources field. pub async fn submit_metrics( &self, - params: SubmitMetricsParams, + body: crate::datadogV2::model::MetricPayload, + params: SubmitMetricsOptionalParams, ) -> Result, Error> { - match self.submit_metrics_with_http_info(params).await { + match self.submit_metrics_with_http_info(body, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1403,15 +1319,15 @@ impl MetricsAPI { /// Host name is one of the resources in the Resources field. pub async fn submit_metrics_with_http_info( &self, - params: SubmitMetricsParams, + body: crate::datadogV2::model::MetricPayload, + params: SubmitMetricsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; + // unbox and build optional parameters let content_encoding = params.content_encoding; let local_client = &local_configuration.client; @@ -1475,12 +1391,16 @@ impl MetricsAPI { /// a tag configuration to be created first. pub async fn update_tag_configuration( &self, - params: UpdateTagConfigurationParams, + metric_name: String, + body: crate::datadogV2::model::MetricTagConfigurationUpdateRequest, ) -> Result< Option, Error, > { - match self.update_tag_configuration_with_http_info(params).await { + match self + .update_tag_configuration_with_http_info(metric_name, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1493,17 +1413,14 @@ impl MetricsAPI { /// a tag configuration to be created first. pub async fn update_tag_configuration_with_http_info( &self, - params: UpdateTagConfigurationParams, + metric_name: String, + body: crate::datadogV2::model::MetricTagConfigurationUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let metric_name = params.metric_name; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_monitors.rs b/src/datadogV2/api/api_monitors.rs index e5dbe438e..c9ee5736b 100644 --- a/src/datadogV2/api/api_monitors.rs +++ b/src/datadogV2/api/api_monitors.rs @@ -5,36 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateMonitorConfigPolicyParams is a struct for passing parameters to the method [`MonitorsAPI::create_monitor_config_policy`] -#[derive(Clone, Debug)] -pub struct CreateMonitorConfigPolicyParams { - /// Create a monitor configuration policy request body. - pub body: crate::datadogV2::model::MonitorConfigPolicyCreateRequest, -} - -/// DeleteMonitorConfigPolicyParams is a struct for passing parameters to the method [`MonitorsAPI::delete_monitor_config_policy`] -#[derive(Clone, Debug)] -pub struct DeleteMonitorConfigPolicyParams { - /// ID of the monitor configuration policy. - pub policy_id: String, -} - -/// GetMonitorConfigPolicyParams is a struct for passing parameters to the method [`MonitorsAPI::get_monitor_config_policy`] -#[derive(Clone, Debug)] -pub struct GetMonitorConfigPolicyParams { - /// ID of the monitor configuration policy. - pub policy_id: String, -} - -/// UpdateMonitorConfigPolicyParams is a struct for passing parameters to the method [`MonitorsAPI::update_monitor_config_policy`] -#[derive(Clone, Debug)] -pub struct UpdateMonitorConfigPolicyParams { - /// ID of the monitor configuration policy. - pub policy_id: String, - /// Description of the update. - pub body: crate::datadogV2::model::MonitorConfigPolicyEditRequest, -} - /// CreateMonitorConfigPolicyError is a struct for typed errors of method [`MonitorsAPI::create_monitor_config_policy`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -110,15 +80,12 @@ impl MonitorsAPI { /// Create a monitor configuration policy. pub async fn create_monitor_config_policy( &self, - params: CreateMonitorConfigPolicyParams, + body: crate::datadogV2::model::MonitorConfigPolicyCreateRequest, ) -> Result< Option, Error, > { - match self - .create_monitor_config_policy_with_http_info(params) - .await - { + match self.create_monitor_config_policy_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -127,16 +94,13 @@ impl MonitorsAPI { /// Create a monitor configuration policy. pub async fn create_monitor_config_policy_with_http_info( &self, - params: CreateMonitorConfigPolicyParams, + body: crate::datadogV2::model::MonitorConfigPolicyCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/monitor/policy", local_configuration.base_path); @@ -193,10 +157,10 @@ impl MonitorsAPI { /// Delete a monitor configuration policy. pub async fn delete_monitor_config_policy( &self, - params: DeleteMonitorConfigPolicyParams, + policy_id: String, ) -> Result, Error> { match self - .delete_monitor_config_policy_with_http_info(params) + .delete_monitor_config_policy_with_http_info(policy_id) .await { Ok(response_content) => Ok(response_content.entity), @@ -207,13 +171,10 @@ impl MonitorsAPI { /// Delete a monitor configuration policy. pub async fn delete_monitor_config_policy_with_http_info( &self, - params: DeleteMonitorConfigPolicyParams, + policy_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let policy_id = params.policy_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -265,12 +226,15 @@ impl MonitorsAPI { /// Get a monitor configuration policy by `policy_id`. pub async fn get_monitor_config_policy( &self, - params: GetMonitorConfigPolicyParams, + policy_id: String, ) -> Result< Option, Error, > { - match self.get_monitor_config_policy_with_http_info(params).await { + match self + .get_monitor_config_policy_with_http_info(policy_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -279,16 +243,13 @@ impl MonitorsAPI { /// Get a monitor configuration policy by `policy_id`. pub async fn get_monitor_config_policy_with_http_info( &self, - params: GetMonitorConfigPolicyParams, + policy_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let policy_id = params.policy_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -361,8 +322,6 @@ impl MonitorsAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/monitor/policy", local_configuration.base_path); @@ -412,13 +371,14 @@ impl MonitorsAPI { /// Edit a monitor configuration policy. pub async fn update_monitor_config_policy( &self, - params: UpdateMonitorConfigPolicyParams, + policy_id: String, + body: crate::datadogV2::model::MonitorConfigPolicyEditRequest, ) -> Result< Option, Error, > { match self - .update_monitor_config_policy_with_http_info(params) + .update_monitor_config_policy_with_http_info(policy_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -429,17 +389,14 @@ impl MonitorsAPI { /// Edit a monitor configuration policy. pub async fn update_monitor_config_policy_with_http_info( &self, - params: UpdateMonitorConfigPolicyParams, + policy_id: String, + body: crate::datadogV2::model::MonitorConfigPolicyEditRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let policy_id = params.policy_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_okta_integration.rs b/src/datadogV2/api/api_okta_integration.rs index 159d56559..c089d88c6 100644 --- a/src/datadogV2/api/api_okta_integration.rs +++ b/src/datadogV2/api/api_okta_integration.rs @@ -5,34 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateOktaAccountParams is a struct for passing parameters to the method [`OktaIntegrationAPI::create_okta_account`] -#[derive(Clone, Debug)] -pub struct CreateOktaAccountParams { - pub body: crate::datadogV2::model::OktaAccountRequest, -} - -/// DeleteOktaAccountParams is a struct for passing parameters to the method [`OktaIntegrationAPI::delete_okta_account`] -#[derive(Clone, Debug)] -pub struct DeleteOktaAccountParams { - /// None - pub account_id: String, -} - -/// GetOktaAccountParams is a struct for passing parameters to the method [`OktaIntegrationAPI::get_okta_account`] -#[derive(Clone, Debug)] -pub struct GetOktaAccountParams { - /// None - pub account_id: String, -} - -/// UpdateOktaAccountParams is a struct for passing parameters to the method [`OktaIntegrationAPI::update_okta_account`] -#[derive(Clone, Debug)] -pub struct UpdateOktaAccountParams { - /// None - pub account_id: String, - pub body: crate::datadogV2::model::OktaAccountUpdateRequest, -} - /// CreateOktaAccountError is a struct for typed errors of method [`OktaIntegrationAPI::create_okta_account`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -112,10 +84,10 @@ impl OktaIntegrationAPI { /// Create an Okta account. pub async fn create_okta_account( &self, - params: CreateOktaAccountParams, + body: crate::datadogV2::model::OktaAccountRequest, ) -> Result, Error> { - match self.create_okta_account_with_http_info(params).await { + match self.create_okta_account_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -124,16 +96,13 @@ impl OktaIntegrationAPI { /// Create an Okta account. pub async fn create_okta_account_with_http_info( &self, - params: CreateOktaAccountParams, + body: crate::datadogV2::model::OktaAccountRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -193,9 +162,9 @@ impl OktaIntegrationAPI { /// Delete an Okta account. pub async fn delete_okta_account( &self, - params: DeleteOktaAccountParams, + account_id: String, ) -> Result, Error> { - match self.delete_okta_account_with_http_info(params).await { + match self.delete_okta_account_with_http_info(account_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -204,13 +173,10 @@ impl OktaIntegrationAPI { /// Delete an Okta account. pub async fn delete_okta_account_with_http_info( &self, - params: DeleteOktaAccountParams, + account_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -262,10 +228,10 @@ impl OktaIntegrationAPI { /// Get an Okta account. pub async fn get_okta_account( &self, - params: GetOktaAccountParams, + account_id: String, ) -> Result, Error> { - match self.get_okta_account_with_http_info(params).await { + match self.get_okta_account_with_http_info(account_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -274,16 +240,13 @@ impl OktaIntegrationAPI { /// Get an Okta account. pub async fn get_okta_account_with_http_info( &self, - params: GetOktaAccountParams, + account_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -354,8 +317,6 @@ impl OktaIntegrationAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -408,10 +369,14 @@ impl OktaIntegrationAPI { /// Update an Okta account. pub async fn update_okta_account( &self, - params: UpdateOktaAccountParams, + account_id: String, + body: crate::datadogV2::model::OktaAccountUpdateRequest, ) -> Result, Error> { - match self.update_okta_account_with_http_info(params).await { + match self + .update_okta_account_with_http_info(account_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -420,17 +385,14 @@ impl OktaIntegrationAPI { /// Update an Okta account. pub async fn update_okta_account_with_http_info( &self, - params: UpdateOktaAccountParams, + account_id: String, + body: crate::datadogV2::model::OktaAccountUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let account_id = params.account_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_opsgenie_integration.rs b/src/datadogV2/api/api_opsgenie_integration.rs index bb8c6206e..419a6e506 100644 --- a/src/datadogV2/api/api_opsgenie_integration.rs +++ b/src/datadogV2/api/api_opsgenie_integration.rs @@ -5,36 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateOpsgenieServiceParams is a struct for passing parameters to the method [`OpsgenieIntegrationAPI::create_opsgenie_service`] -#[derive(Clone, Debug)] -pub struct CreateOpsgenieServiceParams { - /// Opsgenie service payload - pub body: crate::datadogV2::model::OpsgenieServiceCreateRequest, -} - -/// DeleteOpsgenieServiceParams is a struct for passing parameters to the method [`OpsgenieIntegrationAPI::delete_opsgenie_service`] -#[derive(Clone, Debug)] -pub struct DeleteOpsgenieServiceParams { - /// The UUID of the service. - pub integration_service_id: String, -} - -/// GetOpsgenieServiceParams is a struct for passing parameters to the method [`OpsgenieIntegrationAPI::get_opsgenie_service`] -#[derive(Clone, Debug)] -pub struct GetOpsgenieServiceParams { - /// The UUID of the service. - pub integration_service_id: String, -} - -/// UpdateOpsgenieServiceParams is a struct for passing parameters to the method [`OpsgenieIntegrationAPI::update_opsgenie_service`] -#[derive(Clone, Debug)] -pub struct UpdateOpsgenieServiceParams { - /// The UUID of the service. - pub integration_service_id: String, - /// Opsgenie service payload. - pub body: crate::datadogV2::model::OpsgenieServiceUpdateRequest, -} - /// CreateOpsgenieServiceError is a struct for typed errors of method [`OpsgenieIntegrationAPI::create_opsgenie_service`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -114,12 +84,12 @@ impl OpsgenieIntegrationAPI { /// Create a new service object in the Opsgenie integration. pub async fn create_opsgenie_service( &self, - params: CreateOpsgenieServiceParams, + body: crate::datadogV2::model::OpsgenieServiceCreateRequest, ) -> Result< Option, Error, > { - match self.create_opsgenie_service_with_http_info(params).await { + match self.create_opsgenie_service_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -128,16 +98,13 @@ impl OpsgenieIntegrationAPI { /// Create a new service object in the Opsgenie integration. pub async fn create_opsgenie_service_with_http_info( &self, - params: CreateOpsgenieServiceParams, + body: crate::datadogV2::model::OpsgenieServiceCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -197,9 +164,12 @@ impl OpsgenieIntegrationAPI { /// Delete a single service object in the Datadog Opsgenie integration. pub async fn delete_opsgenie_service( &self, - params: DeleteOpsgenieServiceParams, + integration_service_id: String, ) -> Result, Error> { - match self.delete_opsgenie_service_with_http_info(params).await { + match self + .delete_opsgenie_service_with_http_info(integration_service_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -208,13 +178,10 @@ impl OpsgenieIntegrationAPI { /// Delete a single service object in the Datadog Opsgenie integration. pub async fn delete_opsgenie_service_with_http_info( &self, - params: DeleteOpsgenieServiceParams, + integration_service_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let integration_service_id = params.integration_service_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -266,12 +233,15 @@ impl OpsgenieIntegrationAPI { /// Get a single service from the Datadog Opsgenie integration. pub async fn get_opsgenie_service( &self, - params: GetOpsgenieServiceParams, + integration_service_id: String, ) -> Result< Option, Error, > { - match self.get_opsgenie_service_with_http_info(params).await { + match self + .get_opsgenie_service_with_http_info(integration_service_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -280,16 +250,13 @@ impl OpsgenieIntegrationAPI { /// Get a single service from the Datadog Opsgenie integration. pub async fn get_opsgenie_service_with_http_info( &self, - params: GetOpsgenieServiceParams, + integration_service_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let integration_service_id = params.integration_service_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -362,8 +329,6 @@ impl OpsgenieIntegrationAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -416,12 +381,16 @@ impl OpsgenieIntegrationAPI { /// Update a single service object in the Datadog Opsgenie integration. pub async fn update_opsgenie_service( &self, - params: UpdateOpsgenieServiceParams, + integration_service_id: String, + body: crate::datadogV2::model::OpsgenieServiceUpdateRequest, ) -> Result< Option, Error, > { - match self.update_opsgenie_service_with_http_info(params).await { + match self + .update_opsgenie_service_with_http_info(integration_service_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -430,17 +399,14 @@ impl OpsgenieIntegrationAPI { /// Update a single service object in the Datadog Opsgenie integration. pub async fn update_opsgenie_service_with_http_info( &self, - params: UpdateOpsgenieServiceParams, + integration_service_id: String, + body: crate::datadogV2::model::OpsgenieServiceUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let integration_service_id = params.integration_service_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_organizations.rs b/src/datadogV2/api/api_organizations.rs index d858d542c..9397bbadd 100644 --- a/src/datadogV2/api/api_organizations.rs +++ b/src/datadogV2/api/api_organizations.rs @@ -5,9 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// UploadIdPMetadataParams is a struct for passing parameters to the method [`OrganizationsAPI::upload_id_p_metadata`] +/// UploadIdPMetadataOptionalParams is a struct for passing parameters to the method [`OrganizationsAPI::upload_id_p_metadata`] #[derive(Clone, Debug)] -pub struct UploadIdPMetadataParams { +pub struct UploadIdPMetadataOptionalParams { /// The IdP metadata XML file pub idp_file: Option>, } @@ -48,7 +48,7 @@ impl OrganizationsAPI { /// Use this endpoint to upload or replace IdP metadata for SAML login configuration. pub async fn upload_id_p_metadata( &self, - params: UploadIdPMetadataParams, + params: UploadIdPMetadataOptionalParams, ) -> Result, Error> { match self.upload_id_p_metadata_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -61,11 +61,11 @@ impl OrganizationsAPI { /// Use this endpoint to upload or replace IdP metadata for SAML login configuration. pub async fn upload_id_p_metadata_with_http_info( &self, - params: UploadIdPMetadataParams, + params: UploadIdPMetadataOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let idp_file = params.idp_file; let local_client = &local_configuration.client; diff --git a/src/datadogV2/api/api_powerpack.rs b/src/datadogV2/api/api_powerpack.rs index dd9e21814..fe45ecb67 100644 --- a/src/datadogV2/api/api_powerpack.rs +++ b/src/datadogV2/api/api_powerpack.rs @@ -5,45 +5,15 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreatePowerpackParams is a struct for passing parameters to the method [`PowerpackAPI::create_powerpack`] +/// ListPowerpacksOptionalParams is a struct for passing parameters to the method [`PowerpackAPI::list_powerpacks`] #[derive(Clone, Debug)] -pub struct CreatePowerpackParams { - /// Create a powerpack request body. - pub body: crate::datadogV2::model::Powerpack, -} - -/// DeletePowerpackParams is a struct for passing parameters to the method [`PowerpackAPI::delete_powerpack`] -#[derive(Clone, Debug)] -pub struct DeletePowerpackParams { - /// Powerpack id - pub powerpack_id: String, -} - -/// GetPowerpackParams is a struct for passing parameters to the method [`PowerpackAPI::get_powerpack`] -#[derive(Clone, Debug)] -pub struct GetPowerpackParams { - /// ID of the powerpack. - pub powerpack_id: String, -} - -/// ListPowerpacksParams is a struct for passing parameters to the method [`PowerpackAPI::list_powerpacks`] -#[derive(Clone, Debug)] -pub struct ListPowerpacksParams { +pub struct ListPowerpacksOptionalParams { /// Maximum number of powerpacks in the response. pub page_limit: Option, /// Specific offset to use as the beginning of the returned page. pub page_offset: Option, } -/// UpdatePowerpackParams is a struct for passing parameters to the method [`PowerpackAPI::update_powerpack`] -#[derive(Clone, Debug)] -pub struct UpdatePowerpackParams { - /// ID of the powerpack. - pub powerpack_id: String, - /// Update a powerpack request body. - pub body: crate::datadogV2::model::Powerpack, -} - /// CreatePowerpackError is a struct for typed errors of method [`PowerpackAPI::create_powerpack`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -113,10 +83,10 @@ impl PowerpackAPI { /// Create a powerpack. pub async fn create_powerpack( &self, - params: CreatePowerpackParams, + body: crate::datadogV2::model::Powerpack, ) -> Result, Error> { - match self.create_powerpack_with_http_info(params).await { + match self.create_powerpack_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -125,16 +95,13 @@ impl PowerpackAPI { /// Create a powerpack. pub async fn create_powerpack_with_http_info( &self, - params: CreatePowerpackParams, + body: crate::datadogV2::model::Powerpack, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/powerpacks", local_configuration.base_path); @@ -191,9 +158,9 @@ impl PowerpackAPI { /// Delete a powerpack. pub async fn delete_powerpack( &self, - params: DeletePowerpackParams, + powerpack_id: String, ) -> Result, Error> { - match self.delete_powerpack_with_http_info(params).await { + match self.delete_powerpack_with_http_info(powerpack_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -202,13 +169,10 @@ impl PowerpackAPI { /// Delete a powerpack. pub async fn delete_powerpack_with_http_info( &self, - params: DeletePowerpackParams, + powerpack_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let powerpack_id = params.powerpack_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -260,9 +224,9 @@ impl PowerpackAPI { /// Get a powerpack. pub async fn get_powerpack( &self, - params: GetPowerpackParams, + powerpack_id: String, ) -> Result, Error> { - match self.get_powerpack_with_http_info(params).await { + match self.get_powerpack_with_http_info(powerpack_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -271,14 +235,11 @@ impl PowerpackAPI { /// Get a powerpack. pub async fn get_powerpack_with_http_info( &self, - params: GetPowerpackParams, + powerpack_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let powerpack_id = params.powerpack_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -331,7 +292,7 @@ impl PowerpackAPI { /// Get a list of all powerpacks. pub async fn list_powerpacks( &self, - params: ListPowerpacksParams, + params: ListPowerpacksOptionalParams, ) -> Result, Error> { match self.list_powerpacks_with_http_info(params).await { @@ -343,14 +304,14 @@ impl PowerpackAPI { /// Get a list of all powerpacks. pub async fn list_powerpacks_with_http_info( &self, - params: ListPowerpacksParams, + params: ListPowerpacksOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let page_limit = params.page_limit; let page_offset = params.page_offset; @@ -360,12 +321,13 @@ impl PowerpackAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_limit { - local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_limit { + local_req_builder = + local_req_builder.query(&[("page[limit]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_offset { + if let Some(ref local_query_param) = page_offset { local_req_builder = - local_req_builder.query(&[("page[offset]", &local_str.to_string())]); + local_req_builder.query(&[("page[offset]", &local_query_param.to_string())]); }; // build user agent @@ -411,10 +373,14 @@ impl PowerpackAPI { /// Update a powerpack. pub async fn update_powerpack( &self, - params: UpdatePowerpackParams, + powerpack_id: String, + body: crate::datadogV2::model::Powerpack, ) -> Result, Error> { - match self.update_powerpack_with_http_info(params).await { + match self + .update_powerpack_with_http_info(powerpack_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -423,17 +389,14 @@ impl PowerpackAPI { /// Update a powerpack. pub async fn update_powerpack_with_http_info( &self, - params: UpdatePowerpackParams, + powerpack_id: String, + body: crate::datadogV2::model::Powerpack, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let powerpack_id = params.powerpack_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_processes.rs b/src/datadogV2/api/api_processes.rs index c14fa4625..694c04921 100644 --- a/src/datadogV2/api/api_processes.rs +++ b/src/datadogV2/api/api_processes.rs @@ -5,9 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// ListProcessesParams is a struct for passing parameters to the method [`ProcessesAPI::list_processes`] +/// ListProcessesOptionalParams is a struct for passing parameters to the method [`ProcessesAPI::list_processes`] #[derive(Clone, Debug)] -pub struct ListProcessesParams { +pub struct ListProcessesOptionalParams { /// String to search processes by. pub search: Option, /// Comma-separated list of tags to filter processes by. @@ -61,7 +61,7 @@ impl ProcessesAPI { /// Get all processes for your organization. pub async fn list_processes( &self, - params: ListProcessesParams, + params: ListProcessesOptionalParams, ) -> Result, Error> { match self.list_processes_with_http_info(params).await { @@ -73,14 +73,14 @@ impl ProcessesAPI { /// Get all processes for your organization. pub async fn list_processes_with_http_info( &self, - params: ListProcessesParams, + params: ListProcessesOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let search = params.search; let tags = params.tags; let from = params.from; @@ -94,24 +94,28 @@ impl ProcessesAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = search { - local_req_builder = local_req_builder.query(&[("search", &local_str.to_string())]); + if let Some(ref local_query_param) = search { + local_req_builder = + local_req_builder.query(&[("search", &local_query_param.to_string())]); }; - if let Some(ref local_str) = tags { - local_req_builder = local_req_builder.query(&[("tags", &local_str.to_string())]); + if let Some(ref local_query_param) = tags { + local_req_builder = + local_req_builder.query(&[("tags", &local_query_param.to_string())]); }; - if let Some(ref local_str) = from { - local_req_builder = local_req_builder.query(&[("from", &local_str.to_string())]); + if let Some(ref local_query_param) = from { + local_req_builder = + local_req_builder.query(&[("from", &local_query_param.to_string())]); }; - if let Some(ref local_str) = to { - local_req_builder = local_req_builder.query(&[("to", &local_str.to_string())]); + if let Some(ref local_query_param) = to { + local_req_builder = local_req_builder.query(&[("to", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_limit { - local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_limit { + local_req_builder = + local_req_builder.query(&[("page[limit]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_cursor { + if let Some(ref local_query_param) = page_cursor { local_req_builder = - local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + local_req_builder.query(&[("page[cursor]", &local_query_param.to_string())]); }; // build user agent diff --git a/src/datadogV2/api/api_restriction_policies.rs b/src/datadogV2/api/api_restriction_policies.rs index b940a56df..4354e8f2c 100644 --- a/src/datadogV2/api/api_restriction_policies.rs +++ b/src/datadogV2/api/api_restriction_policies.rs @@ -5,29 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// DeleteRestrictionPolicyParams is a struct for passing parameters to the method [`RestrictionPoliciesAPI::delete_restriction_policy`] -#[derive(Clone, Debug)] -pub struct DeleteRestrictionPolicyParams { - /// Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `notebook`, `security-rule`, `slo`. - pub resource_id: String, -} - -/// GetRestrictionPolicyParams is a struct for passing parameters to the method [`RestrictionPoliciesAPI::get_restriction_policy`] -#[derive(Clone, Debug)] -pub struct GetRestrictionPolicyParams { - /// Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `notebook`, `security-rule`, `slo`. - pub resource_id: String, -} - -/// UpdateRestrictionPolicyParams is a struct for passing parameters to the method [`RestrictionPoliciesAPI::update_restriction_policy`] -#[derive(Clone, Debug)] -pub struct UpdateRestrictionPolicyParams { - /// Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `notebook`, `security-rule`, `slo`. - pub resource_id: String, - /// Restriction policy payload - pub body: crate::datadogV2::model::RestrictionPolicyUpdateRequest, -} - /// DeleteRestrictionPolicyError is a struct for typed errors of method [`RestrictionPoliciesAPI::delete_restriction_policy`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -82,9 +59,12 @@ impl RestrictionPoliciesAPI { /// Deletes the restriction policy associated with a specified resource. pub async fn delete_restriction_policy( &self, - params: DeleteRestrictionPolicyParams, + resource_id: String, ) -> Result, Error> { - match self.delete_restriction_policy_with_http_info(params).await { + match self + .delete_restriction_policy_with_http_info(resource_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -93,13 +73,10 @@ impl RestrictionPoliciesAPI { /// Deletes the restriction policy associated with a specified resource. pub async fn delete_restriction_policy_with_http_info( &self, - params: DeleteRestrictionPolicyParams, + resource_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let resource_id = params.resource_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -151,12 +128,15 @@ impl RestrictionPoliciesAPI { /// Retrieves the restriction policy associated with a specified resource. pub async fn get_restriction_policy( &self, - params: GetRestrictionPolicyParams, + resource_id: String, ) -> Result< Option, Error, > { - match self.get_restriction_policy_with_http_info(params).await { + match self + .get_restriction_policy_with_http_info(resource_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -165,16 +145,13 @@ impl RestrictionPoliciesAPI { /// Retrieves the restriction policy associated with a specified resource. pub async fn get_restriction_policy_with_http_info( &self, - params: GetRestrictionPolicyParams, + resource_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let resource_id = params.resource_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -245,12 +222,16 @@ impl RestrictionPoliciesAPI { /// Service Level Objectives | `viewer`, `editor` pub async fn update_restriction_policy( &self, - params: UpdateRestrictionPolicyParams, + resource_id: String, + body: crate::datadogV2::model::RestrictionPolicyUpdateRequest, ) -> Result< Option, Error, > { - match self.update_restriction_policy_with_http_info(params).await { + match self + .update_restriction_policy_with_http_info(resource_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -276,17 +257,14 @@ impl RestrictionPoliciesAPI { /// Service Level Objectives | `viewer`, `editor` pub async fn update_restriction_policy_with_http_info( &self, - params: UpdateRestrictionPolicyParams, + resource_id: String, + body: crate::datadogV2::model::RestrictionPolicyUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let resource_id = params.resource_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_roles.rs b/src/datadogV2/api/api_roles.rs index b656173f0..4b74434dd 100644 --- a/src/datadogV2/api/api_roles.rs +++ b/src/datadogV2/api/api_roles.rs @@ -5,62 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// AddPermissionToRoleParams is a struct for passing parameters to the method [`RolesAPI::add_permission_to_role`] +/// ListRoleUsersOptionalParams is a struct for passing parameters to the method [`RolesAPI::list_role_users`] #[derive(Clone, Debug)] -pub struct AddPermissionToRoleParams { - /// The unique identifier of the role. - pub role_id: String, - pub body: crate::datadogV2::model::RelationshipToPermission, -} - -/// AddUserToRoleParams is a struct for passing parameters to the method [`RolesAPI::add_user_to_role`] -#[derive(Clone, Debug)] -pub struct AddUserToRoleParams { - /// The unique identifier of the role. - pub role_id: String, - pub body: crate::datadogV2::model::RelationshipToUser, -} - -/// CloneRoleParams is a struct for passing parameters to the method [`RolesAPI::clone_role`] -#[derive(Clone, Debug)] -pub struct CloneRoleParams { - /// The unique identifier of the role. - pub role_id: String, - pub body: crate::datadogV2::model::RoleCloneRequest, -} - -/// CreateRoleParams is a struct for passing parameters to the method [`RolesAPI::create_role`] -#[derive(Clone, Debug)] -pub struct CreateRoleParams { - pub body: crate::datadogV2::model::RoleCreateRequest, -} - -/// DeleteRoleParams is a struct for passing parameters to the method [`RolesAPI::delete_role`] -#[derive(Clone, Debug)] -pub struct DeleteRoleParams { - /// The unique identifier of the role. - pub role_id: String, -} - -/// GetRoleParams is a struct for passing parameters to the method [`RolesAPI::get_role`] -#[derive(Clone, Debug)] -pub struct GetRoleParams { - /// The unique identifier of the role. - pub role_id: String, -} - -/// ListRolePermissionsParams is a struct for passing parameters to the method [`RolesAPI::list_role_permissions`] -#[derive(Clone, Debug)] -pub struct ListRolePermissionsParams { - /// The unique identifier of the role. - pub role_id: String, -} - -/// ListRoleUsersParams is a struct for passing parameters to the method [`RolesAPI::list_role_users`] -#[derive(Clone, Debug)] -pub struct ListRoleUsersParams { - /// The unique identifier of the role. - pub role_id: String, +pub struct ListRoleUsersOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, /// Specific page number to return. @@ -73,9 +20,9 @@ pub struct ListRoleUsersParams { pub filter: Option, } -/// ListRolesParams is a struct for passing parameters to the method [`RolesAPI::list_roles`] +/// ListRolesOptionalParams is a struct for passing parameters to the method [`RolesAPI::list_roles`] #[derive(Clone, Debug)] -pub struct ListRolesParams { +pub struct ListRolesOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, /// Specific page number to return. @@ -90,30 +37,6 @@ pub struct ListRolesParams { pub filter_id: Option, } -/// RemovePermissionFromRoleParams is a struct for passing parameters to the method [`RolesAPI::remove_permission_from_role`] -#[derive(Clone, Debug)] -pub struct RemovePermissionFromRoleParams { - /// The unique identifier of the role. - pub role_id: String, - pub body: crate::datadogV2::model::RelationshipToPermission, -} - -/// RemoveUserFromRoleParams is a struct for passing parameters to the method [`RolesAPI::remove_user_from_role`] -#[derive(Clone, Debug)] -pub struct RemoveUserFromRoleParams { - /// The unique identifier of the role. - pub role_id: String, - pub body: crate::datadogV2::model::RelationshipToUser, -} - -/// UpdateRoleParams is a struct for passing parameters to the method [`RolesAPI::update_role`] -#[derive(Clone, Debug)] -pub struct UpdateRoleParams { - /// The unique identifier of the role. - pub role_id: String, - pub body: crate::datadogV2::model::RoleUpdateRequest, -} - /// AddPermissionToRoleError is a struct for typed errors of method [`RolesAPI::add_permission_to_role`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -275,10 +198,14 @@ impl RolesAPI { /// Adds a permission to a role. pub async fn add_permission_to_role( &self, - params: AddPermissionToRoleParams, + role_id: String, + body: crate::datadogV2::model::RelationshipToPermission, ) -> Result, Error> { - match self.add_permission_to_role_with_http_info(params).await { + match self + .add_permission_to_role_with_http_info(role_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -287,17 +214,14 @@ impl RolesAPI { /// Adds a permission to a role. pub async fn add_permission_to_role_with_http_info( &self, - params: AddPermissionToRoleParams, + role_id: String, + body: crate::datadogV2::model::RelationshipToPermission, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let role_id = params.role_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -358,9 +282,10 @@ impl RolesAPI { /// Adds a user to a role. pub async fn add_user_to_role( &self, - params: AddUserToRoleParams, + role_id: String, + body: crate::datadogV2::model::RelationshipToUser, ) -> Result, Error> { - match self.add_user_to_role_with_http_info(params).await { + match self.add_user_to_role_with_http_info(role_id, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -369,15 +294,12 @@ impl RolesAPI { /// Adds a user to a role. pub async fn add_user_to_role_with_http_info( &self, - params: AddUserToRoleParams, + role_id: String, + body: crate::datadogV2::model::RelationshipToUser, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let role_id = params.role_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -438,9 +360,10 @@ impl RolesAPI { /// Clone an existing role pub async fn clone_role( &self, - params: CloneRoleParams, + role_id: String, + body: crate::datadogV2::model::RoleCloneRequest, ) -> Result, Error> { - match self.clone_role_with_http_info(params).await { + match self.clone_role_with_http_info(role_id, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -449,14 +372,11 @@ impl RolesAPI { /// Clone an existing role pub async fn clone_role_with_http_info( &self, - params: CloneRoleParams, + role_id: String, + body: crate::datadogV2::model::RoleCloneRequest, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let role_id = params.role_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -516,9 +436,9 @@ impl RolesAPI { /// Create a new role for your organization. pub async fn create_role( &self, - params: CreateRoleParams, + body: crate::datadogV2::model::RoleCreateRequest, ) -> Result, Error> { - match self.create_role_with_http_info(params).await { + match self.create_role_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -527,14 +447,11 @@ impl RolesAPI { /// Create a new role for your organization. pub async fn create_role_with_http_info( &self, - params: CreateRoleParams, + body: crate::datadogV2::model::RoleCreateRequest, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/roles", local_configuration.base_path); @@ -588,11 +505,8 @@ impl RolesAPI { } /// Disables a role. - pub async fn delete_role( - &self, - params: DeleteRoleParams, - ) -> Result, Error> { - match self.delete_role_with_http_info(params).await { + pub async fn delete_role(&self, role_id: String) -> Result, Error> { + match self.delete_role_with_http_info(role_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -601,13 +515,10 @@ impl RolesAPI { /// Disables a role. pub async fn delete_role_with_http_info( &self, - params: DeleteRoleParams, + role_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let role_id = params.role_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -658,9 +569,9 @@ impl RolesAPI { /// Get a role in the organization specified by the role’s `role_id`. pub async fn get_role( &self, - params: GetRoleParams, + role_id: String, ) -> Result, Error> { - match self.get_role_with_http_info(params).await { + match self.get_role_with_http_info(role_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -669,13 +580,10 @@ impl RolesAPI { /// Get a role in the organization specified by the role’s `role_id`. pub async fn get_role_with_http_info( &self, - params: GetRoleParams, + role_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let role_id = params.role_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -745,8 +653,6 @@ impl RolesAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/permissions", local_configuration.base_path); @@ -796,10 +702,10 @@ impl RolesAPI { /// Returns a list of all permissions for a single role. pub async fn list_role_permissions( &self, - params: ListRolePermissionsParams, + role_id: String, ) -> Result, Error> { - match self.list_role_permissions_with_http_info(params).await { + match self.list_role_permissions_with_http_info(role_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -808,16 +714,13 @@ impl RolesAPI { /// Returns a list of all permissions for a single role. pub async fn list_role_permissions_with_http_info( &self, - params: ListRolePermissionsParams, + role_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let role_id = params.role_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -871,9 +774,10 @@ impl RolesAPI { /// Gets all users of a role. pub async fn list_role_users( &self, - params: ListRoleUsersParams, + role_id: String, + params: ListRoleUsersOptionalParams, ) -> Result, Error> { - match self.list_role_users_with_http_info(params).await { + match self.list_role_users_with_http_info(role_id, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -882,13 +786,13 @@ impl RolesAPI { /// Gets all users of a role. pub async fn list_role_users_with_http_info( &self, - params: ListRoleUsersParams, + role_id: String, + params: ListRoleUsersOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let role_id = params.role_id; + // unbox and build optional parameters let page_size = params.page_size; let page_number = params.page_number; let sort = params.sort; @@ -904,18 +808,21 @@ impl RolesAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_number { + if let Some(ref local_query_param) = page_number { local_req_builder = - local_req_builder.query(&[("page[number]", &local_str.to_string())]); + local_req_builder.query(&[("page[number]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter { - local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + if let Some(ref local_query_param) = filter { + local_req_builder = + local_req_builder.query(&[("filter", &local_query_param.to_string())]); }; // build user agent @@ -961,7 +868,7 @@ impl RolesAPI { /// Returns all roles, including their names and their unique identifiers. pub async fn list_roles( &self, - params: ListRolesParams, + params: ListRolesOptionalParams, ) -> Result, Error> { match self.list_roles_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -972,12 +879,12 @@ impl RolesAPI { /// Returns all roles, including their names and their unique identifiers. pub async fn list_roles_with_http_info( &self, - params: ListRolesParams, + params: ListRolesOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let page_size = params.page_size; let page_number = params.page_number; let sort = params.sort; @@ -990,21 +897,25 @@ impl RolesAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_number { + if let Some(ref local_query_param) = page_number { local_req_builder = - local_req_builder.query(&[("page[number]", &local_str.to_string())]); + local_req_builder.query(&[("page[number]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter { - local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + if let Some(ref local_query_param) = filter { + local_req_builder = + local_req_builder.query(&[("filter", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_id { - local_req_builder = local_req_builder.query(&[("filter[id]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_id { + local_req_builder = + local_req_builder.query(&[("filter[id]", &local_query_param.to_string())]); }; // build user agent @@ -1049,13 +960,14 @@ impl RolesAPI { /// Removes a permission from a role. pub async fn remove_permission_from_role( &self, - params: RemovePermissionFromRoleParams, + role_id: String, + body: crate::datadogV2::model::RelationshipToPermission, ) -> Result< Option, Error, > { match self - .remove_permission_from_role_with_http_info(params) + .remove_permission_from_role_with_http_info(role_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -1066,17 +978,14 @@ impl RolesAPI { /// Removes a permission from a role. pub async fn remove_permission_from_role_with_http_info( &self, - params: RemovePermissionFromRoleParams, + role_id: String, + body: crate::datadogV2::model::RelationshipToPermission, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let role_id = params.role_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1137,10 +1046,14 @@ impl RolesAPI { /// Removes a user from a role. pub async fn remove_user_from_role( &self, - params: RemoveUserFromRoleParams, + role_id: String, + body: crate::datadogV2::model::RelationshipToUser, ) -> Result, Error> { - match self.remove_user_from_role_with_http_info(params).await { + match self + .remove_user_from_role_with_http_info(role_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1149,17 +1062,14 @@ impl RolesAPI { /// Removes a user from a role. pub async fn remove_user_from_role_with_http_info( &self, - params: RemoveUserFromRoleParams, + role_id: String, + body: crate::datadogV2::model::RelationshipToUser, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let role_id = params.role_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1220,9 +1130,10 @@ impl RolesAPI { /// Edit a role. Can only be used with application keys belonging to administrators. pub async fn update_role( &self, - params: UpdateRoleParams, + role_id: String, + body: crate::datadogV2::model::RoleUpdateRequest, ) -> Result, Error> { - match self.update_role_with_http_info(params).await { + match self.update_role_with_http_info(role_id, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1231,15 +1142,12 @@ impl RolesAPI { /// Edit a role. Can only be used with application keys belonging to administrators. pub async fn update_role_with_http_info( &self, - params: UpdateRoleParams, + role_id: String, + body: crate::datadogV2::model::RoleUpdateRequest, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let role_id = params.role_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_rum.rs b/src/datadogV2/api/api_rum.rs index 37ddbc3cb..c10239a55 100644 --- a/src/datadogV2/api/api_rum.rs +++ b/src/datadogV2/api/api_rum.rs @@ -5,35 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// AggregateRUMEventsParams is a struct for passing parameters to the method [`RUMAPI::aggregate_rum_events`] +/// ListRUMEventsOptionalParams is a struct for passing parameters to the method [`RUMAPI::list_rum_events`] #[derive(Clone, Debug)] -pub struct AggregateRUMEventsParams { - pub body: crate::datadogV2::model::RUMAggregateRequest, -} - -/// CreateRUMApplicationParams is a struct for passing parameters to the method [`RUMAPI::create_rum_application`] -#[derive(Clone, Debug)] -pub struct CreateRUMApplicationParams { - pub body: crate::datadogV2::model::RUMApplicationCreateRequest, -} - -/// DeleteRUMApplicationParams is a struct for passing parameters to the method [`RUMAPI::delete_rum_application`] -#[derive(Clone, Debug)] -pub struct DeleteRUMApplicationParams { - /// RUM application ID. - pub id: String, -} - -/// GetRUMApplicationParams is a struct for passing parameters to the method [`RUMAPI::get_rum_application`] -#[derive(Clone, Debug)] -pub struct GetRUMApplicationParams { - /// RUM application ID. - pub id: String, -} - -/// ListRUMEventsParams is a struct for passing parameters to the method [`RUMAPI::list_rum_events`] -#[derive(Clone, Debug)] -pub struct ListRUMEventsParams { +pub struct ListRUMEventsOptionalParams { /// Search query following RUM syntax. pub filter_query: Option, /// Minimum timestamp for requested events. @@ -48,20 +22,6 @@ pub struct ListRUMEventsParams { pub page_limit: Option, } -/// SearchRUMEventsParams is a struct for passing parameters to the method [`RUMAPI::search_rum_events`] -#[derive(Clone, Debug)] -pub struct SearchRUMEventsParams { - pub body: crate::datadogV2::model::RUMSearchEventsRequest, -} - -/// UpdateRUMApplicationParams is a struct for passing parameters to the method [`RUMAPI::update_rum_application`] -#[derive(Clone, Debug)] -pub struct UpdateRUMApplicationParams { - /// RUM application ID. - pub id: String, - pub body: crate::datadogV2::model::RUMApplicationUpdateRequest, -} - /// AggregateRUMEventsError is a struct for typed errors of method [`RUMAPI::aggregate_rum_events`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -163,12 +123,12 @@ impl RUMAPI { /// The API endpoint to aggregate RUM events into buckets of computed metrics and timeseries. pub async fn aggregate_rum_events( &self, - params: AggregateRUMEventsParams, + body: crate::datadogV2::model::RUMAggregateRequest, ) -> Result< Option, Error, > { - match self.aggregate_rum_events_with_http_info(params).await { + match self.aggregate_rum_events_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -177,16 +137,13 @@ impl RUMAPI { /// The API endpoint to aggregate RUM events into buckets of computed metrics and timeseries. pub async fn aggregate_rum_events_with_http_info( &self, - params: AggregateRUMEventsParams, + body: crate::datadogV2::model::RUMAggregateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -246,12 +203,12 @@ impl RUMAPI { /// Create a new RUM application in your organization. pub async fn create_rum_application( &self, - params: CreateRUMApplicationParams, + body: crate::datadogV2::model::RUMApplicationCreateRequest, ) -> Result< Option, Error, > { - match self.create_rum_application_with_http_info(params).await { + match self.create_rum_application_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -260,16 +217,13 @@ impl RUMAPI { /// Create a new RUM application in your organization. pub async fn create_rum_application_with_http_info( &self, - params: CreateRUMApplicationParams, + body: crate::datadogV2::model::RUMApplicationCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/rum/applications", local_configuration.base_path); @@ -326,9 +280,9 @@ impl RUMAPI { /// Delete an existing RUM application in your organization. pub async fn delete_rum_application( &self, - params: DeleteRUMApplicationParams, + id: String, ) -> Result, Error> { - match self.delete_rum_application_with_http_info(params).await { + match self.delete_rum_application_with_http_info(id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -337,13 +291,10 @@ impl RUMAPI { /// Delete an existing RUM application in your organization. pub async fn delete_rum_application_with_http_info( &self, - params: DeleteRUMApplicationParams, + id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let id = params.id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -395,12 +346,12 @@ impl RUMAPI { /// Get the RUM application with given ID in your organization. pub async fn get_rum_application( &self, - params: GetRUMApplicationParams, + id: String, ) -> Result< Option, Error, > { - match self.get_rum_application_with_http_info(params).await { + match self.get_rum_application_with_http_info(id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -409,16 +360,13 @@ impl RUMAPI { /// Get the RUM application with given ID in your organization. pub async fn get_rum_application_with_http_info( &self, - params: GetRUMApplicationParams, + id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let id = params.id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -491,8 +439,6 @@ impl RUMAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/rum/applications", local_configuration.base_path); @@ -547,7 +493,7 @@ impl RUMAPI { /// [1]: pub async fn list_rum_events( &self, - params: ListRUMEventsParams, + params: ListRUMEventsOptionalParams, ) -> Result, Error> { match self.list_rum_events_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -563,14 +509,14 @@ impl RUMAPI { /// [1]: pub async fn list_rum_events_with_http_info( &self, - params: ListRUMEventsParams, + params: ListRUMEventsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let filter_query = params.filter_query; let filter_from = params.filter_from; let filter_to = params.filter_to; @@ -584,26 +530,29 @@ impl RUMAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = filter_query { + if let Some(ref local_query_param) = filter_query { local_req_builder = - local_req_builder.query(&[("filter[query]", &local_str.to_string())]); + local_req_builder.query(&[("filter[query]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_from { + if let Some(ref local_query_param) = filter_from { local_req_builder = - local_req_builder.query(&[("filter[from]", &local_str.to_string())]); + local_req_builder.query(&[("filter[from]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_to { - local_req_builder = local_req_builder.query(&[("filter[to]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_to { + local_req_builder = + local_req_builder.query(&[("filter[to]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_cursor { + if let Some(ref local_query_param) = page_cursor { local_req_builder = - local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + local_req_builder.query(&[("page[cursor]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_limit { - local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_limit { + local_req_builder = + local_req_builder.query(&[("page[limit]", &local_query_param.to_string())]); }; // build user agent @@ -654,10 +603,10 @@ impl RUMAPI { /// [1]: pub async fn search_rum_events( &self, - params: SearchRUMEventsParams, + body: crate::datadogV2::model::RUMSearchEventsRequest, ) -> Result, Error> { - match self.search_rum_events_with_http_info(params).await { + match self.search_rum_events_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -671,16 +620,13 @@ impl RUMAPI { /// [1]: pub async fn search_rum_events_with_http_info( &self, - params: SearchRUMEventsParams, + body: crate::datadogV2::model::RUMSearchEventsRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/rum/events/search", local_configuration.base_path); @@ -737,12 +683,13 @@ impl RUMAPI { /// Update the RUM application with given ID in your organization. pub async fn update_rum_application( &self, - params: UpdateRUMApplicationParams, + id: String, + body: crate::datadogV2::model::RUMApplicationUpdateRequest, ) -> Result< Option, Error, > { - match self.update_rum_application_with_http_info(params).await { + match self.update_rum_application_with_http_info(id, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -751,17 +698,14 @@ impl RUMAPI { /// Update the RUM application with given ID in your organization. pub async fn update_rum_application_with_http_info( &self, - params: UpdateRUMApplicationParams, + id: String, + body: crate::datadogV2::model::RUMApplicationUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let id = params.id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_security_monitoring.rs b/src/datadogV2/api/api_security_monitoring.rs index c50d2af7b..0a06053cc 100644 --- a/src/datadogV2/api/api_security_monitoring.rs +++ b/src/datadogV2/api/api_security_monitoring.rs @@ -5,93 +5,16 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateSecurityFilterParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::create_security_filter`] +/// GetFindingOptionalParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::get_finding`] #[derive(Clone, Debug)] -pub struct CreateSecurityFilterParams { - /// The definition of the new security filter. - pub body: crate::datadogV2::model::SecurityFilterCreateRequest, -} - -/// CreateSecurityMonitoringRuleParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::create_security_monitoring_rule`] -#[derive(Clone, Debug)] -pub struct CreateSecurityMonitoringRuleParams { - pub body: crate::datadogV2::model::SecurityMonitoringRuleCreatePayload, -} - -/// DeleteSecurityFilterParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::delete_security_filter`] -#[derive(Clone, Debug)] -pub struct DeleteSecurityFilterParams { - /// The ID of the security filter. - pub security_filter_id: String, -} - -/// DeleteSecurityMonitoringRuleParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::delete_security_monitoring_rule`] -#[derive(Clone, Debug)] -pub struct DeleteSecurityMonitoringRuleParams { - /// The ID of the rule. - pub rule_id: String, -} - -/// EditSecurityMonitoringSignalAssigneeParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::edit_security_monitoring_signal_assignee`] -#[derive(Clone, Debug)] -pub struct EditSecurityMonitoringSignalAssigneeParams { - /// The ID of the signal. - pub signal_id: String, - /// Attributes describing the signal update. - pub body: crate::datadogV2::model::SecurityMonitoringSignalAssigneeUpdateRequest, -} - -/// EditSecurityMonitoringSignalIncidentsParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::edit_security_monitoring_signal_incidents`] -#[derive(Clone, Debug)] -pub struct EditSecurityMonitoringSignalIncidentsParams { - /// The ID of the signal. - pub signal_id: String, - /// Attributes describing the signal update. - pub body: crate::datadogV2::model::SecurityMonitoringSignalIncidentsUpdateRequest, -} - -/// EditSecurityMonitoringSignalStateParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::edit_security_monitoring_signal_state`] -#[derive(Clone, Debug)] -pub struct EditSecurityMonitoringSignalStateParams { - /// The ID of the signal. - pub signal_id: String, - /// Attributes describing the signal update. - pub body: crate::datadogV2::model::SecurityMonitoringSignalStateUpdateRequest, -} - -/// GetFindingParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::get_finding`] -#[derive(Clone, Debug)] -pub struct GetFindingParams { - /// The ID of the finding. - pub finding_id: String, +pub struct GetFindingOptionalParams { /// Return the finding for a given snapshot of time (Unix ms). pub snapshot_timestamp: Option, } -/// GetSecurityFilterParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::get_security_filter`] +/// ListFindingsOptionalParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::list_findings`] #[derive(Clone, Debug)] -pub struct GetSecurityFilterParams { - /// The ID of the security filter. - pub security_filter_id: String, -} - -/// GetSecurityMonitoringRuleParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::get_security_monitoring_rule`] -#[derive(Clone, Debug)] -pub struct GetSecurityMonitoringRuleParams { - /// The ID of the rule. - pub rule_id: String, -} - -/// GetSecurityMonitoringSignalParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::get_security_monitoring_signal`] -#[derive(Clone, Debug)] -pub struct GetSecurityMonitoringSignalParams { - /// The ID of the signal. - pub signal_id: String, -} - -/// ListFindingsParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::list_findings`] -#[derive(Clone, Debug)] -pub struct ListFindingsParams { +pub struct ListFindingsOptionalParams { /// Limit the number of findings returned. Must be <= 1000. pub page_limit: Option, /// Return findings for a given snapshot of time (Unix ms). @@ -118,18 +41,18 @@ pub struct ListFindingsParams { pub filter_status: Option, } -/// ListSecurityMonitoringRulesParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::list_security_monitoring_rules`] +/// ListSecurityMonitoringRulesOptionalParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::list_security_monitoring_rules`] #[derive(Clone, Debug)] -pub struct ListSecurityMonitoringRulesParams { +pub struct ListSecurityMonitoringRulesOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, /// Specific page number to return. pub page_number: Option, } -/// ListSecurityMonitoringSignalsParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::list_security_monitoring_signals`] +/// ListSecurityMonitoringSignalsOptionalParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::list_security_monitoring_signals`] #[derive(Clone, Debug)] -pub struct ListSecurityMonitoringSignalsParams { +pub struct ListSecurityMonitoringSignalsOptionalParams { /// The search query for security signals. pub filter_query: Option, /// The minimum timestamp for requested security signals. @@ -144,44 +67,10 @@ pub struct ListSecurityMonitoringSignalsParams { pub page_limit: Option, } -/// MuteFindingsParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::mute_findings`] +/// SearchSecurityMonitoringSignalsOptionalParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::search_security_monitoring_signals`] #[derive(Clone, Debug)] -pub struct MuteFindingsParams { - /// ### Attributes - /// - /// All findings are updated with the same attributes. The request body must include at least two attributes: `muted` and `reason`. - /// The allowed reasons depend on whether the finding is being muted or unmuted: - /// - To mute a finding: `PENDING_FIX`, `FALSE_POSITIVE`, `ACCEPTED_RISK`, `OTHER`. - /// - To unmute a finding : `NO_PENDING_FIX`, `HUMAN_ERROR`, `NO_LONGER_ACCEPTED_RISK`, `OTHER`. - /// - /// ### Meta - /// - /// The request body must include a list of the finding IDs to be updated. - /// - pub body: crate::datadogV2::model::BulkMuteFindingsRequest, -} - -/// SearchSecurityMonitoringSignalsParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::search_security_monitoring_signals`] -#[derive(Clone, Debug)] -pub struct SearchSecurityMonitoringSignalsParams { - pub body: Option>, -} - -/// UpdateSecurityFilterParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::update_security_filter`] -#[derive(Clone, Debug)] -pub struct UpdateSecurityFilterParams { - /// The ID of the security filter. - pub security_filter_id: String, - /// New definition of the security filter. - pub body: crate::datadogV2::model::SecurityFilterUpdateRequest, -} - -/// UpdateSecurityMonitoringRuleParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::update_security_monitoring_rule`] -#[derive(Clone, Debug)] -pub struct UpdateSecurityMonitoringRuleParams { - /// The ID of the rule. - pub rule_id: String, - pub body: crate::datadogV2::model::SecurityMonitoringRuleUpdatePayload, +pub struct SearchSecurityMonitoringSignalsOptionalParams { + pub body: Option, } /// CreateSecurityFilterError is a struct for typed errors of method [`SecurityMonitoringAPI::create_security_filter`] @@ -409,12 +298,12 @@ impl SecurityMonitoringAPI { /// for more examples. pub async fn create_security_filter( &self, - params: CreateSecurityFilterParams, + body: crate::datadogV2::model::SecurityFilterCreateRequest, ) -> Result< Option, Error, > { - match self.create_security_filter_with_http_info(params).await { + match self.create_security_filter_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -426,16 +315,13 @@ impl SecurityMonitoringAPI { /// for more examples. pub async fn create_security_filter_with_http_info( &self, - params: CreateSecurityFilterParams, + body: crate::datadogV2::model::SecurityFilterCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -495,13 +381,13 @@ impl SecurityMonitoringAPI { /// Create a detection rule. pub async fn create_security_monitoring_rule( &self, - params: CreateSecurityMonitoringRuleParams, + body: crate::datadogV2::model::SecurityMonitoringRuleCreatePayload, ) -> Result< Option, Error, > { match self - .create_security_monitoring_rule_with_http_info(params) + .create_security_monitoring_rule_with_http_info(body) .await { Ok(response_content) => Ok(response_content.entity), @@ -512,16 +398,13 @@ impl SecurityMonitoringAPI { /// Create a detection rule. pub async fn create_security_monitoring_rule_with_http_info( &self, - params: CreateSecurityMonitoringRuleParams, + body: crate::datadogV2::model::SecurityMonitoringRuleCreatePayload, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -581,9 +464,12 @@ impl SecurityMonitoringAPI { /// Delete a specific security filter. pub async fn delete_security_filter( &self, - params: DeleteSecurityFilterParams, + security_filter_id: String, ) -> Result, Error> { - match self.delete_security_filter_with_http_info(params).await { + match self + .delete_security_filter_with_http_info(security_filter_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -592,13 +478,10 @@ impl SecurityMonitoringAPI { /// Delete a specific security filter. pub async fn delete_security_filter_with_http_info( &self, - params: DeleteSecurityFilterParams, + security_filter_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let security_filter_id = params.security_filter_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -650,10 +533,10 @@ impl SecurityMonitoringAPI { /// Delete an existing rule. Default rules cannot be deleted. pub async fn delete_security_monitoring_rule( &self, - params: DeleteSecurityMonitoringRuleParams, + rule_id: String, ) -> Result, Error> { match self - .delete_security_monitoring_rule_with_http_info(params) + .delete_security_monitoring_rule_with_http_info(rule_id) .await { Ok(response_content) => Ok(response_content.entity), @@ -664,13 +547,10 @@ impl SecurityMonitoringAPI { /// Delete an existing rule. Default rules cannot be deleted. pub async fn delete_security_monitoring_rule_with_http_info( &self, - params: DeleteSecurityMonitoringRuleParams, + rule_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let rule_id = params.rule_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -722,13 +602,14 @@ impl SecurityMonitoringAPI { /// Modify the triage assignee of a security signal. pub async fn edit_security_monitoring_signal_assignee( &self, - params: EditSecurityMonitoringSignalAssigneeParams, + signal_id: String, + body: crate::datadogV2::model::SecurityMonitoringSignalAssigneeUpdateRequest, ) -> Result< Option, Error, > { match self - .edit_security_monitoring_signal_assignee_with_http_info(params) + .edit_security_monitoring_signal_assignee_with_http_info(signal_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -739,17 +620,14 @@ impl SecurityMonitoringAPI { /// Modify the triage assignee of a security signal. pub async fn edit_security_monitoring_signal_assignee_with_http_info( &self, - params: EditSecurityMonitoringSignalAssigneeParams, + signal_id: String, + body: crate::datadogV2::model::SecurityMonitoringSignalAssigneeUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let signal_id = params.signal_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -811,13 +689,14 @@ impl SecurityMonitoringAPI { /// Change the related incidents for a security signal. pub async fn edit_security_monitoring_signal_incidents( &self, - params: EditSecurityMonitoringSignalIncidentsParams, + signal_id: String, + body: crate::datadogV2::model::SecurityMonitoringSignalIncidentsUpdateRequest, ) -> Result< Option, Error, > { match self - .edit_security_monitoring_signal_incidents_with_http_info(params) + .edit_security_monitoring_signal_incidents_with_http_info(signal_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -828,17 +707,14 @@ impl SecurityMonitoringAPI { /// Change the related incidents for a security signal. pub async fn edit_security_monitoring_signal_incidents_with_http_info( &self, - params: EditSecurityMonitoringSignalIncidentsParams, + signal_id: String, + body: crate::datadogV2::model::SecurityMonitoringSignalIncidentsUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let signal_id = params.signal_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -900,13 +776,14 @@ impl SecurityMonitoringAPI { /// Change the triage state of a security signal. pub async fn edit_security_monitoring_signal_state( &self, - params: EditSecurityMonitoringSignalStateParams, + signal_id: String, + body: crate::datadogV2::model::SecurityMonitoringSignalStateUpdateRequest, ) -> Result< Option, Error, > { match self - .edit_security_monitoring_signal_state_with_http_info(params) + .edit_security_monitoring_signal_state_with_http_info(signal_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -917,17 +794,14 @@ impl SecurityMonitoringAPI { /// Change the triage state of a security signal. pub async fn edit_security_monitoring_signal_state_with_http_info( &self, - params: EditSecurityMonitoringSignalStateParams, + signal_id: String, + body: crate::datadogV2::model::SecurityMonitoringSignalStateUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let signal_id = params.signal_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -989,9 +863,10 @@ impl SecurityMonitoringAPI { /// Returns a single finding with message and resource configuration. pub async fn get_finding( &self, - params: GetFindingParams, + finding_id: String, + params: GetFindingOptionalParams, ) -> Result, Error> { - match self.get_finding_with_http_info(params).await { + match self.get_finding_with_http_info(finding_id, params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1000,13 +875,13 @@ impl SecurityMonitoringAPI { /// Returns a single finding with message and resource configuration. pub async fn get_finding_with_http_info( &self, - params: GetFindingParams, + finding_id: String, + params: GetFindingOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let finding_id = params.finding_id; + // unbox and build optional parameters let snapshot_timestamp = params.snapshot_timestamp; let local_client = &local_configuration.client; @@ -1019,9 +894,9 @@ impl SecurityMonitoringAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = snapshot_timestamp { + if let Some(ref local_query_param) = snapshot_timestamp { local_req_builder = - local_req_builder.query(&[("snapshot_timestamp", &local_str.to_string())]); + local_req_builder.query(&[("snapshot_timestamp", &local_query_param.to_string())]); }; // build user agent @@ -1069,12 +944,15 @@ impl SecurityMonitoringAPI { /// for more examples. pub async fn get_security_filter( &self, - params: GetSecurityFilterParams, + security_filter_id: String, ) -> Result< Option, Error, > { - match self.get_security_filter_with_http_info(params).await { + match self + .get_security_filter_with_http_info(security_filter_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1086,16 +964,13 @@ impl SecurityMonitoringAPI { /// for more examples. pub async fn get_security_filter_with_http_info( &self, - params: GetSecurityFilterParams, + security_filter_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let security_filter_id = params.security_filter_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1149,13 +1024,13 @@ impl SecurityMonitoringAPI { /// Get a rule's details. pub async fn get_security_monitoring_rule( &self, - params: GetSecurityMonitoringRuleParams, + rule_id: String, ) -> Result< Option, Error, > { match self - .get_security_monitoring_rule_with_http_info(params) + .get_security_monitoring_rule_with_http_info(rule_id) .await { Ok(response_content) => Ok(response_content.entity), @@ -1166,16 +1041,13 @@ impl SecurityMonitoringAPI { /// Get a rule's details. pub async fn get_security_monitoring_rule_with_http_info( &self, - params: GetSecurityMonitoringRuleParams, + rule_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let rule_id = params.rule_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1229,13 +1101,13 @@ impl SecurityMonitoringAPI { /// Get a signal's details. pub async fn get_security_monitoring_signal( &self, - params: GetSecurityMonitoringSignalParams, + signal_id: String, ) -> Result< Option, Error, > { match self - .get_security_monitoring_signal_with_http_info(params) + .get_security_monitoring_signal_with_http_info(signal_id) .await { Ok(response_content) => Ok(response_content.entity), @@ -1246,16 +1118,13 @@ impl SecurityMonitoringAPI { /// Get a signal's details. pub async fn get_security_monitoring_signal_with_http_info( &self, - params: GetSecurityMonitoringSignalParams, + signal_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let signal_id = params.signal_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1339,7 +1208,7 @@ impl SecurityMonitoringAPI { /// pub async fn list_findings( &self, - params: ListFindingsParams, + params: ListFindingsOptionalParams, ) -> Result, Error> { match self.list_findings_with_http_info(params).await { @@ -1381,14 +1250,14 @@ impl SecurityMonitoringAPI { /// pub async fn list_findings_with_http_info( &self, - params: ListFindingsParams, + params: ListFindingsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let page_limit = params.page_limit; let snapshot_timestamp = params.snapshot_timestamp; let page_cursor = params.page_cursor; @@ -1411,52 +1280,57 @@ impl SecurityMonitoringAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_limit { - local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_limit { + local_req_builder = + local_req_builder.query(&[("page[limit]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = snapshot_timestamp { + if let Some(ref local_query_param) = snapshot_timestamp { local_req_builder = - local_req_builder.query(&[("snapshot_timestamp", &local_str.to_string())]); + local_req_builder.query(&[("snapshot_timestamp", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_cursor { + if let Some(ref local_query_param) = page_cursor { local_req_builder = - local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + local_req_builder.query(&[("page[cursor]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_tags { + if let Some(ref local_query_param) = filter_tags { local_req_builder = - local_req_builder.query(&[("filter[tags]", &local_str.to_string())]); + local_req_builder.query(&[("filter[tags]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_evaluation_changed_at { - local_req_builder = local_req_builder - .query(&[("filter[evaluation_changed_at]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_evaluation_changed_at { + local_req_builder = local_req_builder.query(&[( + "filter[evaluation_changed_at]", + &local_query_param.to_string(), + )]); }; - if let Some(ref local_str) = filter_muted { + if let Some(ref local_query_param) = filter_muted { local_req_builder = - local_req_builder.query(&[("filter[muted]", &local_str.to_string())]); + local_req_builder.query(&[("filter[muted]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_rule_id { + if let Some(ref local_query_param) = filter_rule_id { local_req_builder = - local_req_builder.query(&[("filter[rule_id]", &local_str.to_string())]); + local_req_builder.query(&[("filter[rule_id]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_rule_name { + if let Some(ref local_query_param) = filter_rule_name { local_req_builder = - local_req_builder.query(&[("filter[rule_name]", &local_str.to_string())]); + local_req_builder.query(&[("filter[rule_name]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_resource_type { - local_req_builder = - local_req_builder.query(&[("filter[resource_type]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_resource_type { + local_req_builder = local_req_builder + .query(&[("filter[resource_type]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_discovery_timestamp { - local_req_builder = - local_req_builder.query(&[("filter[discovery_timestamp]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_discovery_timestamp { + local_req_builder = local_req_builder.query(&[( + "filter[discovery_timestamp]", + &local_query_param.to_string(), + )]); }; - if let Some(ref local_str) = filter_evaluation { + if let Some(ref local_query_param) = filter_evaluation { local_req_builder = - local_req_builder.query(&[("filter[evaluation]", &local_str.to_string())]); + local_req_builder.query(&[("filter[evaluation]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_status { + if let Some(ref local_query_param) = filter_status { local_req_builder = - local_req_builder.query(&[("filter[status]", &local_str.to_string())]); + local_req_builder.query(&[("filter[status]", &local_query_param.to_string())]); }; // build user agent @@ -1520,8 +1394,6 @@ impl SecurityMonitoringAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1574,7 +1446,7 @@ impl SecurityMonitoringAPI { /// List rules. pub async fn list_security_monitoring_rules( &self, - params: ListSecurityMonitoringRulesParams, + params: ListSecurityMonitoringRulesOptionalParams, ) -> Result< Option, Error, @@ -1591,14 +1463,14 @@ impl SecurityMonitoringAPI { /// List rules. pub async fn list_security_monitoring_rules_with_http_info( &self, - params: ListSecurityMonitoringRulesParams, + params: ListSecurityMonitoringRulesOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let page_size = params.page_size; let page_number = params.page_number; @@ -1611,12 +1483,13 @@ impl SecurityMonitoringAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_number { + if let Some(ref local_query_param) = page_number { local_req_builder = - local_req_builder.query(&[("page[number]", &local_str.to_string())]); + local_req_builder.query(&[("page[number]", &local_query_param.to_string())]); }; // build user agent @@ -1664,7 +1537,7 @@ impl SecurityMonitoringAPI { /// security signals. pub async fn list_security_monitoring_signals( &self, - params: ListSecurityMonitoringSignalsParams, + params: ListSecurityMonitoringSignalsOptionalParams, ) -> Result< Option, Error, @@ -1683,14 +1556,14 @@ impl SecurityMonitoringAPI { /// security signals. pub async fn list_security_monitoring_signals_with_http_info( &self, - params: ListSecurityMonitoringSignalsParams, + params: ListSecurityMonitoringSignalsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let filter_query = params.filter_query; let filter_from = params.filter_from; let filter_to = params.filter_to; @@ -1707,26 +1580,29 @@ impl SecurityMonitoringAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = filter_query { + if let Some(ref local_query_param) = filter_query { local_req_builder = - local_req_builder.query(&[("filter[query]", &local_str.to_string())]); + local_req_builder.query(&[("filter[query]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_from { + if let Some(ref local_query_param) = filter_from { local_req_builder = - local_req_builder.query(&[("filter[from]", &local_str.to_string())]); + local_req_builder.query(&[("filter[from]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_to { - local_req_builder = local_req_builder.query(&[("filter[to]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_to { + local_req_builder = + local_req_builder.query(&[("filter[to]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_cursor { + if let Some(ref local_query_param) = page_cursor { local_req_builder = - local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + local_req_builder.query(&[("page[cursor]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_limit { - local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_limit { + local_req_builder = + local_req_builder.query(&[("page[limit]", &local_query_param.to_string())]); }; // build user agent @@ -1773,10 +1649,10 @@ impl SecurityMonitoringAPI { /// Mute or unmute findings. pub async fn mute_findings( &self, - params: MuteFindingsParams, + body: crate::datadogV2::model::BulkMuteFindingsRequest, ) -> Result, Error> { - match self.mute_findings_with_http_info(params).await { + match self.mute_findings_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1785,16 +1661,13 @@ impl SecurityMonitoringAPI { /// Mute or unmute findings. pub async fn mute_findings_with_http_info( &self, - params: MuteFindingsParams, + body: crate::datadogV2::model::BulkMuteFindingsRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1855,7 +1728,7 @@ impl SecurityMonitoringAPI { /// security signals. pub async fn search_security_monitoring_signals( &self, - params: SearchSecurityMonitoringSignalsParams, + params: SearchSecurityMonitoringSignalsOptionalParams, ) -> Result< Option, Error, @@ -1874,14 +1747,14 @@ impl SecurityMonitoringAPI { /// security signals. pub async fn search_security_monitoring_signals_with_http_info( &self, - params: SearchSecurityMonitoringSignalsParams, + params: SearchSecurityMonitoringSignalsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let body = params.body; let local_client = &local_configuration.client; @@ -1945,12 +1818,16 @@ impl SecurityMonitoringAPI { /// Returns the security filter object when the request is successful. pub async fn update_security_filter( &self, - params: UpdateSecurityFilterParams, + security_filter_id: String, + body: crate::datadogV2::model::SecurityFilterUpdateRequest, ) -> Result< Option, Error, > { - match self.update_security_filter_with_http_info(params).await { + match self + .update_security_filter_with_http_info(security_filter_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1960,17 +1837,14 @@ impl SecurityMonitoringAPI { /// Returns the security filter object when the request is successful. pub async fn update_security_filter_with_http_info( &self, - params: UpdateSecurityFilterParams, + security_filter_id: String, + body: crate::datadogV2::model::SecurityFilterUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let security_filter_id = params.security_filter_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -2033,13 +1907,14 @@ impl SecurityMonitoringAPI { /// Default rules can only be updated to be enabled and to change notifications. pub async fn update_security_monitoring_rule( &self, - params: UpdateSecurityMonitoringRuleParams, + rule_id: String, + body: crate::datadogV2::model::SecurityMonitoringRuleUpdatePayload, ) -> Result< Option, Error, > { match self - .update_security_monitoring_rule_with_http_info(params) + .update_security_monitoring_rule_with_http_info(rule_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -2052,17 +1927,14 @@ impl SecurityMonitoringAPI { /// Default rules can only be updated to be enabled and to change notifications. pub async fn update_security_monitoring_rule_with_http_info( &self, - params: UpdateSecurityMonitoringRuleParams, + rule_id: String, + body: crate::datadogV2::model::SecurityMonitoringRuleUpdatePayload, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let rule_id = params.rule_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_sensitive_data_scanner.rs b/src/datadogV2/api/api_sensitive_data_scanner.rs index 50ab89052..5dc41c08c 100644 --- a/src/datadogV2/api/api_sensitive_data_scanner.rs +++ b/src/datadogV2/api/api_sensitive_data_scanner.rs @@ -5,56 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateScanningGroupParams is a struct for passing parameters to the method [`SensitiveDataScannerAPI::create_scanning_group`] -#[derive(Clone, Debug)] -pub struct CreateScanningGroupParams { - pub body: crate::datadogV2::model::SensitiveDataScannerGroupCreateRequest, -} - -/// CreateScanningRuleParams is a struct for passing parameters to the method [`SensitiveDataScannerAPI::create_scanning_rule`] -#[derive(Clone, Debug)] -pub struct CreateScanningRuleParams { - pub body: crate::datadogV2::model::SensitiveDataScannerRuleCreateRequest, -} - -/// DeleteScanningGroupParams is a struct for passing parameters to the method [`SensitiveDataScannerAPI::delete_scanning_group`] -#[derive(Clone, Debug)] -pub struct DeleteScanningGroupParams { - /// The ID of a group of rules. - pub group_id: String, - pub body: crate::datadogV2::model::SensitiveDataScannerGroupDeleteRequest, -} - -/// DeleteScanningRuleParams is a struct for passing parameters to the method [`SensitiveDataScannerAPI::delete_scanning_rule`] -#[derive(Clone, Debug)] -pub struct DeleteScanningRuleParams { - /// The ID of the rule. - pub rule_id: String, - pub body: crate::datadogV2::model::SensitiveDataScannerRuleDeleteRequest, -} - -/// ReorderScanningGroupsParams is a struct for passing parameters to the method [`SensitiveDataScannerAPI::reorder_scanning_groups`] -#[derive(Clone, Debug)] -pub struct ReorderScanningGroupsParams { - pub body: crate::datadogV2::model::SensitiveDataScannerConfigRequest, -} - -/// UpdateScanningGroupParams is a struct for passing parameters to the method [`SensitiveDataScannerAPI::update_scanning_group`] -#[derive(Clone, Debug)] -pub struct UpdateScanningGroupParams { - /// The ID of a group of rules. - pub group_id: String, - pub body: crate::datadogV2::model::SensitiveDataScannerGroupUpdateRequest, -} - -/// UpdateScanningRuleParams is a struct for passing parameters to the method [`SensitiveDataScannerAPI::update_scanning_rule`] -#[derive(Clone, Debug)] -pub struct UpdateScanningRuleParams { - /// The ID of the rule. - pub rule_id: String, - pub body: crate::datadogV2::model::SensitiveDataScannerRuleUpdateRequest, -} - /// CreateScanningGroupError is a struct for typed errors of method [`SensitiveDataScannerAPI::create_scanning_group`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -177,12 +127,12 @@ impl SensitiveDataScannerAPI { /// The new group will be ordered last within the configuration. pub async fn create_scanning_group( &self, - params: CreateScanningGroupParams, + body: crate::datadogV2::model::SensitiveDataScannerGroupCreateRequest, ) -> Result< Option, Error, > { - match self.create_scanning_group_with_http_info(params).await { + match self.create_scanning_group_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -195,16 +145,13 @@ impl SensitiveDataScannerAPI { /// The new group will be ordered last within the configuration. pub async fn create_scanning_group_with_http_info( &self, - params: CreateScanningGroupParams, + body: crate::datadogV2::model::SensitiveDataScannerGroupCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -269,12 +216,12 @@ impl SensitiveDataScannerAPI { /// excluded_attributes. If both are missing, we will scan the whole event. pub async fn create_scanning_rule( &self, - params: CreateScanningRuleParams, + body: crate::datadogV2::model::SensitiveDataScannerRuleCreateRequest, ) -> Result< Option, Error, > { - match self.create_scanning_rule_with_http_info(params).await { + match self.create_scanning_rule_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -287,16 +234,13 @@ impl SensitiveDataScannerAPI { /// excluded_attributes. If both are missing, we will scan the whole event. pub async fn create_scanning_rule_with_http_info( &self, - params: CreateScanningRuleParams, + body: crate::datadogV2::model::SensitiveDataScannerRuleCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -357,12 +301,16 @@ impl SensitiveDataScannerAPI { /// Delete a given group. pub async fn delete_scanning_group( &self, - params: DeleteScanningGroupParams, + group_id: String, + body: crate::datadogV2::model::SensitiveDataScannerGroupDeleteRequest, ) -> Result< Option, Error, > { - match self.delete_scanning_group_with_http_info(params).await { + match self + .delete_scanning_group_with_http_info(group_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -371,17 +319,14 @@ impl SensitiveDataScannerAPI { /// Delete a given group. pub async fn delete_scanning_group_with_http_info( &self, - params: DeleteScanningGroupParams, + group_id: String, + body: crate::datadogV2::model::SensitiveDataScannerGroupDeleteRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let group_id = params.group_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -443,12 +388,16 @@ impl SensitiveDataScannerAPI { /// Delete a given rule. pub async fn delete_scanning_rule( &self, - params: DeleteScanningRuleParams, + rule_id: String, + body: crate::datadogV2::model::SensitiveDataScannerRuleDeleteRequest, ) -> Result< Option, Error, > { - match self.delete_scanning_rule_with_http_info(params).await { + match self + .delete_scanning_rule_with_http_info(rule_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -457,17 +406,14 @@ impl SensitiveDataScannerAPI { /// Delete a given rule. pub async fn delete_scanning_rule_with_http_info( &self, - params: DeleteScanningRuleParams, + rule_id: String, + body: crate::datadogV2::model::SensitiveDataScannerRuleDeleteRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let rule_id = params.rule_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -548,8 +494,6 @@ impl SensitiveDataScannerAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -622,8 +566,6 @@ impl SensitiveDataScannerAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -677,12 +619,12 @@ impl SensitiveDataScannerAPI { /// Reorder the list of groups. pub async fn reorder_scanning_groups( &self, - params: ReorderScanningGroupsParams, + body: crate::datadogV2::model::SensitiveDataScannerConfigRequest, ) -> Result< Option, Error, > { - match self.reorder_scanning_groups_with_http_info(params).await { + match self.reorder_scanning_groups_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -691,16 +633,13 @@ impl SensitiveDataScannerAPI { /// Reorder the list of groups. pub async fn reorder_scanning_groups_with_http_info( &self, - params: ReorderScanningGroupsParams, + body: crate::datadogV2::model::SensitiveDataScannerConfigRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -764,12 +703,16 @@ impl SensitiveDataScannerAPI { /// currently in the group, and MUST NOT contain any others. pub async fn update_scanning_group( &self, - params: UpdateScanningGroupParams, + group_id: String, + body: crate::datadogV2::model::SensitiveDataScannerGroupUpdateRequest, ) -> Result< Option, Error, > { - match self.update_scanning_group_with_http_info(params).await { + match self + .update_scanning_group_with_http_info(group_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -781,17 +724,14 @@ impl SensitiveDataScannerAPI { /// currently in the group, and MUST NOT contain any others. pub async fn update_scanning_group_with_http_info( &self, - params: UpdateScanningGroupParams, + group_id: String, + body: crate::datadogV2::model::SensitiveDataScannerGroupUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let group_id = params.group_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -856,12 +796,16 @@ impl SensitiveDataScannerAPI { /// relationship will also result in an error. pub async fn update_scanning_rule( &self, - params: UpdateScanningRuleParams, + rule_id: String, + body: crate::datadogV2::model::SensitiveDataScannerRuleUpdateRequest, ) -> Result< Option, Error, > { - match self.update_scanning_rule_with_http_info(params).await { + match self + .update_scanning_rule_with_http_info(rule_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -873,17 +817,14 @@ impl SensitiveDataScannerAPI { /// relationship will also result in an error. pub async fn update_scanning_rule_with_http_info( &self, - params: UpdateScanningRuleParams, + rule_id: String, + body: crate::datadogV2::model::SensitiveDataScannerRuleUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let rule_id = params.rule_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_service_accounts.rs b/src/datadogV2/api/api_service_accounts.rs index 2c7ee470e..293247681 100644 --- a/src/datadogV2/api/api_service_accounts.rs +++ b/src/datadogV2/api/api_service_accounts.rs @@ -5,43 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateServiceAccountParams is a struct for passing parameters to the method [`ServiceAccountsAPI::create_service_account`] +/// ListServiceAccountApplicationKeysOptionalParams is a struct for passing parameters to the method [`ServiceAccountsAPI::list_service_account_application_keys`] #[derive(Clone, Debug)] -pub struct CreateServiceAccountParams { - pub body: crate::datadogV2::model::ServiceAccountCreateRequest, -} - -/// CreateServiceAccountApplicationKeyParams is a struct for passing parameters to the method [`ServiceAccountsAPI::create_service_account_application_key`] -#[derive(Clone, Debug)] -pub struct CreateServiceAccountApplicationKeyParams { - /// The ID of the service account. - pub service_account_id: String, - pub body: crate::datadogV2::model::ApplicationKeyCreateRequest, -} - -/// DeleteServiceAccountApplicationKeyParams is a struct for passing parameters to the method [`ServiceAccountsAPI::delete_service_account_application_key`] -#[derive(Clone, Debug)] -pub struct DeleteServiceAccountApplicationKeyParams { - /// The ID of the service account. - pub service_account_id: String, - /// The ID of the application key. - pub app_key_id: String, -} - -/// GetServiceAccountApplicationKeyParams is a struct for passing parameters to the method [`ServiceAccountsAPI::get_service_account_application_key`] -#[derive(Clone, Debug)] -pub struct GetServiceAccountApplicationKeyParams { - /// The ID of the service account. - pub service_account_id: String, - /// The ID of the application key. - pub app_key_id: String, -} - -/// ListServiceAccountApplicationKeysParams is a struct for passing parameters to the method [`ServiceAccountsAPI::list_service_account_application_keys`] -#[derive(Clone, Debug)] -pub struct ListServiceAccountApplicationKeysParams { - /// The ID of the service account. - pub service_account_id: String, +pub struct ListServiceAccountApplicationKeysOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, /// Specific page number to return. @@ -58,16 +24,6 @@ pub struct ListServiceAccountApplicationKeysParams { pub filter_created_at_end: Option, } -/// UpdateServiceAccountApplicationKeyParams is a struct for passing parameters to the method [`ServiceAccountsAPI::update_service_account_application_key`] -#[derive(Clone, Debug)] -pub struct UpdateServiceAccountApplicationKeyParams { - /// The ID of the service account. - pub service_account_id: String, - /// The ID of the application key. - pub app_key_id: String, - pub body: crate::datadogV2::model::ApplicationKeyUpdateRequest, -} - /// CreateServiceAccountError is a struct for typed errors of method [`ServiceAccountsAPI::create_service_account`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -154,10 +110,10 @@ impl ServiceAccountsAPI { /// Create a service account for your organization. pub async fn create_service_account( &self, - params: CreateServiceAccountParams, + body: crate::datadogV2::model::ServiceAccountCreateRequest, ) -> Result, Error> { - match self.create_service_account_with_http_info(params).await { + match self.create_service_account_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -166,16 +122,13 @@ impl ServiceAccountsAPI { /// Create a service account for your organization. pub async fn create_service_account_with_http_info( &self, - params: CreateServiceAccountParams, + body: crate::datadogV2::model::ServiceAccountCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/service_accounts", local_configuration.base_path); @@ -232,13 +185,14 @@ impl ServiceAccountsAPI { /// Create an application key for this service account. pub async fn create_service_account_application_key( &self, - params: CreateServiceAccountApplicationKeyParams, + service_account_id: String, + body: crate::datadogV2::model::ApplicationKeyCreateRequest, ) -> Result< Option, Error, > { match self - .create_service_account_application_key_with_http_info(params) + .create_service_account_application_key_with_http_info(service_account_id, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -249,17 +203,14 @@ impl ServiceAccountsAPI { /// Create an application key for this service account. pub async fn create_service_account_application_key_with_http_info( &self, - params: CreateServiceAccountApplicationKeyParams, + service_account_id: String, + body: crate::datadogV2::model::ApplicationKeyCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let service_account_id = params.service_account_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -320,10 +271,11 @@ impl ServiceAccountsAPI { /// Delete an application key owned by this service account. pub async fn delete_service_account_application_key( &self, - params: DeleteServiceAccountApplicationKeyParams, + service_account_id: String, + app_key_id: String, ) -> Result, Error> { match self - .delete_service_account_application_key_with_http_info(params) + .delete_service_account_application_key_with_http_info(service_account_id, app_key_id) .await { Ok(response_content) => Ok(response_content.entity), @@ -334,14 +286,11 @@ impl ServiceAccountsAPI { /// Delete an application key owned by this service account. pub async fn delete_service_account_application_key_with_http_info( &self, - params: DeleteServiceAccountApplicationKeyParams, + service_account_id: String, + app_key_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let service_account_id = params.service_account_id; - let app_key_id = params.app_key_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -394,13 +343,14 @@ impl ServiceAccountsAPI { /// Get an application key owned by this service account. pub async fn get_service_account_application_key( &self, - params: GetServiceAccountApplicationKeyParams, + service_account_id: String, + app_key_id: String, ) -> Result< Option, Error, > { match self - .get_service_account_application_key_with_http_info(params) + .get_service_account_application_key_with_http_info(service_account_id, app_key_id) .await { Ok(response_content) => Ok(response_content.entity), @@ -411,17 +361,14 @@ impl ServiceAccountsAPI { /// Get an application key owned by this service account. pub async fn get_service_account_application_key_with_http_info( &self, - params: GetServiceAccountApplicationKeyParams, + service_account_id: String, + app_key_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let service_account_id = params.service_account_id; - let app_key_id = params.app_key_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -476,13 +423,14 @@ impl ServiceAccountsAPI { /// List all application keys available for this service account. pub async fn list_service_account_application_keys( &self, - params: ListServiceAccountApplicationKeysParams, + service_account_id: String, + params: ListServiceAccountApplicationKeysOptionalParams, ) -> Result< Option, Error, > { match self - .list_service_account_application_keys_with_http_info(params) + .list_service_account_application_keys_with_http_info(service_account_id, params) .await { Ok(response_content) => Ok(response_content.entity), @@ -493,15 +441,15 @@ impl ServiceAccountsAPI { /// List all application keys available for this service account. pub async fn list_service_account_application_keys_with_http_info( &self, - params: ListServiceAccountApplicationKeysParams, + service_account_id: String, + params: ListServiceAccountApplicationKeysOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let service_account_id = params.service_account_id; + // unbox and build optional parameters let page_size = params.page_size; let page_number = params.page_number; let sort = params.sort; @@ -519,26 +467,29 @@ impl ServiceAccountsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); - }; - if let Some(ref local_str) = page_number { + if let Some(ref local_query_param) = page_size { local_req_builder = - local_req_builder.query(&[("page[number]", &local_str.to_string())]); - }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter { - local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + if let Some(ref local_query_param) = page_number { + local_req_builder = + local_req_builder.query(&[("page[number]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_created_at_start { + if let Some(ref local_query_param) = sort { local_req_builder = - local_req_builder.query(&[("filter[created_at][start]", &local_str.to_string())]); + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_created_at_end { + if let Some(ref local_query_param) = filter { local_req_builder = - local_req_builder.query(&[("filter[created_at][end]", &local_str.to_string())]); + local_req_builder.query(&[("filter", &local_query_param.to_string())]); + }; + if let Some(ref local_query_param) = filter_created_at_start { + local_req_builder = local_req_builder + .query(&[("filter[created_at][start]", &local_query_param.to_string())]); + }; + if let Some(ref local_query_param) = filter_created_at_end { + local_req_builder = local_req_builder + .query(&[("filter[created_at][end]", &local_query_param.to_string())]); }; // build user agent @@ -584,13 +535,19 @@ impl ServiceAccountsAPI { /// Edit an application key owned by this service account. pub async fn update_service_account_application_key( &self, - params: UpdateServiceAccountApplicationKeyParams, + service_account_id: String, + app_key_id: String, + body: crate::datadogV2::model::ApplicationKeyUpdateRequest, ) -> Result< Option, Error, > { match self - .update_service_account_application_key_with_http_info(params) + .update_service_account_application_key_with_http_info( + service_account_id, + app_key_id, + body, + ) .await { Ok(response_content) => Ok(response_content.entity), @@ -601,18 +558,15 @@ impl ServiceAccountsAPI { /// Edit an application key owned by this service account. pub async fn update_service_account_application_key_with_http_info( &self, - params: UpdateServiceAccountApplicationKeyParams, + service_account_id: String, + app_key_id: String, + body: crate::datadogV2::model::ApplicationKeyUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let service_account_id = params.service_account_id; - let app_key_id = params.app_key_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_service_definition.rs b/src/datadogV2/api/api_service_definition.rs index f7ce736d7..02e8d92ab 100644 --- a/src/datadogV2/api/api_service_definition.rs +++ b/src/datadogV2/api/api_service_definition.rs @@ -5,32 +5,16 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateOrUpdateServiceDefinitionsParams is a struct for passing parameters to the method [`ServiceDefinitionAPI::create_or_update_service_definitions`] +/// GetServiceDefinitionOptionalParams is a struct for passing parameters to the method [`ServiceDefinitionAPI::get_service_definition`] #[derive(Clone, Debug)] -pub struct CreateOrUpdateServiceDefinitionsParams { - /// Service Definition YAML/JSON. - pub body: crate::datadogV2::model::ServiceDefinitionsCreateRequest, -} - -/// DeleteServiceDefinitionParams is a struct for passing parameters to the method [`ServiceDefinitionAPI::delete_service_definition`] -#[derive(Clone, Debug)] -pub struct DeleteServiceDefinitionParams { - /// The name of the service. - pub service_name: String, -} - -/// GetServiceDefinitionParams is a struct for passing parameters to the method [`ServiceDefinitionAPI::get_service_definition`] -#[derive(Clone, Debug)] -pub struct GetServiceDefinitionParams { - /// The name of the service. - pub service_name: String, +pub struct GetServiceDefinitionOptionalParams { /// The schema version desired in the response. pub schema_version: Option, } -/// ListServiceDefinitionsParams is a struct for passing parameters to the method [`ServiceDefinitionAPI::list_service_definitions`] +/// ListServiceDefinitionsOptionalParams is a struct for passing parameters to the method [`ServiceDefinitionAPI::list_service_definitions`] #[derive(Clone, Debug)] -pub struct ListServiceDefinitionsParams { +pub struct ListServiceDefinitionsOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, /// Specific page number to return. @@ -106,13 +90,13 @@ impl ServiceDefinitionAPI { /// Create or update service definition in the Datadog Service Catalog. pub async fn create_or_update_service_definitions( &self, - params: CreateOrUpdateServiceDefinitionsParams, + body: crate::datadogV2::model::ServiceDefinitionsCreateRequest, ) -> Result< Option, Error, > { match self - .create_or_update_service_definitions_with_http_info(params) + .create_or_update_service_definitions_with_http_info(body) .await { Ok(response_content) => Ok(response_content.entity), @@ -123,16 +107,13 @@ impl ServiceDefinitionAPI { /// Create or update service definition in the Datadog Service Catalog. pub async fn create_or_update_service_definitions_with_http_info( &self, - params: CreateOrUpdateServiceDefinitionsParams, + body: crate::datadogV2::model::ServiceDefinitionsCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -192,9 +173,12 @@ impl ServiceDefinitionAPI { /// Delete a single service definition in the Datadog Service Catalog. pub async fn delete_service_definition( &self, - params: DeleteServiceDefinitionParams, + service_name: String, ) -> Result, Error> { - match self.delete_service_definition_with_http_info(params).await { + match self + .delete_service_definition_with_http_info(service_name) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -203,13 +187,10 @@ impl ServiceDefinitionAPI { /// Delete a single service definition in the Datadog Service Catalog. pub async fn delete_service_definition_with_http_info( &self, - params: DeleteServiceDefinitionParams, + service_name: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let service_name = params.service_name; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -261,12 +242,16 @@ impl ServiceDefinitionAPI { /// Get a single service definition from the Datadog Service Catalog. pub async fn get_service_definition( &self, - params: GetServiceDefinitionParams, + service_name: String, + params: GetServiceDefinitionOptionalParams, ) -> Result< Option, Error, > { - match self.get_service_definition_with_http_info(params).await { + match self + .get_service_definition_with_http_info(service_name, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -275,15 +260,15 @@ impl ServiceDefinitionAPI { /// Get a single service definition from the Datadog Service Catalog. pub async fn get_service_definition_with_http_info( &self, - params: GetServiceDefinitionParams, + service_name: String, + params: GetServiceDefinitionOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let service_name = params.service_name; + // unbox and build optional parameters let schema_version = params.schema_version; let local_client = &local_configuration.client; @@ -296,9 +281,9 @@ impl ServiceDefinitionAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = schema_version { + if let Some(ref local_query_param) = schema_version { local_req_builder = - local_req_builder.query(&[("schema_version", &local_str.to_string())]); + local_req_builder.query(&[("schema_version", &local_query_param.to_string())]); }; // build user agent @@ -344,7 +329,7 @@ impl ServiceDefinitionAPI { /// Get a list of all service definitions from the Datadog Service Catalog. pub async fn list_service_definitions( &self, - params: ListServiceDefinitionsParams, + params: ListServiceDefinitionsOptionalParams, ) -> Result< Option, Error, @@ -358,14 +343,14 @@ impl ServiceDefinitionAPI { /// Get a list of all service definitions from the Datadog Service Catalog. pub async fn list_service_definitions_with_http_info( &self, - params: ListServiceDefinitionsParams, + params: ListServiceDefinitionsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let page_size = params.page_size; let page_number = params.page_number; let schema_version = params.schema_version; @@ -379,16 +364,17 @@ impl ServiceDefinitionAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_number { + if let Some(ref local_query_param) = page_number { local_req_builder = - local_req_builder.query(&[("page[number]", &local_str.to_string())]); + local_req_builder.query(&[("page[number]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = schema_version { + if let Some(ref local_query_param) = schema_version { local_req_builder = - local_req_builder.query(&[("schema_version", &local_str.to_string())]); + local_req_builder.query(&[("schema_version", &local_query_param.to_string())]); }; // build user agent diff --git a/src/datadogV2/api/api_service_scorecards.rs b/src/datadogV2/api/api_service_scorecards.rs index bd1870383..95956ac01 100644 --- a/src/datadogV2/api/api_service_scorecards.rs +++ b/src/datadogV2/api/api_service_scorecards.rs @@ -5,30 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateScorecardOutcomesBatchParams is a struct for passing parameters to the method [`ServiceScorecardsAPI::create_scorecard_outcomes_batch`] +/// ListScorecardOutcomesOptionalParams is a struct for passing parameters to the method [`ServiceScorecardsAPI::list_scorecard_outcomes`] #[derive(Clone, Debug)] -pub struct CreateScorecardOutcomesBatchParams { - /// Set of scorecard outcomes. - pub body: crate::datadogV2::model::OutcomesBatchRequest, -} - -/// CreateScorecardRuleParams is a struct for passing parameters to the method [`ServiceScorecardsAPI::create_scorecard_rule`] -#[derive(Clone, Debug)] -pub struct CreateScorecardRuleParams { - /// Rule attributes. - pub body: crate::datadogV2::model::CreateRuleRequest, -} - -/// DeleteScorecardRuleParams is a struct for passing parameters to the method [`ServiceScorecardsAPI::delete_scorecard_rule`] -#[derive(Clone, Debug)] -pub struct DeleteScorecardRuleParams { - /// The ID of the rule/scorecard. - pub rule_id: String, -} - -/// ListScorecardOutcomesParams is a struct for passing parameters to the method [`ServiceScorecardsAPI::list_scorecard_outcomes`] -#[derive(Clone, Debug)] -pub struct ListScorecardOutcomesParams { +pub struct ListScorecardOutcomesOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, /// Specific offset to use as the beginning of the returned page. @@ -51,9 +30,9 @@ pub struct ListScorecardOutcomesParams { pub filter_rule_name: Option, } -/// ListScorecardRulesParams is a struct for passing parameters to the method [`ServiceScorecardsAPI::list_scorecard_rules`] +/// ListScorecardRulesOptionalParams is a struct for passing parameters to the method [`ServiceScorecardsAPI::list_scorecard_rules`] #[derive(Clone, Debug)] -pub struct ListScorecardRulesParams { +pub struct ListScorecardRulesOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, /// Specific offset to use as the beginning of the returned page. @@ -151,13 +130,13 @@ impl ServiceScorecardsAPI { /// Sets multiple service-rule outcomes in a single batched request. pub async fn create_scorecard_outcomes_batch( &self, - params: CreateScorecardOutcomesBatchParams, + body: crate::datadogV2::model::OutcomesBatchRequest, ) -> Result< Option, Error, > { match self - .create_scorecard_outcomes_batch_with_http_info(params) + .create_scorecard_outcomes_batch_with_http_info(body) .await { Ok(response_content) => Ok(response_content.entity), @@ -168,16 +147,13 @@ impl ServiceScorecardsAPI { /// Sets multiple service-rule outcomes in a single batched request. pub async fn create_scorecard_outcomes_batch_with_http_info( &self, - params: CreateScorecardOutcomesBatchParams, + body: crate::datadogV2::model::OutcomesBatchRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -237,10 +213,10 @@ impl ServiceScorecardsAPI { /// Creates a new rule. pub async fn create_scorecard_rule( &self, - params: CreateScorecardRuleParams, + body: crate::datadogV2::model::CreateRuleRequest, ) -> Result, Error> { - match self.create_scorecard_rule_with_http_info(params).await { + match self.create_scorecard_rule_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -249,16 +225,13 @@ impl ServiceScorecardsAPI { /// Creates a new rule. pub async fn create_scorecard_rule_with_http_info( &self, - params: CreateScorecardRuleParams, + body: crate::datadogV2::model::CreateRuleRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/scorecard/rules", local_configuration.base_path); @@ -315,9 +288,9 @@ impl ServiceScorecardsAPI { /// Deletes a single rule. pub async fn delete_scorecard_rule( &self, - params: DeleteScorecardRuleParams, + rule_id: String, ) -> Result, Error> { - match self.delete_scorecard_rule_with_http_info(params).await { + match self.delete_scorecard_rule_with_http_info(rule_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -326,13 +299,10 @@ impl ServiceScorecardsAPI { /// Deletes a single rule. pub async fn delete_scorecard_rule_with_http_info( &self, - params: DeleteScorecardRuleParams, + rule_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let rule_id = params.rule_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -384,7 +354,7 @@ impl ServiceScorecardsAPI { /// Fetches all rule outcomes. pub async fn list_scorecard_outcomes( &self, - params: ListScorecardOutcomesParams, + params: ListScorecardOutcomesOptionalParams, ) -> Result, Error> { match self.list_scorecard_outcomes_with_http_info(params).await { @@ -396,14 +366,14 @@ impl ServiceScorecardsAPI { /// Fetches all rule outcomes. pub async fn list_scorecard_outcomes_with_http_info( &self, - params: ListScorecardOutcomesParams, + params: ListScorecardOutcomesOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let page_size = params.page_size; let page_offset = params.page_offset; let include = params.include; @@ -424,43 +394,47 @@ impl ServiceScorecardsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_offset { + if let Some(ref local_query_param) = page_offset { local_req_builder = - local_req_builder.query(&[("page[offset]", &local_str.to_string())]); + local_req_builder.query(&[("page[offset]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = include { - local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + if let Some(ref local_query_param) = include { + local_req_builder = + local_req_builder.query(&[("include", &local_query_param.to_string())]); }; - if let Some(ref local_str) = fields_outcome { + if let Some(ref local_query_param) = fields_outcome { local_req_builder = - local_req_builder.query(&[("fields[outcome]", &local_str.to_string())]); + local_req_builder.query(&[("fields[outcome]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = fields_rule { + if let Some(ref local_query_param) = fields_rule { local_req_builder = - local_req_builder.query(&[("fields[rule]", &local_str.to_string())]); + local_req_builder.query(&[("fields[rule]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_outcome_service_name { - local_req_builder = local_req_builder - .query(&[("filter[outcome][service_name]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_outcome_service_name { + local_req_builder = local_req_builder.query(&[( + "filter[outcome][service_name]", + &local_query_param.to_string(), + )]); }; - if let Some(ref local_str) = filter_outcome_state { - local_req_builder = - local_req_builder.query(&[("filter[outcome][state]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_outcome_state { + local_req_builder = local_req_builder + .query(&[("filter[outcome][state]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_rule_enabled { - local_req_builder = - local_req_builder.query(&[("filter[rule][enabled]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_rule_enabled { + local_req_builder = local_req_builder + .query(&[("filter[rule][enabled]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_rule_id { + if let Some(ref local_query_param) = filter_rule_id { local_req_builder = - local_req_builder.query(&[("filter[rule][id]", &local_str.to_string())]); + local_req_builder.query(&[("filter[rule][id]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_rule_name { + if let Some(ref local_query_param) = filter_rule_name { local_req_builder = - local_req_builder.query(&[("filter[rule][name]", &local_str.to_string())]); + local_req_builder.query(&[("filter[rule][name]", &local_query_param.to_string())]); }; // build user agent @@ -506,7 +480,7 @@ impl ServiceScorecardsAPI { /// Fetch all rules. pub async fn list_scorecard_rules( &self, - params: ListScorecardRulesParams, + params: ListScorecardRulesOptionalParams, ) -> Result, Error> { match self.list_scorecard_rules_with_http_info(params).await { @@ -518,14 +492,14 @@ impl ServiceScorecardsAPI { /// Fetch all rules. pub async fn list_scorecard_rules_with_http_info( &self, - params: ListScorecardRulesParams, + params: ListScorecardRulesOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let page_size = params.page_size; let page_offset = params.page_offset; let include = params.include; @@ -543,43 +517,45 @@ impl ServiceScorecardsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); - }; - if let Some(ref local_str) = page_offset { + if let Some(ref local_query_param) = page_size { local_req_builder = - local_req_builder.query(&[("page[offset]", &local_str.to_string())]); - }; - if let Some(ref local_str) = include { - local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_rule_id { + if let Some(ref local_query_param) = page_offset { local_req_builder = - local_req_builder.query(&[("filter[rule][id]", &local_str.to_string())]); + local_req_builder.query(&[("page[offset]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_rule_enabled { + if let Some(ref local_query_param) = include { local_req_builder = - local_req_builder.query(&[("filter[rule][enabled]", &local_str.to_string())]); + local_req_builder.query(&[("include", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_rule_custom { + if let Some(ref local_query_param) = filter_rule_id { local_req_builder = - local_req_builder.query(&[("filter[rule][custom]", &local_str.to_string())]); + local_req_builder.query(&[("filter[rule][id]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_rule_name { - local_req_builder = - local_req_builder.query(&[("filter[rule][name]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_rule_enabled { + local_req_builder = local_req_builder + .query(&[("filter[rule][enabled]", &local_query_param.to_string())]); + }; + if let Some(ref local_query_param) = filter_rule_custom { + local_req_builder = local_req_builder + .query(&[("filter[rule][custom]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_rule_description { + if let Some(ref local_query_param) = filter_rule_name { local_req_builder = - local_req_builder.query(&[("filter[rule][description]", &local_str.to_string())]); + local_req_builder.query(&[("filter[rule][name]", &local_query_param.to_string())]); + }; + if let Some(ref local_query_param) = filter_rule_description { + local_req_builder = local_req_builder + .query(&[("filter[rule][description]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = fields_rule { + if let Some(ref local_query_param) = fields_rule { local_req_builder = - local_req_builder.query(&[("fields[rule]", &local_str.to_string())]); + local_req_builder.query(&[("fields[rule]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = fields_scorecard { + if let Some(ref local_query_param) = fields_scorecard { local_req_builder = - local_req_builder.query(&[("fields[scorecard]", &local_str.to_string())]); + local_req_builder.query(&[("fields[scorecard]", &local_query_param.to_string())]); }; // build user agent diff --git a/src/datadogV2/api/api_spans.rs b/src/datadogV2/api/api_spans.rs index 0bd33411a..a58381d18 100644 --- a/src/datadogV2/api/api_spans.rs +++ b/src/datadogV2/api/api_spans.rs @@ -5,21 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// AggregateSpansParams is a struct for passing parameters to the method [`SpansAPI::aggregate_spans`] +/// ListSpansGetOptionalParams is a struct for passing parameters to the method [`SpansAPI::list_spans_get`] #[derive(Clone, Debug)] -pub struct AggregateSpansParams { - pub body: crate::datadogV2::model::SpansAggregateRequest, -} - -/// ListSpansParams is a struct for passing parameters to the method [`SpansAPI::list_spans`] -#[derive(Clone, Debug)] -pub struct ListSpansParams { - pub body: crate::datadogV2::model::SpansListRequest, -} - -/// ListSpansGetParams is a struct for passing parameters to the method [`SpansAPI::list_spans_get`] -#[derive(Clone, Debug)] -pub struct ListSpansGetParams { +pub struct ListSpansGetOptionalParams { /// Search query following spans syntax. pub filter_query: Option, /// Minimum timestamp for requested spans. Supports date-time ISO8601, date math, and regular timestamps (milliseconds). @@ -91,10 +79,10 @@ impl SpansAPI { /// This endpoint is rate limited to `300` requests per hour. pub async fn aggregate_spans( &self, - params: AggregateSpansParams, + body: crate::datadogV2::model::SpansAggregateRequest, ) -> Result, Error> { - match self.aggregate_spans_with_http_info(params).await { + match self.aggregate_spans_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -104,16 +92,13 @@ impl SpansAPI { /// This endpoint is rate limited to `300` requests per hour. pub async fn aggregate_spans_with_http_info( &self, - params: AggregateSpansParams, + body: crate::datadogV2::model::SpansAggregateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -179,9 +164,9 @@ impl SpansAPI { /// [1]: /logs/guide/collect-multiple-logs-with-pagination?tab=v2api pub async fn list_spans( &self, - params: ListSpansParams, + body: crate::datadogV2::model::SpansListRequest, ) -> Result, Error> { - match self.list_spans_with_http_info(params).await { + match self.list_spans_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -196,14 +181,11 @@ impl SpansAPI { /// [1]: /logs/guide/collect-multiple-logs-with-pagination?tab=v2api pub async fn list_spans_with_http_info( &self, - params: ListSpansParams, + body: crate::datadogV2::model::SpansListRequest, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -268,7 +250,7 @@ impl SpansAPI { /// [1]: /logs/guide/collect-multiple-logs-with-pagination?tab=v2api pub async fn list_spans_get( &self, - params: ListSpansGetParams, + params: ListSpansGetOptionalParams, ) -> Result, Error> { match self.list_spans_get_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -285,12 +267,12 @@ impl SpansAPI { /// [1]: /logs/guide/collect-multiple-logs-with-pagination?tab=v2api pub async fn list_spans_get_with_http_info( &self, - params: ListSpansGetParams, + params: ListSpansGetOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let filter_query = params.filter_query; let filter_from = params.filter_from; let filter_to = params.filter_to; @@ -304,26 +286,29 @@ impl SpansAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = filter_query { + if let Some(ref local_query_param) = filter_query { local_req_builder = - local_req_builder.query(&[("filter[query]", &local_str.to_string())]); + local_req_builder.query(&[("filter[query]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_from { + if let Some(ref local_query_param) = filter_from { local_req_builder = - local_req_builder.query(&[("filter[from]", &local_str.to_string())]); + local_req_builder.query(&[("filter[from]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_to { - local_req_builder = local_req_builder.query(&[("filter[to]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_to { + local_req_builder = + local_req_builder.query(&[("filter[to]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_cursor { + if let Some(ref local_query_param) = page_cursor { local_req_builder = - local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + local_req_builder.query(&[("page[cursor]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_limit { - local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_limit { + local_req_builder = + local_req_builder.query(&[("page[limit]", &local_query_param.to_string())]); }; // build user agent diff --git a/src/datadogV2/api/api_spans_metrics.rs b/src/datadogV2/api/api_spans_metrics.rs index ac770d15e..eb4f8b4ba 100644 --- a/src/datadogV2/api/api_spans_metrics.rs +++ b/src/datadogV2/api/api_spans_metrics.rs @@ -5,36 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateSpansMetricParams is a struct for passing parameters to the method [`SpansMetricsAPI::create_spans_metric`] -#[derive(Clone, Debug)] -pub struct CreateSpansMetricParams { - /// The definition of the new span-based metric. - pub body: crate::datadogV2::model::SpansMetricCreateRequest, -} - -/// DeleteSpansMetricParams is a struct for passing parameters to the method [`SpansMetricsAPI::delete_spans_metric`] -#[derive(Clone, Debug)] -pub struct DeleteSpansMetricParams { - /// The name of the span-based metric. - pub metric_id: String, -} - -/// GetSpansMetricParams is a struct for passing parameters to the method [`SpansMetricsAPI::get_spans_metric`] -#[derive(Clone, Debug)] -pub struct GetSpansMetricParams { - /// The name of the span-based metric. - pub metric_id: String, -} - -/// UpdateSpansMetricParams is a struct for passing parameters to the method [`SpansMetricsAPI::update_spans_metric`] -#[derive(Clone, Debug)] -pub struct UpdateSpansMetricParams { - /// The name of the span-based metric. - pub metric_id: String, - /// New definition of the span-based metric. - pub body: crate::datadogV2::model::SpansMetricUpdateRequest, -} - /// CreateSpansMetricError is a struct for typed errors of method [`SpansMetricsAPI::create_spans_metric`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -111,10 +81,10 @@ impl SpansMetricsAPI { /// Returns the span-based metric object from the request body when the request is successful. pub async fn create_spans_metric( &self, - params: CreateSpansMetricParams, + body: crate::datadogV2::model::SpansMetricCreateRequest, ) -> Result, Error> { - match self.create_spans_metric_with_http_info(params).await { + match self.create_spans_metric_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -124,16 +94,13 @@ impl SpansMetricsAPI { /// Returns the span-based metric object from the request body when the request is successful. pub async fn create_spans_metric_with_http_info( &self, - params: CreateSpansMetricParams, + body: crate::datadogV2::model::SpansMetricCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -193,9 +160,9 @@ impl SpansMetricsAPI { /// Delete a specific span-based metric from your organization. pub async fn delete_spans_metric( &self, - params: DeleteSpansMetricParams, + metric_id: String, ) -> Result, Error> { - match self.delete_spans_metric_with_http_info(params).await { + match self.delete_spans_metric_with_http_info(metric_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -204,13 +171,10 @@ impl SpansMetricsAPI { /// Delete a specific span-based metric from your organization. pub async fn delete_spans_metric_with_http_info( &self, - params: DeleteSpansMetricParams, + metric_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let metric_id = params.metric_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -262,10 +226,10 @@ impl SpansMetricsAPI { /// Get a specific span-based metric from your organization. pub async fn get_spans_metric( &self, - params: GetSpansMetricParams, + metric_id: String, ) -> Result, Error> { - match self.get_spans_metric_with_http_info(params).await { + match self.get_spans_metric_with_http_info(metric_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -274,16 +238,13 @@ impl SpansMetricsAPI { /// Get a specific span-based metric from your organization. pub async fn get_spans_metric_with_http_info( &self, - params: GetSpansMetricParams, + metric_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let metric_id = params.metric_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -354,8 +315,6 @@ impl SpansMetricsAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -409,10 +368,14 @@ impl SpansMetricsAPI { /// Returns the span-based metric object from the request body when the request is successful. pub async fn update_spans_metric( &self, - params: UpdateSpansMetricParams, + metric_id: String, + body: crate::datadogV2::model::SpansMetricUpdateRequest, ) -> Result, Error> { - match self.update_spans_metric_with_http_info(params).await { + match self + .update_spans_metric_with_http_info(metric_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -422,17 +385,14 @@ impl SpansMetricsAPI { /// Returns the span-based metric object from the request body when the request is successful. pub async fn update_spans_metric_with_http_info( &self, - params: UpdateSpansMetricParams, + metric_id: String, + body: crate::datadogV2::model::SpansMetricUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let metric_id = params.metric_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_synthetics.rs b/src/datadogV2/api/api_synthetics.rs index 630b6aca3..82613bedc 100644 --- a/src/datadogV2/api/api_synthetics.rs +++ b/src/datadogV2/api/api_synthetics.rs @@ -5,13 +5,6 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// SetOnDemandConcurrencyCapParams is a struct for passing parameters to the method [`SyntheticsAPI::set_on_demand_concurrency_cap`] -#[derive(Clone, Debug)] -pub struct SetOnDemandConcurrencyCapParams { - /// . - pub body: crate::datadogV2::model::OnDemandConcurrencyCapAttributes, -} - /// GetOnDemandConcurrencyCapError is a struct for typed errors of method [`SyntheticsAPI::get_on_demand_concurrency_cap`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -71,8 +64,6 @@ impl SyntheticsAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -125,13 +116,13 @@ impl SyntheticsAPI { /// Save new value for on-demand concurrency cap. pub async fn set_on_demand_concurrency_cap( &self, - params: SetOnDemandConcurrencyCapParams, + body: crate::datadogV2::model::OnDemandConcurrencyCapAttributes, ) -> Result< Option, Error, > { match self - .set_on_demand_concurrency_cap_with_http_info(params) + .set_on_demand_concurrency_cap_with_http_info(body) .await { Ok(response_content) => Ok(response_content.entity), @@ -142,16 +133,13 @@ impl SyntheticsAPI { /// Save new value for on-demand concurrency cap. pub async fn set_on_demand_concurrency_cap_with_http_info( &self, - params: SetOnDemandConcurrencyCapParams, + body: crate::datadogV2::model::OnDemandConcurrencyCapAttributes, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_teams.rs b/src/datadogV2/api/api_teams.rs index 1a9e2047b..71f3877bb 100644 --- a/src/datadogV2/api/api_teams.rs +++ b/src/datadogV2/api/api_teams.rs @@ -5,81 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateTeamParams is a struct for passing parameters to the method [`TeamsAPI::create_team`] +/// GetTeamMembershipsOptionalParams is a struct for passing parameters to the method [`TeamsAPI::get_team_memberships`] #[derive(Clone, Debug)] -pub struct CreateTeamParams { - pub body: crate::datadogV2::model::TeamCreateRequest, -} - -/// CreateTeamLinkParams is a struct for passing parameters to the method [`TeamsAPI::create_team_link`] -#[derive(Clone, Debug)] -pub struct CreateTeamLinkParams { - /// None - pub team_id: String, - pub body: crate::datadogV2::model::TeamLinkCreateRequest, -} - -/// CreateTeamMembershipParams is a struct for passing parameters to the method [`TeamsAPI::create_team_membership`] -#[derive(Clone, Debug)] -pub struct CreateTeamMembershipParams { - /// None - pub team_id: String, - pub body: crate::datadogV2::model::UserTeamRequest, -} - -/// DeleteTeamParams is a struct for passing parameters to the method [`TeamsAPI::delete_team`] -#[derive(Clone, Debug)] -pub struct DeleteTeamParams { - /// None - pub team_id: String, -} - -/// DeleteTeamLinkParams is a struct for passing parameters to the method [`TeamsAPI::delete_team_link`] -#[derive(Clone, Debug)] -pub struct DeleteTeamLinkParams { - /// None - pub team_id: String, - /// None - pub link_id: String, -} - -/// DeleteTeamMembershipParams is a struct for passing parameters to the method [`TeamsAPI::delete_team_membership`] -#[derive(Clone, Debug)] -pub struct DeleteTeamMembershipParams { - /// None - pub team_id: String, - /// None - pub user_id: String, -} - -/// GetTeamParams is a struct for passing parameters to the method [`TeamsAPI::get_team`] -#[derive(Clone, Debug)] -pub struct GetTeamParams { - /// None - pub team_id: String, -} - -/// GetTeamLinkParams is a struct for passing parameters to the method [`TeamsAPI::get_team_link`] -#[derive(Clone, Debug)] -pub struct GetTeamLinkParams { - /// None - pub team_id: String, - /// None - pub link_id: String, -} - -/// GetTeamLinksParams is a struct for passing parameters to the method [`TeamsAPI::get_team_links`] -#[derive(Clone, Debug)] -pub struct GetTeamLinksParams { - /// None - pub team_id: String, -} - -/// GetTeamMembershipsParams is a struct for passing parameters to the method [`TeamsAPI::get_team_memberships`] -#[derive(Clone, Debug)] -pub struct GetTeamMembershipsParams { - /// None - pub team_id: String, +pub struct GetTeamMembershipsOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, /// Specific page number to return. @@ -90,23 +18,9 @@ pub struct GetTeamMembershipsParams { pub filter_keyword: Option, } -/// GetTeamPermissionSettingsParams is a struct for passing parameters to the method [`TeamsAPI::get_team_permission_settings`] -#[derive(Clone, Debug)] -pub struct GetTeamPermissionSettingsParams { - /// None - pub team_id: String, -} - -/// GetUserMembershipsParams is a struct for passing parameters to the method [`TeamsAPI::get_user_memberships`] -#[derive(Clone, Debug)] -pub struct GetUserMembershipsParams { - /// None - pub user_uuid: String, -} - -/// ListTeamsParams is a struct for passing parameters to the method [`TeamsAPI::list_teams`] +/// ListTeamsOptionalParams is a struct for passing parameters to the method [`TeamsAPI::list_teams`] #[derive(Clone, Debug)] -pub struct ListTeamsParams { +pub struct ListTeamsOptionalParams { /// Specific page number to return. pub page_number: Option, /// Size for a given page. The maximum allowed value is 100. @@ -123,44 +37,6 @@ pub struct ListTeamsParams { pub fields_team: Option>, } -/// UpdateTeamParams is a struct for passing parameters to the method [`TeamsAPI::update_team`] -#[derive(Clone, Debug)] -pub struct UpdateTeamParams { - /// None - pub team_id: String, - pub body: crate::datadogV2::model::TeamUpdateRequest, -} - -/// UpdateTeamLinkParams is a struct for passing parameters to the method [`TeamsAPI::update_team_link`] -#[derive(Clone, Debug)] -pub struct UpdateTeamLinkParams { - /// None - pub team_id: String, - /// None - pub link_id: String, - pub body: crate::datadogV2::model::TeamLinkCreateRequest, -} - -/// UpdateTeamMembershipParams is a struct for passing parameters to the method [`TeamsAPI::update_team_membership`] -#[derive(Clone, Debug)] -pub struct UpdateTeamMembershipParams { - /// None - pub team_id: String, - /// None - pub user_id: String, - pub body: crate::datadogV2::model::UserTeamUpdateRequest, -} - -/// UpdateTeamPermissionSettingParams is a struct for passing parameters to the method [`TeamsAPI::update_team_permission_setting`] -#[derive(Clone, Debug)] -pub struct UpdateTeamPermissionSettingParams { - /// None - pub team_id: String, - /// None - pub action: String, - pub body: crate::datadogV2::model::TeamPermissionSettingUpdateRequest, -} - /// CreateTeamError is a struct for typed errors of method [`TeamsAPI::create_team`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -358,9 +234,9 @@ impl TeamsAPI { /// User IDs passed through the `users` relationship field are added to the team. pub async fn create_team( &self, - params: CreateTeamParams, + body: crate::datadogV2::model::TeamCreateRequest, ) -> Result, Error> { - match self.create_team_with_http_info(params).await { + match self.create_team_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -370,14 +246,11 @@ impl TeamsAPI { /// User IDs passed through the `users` relationship field are added to the team. pub async fn create_team_with_http_info( &self, - params: CreateTeamParams, + body: crate::datadogV2::model::TeamCreateRequest, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/team", local_configuration.base_path); @@ -433,9 +306,10 @@ impl TeamsAPI { /// Add a new link to a team. pub async fn create_team_link( &self, - params: CreateTeamLinkParams, + team_id: String, + body: crate::datadogV2::model::TeamLinkCreateRequest, ) -> Result, Error> { - match self.create_team_link_with_http_info(params).await { + match self.create_team_link_with_http_info(team_id, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -444,17 +318,14 @@ impl TeamsAPI { /// Add a new link to a team. pub async fn create_team_link_with_http_info( &self, - params: CreateTeamLinkParams, + team_id: String, + body: crate::datadogV2::model::TeamLinkCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let team_id = params.team_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -515,10 +386,14 @@ impl TeamsAPI { /// Add a user to a team. pub async fn create_team_membership( &self, - params: CreateTeamMembershipParams, + team_id: String, + body: crate::datadogV2::model::UserTeamRequest, ) -> Result, Error> { - match self.create_team_membership_with_http_info(params).await { + match self + .create_team_membership_with_http_info(team_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -527,17 +402,14 @@ impl TeamsAPI { /// Add a user to a team. pub async fn create_team_membership_with_http_info( &self, - params: CreateTeamMembershipParams, + team_id: String, + body: crate::datadogV2::model::UserTeamRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let team_id = params.team_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -596,11 +468,8 @@ impl TeamsAPI { } /// Remove a team using the team's `id`. - pub async fn delete_team( - &self, - params: DeleteTeamParams, - ) -> Result, Error> { - match self.delete_team_with_http_info(params).await { + pub async fn delete_team(&self, team_id: String) -> Result, Error> { + match self.delete_team_with_http_info(team_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -609,13 +478,10 @@ impl TeamsAPI { /// Remove a team using the team's `id`. pub async fn delete_team_with_http_info( &self, - params: DeleteTeamParams, + team_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let team_id = params.team_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -666,9 +532,10 @@ impl TeamsAPI { /// Remove a link from a team. pub async fn delete_team_link( &self, - params: DeleteTeamLinkParams, + team_id: String, + link_id: String, ) -> Result, Error> { - match self.delete_team_link_with_http_info(params).await { + match self.delete_team_link_with_http_info(team_id, link_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -677,14 +544,11 @@ impl TeamsAPI { /// Remove a link from a team. pub async fn delete_team_link_with_http_info( &self, - params: DeleteTeamLinkParams, + team_id: String, + link_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let team_id = params.team_id; - let link_id = params.link_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -737,9 +601,13 @@ impl TeamsAPI { /// Remove a user from a team. pub async fn delete_team_membership( &self, - params: DeleteTeamMembershipParams, + team_id: String, + user_id: String, ) -> Result, Error> { - match self.delete_team_membership_with_http_info(params).await { + match self + .delete_team_membership_with_http_info(team_id, user_id) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -748,14 +616,11 @@ impl TeamsAPI { /// Remove a user from a team. pub async fn delete_team_membership_with_http_info( &self, - params: DeleteTeamMembershipParams, + team_id: String, + user_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let team_id = params.team_id; - let user_id = params.user_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -808,9 +673,9 @@ impl TeamsAPI { /// Get a single team using the team's `id`. pub async fn get_team( &self, - params: GetTeamParams, + team_id: String, ) -> Result, Error> { - match self.get_team_with_http_info(params).await { + match self.get_team_with_http_info(team_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -819,13 +684,10 @@ impl TeamsAPI { /// Get a single team using the team's `id`. pub async fn get_team_with_http_info( &self, - params: GetTeamParams, + team_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let team_id = params.team_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -878,9 +740,10 @@ impl TeamsAPI { /// Get a single link for a team. pub async fn get_team_link( &self, - params: GetTeamLinkParams, + team_id: String, + link_id: String, ) -> Result, Error> { - match self.get_team_link_with_http_info(params).await { + match self.get_team_link_with_http_info(team_id, link_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -889,15 +752,12 @@ impl TeamsAPI { /// Get a single link for a team. pub async fn get_team_link_with_http_info( &self, - params: GetTeamLinkParams, + team_id: String, + link_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let team_id = params.team_id; - let link_id = params.link_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -951,9 +811,9 @@ impl TeamsAPI { /// Get all links for a given team. pub async fn get_team_links( &self, - params: GetTeamLinksParams, + team_id: String, ) -> Result, Error> { - match self.get_team_links_with_http_info(params).await { + match self.get_team_links_with_http_info(team_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -962,14 +822,11 @@ impl TeamsAPI { /// Get all links for a given team. pub async fn get_team_links_with_http_info( &self, - params: GetTeamLinksParams, + team_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let team_id = params.team_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1022,10 +879,14 @@ impl TeamsAPI { /// Get a paginated list of members for a team pub async fn get_team_memberships( &self, - params: GetTeamMembershipsParams, + team_id: String, + params: GetTeamMembershipsOptionalParams, ) -> Result, Error> { - match self.get_team_memberships_with_http_info(params).await { + match self + .get_team_memberships_with_http_info(team_id, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1034,15 +895,15 @@ impl TeamsAPI { /// Get a paginated list of members for a team pub async fn get_team_memberships_with_http_info( &self, - params: GetTeamMembershipsParams, + team_id: String, + params: GetTeamMembershipsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let team_id = params.team_id; + // unbox and build optional parameters let page_size = params.page_size; let page_number = params.page_number; let sort = params.sort; @@ -1058,19 +919,21 @@ impl TeamsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_number { + if let Some(ref local_query_param) = page_number { local_req_builder = - local_req_builder.query(&[("page[number]", &local_str.to_string())]); + local_req_builder.query(&[("page[number]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_keyword { + if let Some(ref local_query_param) = filter_keyword { local_req_builder = - local_req_builder.query(&[("filter[keyword]", &local_str.to_string())]); + local_req_builder.query(&[("filter[keyword]", &local_query_param.to_string())]); }; // build user agent @@ -1116,13 +979,13 @@ impl TeamsAPI { /// Get all permission settings for a given team. pub async fn get_team_permission_settings( &self, - params: GetTeamPermissionSettingsParams, + team_id: String, ) -> Result< Option, Error, > { match self - .get_team_permission_settings_with_http_info(params) + .get_team_permission_settings_with_http_info(team_id) .await { Ok(response_content) => Ok(response_content.entity), @@ -1133,16 +996,13 @@ impl TeamsAPI { /// Get all permission settings for a given team. pub async fn get_team_permission_settings_with_http_info( &self, - params: GetTeamPermissionSettingsParams, + team_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let team_id = params.team_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1196,10 +1056,10 @@ impl TeamsAPI { /// Get a list of memberships for a user pub async fn get_user_memberships( &self, - params: GetUserMembershipsParams, + user_uuid: String, ) -> Result, Error> { - match self.get_user_memberships_with_http_info(params).await { + match self.get_user_memberships_with_http_info(user_uuid).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1208,16 +1068,13 @@ impl TeamsAPI { /// Get a list of memberships for a user pub async fn get_user_memberships_with_http_info( &self, - params: GetUserMembershipsParams, + user_uuid: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let user_uuid = params.user_uuid; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1272,7 +1129,7 @@ impl TeamsAPI { /// Can be used to search for teams using the `filter[keyword]` and `filter[me]` query parameters. pub async fn list_teams( &self, - params: ListTeamsParams, + params: ListTeamsOptionalParams, ) -> Result, Error> { match self.list_teams_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -1284,12 +1141,12 @@ impl TeamsAPI { /// Can be used to search for teams using the `filter[keyword]` and `filter[me]` query parameters. pub async fn list_teams_with_http_info( &self, - params: ListTeamsParams, + params: ListTeamsOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let page_number = params.page_number; let page_size = params.page_size; let sort = params.sort; @@ -1304,39 +1161,42 @@ impl TeamsAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_number { + if let Some(ref local_query_param) = page_number { local_req_builder = - local_req_builder.query(&[("page[number]", &local_str.to_string())]); + local_req_builder.query(&[("page[number]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; if let Some(ref local) = include { local_req_builder = local_req_builder.query(&[( "include", &local - .into_iter() + .iter() .map(|p| p.to_string()) .collect::>() .join(",") .to_string(), )]); }; - if let Some(ref local_str) = filter_keyword { + if let Some(ref local_query_param) = filter_keyword { local_req_builder = - local_req_builder.query(&[("filter[keyword]", &local_str.to_string())]); + local_req_builder.query(&[("filter[keyword]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_me { - local_req_builder = local_req_builder.query(&[("filter[me]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_me { + local_req_builder = + local_req_builder.query(&[("filter[me]", &local_query_param.to_string())]); }; if let Some(ref local) = fields_team { local_req_builder = local_req_builder.query(&[( "fields[team]", &local - .into_iter() + .iter() .map(|p| p.to_string()) .collect::>() .join(",") @@ -1387,9 +1247,10 @@ impl TeamsAPI { /// If the `team_links` relationship is present, the associated links are updated to be in the order they appear in the array, and any existing team links not present are removed. pub async fn update_team( &self, - params: UpdateTeamParams, + team_id: String, + body: crate::datadogV2::model::TeamUpdateRequest, ) -> Result, Error> { - match self.update_team_with_http_info(params).await { + match self.update_team_with_http_info(team_id, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1399,15 +1260,12 @@ impl TeamsAPI { /// If the `team_links` relationship is present, the associated links are updated to be in the order they appear in the array, and any existing team links not present are removed. pub async fn update_team_with_http_info( &self, - params: UpdateTeamParams, + team_id: String, + body: crate::datadogV2::model::TeamUpdateRequest, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let team_id = params.team_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1467,9 +1325,14 @@ impl TeamsAPI { /// Update a team link. pub async fn update_team_link( &self, - params: UpdateTeamLinkParams, + team_id: String, + link_id: String, + body: crate::datadogV2::model::TeamLinkCreateRequest, ) -> Result, Error> { - match self.update_team_link_with_http_info(params).await { + match self + .update_team_link_with_http_info(team_id, link_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1478,18 +1341,15 @@ impl TeamsAPI { /// Update a team link. pub async fn update_team_link_with_http_info( &self, - params: UpdateTeamLinkParams, + team_id: String, + link_id: String, + body: crate::datadogV2::model::TeamLinkCreateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let team_id = params.team_id; - let link_id = params.link_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1551,10 +1411,15 @@ impl TeamsAPI { /// Update a user's membership attributes on a team. pub async fn update_team_membership( &self, - params: UpdateTeamMembershipParams, + team_id: String, + user_id: String, + body: crate::datadogV2::model::UserTeamUpdateRequest, ) -> Result, Error> { - match self.update_team_membership_with_http_info(params).await { + match self + .update_team_membership_with_http_info(team_id, user_id, body) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -1563,18 +1428,15 @@ impl TeamsAPI { /// Update a user's membership attributes on a team. pub async fn update_team_membership_with_http_info( &self, - params: UpdateTeamMembershipParams, + team_id: String, + user_id: String, + body: crate::datadogV2::model::UserTeamUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let team_id = params.team_id; - let user_id = params.user_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -1636,13 +1498,15 @@ impl TeamsAPI { /// Update a team permission setting for a given team. pub async fn update_team_permission_setting( &self, - params: UpdateTeamPermissionSettingParams, + team_id: String, + action: String, + body: crate::datadogV2::model::TeamPermissionSettingUpdateRequest, ) -> Result< Option, Error, > { match self - .update_team_permission_setting_with_http_info(params) + .update_team_permission_setting_with_http_info(team_id, action, body) .await { Ok(response_content) => Ok(response_content.entity), @@ -1653,18 +1517,15 @@ impl TeamsAPI { /// Update a team permission setting for a given team. pub async fn update_team_permission_setting_with_http_info( &self, - params: UpdateTeamPermissionSettingParams, + team_id: String, + action: String, + body: crate::datadogV2::model::TeamPermissionSettingUpdateRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let team_id = params.team_id; - let action = params.action; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/api/api_usage_metering.rs b/src/datadogV2/api/api_usage_metering.rs index 341516826..f260378d6 100644 --- a/src/datadogV2/api/api_usage_metering.rs +++ b/src/datadogV2/api/api_usage_metering.rs @@ -5,18 +5,16 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// GetCostByOrgParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_cost_by_org`] +/// GetCostByOrgOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_cost_by_org`] #[derive(Clone, Debug)] -pub struct GetCostByOrgParams { - /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost beginning this month. - pub start_month: String, +pub struct GetCostByOrgOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost ending this month. pub end_month: Option, } -/// GetEstimatedCostByOrgParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_estimated_cost_by_org`] +/// GetEstimatedCostByOrgOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_estimated_cost_by_org`] #[derive(Clone, Debug)] -pub struct GetEstimatedCostByOrgParams { +pub struct GetEstimatedCostByOrgOptionalParams { /// String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are `summary` and `sub-org`. Defaults to `summary`. pub view: Option, /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost beginning this month. Either start_month or start_date should be specified, but not both. (start_month cannot go beyond two months in the past). Provide an `end_month` to view month-over-month cost. @@ -29,31 +27,18 @@ pub struct GetEstimatedCostByOrgParams { pub end_date: Option, } -/// GetHistoricalCostByOrgParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_historical_cost_by_org`] +/// GetHistoricalCostByOrgOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_historical_cost_by_org`] #[derive(Clone, Debug)] -pub struct GetHistoricalCostByOrgParams { - /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost beginning this month. - pub start_month: String, +pub struct GetHistoricalCostByOrgOptionalParams { /// String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are `summary` and `sub-org`. Defaults to `summary`. pub view: Option, /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost ending this month. pub end_month: Option, } -/// GetHourlyUsageParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_hourly_usage`] +/// GetHourlyUsageOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_hourly_usage`] #[derive(Clone, Debug)] -pub struct GetHourlyUsageParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. - pub filter_timestamp_start: String, - /// Comma separated list of product families to retrieve. Available families are `all`, `analyzed_logs`, - /// `application_security`, `audit_trail`, `serverless`, `ci_app`, `cloud_cost_management`, - /// `csm_container_enterprise`, `csm_host_enterprise`, `cspm`, `custom_events`, `cws`, `dbm`, `fargate`, - /// `infra_hosts`, `incident_management`, `indexed_logs`, `indexed_spans`, `ingested_spans`, `iot`, - /// `lambda_traced_invocations`, `logs`, `network_flows`, `network_hosts`, `netflow_monitoring`, `observability_pipelines`, - /// `online_archive`, `profiling`, `rum`, `rum_browser_sessions`, `rum_mobile_sessions`, `sds`, `snmp`, - /// `synthetics_api`, `synthetics_browser`, `synthetics_mobile`, `synthetics_parallel_testing`, and `timeseries`. - /// The following product family has been **deprecated**: `audit_logs`. - pub filter_product_families: String, +pub struct GetHourlyUsageOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub filter_timestamp_end: Option, /// Include child org usage in the response. Defaults to false. @@ -70,19 +55,9 @@ pub struct GetHourlyUsageParams { pub page_next_record_id: Option, } -/// GetMonthlyCostAttributionParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_monthly_cost_attribution`] +/// GetMonthlyCostAttributionOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_monthly_cost_attribution`] #[derive(Clone, Debug)] -pub struct GetMonthlyCostAttributionParams { - /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost beginning in this month. - pub start_month: String, - /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost ending this month. - pub end_month: String, - /// Comma-separated list specifying cost types (e.g., `_on_demand_cost`, `_committed_cost`, `_total_cost`) and the - /// proportions (`_percentage_in_org`, `_percentage_in_account`). Use `*` to retrieve all fields. - /// Example: `infra_host_on_demand_cost,infra_host_percentage_in_account` - /// To obtain the complete list of active billing dimensions that can be used to replace - /// `` in the field names, make a request to the [Get active billing dimensions API](). - pub fields: String, +pub struct GetMonthlyCostAttributionOptionalParams { /// The direction to sort by: `[desc, asc]`. pub sort_direction: Option, /// The billing dimension to sort by. Always sorted by total cost. Example: `infra_host`. @@ -96,38 +71,32 @@ pub struct GetMonthlyCostAttributionParams { pub include_descendants: Option, } -/// GetProjectedCostParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_projected_cost`] +/// GetProjectedCostOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_projected_cost`] #[derive(Clone, Debug)] -pub struct GetProjectedCostParams { +pub struct GetProjectedCostOptionalParams { /// String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are `summary` and `sub-org`. Defaults to `summary`. pub view: Option, } -/// GetUsageApplicationSecurityMonitoringParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_application_security_monitoring`] +/// GetUsageApplicationSecurityMonitoringOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_application_security_monitoring`] #[derive(Clone, Debug)] -pub struct GetUsageApplicationSecurityMonitoringParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageApplicationSecurityMonitoringOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } -/// GetUsageLambdaTracedInvocationsParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_lambda_traced_invocations`] +/// GetUsageLambdaTracedInvocationsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_lambda_traced_invocations`] #[derive(Clone, Debug)] -pub struct GetUsageLambdaTracedInvocationsParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageLambdaTracedInvocationsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } -/// GetUsageObservabilityPipelinesParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_observability_pipelines`] +/// GetUsageObservabilityPipelinesOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_observability_pipelines`] #[derive(Clone, Debug)] -pub struct GetUsageObservabilityPipelinesParams { - /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. - pub start_hr: String, +pub struct GetUsageObservabilityPipelinesOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, @@ -276,8 +245,6 @@ impl UsageMeteringAPI { > { let local_configuration = &self.config; - // unbox and build parameters - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -334,9 +301,13 @@ impl UsageMeteringAPI { /// instead. pub async fn get_cost_by_org( &self, - params: GetCostByOrgParams, + start_month: String, + params: GetCostByOrgOptionalParams, ) -> Result, Error> { - match self.get_cost_by_org_with_http_info(params).await { + match self + .get_cost_by_org_with_http_info(start_month, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -349,13 +320,13 @@ impl UsageMeteringAPI { /// instead. pub async fn get_cost_by_org_with_http_info( &self, - params: GetCostByOrgParams, + start_month: String, + params: GetCostByOrgOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let start_month = params.start_month; + // unbox and build optional parameters let end_month = params.end_month; let local_client = &local_configuration.client; @@ -365,8 +336,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_month", &start_month.to_string())]); - if let Some(ref local_str) = end_month { - local_req_builder = local_req_builder.query(&[("end_month", &local_str.to_string())]); + if let Some(ref local_query_param) = end_month { + local_req_builder = + local_req_builder.query(&[("end_month", &local_query_param.to_string())]); }; // build user agent @@ -414,7 +386,7 @@ impl UsageMeteringAPI { /// To access historical costs prior to this, use the `/historical_cost` endpoint. pub async fn get_estimated_cost_by_org( &self, - params: GetEstimatedCostByOrgParams, + params: GetEstimatedCostByOrgOptionalParams, ) -> Result, Error> { match self.get_estimated_cost_by_org_with_http_info(params).await { @@ -429,14 +401,14 @@ impl UsageMeteringAPI { /// To access historical costs prior to this, use the `/historical_cost` endpoint. pub async fn get_estimated_cost_by_org_with_http_info( &self, - params: GetEstimatedCostByOrgParams, + params: GetEstimatedCostByOrgOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let view = params.view; let start_month = params.start_month; let end_month = params.end_month; @@ -452,20 +424,25 @@ impl UsageMeteringAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = view { - local_req_builder = local_req_builder.query(&[("view", &local_str.to_string())]); + if let Some(ref local_query_param) = view { + local_req_builder = + local_req_builder.query(&[("view", &local_query_param.to_string())]); }; - if let Some(ref local_str) = start_month { - local_req_builder = local_req_builder.query(&[("start_month", &local_str.to_string())]); + if let Some(ref local_query_param) = start_month { + local_req_builder = + local_req_builder.query(&[("start_month", &local_query_param.to_string())]); }; - if let Some(ref local_str) = end_month { - local_req_builder = local_req_builder.query(&[("end_month", &local_str.to_string())]); + if let Some(ref local_query_param) = end_month { + local_req_builder = + local_req_builder.query(&[("end_month", &local_query_param.to_string())]); }; - if let Some(ref local_str) = start_date { - local_req_builder = local_req_builder.query(&[("start_date", &local_str.to_string())]); + if let Some(ref local_query_param) = start_date { + local_req_builder = + local_req_builder.query(&[("start_date", &local_query_param.to_string())]); }; - if let Some(ref local_str) = end_date { - local_req_builder = local_req_builder.query(&[("end_date", &local_str.to_string())]); + if let Some(ref local_query_param) = end_date { + local_req_builder = + local_req_builder.query(&[("end_date", &local_query_param.to_string())]); }; // build user agent @@ -512,12 +489,16 @@ impl UsageMeteringAPI { /// Cost data for a given month becomes available no later than the 16th of the following month. pub async fn get_historical_cost_by_org( &self, - params: GetHistoricalCostByOrgParams, + start_month: String, + params: GetHistoricalCostByOrgOptionalParams, ) -> Result< Option, Error, > { - match self.get_historical_cost_by_org_with_http_info(params).await { + match self + .get_historical_cost_by_org_with_http_info(start_month, params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -527,15 +508,15 @@ impl UsageMeteringAPI { /// Cost data for a given month becomes available no later than the 16th of the following month. pub async fn get_historical_cost_by_org_with_http_info( &self, - params: GetHistoricalCostByOrgParams, + start_month: String, + params: GetHistoricalCostByOrgOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_month = params.start_month; + // unbox and build optional parameters let view = params.view; let end_month = params.end_month; @@ -549,11 +530,13 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_month", &start_month.to_string())]); - if let Some(ref local_str) = view { - local_req_builder = local_req_builder.query(&[("view", &local_str.to_string())]); + if let Some(ref local_query_param) = view { + local_req_builder = + local_req_builder.query(&[("view", &local_query_param.to_string())]); }; - if let Some(ref local_str) = end_month { - local_req_builder = local_req_builder.query(&[("end_month", &local_str.to_string())]); + if let Some(ref local_query_param) = end_month { + local_req_builder = + local_req_builder.query(&[("end_month", &local_query_param.to_string())]); }; // build user agent @@ -599,10 +582,19 @@ impl UsageMeteringAPI { /// Get hourly usage by product family. pub async fn get_hourly_usage( &self, - params: GetHourlyUsageParams, + filter_timestamp_start: String, + filter_product_families: String, + params: GetHourlyUsageOptionalParams, ) -> Result, Error> { - match self.get_hourly_usage_with_http_info(params).await { + match self + .get_hourly_usage_with_http_info( + filter_timestamp_start, + filter_product_families, + params, + ) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -611,16 +603,16 @@ impl UsageMeteringAPI { /// Get hourly usage by product family. pub async fn get_hourly_usage_with_http_info( &self, - params: GetHourlyUsageParams, + filter_timestamp_start: String, + filter_product_families: String, + params: GetHourlyUsageOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let filter_timestamp_start = params.filter_timestamp_start; - let filter_product_families = params.filter_product_families; + // unbox and build optional parameters let filter_timestamp_end = params.filter_timestamp_end; let filter_include_descendants = params.filter_include_descendants; let filter_include_breakdown = params.filter_include_breakdown; @@ -645,28 +637,31 @@ impl UsageMeteringAPI { "filter[product_families]", &filter_product_families.to_string(), )]); - if let Some(ref local_str) = filter_timestamp_end { - local_req_builder = - local_req_builder.query(&[("filter[timestamp][end]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_timestamp_end { + local_req_builder = local_req_builder + .query(&[("filter[timestamp][end]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_include_descendants { - local_req_builder = - local_req_builder.query(&[("filter[include_descendants]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_include_descendants { + local_req_builder = local_req_builder.query(&[( + "filter[include_descendants]", + &local_query_param.to_string(), + )]); }; - if let Some(ref local_str) = filter_include_breakdown { - local_req_builder = - local_req_builder.query(&[("filter[include_breakdown]", &local_str.to_string())]); + if let Some(ref local_query_param) = filter_include_breakdown { + local_req_builder = local_req_builder + .query(&[("filter[include_breakdown]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_versions { + if let Some(ref local_query_param) = filter_versions { local_req_builder = - local_req_builder.query(&[("filter[versions]", &local_str.to_string())]); - }; - if let Some(ref local_str) = page_limit { - local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + local_req_builder.query(&[("filter[versions]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_next_record_id { + if let Some(ref local_query_param) = page_limit { local_req_builder = - local_req_builder.query(&[("page[next_record_id]", &local_str.to_string())]); + local_req_builder.query(&[("page[limit]", &local_query_param.to_string())]); + }; + if let Some(ref local_query_param) = page_next_record_id { + local_req_builder = local_req_builder + .query(&[("page[next_record_id]", &local_query_param.to_string())]); }; // build user agent @@ -725,13 +720,16 @@ impl UsageMeteringAPI { /// ``` pub async fn get_monthly_cost_attribution( &self, - params: GetMonthlyCostAttributionParams, + start_month: String, + end_month: String, + fields: String, + params: GetMonthlyCostAttributionOptionalParams, ) -> Result< Option, Error, > { match self - .get_monthly_cost_attribution_with_http_info(params) + .get_monthly_cost_attribution_with_http_info(start_month, end_month, fields, params) .await { Ok(response_content) => Ok(response_content.entity), @@ -755,17 +753,17 @@ impl UsageMeteringAPI { /// ``` pub async fn get_monthly_cost_attribution_with_http_info( &self, - params: GetMonthlyCostAttributionParams, + start_month: String, + end_month: String, + fields: String, + params: GetMonthlyCostAttributionOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_month = params.start_month; - let end_month = params.end_month; - let fields = params.fields; + // unbox and build optional parameters let sort_direction = params.sort_direction; let sort_name = params.sort_name; let tag_breakdown_keys = params.tag_breakdown_keys; @@ -784,24 +782,25 @@ impl UsageMeteringAPI { local_req_builder = local_req_builder.query(&[("start_month", &start_month.to_string())]); local_req_builder = local_req_builder.query(&[("end_month", &end_month.to_string())]); local_req_builder = local_req_builder.query(&[("fields", &fields.to_string())]); - if let Some(ref local_str) = sort_direction { + if let Some(ref local_query_param) = sort_direction { local_req_builder = - local_req_builder.query(&[("sort_direction", &local_str.to_string())]); + local_req_builder.query(&[("sort_direction", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort_name { - local_req_builder = local_req_builder.query(&[("sort_name", &local_str.to_string())]); + if let Some(ref local_query_param) = sort_name { + local_req_builder = + local_req_builder.query(&[("sort_name", &local_query_param.to_string())]); }; - if let Some(ref local_str) = tag_breakdown_keys { + if let Some(ref local_query_param) = tag_breakdown_keys { local_req_builder = - local_req_builder.query(&[("tag_breakdown_keys", &local_str.to_string())]); + local_req_builder.query(&[("tag_breakdown_keys", &local_query_param.to_string())]); }; - if let Some(ref local_str) = next_record_id { + if let Some(ref local_query_param) = next_record_id { local_req_builder = - local_req_builder.query(&[("next_record_id", &local_str.to_string())]); + local_req_builder.query(&[("next_record_id", &local_query_param.to_string())]); }; - if let Some(ref local_str) = include_descendants { + if let Some(ref local_query_param) = include_descendants { local_req_builder = - local_req_builder.query(&[("include_descendants", &local_str.to_string())]); + local_req_builder.query(&[("include_descendants", &local_query_param.to_string())]); }; // build user agent @@ -849,7 +848,7 @@ impl UsageMeteringAPI { /// This endpoint requires the usage_read authorization scope. pub async fn get_projected_cost( &self, - params: GetProjectedCostParams, + params: GetProjectedCostOptionalParams, ) -> Result, Error> { match self.get_projected_cost_with_http_info(params).await { @@ -863,14 +862,14 @@ impl UsageMeteringAPI { /// This endpoint requires the usage_read authorization scope. pub async fn get_projected_cost_with_http_info( &self, - params: GetProjectedCostParams, + params: GetProjectedCostOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let view = params.view; let local_client = &local_configuration.client; @@ -882,8 +881,9 @@ impl UsageMeteringAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = view { - local_req_builder = local_req_builder.query(&[("view", &local_str.to_string())]); + if let Some(ref local_query_param) = view { + local_req_builder = + local_req_builder.query(&[("view", &local_query_param.to_string())]); }; // build user agent @@ -930,13 +930,14 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API]() pub async fn get_usage_application_security_monitoring( &self, - params: GetUsageApplicationSecurityMonitoringParams, + start_hr: String, + params: GetUsageApplicationSecurityMonitoringOptionalParams, ) -> Result< Option, Error, > { match self - .get_usage_application_security_monitoring_with_http_info(params) + .get_usage_application_security_monitoring_with_http_info(start_hr, params) .await { Ok(response_content) => Ok(response_content.entity), @@ -948,15 +949,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API]() pub async fn get_usage_application_security_monitoring_with_http_info( &self, - params: GetUsageApplicationSecurityMonitoringParams, + start_hr: String, + params: GetUsageApplicationSecurityMonitoringOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -969,8 +970,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -1018,13 +1020,14 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API]() pub async fn get_usage_lambda_traced_invocations( &self, - params: GetUsageLambdaTracedInvocationsParams, + start_hr: String, + params: GetUsageLambdaTracedInvocationsOptionalParams, ) -> Result< Option, Error, > { match self - .get_usage_lambda_traced_invocations_with_http_info(params) + .get_usage_lambda_traced_invocations_with_http_info(start_hr, params) .await { Ok(response_content) => Ok(response_content.entity), @@ -1036,15 +1039,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API]() pub async fn get_usage_lambda_traced_invocations_with_http_info( &self, - params: GetUsageLambdaTracedInvocationsParams, + start_hr: String, + params: GetUsageLambdaTracedInvocationsOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -1057,8 +1060,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent @@ -1106,13 +1110,14 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API]() pub async fn get_usage_observability_pipelines( &self, - params: GetUsageObservabilityPipelinesParams, + start_hr: String, + params: GetUsageObservabilityPipelinesOptionalParams, ) -> Result< Option, Error, > { match self - .get_usage_observability_pipelines_with_http_info(params) + .get_usage_observability_pipelines_with_http_info(start_hr, params) .await { Ok(response_content) => Ok(response_content.entity), @@ -1124,15 +1129,15 @@ impl UsageMeteringAPI { /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API]() pub async fn get_usage_observability_pipelines_with_http_info( &self, - params: GetUsageObservabilityPipelinesParams, + start_hr: String, + params: GetUsageObservabilityPipelinesOptionalParams, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let start_hr = params.start_hr; + // unbox and build optional parameters let end_hr = params.end_hr; let local_client = &local_configuration.client; @@ -1145,8 +1150,9 @@ impl UsageMeteringAPI { local_client.request(reqwest::Method::GET, local_uri_str.as_str()); local_req_builder = local_req_builder.query(&[("start_hr", &start_hr.to_string())]); - if let Some(ref local_str) = end_hr { - local_req_builder = local_req_builder.query(&[("end_hr", &local_str.to_string())]); + if let Some(ref local_query_param) = end_hr { + local_req_builder = + local_req_builder.query(&[("end_hr", &local_query_param.to_string())]); }; // build user agent diff --git a/src/datadogV2/api/api_users.rs b/src/datadogV2/api/api_users.rs index 22d1ee426..fd80eae91 100644 --- a/src/datadogV2/api/api_users.rs +++ b/src/datadogV2/api/api_users.rs @@ -5,50 +5,9 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateUserParams is a struct for passing parameters to the method [`UsersAPI::create_user`] +/// ListUsersOptionalParams is a struct for passing parameters to the method [`UsersAPI::list_users`] #[derive(Clone, Debug)] -pub struct CreateUserParams { - pub body: crate::datadogV2::model::UserCreateRequest, -} - -/// DisableUserParams is a struct for passing parameters to the method [`UsersAPI::disable_user`] -#[derive(Clone, Debug)] -pub struct DisableUserParams { - /// The ID of the user. - pub user_id: String, -} - -/// GetInvitationParams is a struct for passing parameters to the method [`UsersAPI::get_invitation`] -#[derive(Clone, Debug)] -pub struct GetInvitationParams { - /// The UUID of the user invitation. - pub user_invitation_uuid: String, -} - -/// GetUserParams is a struct for passing parameters to the method [`UsersAPI::get_user`] -#[derive(Clone, Debug)] -pub struct GetUserParams { - /// The ID of the user. - pub user_id: String, -} - -/// ListUserOrganizationsParams is a struct for passing parameters to the method [`UsersAPI::list_user_organizations`] -#[derive(Clone, Debug)] -pub struct ListUserOrganizationsParams { - /// The ID of the user. - pub user_id: String, -} - -/// ListUserPermissionsParams is a struct for passing parameters to the method [`UsersAPI::list_user_permissions`] -#[derive(Clone, Debug)] -pub struct ListUserPermissionsParams { - /// The ID of the user. - pub user_id: String, -} - -/// ListUsersParams is a struct for passing parameters to the method [`UsersAPI::list_users`] -#[derive(Clone, Debug)] -pub struct ListUsersParams { +pub struct ListUsersOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, /// Specific page number to return. @@ -68,20 +27,6 @@ pub struct ListUsersParams { pub filter_status: Option, } -/// SendInvitationsParams is a struct for passing parameters to the method [`UsersAPI::send_invitations`] -#[derive(Clone, Debug)] -pub struct SendInvitationsParams { - pub body: crate::datadogV2::model::UserInvitationsRequest, -} - -/// UpdateUserParams is a struct for passing parameters to the method [`UsersAPI::update_user`] -#[derive(Clone, Debug)] -pub struct UpdateUserParams { - /// The ID of the user. - pub user_id: String, - pub body: crate::datadogV2::model::UserUpdateRequest, -} - /// CreateUserError is a struct for typed errors of method [`UsersAPI::create_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -198,9 +143,9 @@ impl UsersAPI { /// Create a user for your organization. pub async fn create_user( &self, - params: CreateUserParams, + body: crate::datadogV2::model::UserCreateRequest, ) -> Result, Error> { - match self.create_user_with_http_info(params).await { + match self.create_user_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -209,14 +154,11 @@ impl UsersAPI { /// Create a user for your organization. pub async fn create_user_with_http_info( &self, - params: CreateUserParams, + body: crate::datadogV2::model::UserCreateRequest, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/users", local_configuration.base_path); @@ -273,9 +215,9 @@ impl UsersAPI { /// to an administrator user. pub async fn disable_user( &self, - params: DisableUserParams, + user_id: String, ) -> Result, Error> { - match self.disable_user_with_http_info(params).await { + match self.disable_user_with_http_info(user_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -285,13 +227,10 @@ impl UsersAPI { /// to an administrator user. pub async fn disable_user_with_http_info( &self, - params: DisableUserParams, + user_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let user_id = params.user_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -342,10 +281,13 @@ impl UsersAPI { /// Returns a single user invitation by its UUID. pub async fn get_invitation( &self, - params: GetInvitationParams, + user_invitation_uuid: String, ) -> Result, Error> { - match self.get_invitation_with_http_info(params).await { + match self + .get_invitation_with_http_info(user_invitation_uuid) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -354,16 +296,13 @@ impl UsersAPI { /// Returns a single user invitation by its UUID. pub async fn get_invitation_with_http_info( &self, - params: GetInvitationParams, + user_invitation_uuid: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let user_invitation_uuid = params.user_invitation_uuid; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -417,9 +356,9 @@ impl UsersAPI { /// Get a user in the organization specified by the user’s `user_id`. pub async fn get_user( &self, - params: GetUserParams, + user_id: String, ) -> Result, Error> { - match self.get_user_with_http_info(params).await { + match self.get_user_with_http_info(user_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -428,13 +367,10 @@ impl UsersAPI { /// Get a user in the organization specified by the user’s `user_id`. pub async fn get_user_with_http_info( &self, - params: GetUserParams, + user_id: String, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let user_id = params.user_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -488,10 +424,10 @@ impl UsersAPI { /// joined by this user. pub async fn list_user_organizations( &self, - params: ListUserOrganizationsParams, + user_id: String, ) -> Result, Error> { - match self.list_user_organizations_with_http_info(params).await { + match self.list_user_organizations_with_http_info(user_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -501,16 +437,13 @@ impl UsersAPI { /// joined by this user. pub async fn list_user_organizations_with_http_info( &self, - params: ListUserOrganizationsParams, + user_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let user_id = params.user_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -565,10 +498,10 @@ impl UsersAPI { /// granted by the associated user's roles. pub async fn list_user_permissions( &self, - params: ListUserPermissionsParams, + user_id: String, ) -> Result, Error> { - match self.list_user_permissions_with_http_info(params).await { + match self.list_user_permissions_with_http_info(user_id).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -578,16 +511,13 @@ impl UsersAPI { /// granted by the associated user's roles. pub async fn list_user_permissions_with_http_info( &self, - params: ListUserPermissionsParams, + user_id: String, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let user_id = params.user_id; - let local_client = &local_configuration.client; let local_uri_str = format!( @@ -642,7 +572,7 @@ impl UsersAPI { /// all users even if they are deactivated or unverified. pub async fn list_users( &self, - params: ListUsersParams, + params: ListUsersOptionalParams, ) -> Result, Error> { match self.list_users_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), @@ -654,12 +584,12 @@ impl UsersAPI { /// all users even if they are deactivated or unverified. pub async fn list_users_with_http_info( &self, - params: ListUsersParams, + params: ListUsersOptionalParams, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters + // unbox and build optional parameters let page_size = params.page_size; let page_number = params.page_number; let sort = params.sort; @@ -673,25 +603,29 @@ impl UsersAPI { let mut local_req_builder = local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - if let Some(ref local_str) = page_size { - local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + if let Some(ref local_query_param) = page_size { + local_req_builder = + local_req_builder.query(&[("page[size]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = page_number { + if let Some(ref local_query_param) = page_number { local_req_builder = - local_req_builder.query(&[("page[number]", &local_str.to_string())]); + local_req_builder.query(&[("page[number]", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort { - local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + if let Some(ref local_query_param) = sort { + local_req_builder = + local_req_builder.query(&[("sort", &local_query_param.to_string())]); }; - if let Some(ref local_str) = sort_dir { - local_req_builder = local_req_builder.query(&[("sort_dir", &local_str.to_string())]); + if let Some(ref local_query_param) = sort_dir { + local_req_builder = + local_req_builder.query(&[("sort_dir", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter { - local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + if let Some(ref local_query_param) = filter { + local_req_builder = + local_req_builder.query(&[("filter", &local_query_param.to_string())]); }; - if let Some(ref local_str) = filter_status { + if let Some(ref local_query_param) = filter_status { local_req_builder = - local_req_builder.query(&[("filter[status]", &local_str.to_string())]); + local_req_builder.query(&[("filter[status]", &local_query_param.to_string())]); }; // build user agent @@ -736,10 +670,10 @@ impl UsersAPI { /// Sends emails to one or more users inviting them to join the organization. pub async fn send_invitations( &self, - params: SendInvitationsParams, + body: crate::datadogV2::model::UserInvitationsRequest, ) -> Result, Error> { - match self.send_invitations_with_http_info(params).await { + match self.send_invitations_with_http_info(body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -748,16 +682,13 @@ impl UsersAPI { /// Sends emails to one or more users inviting them to join the organization. pub async fn send_invitations_with_http_info( &self, - params: SendInvitationsParams, + body: crate::datadogV2::model::UserInvitationsRequest, ) -> Result< ResponseContent, Error, > { let local_configuration = &self.config; - // unbox and build parameters - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!("{}/api/v2/user_invitations", local_configuration.base_path); @@ -815,9 +746,10 @@ impl UsersAPI { /// to an administrator user. pub async fn update_user( &self, - params: UpdateUserParams, + user_id: String, + body: crate::datadogV2::model::UserUpdateRequest, ) -> Result, Error> { - match self.update_user_with_http_info(params).await { + match self.update_user_with_http_info(user_id, body).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -827,15 +759,12 @@ impl UsersAPI { /// to an administrator user. pub async fn update_user_with_http_info( &self, - params: UpdateUserParams, + user_id: String, + body: crate::datadogV2::model::UserUpdateRequest, ) -> Result, Error> { let local_configuration = &self.config; - // unbox and build parameters - let user_id = params.user_id; - let body = params.body; - let local_client = &local_configuration.client; let local_uri_str = format!( diff --git a/src/datadogV2/model/model_active_billing_dimensions_attributes.rs b/src/datadogV2/model/model_active_billing_dimensions_attributes.rs index 1c15528b7..20ac12252 100644 --- a/src/datadogV2/model/model_active_billing_dimensions_attributes.rs +++ b/src/datadogV2/model/model_active_billing_dimensions_attributes.rs @@ -23,6 +23,16 @@ impl ActiveBillingDimensionsAttributes { values: None, } } + + pub fn with_month(&mut self, value: String) -> &mut Self { + self.month = Some(value); + self + } + + pub fn with_values(&mut self, value: Vec) -> &mut Self { + self.values = Some(value); + self + } } impl Default for ActiveBillingDimensionsAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_active_billing_dimensions_body.rs b/src/datadogV2/model/model_active_billing_dimensions_body.rs index bfd13dee7..7aa2bdcde 100644 --- a/src/datadogV2/model/model_active_billing_dimensions_body.rs +++ b/src/datadogV2/model/model_active_billing_dimensions_body.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ActiveBillingDimensionsBody { /// List of active billing dimensions. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Unique ID of the response. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,27 @@ impl ActiveBillingDimensionsBody { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::ActiveBillingDimensionsAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::ActiveBillingDimensionsType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for ActiveBillingDimensionsBody { fn default() -> Self { diff --git a/src/datadogV2/model/model_active_billing_dimensions_response.rs b/src/datadogV2/model/model_active_billing_dimensions_response.rs index cdc3b5e24..82a335056 100644 --- a/src/datadogV2/model/model_active_billing_dimensions_response.rs +++ b/src/datadogV2/model/model_active_billing_dimensions_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct ActiveBillingDimensionsResponse { /// Active billing dimensions data. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl ActiveBillingDimensionsResponse { pub fn new() -> ActiveBillingDimensionsResponse { ActiveBillingDimensionsResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::ActiveBillingDimensionsBody, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for ActiveBillingDimensionsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_api_key_create_data.rs b/src/datadogV2/model/model_api_key_create_data.rs index 968414968..2962b0901 100644 --- a/src/datadogV2/model/model_api_key_create_data.rs +++ b/src/datadogV2/model/model_api_key_create_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct APIKeyCreateData { /// Attributes used to create an API Key. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::APIKeyCreateAttributes, /// API Keys resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::APIKeysType, @@ -18,7 +18,7 @@ pub struct APIKeyCreateData { impl APIKeyCreateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::APIKeyCreateAttributes, type_: crate::datadogV2::model::APIKeysType, ) -> APIKeyCreateData { APIKeyCreateData { attributes, type_ } diff --git a/src/datadogV2/model/model_api_key_create_request.rs b/src/datadogV2/model/model_api_key_create_request.rs index 3c53769a7..7773c388d 100644 --- a/src/datadogV2/model/model_api_key_create_request.rs +++ b/src/datadogV2/model/model_api_key_create_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct APIKeyCreateRequest { /// Object used to create an API key. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::APIKeyCreateData, } impl APIKeyCreateRequest { - pub fn new(data: Box) -> APIKeyCreateRequest { + pub fn new(data: crate::datadogV2::model::APIKeyCreateData) -> APIKeyCreateRequest { APIKeyCreateRequest { data } } } diff --git a/src/datadogV2/model/model_api_key_relationships.rs b/src/datadogV2/model/model_api_key_relationships.rs index 595a41e9d..fef5267e1 100644 --- a/src/datadogV2/model/model_api_key_relationships.rs +++ b/src/datadogV2/model/model_api_key_relationships.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct APIKeyRelationships { /// Relationship to user. #[serde(rename = "created_by")] - pub created_by: Option>, + pub created_by: Option, /// Relationship to user. #[serde(rename = "modified_by")] - pub modified_by: Option>, + pub modified_by: Option, } impl APIKeyRelationships { @@ -23,6 +23,22 @@ impl APIKeyRelationships { modified_by: None, } } + + pub fn with_created_by( + &mut self, + value: crate::datadogV2::model::RelationshipToUser, + ) -> &mut Self { + self.created_by = Some(value); + self + } + + pub fn with_modified_by( + &mut self, + value: crate::datadogV2::model::RelationshipToUser, + ) -> &mut Self { + self.modified_by = Some(value); + self + } } impl Default for APIKeyRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_api_key_response.rs b/src/datadogV2/model/model_api_key_response.rs index 49907b124..9391e64bc 100644 --- a/src/datadogV2/model/model_api_key_response.rs +++ b/src/datadogV2/model/model_api_key_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct APIKeyResponse { /// Datadog API key. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// Array of objects related to the API key. #[serde(rename = "included")] pub included: Option>, @@ -23,6 +23,19 @@ impl APIKeyResponse { included: None, } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::FullAPIKey) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } } impl Default for APIKeyResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_api_key_response_included_item.rs b/src/datadogV2/model/model_api_key_response_included_item.rs index b283968d2..af5c50091 100644 --- a/src/datadogV2/model/model_api_key_response_included_item.rs +++ b/src/datadogV2/model/model_api_key_response_included_item.rs @@ -7,5 +7,5 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum APIKeyResponseIncludedItem { - User(Box), + User(crate::datadogV2::model::User), } diff --git a/src/datadogV2/model/model_api_key_update_data.rs b/src/datadogV2/model/model_api_key_update_data.rs index 14aa9fb57..ddc4d0014 100644 --- a/src/datadogV2/model/model_api_key_update_data.rs +++ b/src/datadogV2/model/model_api_key_update_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct APIKeyUpdateData { /// Attributes used to update an API Key. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::APIKeyUpdateAttributes, /// ID of the API key. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct APIKeyUpdateData { impl APIKeyUpdateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::APIKeyUpdateAttributes, id: String, type_: crate::datadogV2::model::APIKeysType, ) -> APIKeyUpdateData { diff --git a/src/datadogV2/model/model_api_key_update_request.rs b/src/datadogV2/model/model_api_key_update_request.rs index eb6fab2b8..6b0047ef3 100644 --- a/src/datadogV2/model/model_api_key_update_request.rs +++ b/src/datadogV2/model/model_api_key_update_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct APIKeyUpdateRequest { /// Object used to update an API key. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::APIKeyUpdateData, } impl APIKeyUpdateRequest { - pub fn new(data: Box) -> APIKeyUpdateRequest { + pub fn new(data: crate::datadogV2::model::APIKeyUpdateData) -> APIKeyUpdateRequest { APIKeyUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_api_keys_response.rs b/src/datadogV2/model/model_api_keys_response.rs index 3c2e0e91c..753297a1b 100644 --- a/src/datadogV2/model/model_api_keys_response.rs +++ b/src/datadogV2/model/model_api_keys_response.rs @@ -16,7 +16,7 @@ pub struct APIKeysResponse { pub included: Option>, /// Additional information related to api keys response. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl APIKeysResponse { @@ -27,6 +27,24 @@ impl APIKeysResponse { meta: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::APIKeysResponseMeta) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for APIKeysResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_api_keys_response_meta.rs b/src/datadogV2/model/model_api_keys_response_meta.rs index 31d173973..332e14a3c 100644 --- a/src/datadogV2/model/model_api_keys_response_meta.rs +++ b/src/datadogV2/model/model_api_keys_response_meta.rs @@ -13,7 +13,7 @@ pub struct APIKeysResponseMeta { pub max_allowed: Option, /// Additional information related to the API keys response. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, } impl APIKeysResponseMeta { @@ -23,6 +23,19 @@ impl APIKeysResponseMeta { page: None, } } + + pub fn with_max_allowed(&mut self, value: i64) -> &mut Self { + self.max_allowed = Some(value); + self + } + + pub fn with_page( + &mut self, + value: crate::datadogV2::model::APIKeysResponseMetaPage, + ) -> &mut Self { + self.page = Some(value); + self + } } impl Default for APIKeysResponseMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_api_keys_response_meta_page.rs b/src/datadogV2/model/model_api_keys_response_meta_page.rs index 1553f763c..167e52408 100644 --- a/src/datadogV2/model/model_api_keys_response_meta_page.rs +++ b/src/datadogV2/model/model_api_keys_response_meta_page.rs @@ -19,6 +19,11 @@ impl APIKeysResponseMetaPage { total_filtered_count: None, } } + + pub fn with_total_filtered_count(&mut self, value: i64) -> &mut Self { + self.total_filtered_count = Some(value); + self + } } impl Default for APIKeysResponseMetaPage { fn default() -> Self { diff --git a/src/datadogV2/model/model_application_key_create_attributes.rs b/src/datadogV2/model/model_application_key_create_attributes.rs index eb574bc60..669be8ca5 100644 --- a/src/datadogV2/model/model_application_key_create_attributes.rs +++ b/src/datadogV2/model/model_application_key_create_attributes.rs @@ -20,4 +20,9 @@ impl ApplicationKeyCreateAttributes { pub fn new(name: String) -> ApplicationKeyCreateAttributes { ApplicationKeyCreateAttributes { name, scopes: None } } + + pub fn with_scopes(&mut self, value: Option>) -> &mut Self { + self.scopes = Some(value); + self + } } diff --git a/src/datadogV2/model/model_application_key_create_data.rs b/src/datadogV2/model/model_application_key_create_data.rs index ce2e287d7..78f7d0dd5 100644 --- a/src/datadogV2/model/model_application_key_create_data.rs +++ b/src/datadogV2/model/model_application_key_create_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ApplicationKeyCreateData { /// Attributes used to create an application Key. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::ApplicationKeyCreateAttributes, /// Application Keys resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::ApplicationKeysType, @@ -18,7 +18,7 @@ pub struct ApplicationKeyCreateData { impl ApplicationKeyCreateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::ApplicationKeyCreateAttributes, type_: crate::datadogV2::model::ApplicationKeysType, ) -> ApplicationKeyCreateData { ApplicationKeyCreateData { attributes, type_ } diff --git a/src/datadogV2/model/model_application_key_create_request.rs b/src/datadogV2/model/model_application_key_create_request.rs index f0882f78c..71f796afc 100644 --- a/src/datadogV2/model/model_application_key_create_request.rs +++ b/src/datadogV2/model/model_application_key_create_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct ApplicationKeyCreateRequest { /// Object used to create an application key. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::ApplicationKeyCreateData, } impl ApplicationKeyCreateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::ApplicationKeyCreateData, ) -> ApplicationKeyCreateRequest { ApplicationKeyCreateRequest { data } } diff --git a/src/datadogV2/model/model_application_key_relationships.rs b/src/datadogV2/model/model_application_key_relationships.rs index b3f3b68e8..e0a352bbe 100644 --- a/src/datadogV2/model/model_application_key_relationships.rs +++ b/src/datadogV2/model/model_application_key_relationships.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct ApplicationKeyRelationships { /// Relationship to user. #[serde(rename = "owned_by")] - pub owned_by: Option>, + pub owned_by: Option, } impl ApplicationKeyRelationships { pub fn new() -> ApplicationKeyRelationships { ApplicationKeyRelationships { owned_by: None } } + + pub fn with_owned_by( + &mut self, + value: crate::datadogV2::model::RelationshipToUser, + ) -> &mut Self { + self.owned_by = Some(value); + self + } } impl Default for ApplicationKeyRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_application_key_response.rs b/src/datadogV2/model/model_application_key_response.rs index 6800534fa..104919236 100644 --- a/src/datadogV2/model/model_application_key_response.rs +++ b/src/datadogV2/model/model_application_key_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ApplicationKeyResponse { /// Datadog application key. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// Array of objects related to the application key. #[serde(rename = "included")] pub included: Option>, @@ -23,6 +23,19 @@ impl ApplicationKeyResponse { included: None, } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::FullApplicationKey) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } } impl Default for ApplicationKeyResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_application_key_response_included_item.rs b/src/datadogV2/model/model_application_key_response_included_item.rs index 32020e49d..611c0002a 100644 --- a/src/datadogV2/model/model_application_key_response_included_item.rs +++ b/src/datadogV2/model/model_application_key_response_included_item.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ApplicationKeyResponseIncludedItem { - User(Box), - Role(Box), + User(crate::datadogV2::model::User), + Role(crate::datadogV2::model::Role), } diff --git a/src/datadogV2/model/model_application_key_response_meta.rs b/src/datadogV2/model/model_application_key_response_meta.rs index 2a4956383..56de665f3 100644 --- a/src/datadogV2/model/model_application_key_response_meta.rs +++ b/src/datadogV2/model/model_application_key_response_meta.rs @@ -13,7 +13,7 @@ pub struct ApplicationKeyResponseMeta { pub max_allowed_per_user: Option, /// Additional information related to the application key response. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, } impl ApplicationKeyResponseMeta { @@ -23,6 +23,19 @@ impl ApplicationKeyResponseMeta { page: None, } } + + pub fn with_max_allowed_per_user(&mut self, value: i64) -> &mut Self { + self.max_allowed_per_user = Some(value); + self + } + + pub fn with_page( + &mut self, + value: crate::datadogV2::model::ApplicationKeyResponseMetaPage, + ) -> &mut Self { + self.page = Some(value); + self + } } impl Default for ApplicationKeyResponseMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_application_key_response_meta_page.rs b/src/datadogV2/model/model_application_key_response_meta_page.rs index 3c0fb7c9a..14ac697cd 100644 --- a/src/datadogV2/model/model_application_key_response_meta_page.rs +++ b/src/datadogV2/model/model_application_key_response_meta_page.rs @@ -19,6 +19,11 @@ impl ApplicationKeyResponseMetaPage { total_filtered_count: None, } } + + pub fn with_total_filtered_count(&mut self, value: i64) -> &mut Self { + self.total_filtered_count = Some(value); + self + } } impl Default for ApplicationKeyResponseMetaPage { fn default() -> Self { diff --git a/src/datadogV2/model/model_application_key_update_attributes.rs b/src/datadogV2/model/model_application_key_update_attributes.rs index aa89e782d..ddcdd5bc7 100644 --- a/src/datadogV2/model/model_application_key_update_attributes.rs +++ b/src/datadogV2/model/model_application_key_update_attributes.rs @@ -23,6 +23,16 @@ impl ApplicationKeyUpdateAttributes { scopes: None, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_scopes(&mut self, value: Option>) -> &mut Self { + self.scopes = Some(value); + self + } } impl Default for ApplicationKeyUpdateAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_application_key_update_data.rs b/src/datadogV2/model/model_application_key_update_data.rs index 908df7e6c..3a6598876 100644 --- a/src/datadogV2/model/model_application_key_update_data.rs +++ b/src/datadogV2/model/model_application_key_update_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ApplicationKeyUpdateData { /// Attributes used to update an application Key. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::ApplicationKeyUpdateAttributes, /// ID of the application key. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct ApplicationKeyUpdateData { impl ApplicationKeyUpdateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::ApplicationKeyUpdateAttributes, id: String, type_: crate::datadogV2::model::ApplicationKeysType, ) -> ApplicationKeyUpdateData { diff --git a/src/datadogV2/model/model_application_key_update_request.rs b/src/datadogV2/model/model_application_key_update_request.rs index 4c062fb92..6cf68be13 100644 --- a/src/datadogV2/model/model_application_key_update_request.rs +++ b/src/datadogV2/model/model_application_key_update_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct ApplicationKeyUpdateRequest { /// Object used to update an application key. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::ApplicationKeyUpdateData, } impl ApplicationKeyUpdateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::ApplicationKeyUpdateData, ) -> ApplicationKeyUpdateRequest { ApplicationKeyUpdateRequest { data } } diff --git a/src/datadogV2/model/model_audit_logs_event.rs b/src/datadogV2/model/model_audit_logs_event.rs index 67be95832..41eb522e7 100644 --- a/src/datadogV2/model/model_audit_logs_event.rs +++ b/src/datadogV2/model/model_audit_logs_event.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct AuditLogsEvent { /// JSON object containing all event attributes and their associated values. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Unique ID of the event. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl AuditLogsEvent { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::AuditLogsEventAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::AuditLogsEventType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for AuditLogsEvent { fn default() -> Self { diff --git a/src/datadogV2/model/model_audit_logs_event_attributes.rs b/src/datadogV2/model/model_audit_logs_event_attributes.rs index e313bfb6d..b80827368 100644 --- a/src/datadogV2/model/model_audit_logs_event_attributes.rs +++ b/src/datadogV2/model/model_audit_logs_event_attributes.rs @@ -37,6 +37,34 @@ impl AuditLogsEventAttributes { timestamp: None, } } + + pub fn with_attributes( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_service(&mut self, value: String) -> &mut Self { + self.service = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_timestamp(&mut self, value: String) -> &mut Self { + self.timestamp = Some(value); + self + } } impl Default for AuditLogsEventAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_audit_logs_events_response.rs b/src/datadogV2/model/model_audit_logs_events_response.rs index df05f7bc9..75d02ba38 100644 --- a/src/datadogV2/model/model_audit_logs_events_response.rs +++ b/src/datadogV2/model/model_audit_logs_events_response.rs @@ -13,10 +13,10 @@ pub struct AuditLogsEventsResponse { pub data: Option>, /// Links attributes. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, /// The metadata associated with a request. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl AuditLogsEventsResponse { @@ -27,6 +27,27 @@ impl AuditLogsEventsResponse { meta: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links( + &mut self, + value: crate::datadogV2::model::AuditLogsResponseLinks, + ) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::AuditLogsResponseMetadata, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for AuditLogsEventsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_audit_logs_query_filter.rs b/src/datadogV2/model/model_audit_logs_query_filter.rs index 68458c507..d658913f0 100644 --- a/src/datadogV2/model/model_audit_logs_query_filter.rs +++ b/src/datadogV2/model/model_audit_logs_query_filter.rs @@ -27,6 +27,21 @@ impl AuditLogsQueryFilter { to: None, } } + + pub fn with_from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_to(&mut self, value: String) -> &mut Self { + self.to = Some(value); + self + } } impl Default for AuditLogsQueryFilter { fn default() -> Self { diff --git a/src/datadogV2/model/model_audit_logs_query_options.rs b/src/datadogV2/model/model_audit_logs_query_options.rs index a92a3b04b..a6000d363 100644 --- a/src/datadogV2/model/model_audit_logs_query_options.rs +++ b/src/datadogV2/model/model_audit_logs_query_options.rs @@ -24,6 +24,16 @@ impl AuditLogsQueryOptions { timezone: None, } } + + pub fn with_time_offset(&mut self, value: i64) -> &mut Self { + self.time_offset = Some(value); + self + } + + pub fn with_timezone(&mut self, value: String) -> &mut Self { + self.timezone = Some(value); + self + } } impl Default for AuditLogsQueryOptions { fn default() -> Self { diff --git a/src/datadogV2/model/model_audit_logs_query_page_options.rs b/src/datadogV2/model/model_audit_logs_query_page_options.rs index 75d72e7ac..46b65ef9f 100644 --- a/src/datadogV2/model/model_audit_logs_query_page_options.rs +++ b/src/datadogV2/model/model_audit_logs_query_page_options.rs @@ -23,6 +23,16 @@ impl AuditLogsQueryPageOptions { limit: None, } } + + pub fn with_cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + self + } + + pub fn with_limit(&mut self, value: i32) -> &mut Self { + self.limit = Some(value); + self + } } impl Default for AuditLogsQueryPageOptions { fn default() -> Self { diff --git a/src/datadogV2/model/model_audit_logs_response_links.rs b/src/datadogV2/model/model_audit_logs_response_links.rs index 373cd1ffa..c786a169a 100644 --- a/src/datadogV2/model/model_audit_logs_response_links.rs +++ b/src/datadogV2/model/model_audit_logs_response_links.rs @@ -18,6 +18,11 @@ impl AuditLogsResponseLinks { pub fn new() -> AuditLogsResponseLinks { AuditLogsResponseLinks { next: None } } + + pub fn with_next(&mut self, value: String) -> &mut Self { + self.next = Some(value); + self + } } impl Default for AuditLogsResponseLinks { fn default() -> Self { diff --git a/src/datadogV2/model/model_audit_logs_response_metadata.rs b/src/datadogV2/model/model_audit_logs_response_metadata.rs index 13580aa4f..ad703a1fd 100644 --- a/src/datadogV2/model/model_audit_logs_response_metadata.rs +++ b/src/datadogV2/model/model_audit_logs_response_metadata.rs @@ -13,7 +13,7 @@ pub struct AuditLogsResponseMetadata { pub elapsed: Option, /// Paging attributes. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, /// The identifier of the request. #[serde(rename = "request_id")] pub request_id: Option, @@ -36,6 +36,40 @@ impl AuditLogsResponseMetadata { warnings: None, } } + + pub fn with_elapsed(&mut self, value: i64) -> &mut Self { + self.elapsed = Some(value); + self + } + + pub fn with_page( + &mut self, + value: crate::datadogV2::model::AuditLogsResponsePage, + ) -> &mut Self { + self.page = Some(value); + self + } + + pub fn with_request_id(&mut self, value: String) -> &mut Self { + self.request_id = Some(value); + self + } + + pub fn with_status( + &mut self, + value: crate::datadogV2::model::AuditLogsResponseStatus, + ) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_warnings( + &mut self, + value: Vec, + ) -> &mut Self { + self.warnings = Some(value); + self + } } impl Default for AuditLogsResponseMetadata { fn default() -> Self { diff --git a/src/datadogV2/model/model_audit_logs_response_page.rs b/src/datadogV2/model/model_audit_logs_response_page.rs index 657bcb04f..1b44d6c77 100644 --- a/src/datadogV2/model/model_audit_logs_response_page.rs +++ b/src/datadogV2/model/model_audit_logs_response_page.rs @@ -17,6 +17,11 @@ impl AuditLogsResponsePage { pub fn new() -> AuditLogsResponsePage { AuditLogsResponsePage { after: None } } + + pub fn with_after(&mut self, value: String) -> &mut Self { + self.after = Some(value); + self + } } impl Default for AuditLogsResponsePage { fn default() -> Self { diff --git a/src/datadogV2/model/model_audit_logs_search_events_request.rs b/src/datadogV2/model/model_audit_logs_search_events_request.rs index 1d6e08603..0149149c8 100644 --- a/src/datadogV2/model/model_audit_logs_search_events_request.rs +++ b/src/datadogV2/model/model_audit_logs_search_events_request.rs @@ -10,14 +10,14 @@ use serde_with::skip_serializing_none; pub struct AuditLogsSearchEventsRequest { /// Search and filter query settings. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// Global query options that are used during the query. /// Note: Specify either timezone or time offset, not both. Otherwise, the query fails. #[serde(rename = "options")] - pub options: Option>, + pub options: Option, /// Paging attributes for listing events. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, /// Sort parameters when querying events. #[serde(rename = "sort")] pub sort: Option, @@ -32,6 +32,35 @@ impl AuditLogsSearchEventsRequest { sort: None, } } + + pub fn with_filter( + &mut self, + value: crate::datadogV2::model::AuditLogsQueryFilter, + ) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_options( + &mut self, + value: crate::datadogV2::model::AuditLogsQueryOptions, + ) -> &mut Self { + self.options = Some(value); + self + } + + pub fn with_page( + &mut self, + value: crate::datadogV2::model::AuditLogsQueryPageOptions, + ) -> &mut Self { + self.page = Some(value); + self + } + + pub fn with_sort(&mut self, value: crate::datadogV2::model::AuditLogsSort) -> &mut Self { + self.sort = Some(value); + self + } } impl Default for AuditLogsSearchEventsRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_audit_logs_warning.rs b/src/datadogV2/model/model_audit_logs_warning.rs index 8de93b7aa..8e8b46c66 100644 --- a/src/datadogV2/model/model_audit_logs_warning.rs +++ b/src/datadogV2/model/model_audit_logs_warning.rs @@ -27,6 +27,21 @@ impl AuditLogsWarning { title: None, } } + + pub fn with_code(&mut self, value: String) -> &mut Self { + self.code = Some(value); + self + } + + pub fn with_detail(&mut self, value: String) -> &mut Self { + self.detail = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } } impl Default for AuditLogsWarning { fn default() -> Self { diff --git a/src/datadogV2/model/model_auth_n_mapping.rs b/src/datadogV2/model/model_auth_n_mapping.rs index c76107f38..96f2e6bdc 100644 --- a/src/datadogV2/model/model_auth_n_mapping.rs +++ b/src/datadogV2/model/model_auth_n_mapping.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct AuthNMapping { /// Attributes of AuthN Mapping. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of the AuthN Mapping. #[serde(rename = "id")] pub id: String, /// All relationships associated with AuthN Mapping. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// AuthN Mappings resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::AuthNMappingsType, @@ -31,4 +31,20 @@ impl AuthNMapping { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::AuthNMappingAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::AuthNMappingRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_auth_n_mapping_attributes.rs b/src/datadogV2/model/model_auth_n_mapping_attributes.rs index eb3b79b91..1022b3d6e 100644 --- a/src/datadogV2/model/model_auth_n_mapping_attributes.rs +++ b/src/datadogV2/model/model_auth_n_mapping_attributes.rs @@ -35,6 +35,31 @@ impl AuthNMappingAttributes { saml_assertion_attribute_id: None, } } + + pub fn with_attribute_key(&mut self, value: String) -> &mut Self { + self.attribute_key = Some(value); + self + } + + pub fn with_attribute_value(&mut self, value: String) -> &mut Self { + self.attribute_value = Some(value); + self + } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn with_saml_assertion_attribute_id(&mut self, value: String) -> &mut Self { + self.saml_assertion_attribute_id = Some(value); + self + } } impl Default for AuthNMappingAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_auth_n_mapping_create_attributes.rs b/src/datadogV2/model/model_auth_n_mapping_create_attributes.rs index 4a0f0003f..1681dd556 100644 --- a/src/datadogV2/model/model_auth_n_mapping_create_attributes.rs +++ b/src/datadogV2/model/model_auth_n_mapping_create_attributes.rs @@ -23,6 +23,16 @@ impl AuthNMappingCreateAttributes { attribute_value: None, } } + + pub fn with_attribute_key(&mut self, value: String) -> &mut Self { + self.attribute_key = Some(value); + self + } + + pub fn with_attribute_value(&mut self, value: String) -> &mut Self { + self.attribute_value = Some(value); + self + } } impl Default for AuthNMappingCreateAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_auth_n_mapping_create_data.rs b/src/datadogV2/model/model_auth_n_mapping_create_data.rs index a89c10e70..86a9523fd 100644 --- a/src/datadogV2/model/model_auth_n_mapping_create_data.rs +++ b/src/datadogV2/model/model_auth_n_mapping_create_data.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct AuthNMappingCreateData { /// Key/Value pair of attributes used for create request. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Relationship of AuthN Mapping create object to Role. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// AuthN Mappings resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::AuthNMappingsType, @@ -27,4 +27,20 @@ impl AuthNMappingCreateData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::AuthNMappingCreateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::AuthNMappingCreateRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_auth_n_mapping_create_relationships.rs b/src/datadogV2/model/model_auth_n_mapping_create_relationships.rs index 719fb428e..04ee0f628 100644 --- a/src/datadogV2/model/model_auth_n_mapping_create_relationships.rs +++ b/src/datadogV2/model/model_auth_n_mapping_create_relationships.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct AuthNMappingCreateRelationships { /// Relationship to role. #[serde(rename = "role")] - pub role: Option>, + pub role: Option, } impl AuthNMappingCreateRelationships { pub fn new() -> AuthNMappingCreateRelationships { AuthNMappingCreateRelationships { role: None } } + + pub fn with_role(&mut self, value: crate::datadogV2::model::RelationshipToRole) -> &mut Self { + self.role = Some(value); + self + } } impl Default for AuthNMappingCreateRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_auth_n_mapping_create_request.rs b/src/datadogV2/model/model_auth_n_mapping_create_request.rs index 3f8d40334..b9276b4f2 100644 --- a/src/datadogV2/model/model_auth_n_mapping_create_request.rs +++ b/src/datadogV2/model/model_auth_n_mapping_create_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct AuthNMappingCreateRequest { /// Data for creating an AuthN Mapping. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::AuthNMappingCreateData, } impl AuthNMappingCreateRequest { - pub fn new( - data: Box, - ) -> AuthNMappingCreateRequest { + pub fn new(data: crate::datadogV2::model::AuthNMappingCreateData) -> AuthNMappingCreateRequest { AuthNMappingCreateRequest { data } } } diff --git a/src/datadogV2/model/model_auth_n_mapping_included.rs b/src/datadogV2/model/model_auth_n_mapping_included.rs index 2b42f34b1..0af4f5f17 100644 --- a/src/datadogV2/model/model_auth_n_mapping_included.rs +++ b/src/datadogV2/model/model_auth_n_mapping_included.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum AuthNMappingIncluded { - SAMLAssertionAttribute(Box), - Role(Box), + SAMLAssertionAttribute(crate::datadogV2::model::SAMLAssertionAttribute), + Role(crate::datadogV2::model::Role), } diff --git a/src/datadogV2/model/model_auth_n_mapping_relationships.rs b/src/datadogV2/model/model_auth_n_mapping_relationships.rs index 63bdd4d92..b3afd05ac 100644 --- a/src/datadogV2/model/model_auth_n_mapping_relationships.rs +++ b/src/datadogV2/model/model_auth_n_mapping_relationships.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct AuthNMappingRelationships { /// Relationship to role. #[serde(rename = "role")] - pub role: Option>, + pub role: Option, /// AuthN Mapping relationship to SAML Assertion Attribute. #[serde(rename = "saml_assertion_attribute")] pub saml_assertion_attribute: - Option>, + Option, } impl AuthNMappingRelationships { @@ -24,6 +24,19 @@ impl AuthNMappingRelationships { saml_assertion_attribute: None, } } + + pub fn with_role(&mut self, value: crate::datadogV2::model::RelationshipToRole) -> &mut Self { + self.role = Some(value); + self + } + + pub fn with_saml_assertion_attribute( + &mut self, + value: crate::datadogV2::model::RelationshipToSAMLAssertionAttribute, + ) -> &mut Self { + self.saml_assertion_attribute = Some(value); + self + } } impl Default for AuthNMappingRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_auth_n_mapping_response.rs b/src/datadogV2/model/model_auth_n_mapping_response.rs index db821415f..e155cc470 100644 --- a/src/datadogV2/model/model_auth_n_mapping_response.rs +++ b/src/datadogV2/model/model_auth_n_mapping_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct AuthNMappingResponse { /// The AuthN Mapping object returned by API. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// Included data in the AuthN Mapping response. #[serde(rename = "included")] pub included: Option>, @@ -23,6 +23,19 @@ impl AuthNMappingResponse { included: None, } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::AuthNMapping) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } } impl Default for AuthNMappingResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_auth_n_mapping_update_attributes.rs b/src/datadogV2/model/model_auth_n_mapping_update_attributes.rs index bd3388cb5..023b172f6 100644 --- a/src/datadogV2/model/model_auth_n_mapping_update_attributes.rs +++ b/src/datadogV2/model/model_auth_n_mapping_update_attributes.rs @@ -23,6 +23,16 @@ impl AuthNMappingUpdateAttributes { attribute_value: None, } } + + pub fn with_attribute_key(&mut self, value: String) -> &mut Self { + self.attribute_key = Some(value); + self + } + + pub fn with_attribute_value(&mut self, value: String) -> &mut Self { + self.attribute_value = Some(value); + self + } } impl Default for AuthNMappingUpdateAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_auth_n_mapping_update_data.rs b/src/datadogV2/model/model_auth_n_mapping_update_data.rs index 4e98d9dd4..aeb3d9787 100644 --- a/src/datadogV2/model/model_auth_n_mapping_update_data.rs +++ b/src/datadogV2/model/model_auth_n_mapping_update_data.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct AuthNMappingUpdateData { /// Key/Value pair of attributes used for update request. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of the AuthN Mapping. #[serde(rename = "id")] pub id: String, /// Relationship of AuthN Mapping update object to Role. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// AuthN Mappings resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::AuthNMappingsType, @@ -34,4 +34,20 @@ impl AuthNMappingUpdateData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::AuthNMappingUpdateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::AuthNMappingUpdateRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_auth_n_mapping_update_relationships.rs b/src/datadogV2/model/model_auth_n_mapping_update_relationships.rs index 0a2389c05..66407a26b 100644 --- a/src/datadogV2/model/model_auth_n_mapping_update_relationships.rs +++ b/src/datadogV2/model/model_auth_n_mapping_update_relationships.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct AuthNMappingUpdateRelationships { /// Relationship to role. #[serde(rename = "role")] - pub role: Option>, + pub role: Option, } impl AuthNMappingUpdateRelationships { pub fn new() -> AuthNMappingUpdateRelationships { AuthNMappingUpdateRelationships { role: None } } + + pub fn with_role(&mut self, value: crate::datadogV2::model::RelationshipToRole) -> &mut Self { + self.role = Some(value); + self + } } impl Default for AuthNMappingUpdateRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_auth_n_mapping_update_request.rs b/src/datadogV2/model/model_auth_n_mapping_update_request.rs index 017742fe2..abb03c93a 100644 --- a/src/datadogV2/model/model_auth_n_mapping_update_request.rs +++ b/src/datadogV2/model/model_auth_n_mapping_update_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct AuthNMappingUpdateRequest { /// Data for updating an AuthN Mapping. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::AuthNMappingUpdateData, } impl AuthNMappingUpdateRequest { - pub fn new( - data: Box, - ) -> AuthNMappingUpdateRequest { + pub fn new(data: crate::datadogV2::model::AuthNMappingUpdateData) -> AuthNMappingUpdateRequest { AuthNMappingUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_auth_n_mappings_response.rs b/src/datadogV2/model/model_auth_n_mappings_response.rs index e46ddbf62..9d3921b89 100644 --- a/src/datadogV2/model/model_auth_n_mappings_response.rs +++ b/src/datadogV2/model/model_auth_n_mappings_response.rs @@ -16,7 +16,7 @@ pub struct AuthNMappingsResponse { pub included: Option>, /// Object describing meta attributes of response. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl AuthNMappingsResponse { @@ -27,6 +27,27 @@ impl AuthNMappingsResponse { meta: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::ResponseMetaAttributes, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for AuthNMappingsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_aws_cur_config.rs b/src/datadogV2/model/model_aws_cur_config.rs index 11b78baea..7588e9004 100644 --- a/src/datadogV2/model/model_aws_cur_config.rs +++ b/src/datadogV2/model/model_aws_cur_config.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct AwsCURConfig { /// Attributes for An AWS CUR config. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::AwsCURConfigAttributes, /// The ID of the AWS CUR config. #[serde(rename = "id")] pub id: Option, @@ -21,7 +21,7 @@ pub struct AwsCURConfig { impl AwsCURConfig { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::AwsCURConfigAttributes, type_: crate::datadogV2::model::AwsCURConfigType, ) -> AwsCURConfig { AwsCURConfig { @@ -30,4 +30,9 @@ impl AwsCURConfig { type_, } } + + pub fn with_id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } } diff --git a/src/datadogV2/model/model_aws_cur_config_attributes.rs b/src/datadogV2/model/model_aws_cur_config_attributes.rs index 6a3408072..1883329e2 100644 --- a/src/datadogV2/model/model_aws_cur_config_attributes.rs +++ b/src/datadogV2/model/model_aws_cur_config_attributes.rs @@ -68,4 +68,34 @@ impl AwsCURConfigAttributes { updated_at: None, } } + + #[allow(deprecated)] + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_error_messages(&mut self, value: Vec) -> &mut Self { + self.error_messages = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_months(&mut self, value: i32) -> &mut Self { + self.months = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_status_updated_at(&mut self, value: String) -> &mut Self { + self.status_updated_at = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_updated_at(&mut self, value: String) -> &mut Self { + self.updated_at = Some(value); + self + } } diff --git a/src/datadogV2/model/model_aws_cur_config_patch_data.rs b/src/datadogV2/model/model_aws_cur_config_patch_data.rs index 9bbc6987b..5327dd3cc 100644 --- a/src/datadogV2/model/model_aws_cur_config_patch_data.rs +++ b/src/datadogV2/model/model_aws_cur_config_patch_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct AwsCURConfigPatchData { /// Attributes for AWS CUR config Patch Request. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::AwsCURConfigPatchRequestAttributes, /// Type of AWS CUR config Patch Request. #[serde(rename = "type")] pub type_: crate::datadogV2::model::AwsCURConfigPatchRequestType, @@ -18,7 +18,7 @@ pub struct AwsCURConfigPatchData { impl AwsCURConfigPatchData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::AwsCURConfigPatchRequestAttributes, type_: crate::datadogV2::model::AwsCURConfigPatchRequestType, ) -> AwsCURConfigPatchData { AwsCURConfigPatchData { attributes, type_ } diff --git a/src/datadogV2/model/model_aws_cur_config_patch_request.rs b/src/datadogV2/model/model_aws_cur_config_patch_request.rs index 3b9fac3b4..34afec3f7 100644 --- a/src/datadogV2/model/model_aws_cur_config_patch_request.rs +++ b/src/datadogV2/model/model_aws_cur_config_patch_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct AwsCURConfigPatchRequest { /// AWS CUR config Patch data. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::AwsCURConfigPatchData, } impl AwsCURConfigPatchRequest { - pub fn new( - data: Box, - ) -> AwsCURConfigPatchRequest { + pub fn new(data: crate::datadogV2::model::AwsCURConfigPatchData) -> AwsCURConfigPatchRequest { AwsCURConfigPatchRequest { data } } } diff --git a/src/datadogV2/model/model_aws_cur_config_post_data.rs b/src/datadogV2/model/model_aws_cur_config_post_data.rs index 947799172..6991e9195 100644 --- a/src/datadogV2/model/model_aws_cur_config_post_data.rs +++ b/src/datadogV2/model/model_aws_cur_config_post_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct AwsCURConfigPostData { /// Attributes for AWS CUR config Post Request. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::AwsCURConfigPostRequestAttributes, /// Type of AWS CUR config Post Request. #[serde(rename = "type")] pub type_: crate::datadogV2::model::AwsCURConfigPostRequestType, @@ -18,7 +18,7 @@ pub struct AwsCURConfigPostData { impl AwsCURConfigPostData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::AwsCURConfigPostRequestAttributes, type_: crate::datadogV2::model::AwsCURConfigPostRequestType, ) -> AwsCURConfigPostData { AwsCURConfigPostData { attributes, type_ } diff --git a/src/datadogV2/model/model_aws_cur_config_post_request.rs b/src/datadogV2/model/model_aws_cur_config_post_request.rs index a1e5f51c9..d8cd1ee5b 100644 --- a/src/datadogV2/model/model_aws_cur_config_post_request.rs +++ b/src/datadogV2/model/model_aws_cur_config_post_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct AwsCURConfigPostRequest { /// AWS CUR config Post data. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::AwsCURConfigPostData, } impl AwsCURConfigPostRequest { - pub fn new( - data: Box, - ) -> AwsCURConfigPostRequest { + pub fn new(data: crate::datadogV2::model::AwsCURConfigPostData) -> AwsCURConfigPostRequest { AwsCURConfigPostRequest { data } } } diff --git a/src/datadogV2/model/model_aws_cur_config_post_request_attributes.rs b/src/datadogV2/model/model_aws_cur_config_post_request_attributes.rs index d6536f58d..f205bc957 100644 --- a/src/datadogV2/model/model_aws_cur_config_post_request_attributes.rs +++ b/src/datadogV2/model/model_aws_cur_config_post_request_attributes.rs @@ -48,4 +48,19 @@ impl AwsCURConfigPostRequestAttributes { report_prefix, } } + + pub fn with_bucket_region(&mut self, value: String) -> &mut Self { + self.bucket_region = Some(value); + self + } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_months(&mut self, value: i32) -> &mut Self { + self.months = Some(value); + self + } } diff --git a/src/datadogV2/model/model_aws_cur_config_response.rs b/src/datadogV2/model/model_aws_cur_config_response.rs index 698e3a102..5487da009 100644 --- a/src/datadogV2/model/model_aws_cur_config_response.rs +++ b/src/datadogV2/model/model_aws_cur_config_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct AwsCURConfigResponse { /// AWS CUR config. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl AwsCURConfigResponse { pub fn new() -> AwsCURConfigResponse { AwsCURConfigResponse { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::AwsCURConfig) -> &mut Self { + self.data = Some(value); + self + } } impl Default for AwsCURConfigResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_aws_cur_configs_response.rs b/src/datadogV2/model/model_aws_cur_configs_response.rs index b74320cdf..ab79535fa 100644 --- a/src/datadogV2/model/model_aws_cur_configs_response.rs +++ b/src/datadogV2/model/model_aws_cur_configs_response.rs @@ -17,6 +17,11 @@ impl AwsCURConfigsResponse { pub fn new() -> AwsCURConfigsResponse { AwsCURConfigsResponse { data: None } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } } impl Default for AwsCURConfigsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_aws_related_account.rs b/src/datadogV2/model/model_aws_related_account.rs index 66d4b2ef2..4fc88900b 100644 --- a/src/datadogV2/model/model_aws_related_account.rs +++ b/src/datadogV2/model/model_aws_related_account.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct AWSRelatedAccount { /// Attributes for an AWS related account. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The AWS account ID. #[serde(rename = "id")] pub id: String, @@ -30,4 +30,12 @@ impl AWSRelatedAccount { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::AWSRelatedAccountAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } } diff --git a/src/datadogV2/model/model_aws_related_account_attributes.rs b/src/datadogV2/model/model_aws_related_account_attributes.rs index fe7aaa9a9..d8b308e93 100644 --- a/src/datadogV2/model/model_aws_related_account_attributes.rs +++ b/src/datadogV2/model/model_aws_related_account_attributes.rs @@ -23,6 +23,16 @@ impl AWSRelatedAccountAttributes { name: None, } } + + pub fn with_has_datadog_integration(&mut self, value: bool) -> &mut Self { + self.has_datadog_integration = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } impl Default for AWSRelatedAccountAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_aws_related_accounts_response.rs b/src/datadogV2/model/model_aws_related_accounts_response.rs index a1c03719b..75a6faad8 100644 --- a/src/datadogV2/model/model_aws_related_accounts_response.rs +++ b/src/datadogV2/model/model_aws_related_accounts_response.rs @@ -17,6 +17,14 @@ impl AWSRelatedAccountsResponse { pub fn new() -> AWSRelatedAccountsResponse { AWSRelatedAccountsResponse { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for AWSRelatedAccountsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_azure_uc_config.rs b/src/datadogV2/model/model_azure_uc_config.rs index a2beb9df4..7643eca23 100644 --- a/src/datadogV2/model/model_azure_uc_config.rs +++ b/src/datadogV2/model/model_azure_uc_config.rs @@ -87,4 +87,40 @@ impl AzureUCConfig { updated_at: None, } } + + #[allow(deprecated)] + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_error_messages(&mut self, value: Vec) -> &mut Self { + self.error_messages = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_months(&mut self, value: i32) -> &mut Self { + self.months = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_status_updated_at(&mut self, value: String) -> &mut Self { + self.status_updated_at = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_updated_at(&mut self, value: String) -> &mut Self { + self.updated_at = Some(value); + self + } } diff --git a/src/datadogV2/model/model_azure_uc_config_pair.rs b/src/datadogV2/model/model_azure_uc_config_pair.rs index fb61c4116..ea6f9dc91 100644 --- a/src/datadogV2/model/model_azure_uc_config_pair.rs +++ b/src/datadogV2/model/model_azure_uc_config_pair.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct AzureUCConfigPair { /// Attributes for Azure config pair. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::AzureUCConfigPairAttributes, /// The ID of Cloud Cost Management account. #[serde(rename = "id")] pub id: Option, @@ -21,7 +21,7 @@ pub struct AzureUCConfigPair { impl AzureUCConfigPair { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::AzureUCConfigPairAttributes, type_: crate::datadogV2::model::AzureUCConfigPairType, ) -> AzureUCConfigPair { AzureUCConfigPair { @@ -30,4 +30,9 @@ impl AzureUCConfigPair { type_, } } + + pub fn with_id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } } diff --git a/src/datadogV2/model/model_azure_uc_config_pair_attributes.rs b/src/datadogV2/model/model_azure_uc_config_pair_attributes.rs index 23de99832..02828e05b 100644 --- a/src/datadogV2/model/model_azure_uc_config_pair_attributes.rs +++ b/src/datadogV2/model/model_azure_uc_config_pair_attributes.rs @@ -22,4 +22,9 @@ impl AzureUCConfigPairAttributes { ) -> AzureUCConfigPairAttributes { AzureUCConfigPairAttributes { configs, id: None } } + + pub fn with_id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } } diff --git a/src/datadogV2/model/model_azure_uc_config_pairs_response.rs b/src/datadogV2/model/model_azure_uc_config_pairs_response.rs index 2eef1178a..274b9cfef 100644 --- a/src/datadogV2/model/model_azure_uc_config_pairs_response.rs +++ b/src/datadogV2/model/model_azure_uc_config_pairs_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct AzureUCConfigPairsResponse { /// Azure config pair. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl AzureUCConfigPairsResponse { pub fn new() -> AzureUCConfigPairsResponse { AzureUCConfigPairsResponse { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::AzureUCConfigPair) -> &mut Self { + self.data = Some(value); + self + } } impl Default for AzureUCConfigPairsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_azure_uc_config_patch_data.rs b/src/datadogV2/model/model_azure_uc_config_patch_data.rs index 92623f532..dc0d3fe58 100644 --- a/src/datadogV2/model/model_azure_uc_config_patch_data.rs +++ b/src/datadogV2/model/model_azure_uc_config_patch_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct AzureUCConfigPatchData { /// Attributes for Azure config Patch Request. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::AzureUCConfigPatchRequestAttributes, /// Type of Azure config Patch Request. #[serde(rename = "type")] pub type_: crate::datadogV2::model::AzureUCConfigPatchRequestType, @@ -18,7 +18,7 @@ pub struct AzureUCConfigPatchData { impl AzureUCConfigPatchData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::AzureUCConfigPatchRequestAttributes, type_: crate::datadogV2::model::AzureUCConfigPatchRequestType, ) -> AzureUCConfigPatchData { AzureUCConfigPatchData { attributes, type_ } diff --git a/src/datadogV2/model/model_azure_uc_config_patch_request.rs b/src/datadogV2/model/model_azure_uc_config_patch_request.rs index 44657e03b..22f8af78c 100644 --- a/src/datadogV2/model/model_azure_uc_config_patch_request.rs +++ b/src/datadogV2/model/model_azure_uc_config_patch_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct AzureUCConfigPatchRequest { /// Azure config Patch data. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::AzureUCConfigPatchData, } impl AzureUCConfigPatchRequest { - pub fn new( - data: Box, - ) -> AzureUCConfigPatchRequest { + pub fn new(data: crate::datadogV2::model::AzureUCConfigPatchData) -> AzureUCConfigPatchRequest { AzureUCConfigPatchRequest { data } } } diff --git a/src/datadogV2/model/model_azure_uc_config_post_data.rs b/src/datadogV2/model/model_azure_uc_config_post_data.rs index 2ed4e0b5f..433941067 100644 --- a/src/datadogV2/model/model_azure_uc_config_post_data.rs +++ b/src/datadogV2/model/model_azure_uc_config_post_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct AzureUCConfigPostData { /// Attributes for Azure config Post Request. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::AzureUCConfigPostRequestAttributes, /// Type of Azure config Post Request. #[serde(rename = "type")] pub type_: crate::datadogV2::model::AzureUCConfigPostRequestType, @@ -18,7 +18,7 @@ pub struct AzureUCConfigPostData { impl AzureUCConfigPostData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::AzureUCConfigPostRequestAttributes, type_: crate::datadogV2::model::AzureUCConfigPostRequestType, ) -> AzureUCConfigPostData { AzureUCConfigPostData { attributes, type_ } diff --git a/src/datadogV2/model/model_azure_uc_config_post_request.rs b/src/datadogV2/model/model_azure_uc_config_post_request.rs index 1655a0105..efd187737 100644 --- a/src/datadogV2/model/model_azure_uc_config_post_request.rs +++ b/src/datadogV2/model/model_azure_uc_config_post_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct AzureUCConfigPostRequest { /// Azure config Post data. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::AzureUCConfigPostData, } impl AzureUCConfigPostRequest { - pub fn new( - data: Box, - ) -> AzureUCConfigPostRequest { + pub fn new(data: crate::datadogV2::model::AzureUCConfigPostData) -> AzureUCConfigPostRequest { AzureUCConfigPostRequest { data } } } diff --git a/src/datadogV2/model/model_azure_uc_config_post_request_attributes.rs b/src/datadogV2/model/model_azure_uc_config_post_request_attributes.rs index 9a0197d22..b1268f989 100644 --- a/src/datadogV2/model/model_azure_uc_config_post_request_attributes.rs +++ b/src/datadogV2/model/model_azure_uc_config_post_request_attributes.rs @@ -13,10 +13,10 @@ pub struct AzureUCConfigPostRequestAttributes { pub account_id: String, /// Bill config. #[serde(rename = "actual_bill_config")] - pub actual_bill_config: Box, + pub actual_bill_config: crate::datadogV2::model::BillConfig, /// Bill config. #[serde(rename = "amortized_bill_config")] - pub amortized_bill_config: Box, + pub amortized_bill_config: crate::datadogV2::model::BillConfig, /// The client ID of the azure account. #[serde(rename = "client_id")] pub client_id: String, @@ -31,8 +31,8 @@ pub struct AzureUCConfigPostRequestAttributes { impl AzureUCConfigPostRequestAttributes { pub fn new( account_id: String, - actual_bill_config: Box, - amortized_bill_config: Box, + actual_bill_config: crate::datadogV2::model::BillConfig, + amortized_bill_config: crate::datadogV2::model::BillConfig, client_id: String, scope: String, ) -> AzureUCConfigPostRequestAttributes { @@ -45,4 +45,9 @@ impl AzureUCConfigPostRequestAttributes { scope, } } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } } diff --git a/src/datadogV2/model/model_azure_uc_configs_response.rs b/src/datadogV2/model/model_azure_uc_configs_response.rs index 39cb390ce..9ab6a206f 100644 --- a/src/datadogV2/model/model_azure_uc_configs_response.rs +++ b/src/datadogV2/model/model_azure_uc_configs_response.rs @@ -17,6 +17,14 @@ impl AzureUCConfigsResponse { pub fn new() -> AzureUCConfigsResponse { AzureUCConfigsResponse { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for AzureUCConfigsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_bulk_mute_findings_request.rs b/src/datadogV2/model/model_bulk_mute_findings_request.rs index 1ee687ac0..08071742f 100644 --- a/src/datadogV2/model/model_bulk_mute_findings_request.rs +++ b/src/datadogV2/model/model_bulk_mute_findings_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct BulkMuteFindingsRequest { /// Data object containing the new bulk mute properties of the finding. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::BulkMuteFindingsRequestData, } impl BulkMuteFindingsRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::BulkMuteFindingsRequestData, ) -> BulkMuteFindingsRequest { BulkMuteFindingsRequest { data } } diff --git a/src/datadogV2/model/model_bulk_mute_findings_request_attributes.rs b/src/datadogV2/model/model_bulk_mute_findings_request_attributes.rs index 3577f21b8..223a41749 100644 --- a/src/datadogV2/model/model_bulk_mute_findings_request_attributes.rs +++ b/src/datadogV2/model/model_bulk_mute_findings_request_attributes.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct BulkMuteFindingsRequestAttributes { /// Object containing the new mute properties of the findings. #[serde(rename = "mute")] - pub mute: Box, + pub mute: crate::datadogV2::model::BulkMuteFindingsRequestProperties, } impl BulkMuteFindingsRequestAttributes { pub fn new( - mute: Box, + mute: crate::datadogV2::model::BulkMuteFindingsRequestProperties, ) -> BulkMuteFindingsRequestAttributes { BulkMuteFindingsRequestAttributes { mute } } diff --git a/src/datadogV2/model/model_bulk_mute_findings_request_data.rs b/src/datadogV2/model/model_bulk_mute_findings_request_data.rs index c9defe6c2..6e172d287 100644 --- a/src/datadogV2/model/model_bulk_mute_findings_request_data.rs +++ b/src/datadogV2/model/model_bulk_mute_findings_request_data.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct BulkMuteFindingsRequestData { /// The mute properties to be updated. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::BulkMuteFindingsRequestAttributes, /// UUID to identify the request #[serde(rename = "id")] pub id: String, /// Meta object containing the findings to be updated. #[serde(rename = "meta")] - pub meta: Box, + pub meta: crate::datadogV2::model::BulkMuteFindingsRequestMeta, /// The JSON:API type for findings. #[serde(rename = "type")] pub type_: crate::datadogV2::model::FindingType, @@ -24,9 +24,9 @@ pub struct BulkMuteFindingsRequestData { impl BulkMuteFindingsRequestData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::BulkMuteFindingsRequestAttributes, id: String, - meta: Box, + meta: crate::datadogV2::model::BulkMuteFindingsRequestMeta, type_: crate::datadogV2::model::FindingType, ) -> BulkMuteFindingsRequestData { BulkMuteFindingsRequestData { diff --git a/src/datadogV2/model/model_bulk_mute_findings_request_meta.rs b/src/datadogV2/model/model_bulk_mute_findings_request_meta.rs index 6e95b4c02..9dfd313d5 100644 --- a/src/datadogV2/model/model_bulk_mute_findings_request_meta.rs +++ b/src/datadogV2/model/model_bulk_mute_findings_request_meta.rs @@ -17,6 +17,14 @@ impl BulkMuteFindingsRequestMeta { pub fn new() -> BulkMuteFindingsRequestMeta { BulkMuteFindingsRequestMeta { findings: None } } + + pub fn with_findings( + &mut self, + value: Vec, + ) -> &mut Self { + self.findings = Some(value); + self + } } impl Default for BulkMuteFindingsRequestMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_bulk_mute_findings_request_meta_findings.rs b/src/datadogV2/model/model_bulk_mute_findings_request_meta_findings.rs index d2be07210..3690df1a8 100644 --- a/src/datadogV2/model/model_bulk_mute_findings_request_meta_findings.rs +++ b/src/datadogV2/model/model_bulk_mute_findings_request_meta_findings.rs @@ -17,6 +17,11 @@ impl BulkMuteFindingsRequestMetaFindings { pub fn new() -> BulkMuteFindingsRequestMetaFindings { BulkMuteFindingsRequestMetaFindings { finding_id: None } } + + pub fn with_finding_id(&mut self, value: String) -> &mut Self { + self.finding_id = Some(value); + self + } } impl Default for BulkMuteFindingsRequestMetaFindings { fn default() -> Self { diff --git a/src/datadogV2/model/model_bulk_mute_findings_request_properties.rs b/src/datadogV2/model/model_bulk_mute_findings_request_properties.rs index 92afcb74b..98365c6c8 100644 --- a/src/datadogV2/model/model_bulk_mute_findings_request_properties.rs +++ b/src/datadogV2/model/model_bulk_mute_findings_request_properties.rs @@ -36,4 +36,14 @@ impl BulkMuteFindingsRequestProperties { reason, } } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_expiration_date(&mut self, value: i64) -> &mut Self { + self.expiration_date = Some(value); + self + } } diff --git a/src/datadogV2/model/model_bulk_mute_findings_response.rs b/src/datadogV2/model/model_bulk_mute_findings_response.rs index 0426bc514..5ff9921ee 100644 --- a/src/datadogV2/model/model_bulk_mute_findings_response.rs +++ b/src/datadogV2/model/model_bulk_mute_findings_response.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct BulkMuteFindingsResponse { /// Data object containing the ID of the request that was updated. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::BulkMuteFindingsResponseData, } impl BulkMuteFindingsResponse { pub fn new( - data: Box, + data: crate::datadogV2::model::BulkMuteFindingsResponseData, ) -> BulkMuteFindingsResponse { BulkMuteFindingsResponse { data } } diff --git a/src/datadogV2/model/model_bulk_mute_findings_response_data.rs b/src/datadogV2/model/model_bulk_mute_findings_response_data.rs index 3abe35bd9..66f6a33bd 100644 --- a/src/datadogV2/model/model_bulk_mute_findings_response_data.rs +++ b/src/datadogV2/model/model_bulk_mute_findings_response_data.rs @@ -23,6 +23,16 @@ impl BulkMuteFindingsResponseData { type_: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::FindingType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for BulkMuteFindingsResponseData { fn default() -> Self { diff --git a/src/datadogV2/model/model_chargeback_breakdown.rs b/src/datadogV2/model/model_chargeback_breakdown.rs index 6c92f6121..86282d4a1 100644 --- a/src/datadogV2/model/model_chargeback_breakdown.rs +++ b/src/datadogV2/model/model_chargeback_breakdown.rs @@ -27,6 +27,21 @@ impl ChargebackBreakdown { product_name: None, } } + + pub fn with_charge_type(&mut self, value: String) -> &mut Self { + self.charge_type = Some(value); + self + } + + pub fn with_cost(&mut self, value: f64) -> &mut Self { + self.cost = Some(value); + self + } + + pub fn with_product_name(&mut self, value: String) -> &mut Self { + self.product_name = Some(value); + self + } } impl Default for ChargebackBreakdown { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_aggregate_bucket_value_timeseries_point.rs b/src/datadogV2/model/model_ci_app_aggregate_bucket_value_timeseries_point.rs index c84cceda4..088baaa58 100644 --- a/src/datadogV2/model/model_ci_app_aggregate_bucket_value_timeseries_point.rs +++ b/src/datadogV2/model/model_ci_app_aggregate_bucket_value_timeseries_point.rs @@ -23,6 +23,16 @@ impl CIAppAggregateBucketValueTimeseriesPoint { value: None, } } + + pub fn with_time(&mut self, value: String) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_value(&mut self, value: f64) -> &mut Self { + self.value = Some(value); + self + } } impl Default for CIAppAggregateBucketValueTimeseriesPoint { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_aggregate_sort.rs b/src/datadogV2/model/model_ci_app_aggregate_sort.rs index e3596060c..efbd911f8 100644 --- a/src/datadogV2/model/model_ci_app_aggregate_sort.rs +++ b/src/datadogV2/model/model_ci_app_aggregate_sort.rs @@ -31,6 +31,32 @@ impl CIAppAggregateSort { type_: None, } } + + pub fn with_aggregation( + &mut self, + value: crate::datadogV2::model::CIAppAggregationFunction, + ) -> &mut Self { + self.aggregation = Some(value); + self + } + + pub fn with_metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn with_order(&mut self, value: crate::datadogV2::model::CIAppSortOrder) -> &mut Self { + self.order = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::CIAppAggregateSortType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for CIAppAggregateSort { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_ci_error.rs b/src/datadogV2/model/model_ci_app_ci_error.rs index c55201d84..57b86ff30 100644 --- a/src/datadogV2/model/model_ci_app_ci_error.rs +++ b/src/datadogV2/model/model_ci_app_ci_error.rs @@ -35,6 +35,26 @@ impl CIAppCIError { type_: None, } } + + pub fn with_domain(&mut self, value: crate::datadogV2::model::CIAppCIErrorDomain) -> &mut Self { + self.domain = Some(value); + self + } + + pub fn with_message(&mut self, value: Option) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_stack(&mut self, value: Option) -> &mut Self { + self.stack = Some(value); + self + } + + pub fn with_type_(&mut self, value: Option) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for CIAppCIError { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_compute.rs b/src/datadogV2/model/model_ci_app_compute.rs index f8e2f3308..cfd1a8721 100644 --- a/src/datadogV2/model/model_ci_app_compute.rs +++ b/src/datadogV2/model/model_ci_app_compute.rs @@ -32,4 +32,19 @@ impl CIAppCompute { type_: None, } } + + pub fn with_interval(&mut self, value: String) -> &mut Self { + self.interval = Some(value); + self + } + + pub fn with_metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::CIAppComputeType) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV2/model/model_ci_app_create_pipeline_event_request.rs b/src/datadogV2/model/model_ci_app_create_pipeline_event_request.rs index cb8700839..342e5632b 100644 --- a/src/datadogV2/model/model_ci_app_create_pipeline_event_request.rs +++ b/src/datadogV2/model/model_ci_app_create_pipeline_event_request.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct CIAppCreatePipelineEventRequest { /// Data of the pipeline event to create. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl CIAppCreatePipelineEventRequest { pub fn new() -> CIAppCreatePipelineEventRequest { CIAppCreatePipelineEventRequest { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::CIAppCreatePipelineEventRequestData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for CIAppCreatePipelineEventRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes.rs b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes.rs index 8f60dbe8f..7a593a11c 100644 --- a/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes.rs +++ b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes.rs @@ -13,7 +13,7 @@ pub struct CIAppCreatePipelineEventRequestAttributes { pub env: Option, /// Details of the CI pipeline event. #[serde(rename = "resource")] - pub resource: Box, + pub resource: crate::datadogV2::model::CIAppCreatePipelineEventRequestAttributesResource, /// If the CI provider is SaaS, use this to differentiate between instances. #[serde(rename = "service")] pub service: Option, @@ -21,7 +21,7 @@ pub struct CIAppCreatePipelineEventRequestAttributes { impl CIAppCreatePipelineEventRequestAttributes { pub fn new( - resource: Box, + resource: crate::datadogV2::model::CIAppCreatePipelineEventRequestAttributesResource, ) -> CIAppCreatePipelineEventRequestAttributes { CIAppCreatePipelineEventRequestAttributes { env: None, @@ -29,4 +29,14 @@ impl CIAppCreatePipelineEventRequestAttributes { service: None, } } + + pub fn with_env(&mut self, value: String) -> &mut Self { + self.env = Some(value); + self + } + + pub fn with_service(&mut self, value: String) -> &mut Self { + self.service = Some(value); + self + } } diff --git a/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes_resource.rs b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes_resource.rs index a9761cd1d..f61fa0ca2 100644 --- a/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes_resource.rs +++ b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes_resource.rs @@ -7,8 +7,8 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum CIAppCreatePipelineEventRequestAttributesResource { - CIAppPipelineEventPipeline(Box), - CIAppPipelineEventStage(Box), - CIAppPipelineEventJob(Box), - CIAppPipelineEventStep(Box), + CIAppPipelineEventPipeline(crate::datadogV2::model::CIAppPipelineEventPipeline), + CIAppPipelineEventStage(crate::datadogV2::model::CIAppPipelineEventStage), + CIAppPipelineEventJob(crate::datadogV2::model::CIAppPipelineEventJob), + CIAppPipelineEventStep(crate::datadogV2::model::CIAppPipelineEventStep), } diff --git a/src/datadogV2/model/model_ci_app_create_pipeline_event_request_data.rs b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_data.rs index f71d5807e..4a1d757ea 100644 --- a/src/datadogV2/model/model_ci_app_create_pipeline_event_request_data.rs +++ b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct CIAppCreatePipelineEventRequestData { /// Attributes of the pipeline event to create. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Type of the event. #[serde(rename = "type")] pub type_: Option, @@ -23,6 +23,22 @@ impl CIAppCreatePipelineEventRequestData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::CIAppCreatePipelineEventRequestAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::CIAppCreatePipelineEventRequestDataType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for CIAppCreatePipelineEventRequestData { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_event_attributes.rs b/src/datadogV2/model/model_ci_app_event_attributes.rs index 3a8047dc9..db2972ba8 100644 --- a/src/datadogV2/model/model_ci_app_event_attributes.rs +++ b/src/datadogV2/model/model_ci_app_event_attributes.rs @@ -27,6 +27,24 @@ impl CIAppEventAttributes { test_level: None, } } + + pub fn with_attributes( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_test_level(&mut self, value: crate::datadogV2::model::CIAppTestLevel) -> &mut Self { + self.test_level = Some(value); + self + } } impl Default for CIAppEventAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_git_info.rs b/src/datadogV2/model/model_ci_app_git_info.rs index 79c1bb379..ad250c258 100644 --- a/src/datadogV2/model/model_ci_app_git_info.rs +++ b/src/datadogV2/model/model_ci_app_git_info.rs @@ -92,4 +92,49 @@ impl CIAppGitInfo { tag: None, } } + + pub fn with_author_name(&mut self, value: Option) -> &mut Self { + self.author_name = Some(value); + self + } + + pub fn with_author_time(&mut self, value: Option) -> &mut Self { + self.author_time = Some(value); + self + } + + pub fn with_branch(&mut self, value: Option) -> &mut Self { + self.branch = Some(value); + self + } + + pub fn with_commit_time(&mut self, value: Option) -> &mut Self { + self.commit_time = Some(value); + self + } + + pub fn with_committer_email(&mut self, value: Option) -> &mut Self { + self.committer_email = Some(value); + self + } + + pub fn with_committer_name(&mut self, value: Option) -> &mut Self { + self.committer_name = Some(value); + self + } + + pub fn with_default_branch(&mut self, value: Option) -> &mut Self { + self.default_branch = Some(value); + self + } + + pub fn with_message(&mut self, value: Option) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_tag(&mut self, value: Option) -> &mut Self { + self.tag = Some(value); + self + } } diff --git a/src/datadogV2/model/model_ci_app_host_info.rs b/src/datadogV2/model/model_ci_app_host_info.rs index f452705d1..ab3a6a8e6 100644 --- a/src/datadogV2/model/model_ci_app_host_info.rs +++ b/src/datadogV2/model/model_ci_app_host_info.rs @@ -31,6 +31,26 @@ impl CIAppHostInfo { workspace: None, } } + + pub fn with_hostname(&mut self, value: String) -> &mut Self { + self.hostname = Some(value); + self + } + + pub fn with_labels(&mut self, value: Vec) -> &mut Self { + self.labels = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_workspace(&mut self, value: String) -> &mut Self { + self.workspace = Some(value); + self + } } impl Default for CIAppHostInfo { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_pipeline_event.rs b/src/datadogV2/model/model_ci_app_pipeline_event.rs index be1a3c8b4..48f40de9e 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_event.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_event.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct CIAppPipelineEvent { /// JSON object containing all event attributes and their associated values. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Unique ID of the event. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,27 @@ impl CIAppPipelineEvent { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::CIAppPipelineEventAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::CIAppPipelineEventTypeName, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for CIAppPipelineEvent { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_attributes.rs b/src/datadogV2/model/model_ci_app_pipeline_event_attributes.rs index 1dbade366..225b392e4 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_event_attributes.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_event_attributes.rs @@ -27,6 +27,27 @@ impl CIAppPipelineEventAttributes { tags: None, } } + + pub fn with_attributes( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_ci_level( + &mut self, + value: crate::datadogV2::model::CIAppPipelineLevel, + ) -> &mut Self { + self.ci_level = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } impl Default for CIAppPipelineEventAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_job.rs b/src/datadogV2/model/model_ci_app_pipeline_event_job.rs index 9a032a5ef..cd223e9b0 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_event_job.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_event_job.rs @@ -20,11 +20,11 @@ pub struct CIAppPipelineEventJob { pub end: String, /// Contains information of the CI error. #[serde(rename = "error", default, with = "::serde_with::rust::double_option")] - pub error: Option>>, + pub error: Option>, /// If pipelines are triggered due to actions to a Git repository, then all payloads must contain this. /// Note that either `tag` or `branch` has to be provided, but not both. #[serde(rename = "git", default, with = "::serde_with::rust::double_option")] - pub git: Option>>, + pub git: Option>, /// The UUID for the job. It has to be unique within each pipeline execution. #[serde(rename = "id")] pub id: String, @@ -43,7 +43,7 @@ pub struct CIAppPipelineEventJob { pub name: String, /// Contains information of the host running the pipeline, stage, job, or step. #[serde(rename = "node", default, with = "::serde_with::rust::double_option")] - pub node: Option>>, + pub node: Option>, /// A map of key-value parameters or environment variables that were defined for the pipeline. #[serde( rename = "parameters", @@ -126,4 +126,63 @@ impl CIAppPipelineEventJob { url, } } + + pub fn with_dependencies(&mut self, value: Option>) -> &mut Self { + self.dependencies = Some(value); + self + } + + pub fn with_error( + &mut self, + value: Option, + ) -> &mut Self { + self.error = Some(value); + self + } + + pub fn with_git(&mut self, value: Option) -> &mut Self { + self.git = Some(value); + self + } + + pub fn with_metrics(&mut self, value: Option>) -> &mut Self { + self.metrics = Some(value); + self + } + + pub fn with_node( + &mut self, + value: Option, + ) -> &mut Self { + self.node = Some(value); + self + } + + pub fn with_parameters( + &mut self, + value: Option>, + ) -> &mut Self { + self.parameters = Some(value); + self + } + + pub fn with_queue_time(&mut self, value: Option) -> &mut Self { + self.queue_time = Some(value); + self + } + + pub fn with_stage_id(&mut self, value: Option) -> &mut Self { + self.stage_id = Some(value); + self + } + + pub fn with_stage_name(&mut self, value: Option) -> &mut Self { + self.stage_name = Some(value); + self + } + + pub fn with_tags(&mut self, value: Option>) -> &mut Self { + self.tags = Some(value); + self + } } diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_parent_pipeline.rs b/src/datadogV2/model/model_ci_app_pipeline_event_parent_pipeline.rs index 8d1ea4ac8..367cc4567 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_event_parent_pipeline.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_event_parent_pipeline.rs @@ -20,4 +20,9 @@ impl CIAppPipelineEventParentPipeline { pub fn new(id: String) -> CIAppPipelineEventParentPipeline { CIAppPipelineEventParentPipeline { id, url: None } } + + pub fn with_url(&mut self, value: String) -> &mut Self { + self.url = Some(value); + self + } } diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_pipeline.rs b/src/datadogV2/model/model_ci_app_pipeline_event_pipeline.rs index 17c3f6e15..bddb33b7e 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_event_pipeline.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_event_pipeline.rs @@ -13,11 +13,11 @@ pub struct CIAppPipelineEventPipeline { pub end: String, /// Contains information of the CI error. #[serde(rename = "error", default, with = "::serde_with::rust::double_option")] - pub error: Option>>, + pub error: Option>, /// If pipelines are triggered due to actions to a Git repository, then all payloads must contain this. /// Note that either `tag` or `branch` has to be provided, but not both. #[serde(rename = "git", default, with = "::serde_with::rust::double_option")] - pub git: Option>>, + pub git: Option>, /// Whether or not the pipeline was triggered manually by the user. #[serde( rename = "is_manual", @@ -47,7 +47,7 @@ pub struct CIAppPipelineEventPipeline { pub name: String, /// Contains information of the host running the pipeline, stage, job, or step. #[serde(rename = "node", default, with = "::serde_with::rust::double_option")] - pub node: Option>>, + pub node: Option>, /// A map of key-value parameters or environment variables that were defined for the pipeline. #[serde( rename = "parameters", @@ -61,8 +61,7 @@ pub struct CIAppPipelineEventPipeline { default, with = "::serde_with::rust::double_option" )] - pub parent_pipeline: - Option>>, + pub parent_pipeline: Option>, /// Whether or not the pipeline was a partial retry of a previous attempt. A partial retry is one /// which only runs a subset of the original jobs. #[serde(rename = "partial_retry")] @@ -78,7 +77,7 @@ pub struct CIAppPipelineEventPipeline { with = "::serde_with::rust::double_option" )] pub previous_attempt: - Option>>, + Option>, /// The queue time in milliseconds, if applicable. #[serde( rename = "queue_time", @@ -138,4 +137,79 @@ impl CIAppPipelineEventPipeline { url, } } + + pub fn with_error( + &mut self, + value: Option, + ) -> &mut Self { + self.error = Some(value); + self + } + + pub fn with_git(&mut self, value: Option) -> &mut Self { + self.git = Some(value); + self + } + + pub fn with_is_manual(&mut self, value: Option) -> &mut Self { + self.is_manual = Some(value); + self + } + + pub fn with_is_resumed(&mut self, value: Option) -> &mut Self { + self.is_resumed = Some(value); + self + } + + pub fn with_metrics(&mut self, value: Option>) -> &mut Self { + self.metrics = Some(value); + self + } + + pub fn with_node( + &mut self, + value: Option, + ) -> &mut Self { + self.node = Some(value); + self + } + + pub fn with_parameters( + &mut self, + value: Option>, + ) -> &mut Self { + self.parameters = Some(value); + self + } + + pub fn with_parent_pipeline( + &mut self, + value: Option, + ) -> &mut Self { + self.parent_pipeline = Some(value); + self + } + + pub fn with_pipeline_id(&mut self, value: String) -> &mut Self { + self.pipeline_id = Some(value); + self + } + + pub fn with_previous_attempt( + &mut self, + value: Option, + ) -> &mut Self { + self.previous_attempt = Some(value); + self + } + + pub fn with_queue_time(&mut self, value: Option) -> &mut Self { + self.queue_time = Some(value); + self + } + + pub fn with_tags(&mut self, value: Option>) -> &mut Self { + self.tags = Some(value); + self + } } diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_previous_pipeline.rs b/src/datadogV2/model/model_ci_app_pipeline_event_previous_pipeline.rs index 39459cacc..127649b4c 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_event_previous_pipeline.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_event_previous_pipeline.rs @@ -20,4 +20,9 @@ impl CIAppPipelineEventPreviousPipeline { pub fn new(id: String) -> CIAppPipelineEventPreviousPipeline { CIAppPipelineEventPreviousPipeline { id, url: None } } + + pub fn with_url(&mut self, value: String) -> &mut Self { + self.url = Some(value); + self + } } diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_stage.rs b/src/datadogV2/model/model_ci_app_pipeline_event_stage.rs index 5026d123b..c1cc9645b 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_event_stage.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_event_stage.rs @@ -20,11 +20,11 @@ pub struct CIAppPipelineEventStage { pub end: String, /// Contains information of the CI error. #[serde(rename = "error", default, with = "::serde_with::rust::double_option")] - pub error: Option>>, + pub error: Option>, /// If pipelines are triggered due to actions to a Git repository, then all payloads must contain this. /// Note that either `tag` or `branch` has to be provided, but not both. #[serde(rename = "git", default, with = "::serde_with::rust::double_option")] - pub git: Option>>, + pub git: Option>, /// UUID for the stage. It has to be unique at least in the pipeline scope. #[serde(rename = "id")] pub id: String, @@ -43,7 +43,7 @@ pub struct CIAppPipelineEventStage { pub name: String, /// Contains information of the host running the pipeline, stage, job, or step. #[serde(rename = "node", default, with = "::serde_with::rust::double_option")] - pub node: Option>>, + pub node: Option>, /// A map of key-value parameters or environment variables that were defined for the pipeline. #[serde( rename = "parameters", @@ -105,4 +105,53 @@ impl CIAppPipelineEventStage { tags: None, } } + + pub fn with_dependencies(&mut self, value: Option>) -> &mut Self { + self.dependencies = Some(value); + self + } + + pub fn with_error( + &mut self, + value: Option, + ) -> &mut Self { + self.error = Some(value); + self + } + + pub fn with_git(&mut self, value: Option) -> &mut Self { + self.git = Some(value); + self + } + + pub fn with_metrics(&mut self, value: Option>) -> &mut Self { + self.metrics = Some(value); + self + } + + pub fn with_node( + &mut self, + value: Option, + ) -> &mut Self { + self.node = Some(value); + self + } + + pub fn with_parameters( + &mut self, + value: Option>, + ) -> &mut Self { + self.parameters = Some(value); + self + } + + pub fn with_queue_time(&mut self, value: Option) -> &mut Self { + self.queue_time = Some(value); + self + } + + pub fn with_tags(&mut self, value: Option>) -> &mut Self { + self.tags = Some(value); + self + } } diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_step.rs b/src/datadogV2/model/model_ci_app_pipeline_event_step.rs index cb6ec6026..d2ce212ec 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_event_step.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_event_step.rs @@ -13,11 +13,11 @@ pub struct CIAppPipelineEventStep { pub end: String, /// Contains information of the CI error. #[serde(rename = "error", default, with = "::serde_with::rust::double_option")] - pub error: Option>>, + pub error: Option>, /// If pipelines are triggered due to actions to a Git repository, then all payloads must contain this. /// Note that either `tag` or `branch` has to be provided, but not both. #[serde(rename = "git", default, with = "::serde_with::rust::double_option")] - pub git: Option>>, + pub git: Option>, /// UUID for the step. It has to be unique within each pipeline execution. #[serde(rename = "id")] pub id: String, @@ -46,7 +46,7 @@ pub struct CIAppPipelineEventStep { pub name: String, /// Contains information of the host running the pipeline, stage, job, or step. #[serde(rename = "node", default, with = "::serde_with::rust::double_option")] - pub node: Option>>, + pub node: Option>, /// A map of key-value parameters or environment variables that were defined for the pipeline. #[serde( rename = "parameters", @@ -121,4 +121,68 @@ impl CIAppPipelineEventStep { url: None, } } + + pub fn with_error( + &mut self, + value: Option, + ) -> &mut Self { + self.error = Some(value); + self + } + + pub fn with_git(&mut self, value: Option) -> &mut Self { + self.git = Some(value); + self + } + + pub fn with_job_id(&mut self, value: Option) -> &mut Self { + self.job_id = Some(value); + self + } + + pub fn with_job_name(&mut self, value: Option) -> &mut Self { + self.job_name = Some(value); + self + } + + pub fn with_metrics(&mut self, value: Option>) -> &mut Self { + self.metrics = Some(value); + self + } + + pub fn with_node( + &mut self, + value: Option, + ) -> &mut Self { + self.node = Some(value); + self + } + + pub fn with_parameters( + &mut self, + value: Option>, + ) -> &mut Self { + self.parameters = Some(value); + self + } + + pub fn with_stage_id(&mut self, value: Option) -> &mut Self { + self.stage_id = Some(value); + self + } + + pub fn with_stage_name(&mut self, value: Option) -> &mut Self { + self.stage_name = Some(value); + self + } + + pub fn with_tags(&mut self, value: Option>) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_url(&mut self, value: Option) -> &mut Self { + self.url = Some(value); + self + } } diff --git a/src/datadogV2/model/model_ci_app_pipeline_events_request.rs b/src/datadogV2/model/model_ci_app_pipeline_events_request.rs index 1f2800502..fd5d23004 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_events_request.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_events_request.rs @@ -10,14 +10,14 @@ use serde_with::skip_serializing_none; pub struct CIAppPipelineEventsRequest { /// The search and filter query settings. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// Global query options that are used during the query. /// Only supply timezone or time offset, not both. Otherwise, the query fails. #[serde(rename = "options")] - pub options: Option>, + pub options: Option, /// Paging attributes for listing events. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, /// Sort parameters when querying events. #[serde(rename = "sort")] pub sort: Option, @@ -32,6 +32,32 @@ impl CIAppPipelineEventsRequest { sort: None, } } + + pub fn with_filter( + &mut self, + value: crate::datadogV2::model::CIAppPipelinesQueryFilter, + ) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_options(&mut self, value: crate::datadogV2::model::CIAppQueryOptions) -> &mut Self { + self.options = Some(value); + self + } + + pub fn with_page( + &mut self, + value: crate::datadogV2::model::CIAppQueryPageOptions, + ) -> &mut Self { + self.page = Some(value); + self + } + + pub fn with_sort(&mut self, value: crate::datadogV2::model::CIAppSort) -> &mut Self { + self.sort = Some(value); + self + } } impl Default for CIAppPipelineEventsRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_pipeline_events_response.rs b/src/datadogV2/model/model_ci_app_pipeline_events_response.rs index 1ad813950..aea3e2287 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_events_response.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_events_response.rs @@ -13,10 +13,10 @@ pub struct CIAppPipelineEventsResponse { pub data: Option>, /// Links attributes. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, /// The metadata associated with a request. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl CIAppPipelineEventsResponse { @@ -27,6 +27,27 @@ impl CIAppPipelineEventsResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links(&mut self, value: crate::datadogV2::model::CIAppResponseLinks) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::CIAppResponseMetadataWithPagination, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for CIAppPipelineEventsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_pipelines_aggregate_request.rs b/src/datadogV2/model/model_ci_app_pipelines_aggregate_request.rs index f3aeff674..bb42236cb 100644 --- a/src/datadogV2/model/model_ci_app_pipelines_aggregate_request.rs +++ b/src/datadogV2/model/model_ci_app_pipelines_aggregate_request.rs @@ -13,14 +13,14 @@ pub struct CIAppPipelinesAggregateRequest { pub compute: Option>, /// The search and filter query settings. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// The rules for the group-by. #[serde(rename = "group_by")] pub group_by: Option>, /// Global query options that are used during the query. /// Only supply timezone or time offset, not both. Otherwise, the query fails. #[serde(rename = "options")] - pub options: Option>, + pub options: Option, } impl CIAppPipelinesAggregateRequest { @@ -32,6 +32,32 @@ impl CIAppPipelinesAggregateRequest { options: None, } } + + pub fn with_compute(&mut self, value: Vec) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn with_filter( + &mut self, + value: crate::datadogV2::model::CIAppPipelinesQueryFilter, + ) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn with_options(&mut self, value: crate::datadogV2::model::CIAppQueryOptions) -> &mut Self { + self.options = Some(value); + self + } } impl Default for CIAppPipelinesAggregateRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_pipelines_aggregation_buckets_response.rs b/src/datadogV2/model/model_ci_app_pipelines_aggregation_buckets_response.rs index 2016844a2..099f46465 100644 --- a/src/datadogV2/model/model_ci_app_pipelines_aggregation_buckets_response.rs +++ b/src/datadogV2/model/model_ci_app_pipelines_aggregation_buckets_response.rs @@ -17,6 +17,14 @@ impl CIAppPipelinesAggregationBucketsResponse { pub fn new() -> CIAppPipelinesAggregationBucketsResponse { CIAppPipelinesAggregationBucketsResponse { buckets: None } } + + pub fn with_buckets( + &mut self, + value: Vec, + ) -> &mut Self { + self.buckets = Some(value); + self + } } impl Default for CIAppPipelinesAggregationBucketsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_pipelines_analytics_aggregate_response.rs b/src/datadogV2/model/model_ci_app_pipelines_analytics_aggregate_response.rs index 34a297ae3..d70bcf959 100644 --- a/src/datadogV2/model/model_ci_app_pipelines_analytics_aggregate_response.rs +++ b/src/datadogV2/model/model_ci_app_pipelines_analytics_aggregate_response.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct CIAppPipelinesAnalyticsAggregateResponse { /// The query results. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// Links attributes. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, /// The metadata associated with a request. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl CIAppPipelinesAnalyticsAggregateResponse { @@ -27,6 +27,27 @@ impl CIAppPipelinesAnalyticsAggregateResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::CIAppPipelinesAggregationBucketsResponse, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links(&mut self, value: crate::datadogV2::model::CIAppResponseLinks) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::CIAppResponseMetadata, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for CIAppPipelinesAnalyticsAggregateResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_pipelines_bucket_response.rs b/src/datadogV2/model/model_ci_app_pipelines_bucket_response.rs index ff7f46dbc..f536f8f0b 100644 --- a/src/datadogV2/model/model_ci_app_pipelines_bucket_response.rs +++ b/src/datadogV2/model/model_ci_app_pipelines_bucket_response.rs @@ -25,6 +25,25 @@ impl CIAppPipelinesBucketResponse { computes: None, } } + + pub fn with_by( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.by = Some(value); + self + } + + pub fn with_computes( + &mut self, + value: std::collections::BTreeMap< + String, + crate::datadogV2::model::CIAppAggregateBucketValue, + >, + ) -> &mut Self { + self.computes = Some(value); + self + } } impl Default for CIAppPipelinesBucketResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_pipelines_group_by.rs b/src/datadogV2/model/model_ci_app_pipelines_group_by.rs index 28055abdb..ece378d43 100644 --- a/src/datadogV2/model/model_ci_app_pipelines_group_by.rs +++ b/src/datadogV2/model/model_ci_app_pipelines_group_by.rs @@ -14,19 +14,19 @@ pub struct CIAppPipelinesGroupBy { /// Used to perform a histogram computation (only for measure facets). /// At most, 100 buckets are allowed, the number of buckets is `(max - min)/interval`. #[serde(rename = "histogram")] - pub histogram: Option>, + pub histogram: Option, /// The maximum buckets to return for this group-by. #[serde(rename = "limit")] pub limit: Option, /// The value to use for logs that don't have the facet used to group-by. #[serde(rename = "missing")] - pub missing: Option>, + pub missing: Option, /// A sort rule. #[serde(rename = "sort")] - pub sort: Option>, + pub sort: Option, /// A resulting object to put the given computes in over all the matching records. #[serde(rename = "total")] - pub total: Option>, + pub total: Option, } impl CIAppPipelinesGroupBy { @@ -40,4 +40,35 @@ impl CIAppPipelinesGroupBy { total: None, } } + + pub fn with_histogram( + &mut self, + value: crate::datadogV2::model::CIAppGroupByHistogram, + ) -> &mut Self { + self.histogram = Some(value); + self + } + + pub fn with_limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_missing( + &mut self, + value: crate::datadogV2::model::CIAppGroupByMissing, + ) -> &mut Self { + self.missing = Some(value); + self + } + + pub fn with_sort(&mut self, value: crate::datadogV2::model::CIAppAggregateSort) -> &mut Self { + self.sort = Some(value); + self + } + + pub fn with_total(&mut self, value: crate::datadogV2::model::CIAppGroupByTotal) -> &mut Self { + self.total = Some(value); + self + } } diff --git a/src/datadogV2/model/model_ci_app_pipelines_query_filter.rs b/src/datadogV2/model/model_ci_app_pipelines_query_filter.rs index 126ff06f1..c7e2c2e6a 100644 --- a/src/datadogV2/model/model_ci_app_pipelines_query_filter.rs +++ b/src/datadogV2/model/model_ci_app_pipelines_query_filter.rs @@ -27,6 +27,21 @@ impl CIAppPipelinesQueryFilter { to: None, } } + + pub fn with_from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_to(&mut self, value: String) -> &mut Self { + self.to = Some(value); + self + } } impl Default for CIAppPipelinesQueryFilter { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_query_options.rs b/src/datadogV2/model/model_ci_app_query_options.rs index 5955fbfdd..742aea2c2 100644 --- a/src/datadogV2/model/model_ci_app_query_options.rs +++ b/src/datadogV2/model/model_ci_app_query_options.rs @@ -24,6 +24,16 @@ impl CIAppQueryOptions { timezone: None, } } + + pub fn with_time_offset(&mut self, value: i64) -> &mut Self { + self.time_offset = Some(value); + self + } + + pub fn with_timezone(&mut self, value: String) -> &mut Self { + self.timezone = Some(value); + self + } } impl Default for CIAppQueryOptions { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_query_page_options.rs b/src/datadogV2/model/model_ci_app_query_page_options.rs index 5bf76b4cf..a4a63f868 100644 --- a/src/datadogV2/model/model_ci_app_query_page_options.rs +++ b/src/datadogV2/model/model_ci_app_query_page_options.rs @@ -23,6 +23,16 @@ impl CIAppQueryPageOptions { limit: None, } } + + pub fn with_cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + self + } + + pub fn with_limit(&mut self, value: i32) -> &mut Self { + self.limit = Some(value); + self + } } impl Default for CIAppQueryPageOptions { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_response_links.rs b/src/datadogV2/model/model_ci_app_response_links.rs index 1faecb6bd..44e7f2573 100644 --- a/src/datadogV2/model/model_ci_app_response_links.rs +++ b/src/datadogV2/model/model_ci_app_response_links.rs @@ -18,6 +18,11 @@ impl CIAppResponseLinks { pub fn new() -> CIAppResponseLinks { CIAppResponseLinks { next: None } } + + pub fn with_next(&mut self, value: String) -> &mut Self { + self.next = Some(value); + self + } } impl Default for CIAppResponseLinks { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_response_metadata.rs b/src/datadogV2/model/model_ci_app_response_metadata.rs index 76c1bb23e..605e89d5e 100644 --- a/src/datadogV2/model/model_ci_app_response_metadata.rs +++ b/src/datadogV2/model/model_ci_app_response_metadata.rs @@ -32,6 +32,32 @@ impl CIAppResponseMetadata { warnings: None, } } + + pub fn with_elapsed(&mut self, value: i64) -> &mut Self { + self.elapsed = Some(value); + self + } + + pub fn with_request_id(&mut self, value: String) -> &mut Self { + self.request_id = Some(value); + self + } + + pub fn with_status( + &mut self, + value: crate::datadogV2::model::CIAppResponseStatus, + ) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_warnings( + &mut self, + value: Vec, + ) -> &mut Self { + self.warnings = Some(value); + self + } } impl Default for CIAppResponseMetadata { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_response_metadata_with_pagination.rs b/src/datadogV2/model/model_ci_app_response_metadata_with_pagination.rs index 378963db8..aa4f37baa 100644 --- a/src/datadogV2/model/model_ci_app_response_metadata_with_pagination.rs +++ b/src/datadogV2/model/model_ci_app_response_metadata_with_pagination.rs @@ -13,7 +13,7 @@ pub struct CIAppResponseMetadataWithPagination { pub elapsed: Option, /// Paging attributes. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, /// The identifier of the request. #[serde(rename = "request_id")] pub request_id: Option, @@ -36,6 +36,37 @@ impl CIAppResponseMetadataWithPagination { warnings: None, } } + + pub fn with_elapsed(&mut self, value: i64) -> &mut Self { + self.elapsed = Some(value); + self + } + + pub fn with_page(&mut self, value: crate::datadogV2::model::CIAppResponsePage) -> &mut Self { + self.page = Some(value); + self + } + + pub fn with_request_id(&mut self, value: String) -> &mut Self { + self.request_id = Some(value); + self + } + + pub fn with_status( + &mut self, + value: crate::datadogV2::model::CIAppResponseStatus, + ) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_warnings( + &mut self, + value: Vec, + ) -> &mut Self { + self.warnings = Some(value); + self + } } impl Default for CIAppResponseMetadataWithPagination { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_response_page.rs b/src/datadogV2/model/model_ci_app_response_page.rs index f81b6e3b0..eda4b4755 100644 --- a/src/datadogV2/model/model_ci_app_response_page.rs +++ b/src/datadogV2/model/model_ci_app_response_page.rs @@ -17,6 +17,11 @@ impl CIAppResponsePage { pub fn new() -> CIAppResponsePage { CIAppResponsePage { after: None } } + + pub fn with_after(&mut self, value: String) -> &mut Self { + self.after = Some(value); + self + } } impl Default for CIAppResponsePage { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_test_event.rs b/src/datadogV2/model/model_ci_app_test_event.rs index 062624f92..6329ae83f 100644 --- a/src/datadogV2/model/model_ci_app_test_event.rs +++ b/src/datadogV2/model/model_ci_app_test_event.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct CIAppTestEvent { /// JSON object containing all event attributes and their associated values. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Unique ID of the event. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,27 @@ impl CIAppTestEvent { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::CIAppEventAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::CIAppTestEventTypeName, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for CIAppTestEvent { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_test_events_request.rs b/src/datadogV2/model/model_ci_app_test_events_request.rs index aa05eb012..de9588a4f 100644 --- a/src/datadogV2/model/model_ci_app_test_events_request.rs +++ b/src/datadogV2/model/model_ci_app_test_events_request.rs @@ -10,14 +10,14 @@ use serde_with::skip_serializing_none; pub struct CIAppTestEventsRequest { /// The search and filter query settings. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// Global query options that are used during the query. /// Only supply timezone or time offset, not both. Otherwise, the query fails. #[serde(rename = "options")] - pub options: Option>, + pub options: Option, /// Paging attributes for listing events. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, /// Sort parameters when querying events. #[serde(rename = "sort")] pub sort: Option, @@ -32,6 +32,32 @@ impl CIAppTestEventsRequest { sort: None, } } + + pub fn with_filter( + &mut self, + value: crate::datadogV2::model::CIAppTestsQueryFilter, + ) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_options(&mut self, value: crate::datadogV2::model::CIAppQueryOptions) -> &mut Self { + self.options = Some(value); + self + } + + pub fn with_page( + &mut self, + value: crate::datadogV2::model::CIAppQueryPageOptions, + ) -> &mut Self { + self.page = Some(value); + self + } + + pub fn with_sort(&mut self, value: crate::datadogV2::model::CIAppSort) -> &mut Self { + self.sort = Some(value); + self + } } impl Default for CIAppTestEventsRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_test_events_response.rs b/src/datadogV2/model/model_ci_app_test_events_response.rs index 77d00b536..a2dc492f7 100644 --- a/src/datadogV2/model/model_ci_app_test_events_response.rs +++ b/src/datadogV2/model/model_ci_app_test_events_response.rs @@ -13,10 +13,10 @@ pub struct CIAppTestEventsResponse { pub data: Option>, /// Links attributes. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, /// The metadata associated with a request. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl CIAppTestEventsResponse { @@ -27,6 +27,24 @@ impl CIAppTestEventsResponse { meta: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links(&mut self, value: crate::datadogV2::model::CIAppResponseLinks) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::CIAppResponseMetadataWithPagination, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for CIAppTestEventsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_tests_aggregate_request.rs b/src/datadogV2/model/model_ci_app_tests_aggregate_request.rs index 3aa6e21a2..27bb48182 100644 --- a/src/datadogV2/model/model_ci_app_tests_aggregate_request.rs +++ b/src/datadogV2/model/model_ci_app_tests_aggregate_request.rs @@ -13,14 +13,14 @@ pub struct CIAppTestsAggregateRequest { pub compute: Option>, /// The search and filter query settings. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// The rules for the group-by. #[serde(rename = "group_by")] pub group_by: Option>, /// Global query options that are used during the query. /// Only supply timezone or time offset, not both. Otherwise, the query fails. #[serde(rename = "options")] - pub options: Option>, + pub options: Option, } impl CIAppTestsAggregateRequest { @@ -32,6 +32,32 @@ impl CIAppTestsAggregateRequest { options: None, } } + + pub fn with_compute(&mut self, value: Vec) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn with_filter( + &mut self, + value: crate::datadogV2::model::CIAppTestsQueryFilter, + ) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn with_options(&mut self, value: crate::datadogV2::model::CIAppQueryOptions) -> &mut Self { + self.options = Some(value); + self + } } impl Default for CIAppTestsAggregateRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_tests_aggregation_buckets_response.rs b/src/datadogV2/model/model_ci_app_tests_aggregation_buckets_response.rs index ddf0db281..349035318 100644 --- a/src/datadogV2/model/model_ci_app_tests_aggregation_buckets_response.rs +++ b/src/datadogV2/model/model_ci_app_tests_aggregation_buckets_response.rs @@ -17,6 +17,14 @@ impl CIAppTestsAggregationBucketsResponse { pub fn new() -> CIAppTestsAggregationBucketsResponse { CIAppTestsAggregationBucketsResponse { buckets: None } } + + pub fn with_buckets( + &mut self, + value: Vec, + ) -> &mut Self { + self.buckets = Some(value); + self + } } impl Default for CIAppTestsAggregationBucketsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_tests_analytics_aggregate_response.rs b/src/datadogV2/model/model_ci_app_tests_analytics_aggregate_response.rs index ed5fbfc91..1bfe17775 100644 --- a/src/datadogV2/model/model_ci_app_tests_analytics_aggregate_response.rs +++ b/src/datadogV2/model/model_ci_app_tests_analytics_aggregate_response.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct CIAppTestsAnalyticsAggregateResponse { /// The query results. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// Links attributes. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, /// The metadata associated with a request. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl CIAppTestsAnalyticsAggregateResponse { @@ -27,6 +27,27 @@ impl CIAppTestsAnalyticsAggregateResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::CIAppTestsAggregationBucketsResponse, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links(&mut self, value: crate::datadogV2::model::CIAppResponseLinks) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::CIAppResponseMetadataWithPagination, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for CIAppTestsAnalyticsAggregateResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_tests_bucket_response.rs b/src/datadogV2/model/model_ci_app_tests_bucket_response.rs index 6ecd84ac2..0e3a9518f 100644 --- a/src/datadogV2/model/model_ci_app_tests_bucket_response.rs +++ b/src/datadogV2/model/model_ci_app_tests_bucket_response.rs @@ -25,6 +25,25 @@ impl CIAppTestsBucketResponse { computes: None, } } + + pub fn with_by( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.by = Some(value); + self + } + + pub fn with_computes( + &mut self, + value: std::collections::BTreeMap< + String, + crate::datadogV2::model::CIAppAggregateBucketValue, + >, + ) -> &mut Self { + self.computes = Some(value); + self + } } impl Default for CIAppTestsBucketResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_tests_group_by.rs b/src/datadogV2/model/model_ci_app_tests_group_by.rs index a17ccb8f5..9a3b629e3 100644 --- a/src/datadogV2/model/model_ci_app_tests_group_by.rs +++ b/src/datadogV2/model/model_ci_app_tests_group_by.rs @@ -14,19 +14,19 @@ pub struct CIAppTestsGroupBy { /// Used to perform a histogram computation (only for measure facets). /// At most, 100 buckets are allowed, the number of buckets is `(max - min)/interval`. #[serde(rename = "histogram")] - pub histogram: Option>, + pub histogram: Option, /// The maximum buckets to return for this group-by. #[serde(rename = "limit")] pub limit: Option, /// The value to use for logs that don't have the facet used to group-by. #[serde(rename = "missing")] - pub missing: Option>, + pub missing: Option, /// A sort rule. #[serde(rename = "sort")] - pub sort: Option>, + pub sort: Option, /// A resulting object to put the given computes in over all the matching records. #[serde(rename = "total")] - pub total: Option>, + pub total: Option, } impl CIAppTestsGroupBy { @@ -40,4 +40,35 @@ impl CIAppTestsGroupBy { total: None, } } + + pub fn with_histogram( + &mut self, + value: crate::datadogV2::model::CIAppGroupByHistogram, + ) -> &mut Self { + self.histogram = Some(value); + self + } + + pub fn with_limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_missing( + &mut self, + value: crate::datadogV2::model::CIAppGroupByMissing, + ) -> &mut Self { + self.missing = Some(value); + self + } + + pub fn with_sort(&mut self, value: crate::datadogV2::model::CIAppAggregateSort) -> &mut Self { + self.sort = Some(value); + self + } + + pub fn with_total(&mut self, value: crate::datadogV2::model::CIAppGroupByTotal) -> &mut Self { + self.total = Some(value); + self + } } diff --git a/src/datadogV2/model/model_ci_app_tests_query_filter.rs b/src/datadogV2/model/model_ci_app_tests_query_filter.rs index cf409dfff..c3fe22a32 100644 --- a/src/datadogV2/model/model_ci_app_tests_query_filter.rs +++ b/src/datadogV2/model/model_ci_app_tests_query_filter.rs @@ -27,6 +27,21 @@ impl CIAppTestsQueryFilter { to: None, } } + + pub fn with_from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_to(&mut self, value: String) -> &mut Self { + self.to = Some(value); + self + } } impl Default for CIAppTestsQueryFilter { fn default() -> Self { diff --git a/src/datadogV2/model/model_ci_app_warning.rs b/src/datadogV2/model/model_ci_app_warning.rs index ac4c6fca7..f64502bbc 100644 --- a/src/datadogV2/model/model_ci_app_warning.rs +++ b/src/datadogV2/model/model_ci_app_warning.rs @@ -27,6 +27,21 @@ impl CIAppWarning { title: None, } } + + pub fn with_code(&mut self, value: String) -> &mut Self { + self.code = Some(value); + self + } + + pub fn with_detail(&mut self, value: String) -> &mut Self { + self.detail = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } } impl Default for CIAppWarning { fn default() -> Self { diff --git a/src/datadogV2/model/model_cloud_configuration_compliance_rule_options.rs b/src/datadogV2/model/model_cloud_configuration_compliance_rule_options.rs index 190cd44da..8c3822172 100644 --- a/src/datadogV2/model/model_cloud_configuration_compliance_rule_options.rs +++ b/src/datadogV2/model/model_cloud_configuration_compliance_rule_options.rs @@ -17,7 +17,7 @@ pub struct CloudConfigurationComplianceRuleOptions { pub complex_rule: Option, /// Rule details. #[serde(rename = "regoRule")] - pub rego_rule: Option>, + pub rego_rule: Option, /// Main resource type to be checked by the rule. It should be specified again in `regoRule.resourceTypes`. /// #[serde(rename = "resourceType")] @@ -35,6 +35,24 @@ impl CloudConfigurationComplianceRuleOptions { additional_properties: std::collections::BTreeMap::new(), } } + + pub fn with_complex_rule(&mut self, value: bool) -> &mut Self { + self.complex_rule = Some(value); + self + } + + pub fn with_rego_rule( + &mut self, + value: crate::datadogV2::model::CloudConfigurationRegoRule, + ) -> &mut Self { + self.rego_rule = Some(value); + self + } + + pub fn with_resource_type(&mut self, value: String) -> &mut Self { + self.resource_type = Some(value); + self + } } impl Default for CloudConfigurationComplianceRuleOptions { fn default() -> Self { diff --git a/src/datadogV2/model/model_cloud_configuration_rule_case_create.rs b/src/datadogV2/model/model_cloud_configuration_rule_case_create.rs index 127beda1d..1b270b4c5 100644 --- a/src/datadogV2/model/model_cloud_configuration_rule_case_create.rs +++ b/src/datadogV2/model/model_cloud_configuration_rule_case_create.rs @@ -25,4 +25,9 @@ impl CloudConfigurationRuleCaseCreate { status, } } + + pub fn with_notifications(&mut self, value: Vec) -> &mut Self { + self.notifications = Some(value); + self + } } diff --git a/src/datadogV2/model/model_cloud_configuration_rule_compliance_signal_options.rs b/src/datadogV2/model/model_cloud_configuration_rule_compliance_signal_options.rs index c4e7d00e3..dd5daafa2 100644 --- a/src/datadogV2/model/model_cloud_configuration_rule_compliance_signal_options.rs +++ b/src/datadogV2/model/model_cloud_configuration_rule_compliance_signal_options.rs @@ -47,6 +47,26 @@ impl CloudConfigurationRuleComplianceSignalOptions { user_group_by_fields: None, } } + + pub fn with_default_activation_status(&mut self, value: Option) -> &mut Self { + self.default_activation_status = Some(value); + self + } + + pub fn with_default_group_by_fields(&mut self, value: Option>) -> &mut Self { + self.default_group_by_fields = Some(value); + self + } + + pub fn with_user_activation_status(&mut self, value: Option) -> &mut Self { + self.user_activation_status = Some(value); + self + } + + pub fn with_user_group_by_fields(&mut self, value: Option>) -> &mut Self { + self.user_group_by_fields = Some(value); + self + } } impl Default for CloudConfigurationRuleComplianceSignalOptions { fn default() -> Self { diff --git a/src/datadogV2/model/model_cloud_configuration_rule_create_payload.rs b/src/datadogV2/model/model_cloud_configuration_rule_create_payload.rs index 8698b741f..243b450df 100644 --- a/src/datadogV2/model/model_cloud_configuration_rule_create_payload.rs +++ b/src/datadogV2/model/model_cloud_configuration_rule_create_payload.rs @@ -15,7 +15,7 @@ pub struct CloudConfigurationRuleCreatePayload { /// How to generate compliance signals. Useful for cloud_configuration rules only. #[serde(rename = "complianceSignalOptions")] pub compliance_signal_options: - Box, + crate::datadogV2::model::CloudConfigurationRuleComplianceSignalOptions, /// Additional queries to filter matched events before they are processed. #[serde(rename = "filters")] pub filters: Option>, @@ -30,7 +30,7 @@ pub struct CloudConfigurationRuleCreatePayload { pub name: String, /// Options on cloud configuration rules. #[serde(rename = "options")] - pub options: Box, + pub options: crate::datadogV2::model::CloudConfigurationRuleOptions, /// Tags for generated findings and signals. #[serde(rename = "tags")] pub tags: Option>, @@ -42,13 +42,11 @@ pub struct CloudConfigurationRuleCreatePayload { impl CloudConfigurationRuleCreatePayload { pub fn new( cases: Vec, - compliance_signal_options: Box< - crate::datadogV2::model::CloudConfigurationRuleComplianceSignalOptions, - >, + compliance_signal_options: crate::datadogV2::model::CloudConfigurationRuleComplianceSignalOptions, is_enabled: bool, message: String, name: String, - options: Box, + options: crate::datadogV2::model::CloudConfigurationRuleOptions, ) -> CloudConfigurationRuleCreatePayload { CloudConfigurationRuleCreatePayload { cases, @@ -62,4 +60,25 @@ impl CloudConfigurationRuleCreatePayload { type_: None, } } + + pub fn with_filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.filters = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::CloudConfigurationRuleType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV2/model/model_cloud_configuration_rule_options.rs b/src/datadogV2/model/model_cloud_configuration_rule_options.rs index f3a3f9f28..1bdb6f503 100644 --- a/src/datadogV2/model/model_cloud_configuration_rule_options.rs +++ b/src/datadogV2/model/model_cloud_configuration_rule_options.rs @@ -12,15 +12,12 @@ pub struct CloudConfigurationRuleOptions { /// Fields `resourceType` and `regoRule` are mandatory when managing custom `cloud_configuration` rules. /// #[serde(rename = "complianceRuleOptions")] - pub compliance_rule_options: - Box, + pub compliance_rule_options: crate::datadogV2::model::CloudConfigurationComplianceRuleOptions, } impl CloudConfigurationRuleOptions { pub fn new( - compliance_rule_options: Box< - crate::datadogV2::model::CloudConfigurationComplianceRuleOptions, - >, + compliance_rule_options: crate::datadogV2::model::CloudConfigurationComplianceRuleOptions, ) -> CloudConfigurationRuleOptions { CloudConfigurationRuleOptions { compliance_rule_options, diff --git a/src/datadogV2/model/model_cloud_cost_activity.rs b/src/datadogV2/model/model_cloud_cost_activity.rs index 75131b6a6..3a7e3381f 100644 --- a/src/datadogV2/model/model_cloud_cost_activity.rs +++ b/src/datadogV2/model/model_cloud_cost_activity.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct CloudCostActivity { /// Attributes for Cloud Cost activity. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::CloudCostActivityAttributes, /// Type of Cloud Cost Activity. #[serde(rename = "type")] pub type_: crate::datadogV2::model::CloudCostActivityType, @@ -18,7 +18,7 @@ pub struct CloudCostActivity { impl CloudCostActivity { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::CloudCostActivityAttributes, type_: crate::datadogV2::model::CloudCostActivityType, ) -> CloudCostActivity { CloudCostActivity { attributes, type_ } diff --git a/src/datadogV2/model/model_cloud_cost_activity_response.rs b/src/datadogV2/model/model_cloud_cost_activity_response.rs index 4033a5646..c66ea5df4 100644 --- a/src/datadogV2/model/model_cloud_cost_activity_response.rs +++ b/src/datadogV2/model/model_cloud_cost_activity_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct CloudCostActivityResponse { /// Cloud Cost Activity. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl CloudCostActivityResponse { pub fn new() -> CloudCostActivityResponse { CloudCostActivityResponse { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::CloudCostActivity) -> &mut Self { + self.data = Some(value); + self + } } impl Default for CloudCostActivityResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_attributes.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_attributes.rs index 20750a597..4fbccb9d1 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_attributes.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_attributes.rs @@ -22,8 +22,7 @@ pub struct CloudWorkloadSecurityAgentRuleAttributes { pub creation_date: Option, /// The attributes of the user who created the Agent rule. #[serde(rename = "creator")] - pub creator: - Option>, + pub creator: Option, /// Whether the rule is included by default. #[serde(rename = "defaultRule")] pub default_rule: Option, @@ -53,8 +52,7 @@ pub struct CloudWorkloadSecurityAgentRuleAttributes { pub updated_at: Option, /// The attributes of the user who last updated the Agent rule. #[serde(rename = "updater")] - pub updater: - Option>, + pub updater: Option, /// The version of the Agent rule. #[serde(rename = "version")] pub version: Option, @@ -81,6 +79,92 @@ impl CloudWorkloadSecurityAgentRuleAttributes { version: None, } } + + pub fn with_agent_constraint(&mut self, value: String) -> &mut Self { + self.agent_constraint = Some(value); + self + } + + pub fn with_category(&mut self, value: String) -> &mut Self { + self.category = Some(value); + self + } + + pub fn with_creation_author_uu_id(&mut self, value: String) -> &mut Self { + self.creation_author_uu_id = Some(value); + self + } + + pub fn with_creation_date(&mut self, value: i64) -> &mut Self { + self.creation_date = Some(value); + self + } + + pub fn with_creator( + &mut self, + value: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleCreatorAttributes, + ) -> &mut Self { + self.creator = Some(value); + self + } + + pub fn with_default_rule(&mut self, value: bool) -> &mut Self { + self.default_rule = Some(value); + self + } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_enabled(&mut self, value: bool) -> &mut Self { + self.enabled = Some(value); + self + } + + pub fn with_expression(&mut self, value: String) -> &mut Self { + self.expression = Some(value); + self + } + + pub fn with_filters(&mut self, value: Vec) -> &mut Self { + self.filters = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_update_author_uu_id(&mut self, value: String) -> &mut Self { + self.update_author_uu_id = Some(value); + self + } + + pub fn with_update_date(&mut self, value: i64) -> &mut Self { + self.update_date = Some(value); + self + } + + pub fn with_updated_at(&mut self, value: i64) -> &mut Self { + self.updated_at = Some(value); + self + } + + pub fn with_updater( + &mut self, + value: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleUpdaterAttributes, + ) -> &mut Self { + self.updater = Some(value); + self + } + + pub fn with_version(&mut self, value: i64) -> &mut Self { + self.version = Some(value); + self + } } impl Default for CloudWorkloadSecurityAgentRuleAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_attributes.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_attributes.rs index 59e98dbbc..2d435e0a3 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_attributes.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_attributes.rs @@ -31,4 +31,14 @@ impl CloudWorkloadSecurityAgentRuleCreateAttributes { name, } } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_enabled(&mut self, value: bool) -> &mut Self { + self.enabled = Some(value); + self + } } diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_data.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_data.rs index 97046ddf4..887ecbd04 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_data.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct CloudWorkloadSecurityAgentRuleCreateData { /// Create a new Cloud Workload Security Agent rule. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleCreateAttributes, /// The type of the resource. The value should always be `agent_rule`. #[serde(rename = "type")] pub type_: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleType, @@ -18,7 +18,7 @@ pub struct CloudWorkloadSecurityAgentRuleCreateData { impl CloudWorkloadSecurityAgentRuleCreateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleCreateAttributes, type_: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleType, ) -> CloudWorkloadSecurityAgentRuleCreateData { CloudWorkloadSecurityAgentRuleCreateData { attributes, type_ } diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_request.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_request.rs index ae4f9747c..567717ea4 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_request.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct CloudWorkloadSecurityAgentRuleCreateRequest { /// Object for a single Agent rule. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleCreateData, } impl CloudWorkloadSecurityAgentRuleCreateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleCreateData, ) -> CloudWorkloadSecurityAgentRuleCreateRequest { CloudWorkloadSecurityAgentRuleCreateRequest { data } } diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_creator_attributes.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_creator_attributes.rs index e84f81225..d375324e0 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_creator_attributes.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_creator_attributes.rs @@ -23,6 +23,16 @@ impl CloudWorkloadSecurityAgentRuleCreatorAttributes { name: None, } } + + pub fn with_handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + self + } + + pub fn with_name(&mut self, value: Option) -> &mut Self { + self.name = Some(value); + self + } } impl Default for CloudWorkloadSecurityAgentRuleCreatorAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_data.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_data.rs index 5da415721..491a0785e 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_data.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct CloudWorkloadSecurityAgentRuleData { /// A Cloud Workload Security Agent rule returned by the API. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The ID of the Agent rule. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,27 @@ impl CloudWorkloadSecurityAgentRuleData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for CloudWorkloadSecurityAgentRuleData { fn default() -> Self { diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_response.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_response.rs index 328c5ac55..62f58f748 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_response.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct CloudWorkloadSecurityAgentRuleResponse { /// Object for a single Agent rule. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl CloudWorkloadSecurityAgentRuleResponse { pub fn new() -> CloudWorkloadSecurityAgentRuleResponse { CloudWorkloadSecurityAgentRuleResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for CloudWorkloadSecurityAgentRuleResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_attributes.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_attributes.rs index 49274d1d8..294f70028 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_attributes.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_attributes.rs @@ -27,6 +27,21 @@ impl CloudWorkloadSecurityAgentRuleUpdateAttributes { expression: None, } } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_enabled(&mut self, value: bool) -> &mut Self { + self.enabled = Some(value); + self + } + + pub fn with_expression(&mut self, value: String) -> &mut Self { + self.expression = Some(value); + self + } } impl Default for CloudWorkloadSecurityAgentRuleUpdateAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_data.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_data.rs index 0fe91cde6..274366173 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_data.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct CloudWorkloadSecurityAgentRuleUpdateData { /// Update an existing Cloud Workload Security Agent rule. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleUpdateAttributes, /// The type of the resource. The value should always be `agent_rule`. #[serde(rename = "type")] pub type_: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleType, @@ -18,7 +18,7 @@ pub struct CloudWorkloadSecurityAgentRuleUpdateData { impl CloudWorkloadSecurityAgentRuleUpdateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleUpdateAttributes, type_: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleType, ) -> CloudWorkloadSecurityAgentRuleUpdateData { CloudWorkloadSecurityAgentRuleUpdateData { attributes, type_ } diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_request.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_request.rs index 1334babf4..8f1669d5c 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_request.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct CloudWorkloadSecurityAgentRuleUpdateRequest { /// Object for a single Agent rule. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleUpdateData, } impl CloudWorkloadSecurityAgentRuleUpdateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleUpdateData, ) -> CloudWorkloadSecurityAgentRuleUpdateRequest { CloudWorkloadSecurityAgentRuleUpdateRequest { data } } diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_updater_attributes.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_updater_attributes.rs index 35d5a1231..4e1c9bd06 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_updater_attributes.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_updater_attributes.rs @@ -23,6 +23,16 @@ impl CloudWorkloadSecurityAgentRuleUpdaterAttributes { name: None, } } + + pub fn with_handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + self + } + + pub fn with_name(&mut self, value: Option) -> &mut Self { + self.name = Some(value); + self + } } impl Default for CloudWorkloadSecurityAgentRuleUpdaterAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rules_list_response.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rules_list_response.rs index 5a32d21cc..1596612ba 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rules_list_response.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rules_list_response.rs @@ -17,6 +17,14 @@ impl CloudWorkloadSecurityAgentRulesListResponse { pub fn new() -> CloudWorkloadSecurityAgentRulesListResponse { CloudWorkloadSecurityAgentRulesListResponse { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for CloudWorkloadSecurityAgentRulesListResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_cloudflare_account_create_request.rs b/src/datadogV2/model/model_cloudflare_account_create_request.rs index ace255da4..b99b4789b 100644 --- a/src/datadogV2/model/model_cloudflare_account_create_request.rs +++ b/src/datadogV2/model/model_cloudflare_account_create_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct CloudflareAccountCreateRequest { /// Data object for creating a Cloudflare account. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::CloudflareAccountCreateRequestData, } impl CloudflareAccountCreateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::CloudflareAccountCreateRequestData, ) -> CloudflareAccountCreateRequest { CloudflareAccountCreateRequest { data } } diff --git a/src/datadogV2/model/model_cloudflare_account_create_request_attributes.rs b/src/datadogV2/model/model_cloudflare_account_create_request_attributes.rs index a8e965754..a53ff021f 100644 --- a/src/datadogV2/model/model_cloudflare_account_create_request_attributes.rs +++ b/src/datadogV2/model/model_cloudflare_account_create_request_attributes.rs @@ -27,4 +27,9 @@ impl CloudflareAccountCreateRequestAttributes { name, } } + + pub fn with_email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } } diff --git a/src/datadogV2/model/model_cloudflare_account_create_request_data.rs b/src/datadogV2/model/model_cloudflare_account_create_request_data.rs index 23652f3f1..b85603da6 100644 --- a/src/datadogV2/model/model_cloudflare_account_create_request_data.rs +++ b/src/datadogV2/model/model_cloudflare_account_create_request_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct CloudflareAccountCreateRequestData { /// Attributes object for creating a Cloudflare account. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::CloudflareAccountCreateRequestAttributes, /// The JSON:API type for this API. Should always be `cloudflare-accounts`. #[serde(rename = "type")] pub type_: crate::datadogV2::model::CloudflareAccountType, @@ -18,7 +18,7 @@ pub struct CloudflareAccountCreateRequestData { impl CloudflareAccountCreateRequestData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::CloudflareAccountCreateRequestAttributes, type_: crate::datadogV2::model::CloudflareAccountType, ) -> CloudflareAccountCreateRequestData { CloudflareAccountCreateRequestData { attributes, type_ } diff --git a/src/datadogV2/model/model_cloudflare_account_response.rs b/src/datadogV2/model/model_cloudflare_account_response.rs index 625903aa1..9b4476527 100644 --- a/src/datadogV2/model/model_cloudflare_account_response.rs +++ b/src/datadogV2/model/model_cloudflare_account_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct CloudflareAccountResponse { /// Data object of a Cloudflare account. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl CloudflareAccountResponse { pub fn new() -> CloudflareAccountResponse { CloudflareAccountResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::CloudflareAccountResponseData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for CloudflareAccountResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_cloudflare_account_response_attributes.rs b/src/datadogV2/model/model_cloudflare_account_response_attributes.rs index 04dfd1faf..a5379378a 100644 --- a/src/datadogV2/model/model_cloudflare_account_response_attributes.rs +++ b/src/datadogV2/model/model_cloudflare_account_response_attributes.rs @@ -20,4 +20,9 @@ impl CloudflareAccountResponseAttributes { pub fn new(name: String) -> CloudflareAccountResponseAttributes { CloudflareAccountResponseAttributes { email: None, name } } + + pub fn with_email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } } diff --git a/src/datadogV2/model/model_cloudflare_account_response_data.rs b/src/datadogV2/model/model_cloudflare_account_response_data.rs index 4c83a28d8..848254943 100644 --- a/src/datadogV2/model/model_cloudflare_account_response_data.rs +++ b/src/datadogV2/model/model_cloudflare_account_response_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct CloudflareAccountResponseData { /// Attributes object of a Cloudflare account. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::CloudflareAccountResponseAttributes, /// The ID of the Cloudflare account, a hash of the account name. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct CloudflareAccountResponseData { impl CloudflareAccountResponseData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::CloudflareAccountResponseAttributes, id: String, type_: crate::datadogV2::model::CloudflareAccountType, ) -> CloudflareAccountResponseData { diff --git a/src/datadogV2/model/model_cloudflare_account_update_request.rs b/src/datadogV2/model/model_cloudflare_account_update_request.rs index 0ba4505f7..e2000a637 100644 --- a/src/datadogV2/model/model_cloudflare_account_update_request.rs +++ b/src/datadogV2/model/model_cloudflare_account_update_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct CloudflareAccountUpdateRequest { /// Data object for updating a Cloudflare account. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::CloudflareAccountUpdateRequestData, } impl CloudflareAccountUpdateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::CloudflareAccountUpdateRequestData, ) -> CloudflareAccountUpdateRequest { CloudflareAccountUpdateRequest { data } } diff --git a/src/datadogV2/model/model_cloudflare_account_update_request_attributes.rs b/src/datadogV2/model/model_cloudflare_account_update_request_attributes.rs index 20ef7b654..2a19a14f6 100644 --- a/src/datadogV2/model/model_cloudflare_account_update_request_attributes.rs +++ b/src/datadogV2/model/model_cloudflare_account_update_request_attributes.rs @@ -23,4 +23,9 @@ impl CloudflareAccountUpdateRequestAttributes { email: None, } } + + pub fn with_email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } } diff --git a/src/datadogV2/model/model_cloudflare_account_update_request_data.rs b/src/datadogV2/model/model_cloudflare_account_update_request_data.rs index 0be6d6a79..3fc105a38 100644 --- a/src/datadogV2/model/model_cloudflare_account_update_request_data.rs +++ b/src/datadogV2/model/model_cloudflare_account_update_request_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct CloudflareAccountUpdateRequestData { /// Attributes object for updating a Cloudflare account. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The JSON:API type for this API. Should always be `cloudflare-accounts`. #[serde(rename = "type")] pub type_: Option, @@ -23,6 +23,22 @@ impl CloudflareAccountUpdateRequestData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::CloudflareAccountUpdateRequestAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::CloudflareAccountType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for CloudflareAccountUpdateRequestData { fn default() -> Self { diff --git a/src/datadogV2/model/model_cloudflare_accounts_response.rs b/src/datadogV2/model/model_cloudflare_accounts_response.rs index 3c7eb13d1..e28a28654 100644 --- a/src/datadogV2/model/model_cloudflare_accounts_response.rs +++ b/src/datadogV2/model/model_cloudflare_accounts_response.rs @@ -17,6 +17,14 @@ impl CloudflareAccountsResponse { pub fn new() -> CloudflareAccountsResponse { CloudflareAccountsResponse { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for CloudflareAccountsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_confluent_account_create_request.rs b/src/datadogV2/model/model_confluent_account_create_request.rs index 797d9da0f..1c3583d2f 100644 --- a/src/datadogV2/model/model_confluent_account_create_request.rs +++ b/src/datadogV2/model/model_confluent_account_create_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct ConfluentAccountCreateRequest { /// The data body for adding a Confluent account. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::ConfluentAccountCreateRequestData, } impl ConfluentAccountCreateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::ConfluentAccountCreateRequestData, ) -> ConfluentAccountCreateRequest { ConfluentAccountCreateRequest { data } } diff --git a/src/datadogV2/model/model_confluent_account_create_request_attributes.rs b/src/datadogV2/model/model_confluent_account_create_request_attributes.rs index 476734776..d288ab4e1 100644 --- a/src/datadogV2/model/model_confluent_account_create_request_attributes.rs +++ b/src/datadogV2/model/model_confluent_account_create_request_attributes.rs @@ -31,4 +31,17 @@ impl ConfluentAccountCreateRequestAttributes { tags: None, } } + + pub fn with_resources( + &mut self, + value: Vec, + ) -> &mut Self { + self.resources = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } diff --git a/src/datadogV2/model/model_confluent_account_create_request_data.rs b/src/datadogV2/model/model_confluent_account_create_request_data.rs index 3535b6c28..38258f32c 100644 --- a/src/datadogV2/model/model_confluent_account_create_request_data.rs +++ b/src/datadogV2/model/model_confluent_account_create_request_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ConfluentAccountCreateRequestData { /// Attributes associated with the account creation request. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::ConfluentAccountCreateRequestAttributes, /// The JSON:API type for this API. Should always be `confluent-cloud-accounts`. #[serde(rename = "type")] pub type_: crate::datadogV2::model::ConfluentAccountType, @@ -18,7 +18,7 @@ pub struct ConfluentAccountCreateRequestData { impl ConfluentAccountCreateRequestData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::ConfluentAccountCreateRequestAttributes, type_: crate::datadogV2::model::ConfluentAccountType, ) -> ConfluentAccountCreateRequestData { ConfluentAccountCreateRequestData { attributes, type_ } diff --git a/src/datadogV2/model/model_confluent_account_resource_attributes.rs b/src/datadogV2/model/model_confluent_account_resource_attributes.rs index a870344b9..d0e4d9907 100644 --- a/src/datadogV2/model/model_confluent_account_resource_attributes.rs +++ b/src/datadogV2/model/model_confluent_account_resource_attributes.rs @@ -31,4 +31,19 @@ impl ConfluentAccountResourceAttributes { tags: None, } } + + pub fn with_enable_custom_metrics(&mut self, value: bool) -> &mut Self { + self.enable_custom_metrics = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } diff --git a/src/datadogV2/model/model_confluent_account_response.rs b/src/datadogV2/model/model_confluent_account_response.rs index 1a40328dc..dc792cfc0 100644 --- a/src/datadogV2/model/model_confluent_account_response.rs +++ b/src/datadogV2/model/model_confluent_account_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct ConfluentAccountResponse { /// An API key and API secret pair that represents a Confluent account. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl ConfluentAccountResponse { pub fn new() -> ConfluentAccountResponse { ConfluentAccountResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::ConfluentAccountResponseData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for ConfluentAccountResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_confluent_account_response_attributes.rs b/src/datadogV2/model/model_confluent_account_response_attributes.rs index e7e1112a0..0001da278 100644 --- a/src/datadogV2/model/model_confluent_account_response_attributes.rs +++ b/src/datadogV2/model/model_confluent_account_response_attributes.rs @@ -27,4 +27,17 @@ impl ConfluentAccountResponseAttributes { tags: None, } } + + pub fn with_resources( + &mut self, + value: Vec, + ) -> &mut Self { + self.resources = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } diff --git a/src/datadogV2/model/model_confluent_account_response_data.rs b/src/datadogV2/model/model_confluent_account_response_data.rs index 5b6761077..da397f767 100644 --- a/src/datadogV2/model/model_confluent_account_response_data.rs +++ b/src/datadogV2/model/model_confluent_account_response_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ConfluentAccountResponseData { /// The attributes of a Confluent account. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::ConfluentAccountResponseAttributes, /// A randomly generated ID associated with a Confluent account. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct ConfluentAccountResponseData { impl ConfluentAccountResponseData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::ConfluentAccountResponseAttributes, id: String, type_: crate::datadogV2::model::ConfluentAccountType, ) -> ConfluentAccountResponseData { diff --git a/src/datadogV2/model/model_confluent_account_update_request.rs b/src/datadogV2/model/model_confluent_account_update_request.rs index 32865389a..de7a5094f 100644 --- a/src/datadogV2/model/model_confluent_account_update_request.rs +++ b/src/datadogV2/model/model_confluent_account_update_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct ConfluentAccountUpdateRequest { /// Data object for updating a Confluent account. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::ConfluentAccountUpdateRequestData, } impl ConfluentAccountUpdateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::ConfluentAccountUpdateRequestData, ) -> ConfluentAccountUpdateRequest { ConfluentAccountUpdateRequest { data } } diff --git a/src/datadogV2/model/model_confluent_account_update_request_attributes.rs b/src/datadogV2/model/model_confluent_account_update_request_attributes.rs index 928c3de9d..68114e8f4 100644 --- a/src/datadogV2/model/model_confluent_account_update_request_attributes.rs +++ b/src/datadogV2/model/model_confluent_account_update_request_attributes.rs @@ -27,4 +27,9 @@ impl ConfluentAccountUpdateRequestAttributes { tags: None, } } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } diff --git a/src/datadogV2/model/model_confluent_account_update_request_data.rs b/src/datadogV2/model/model_confluent_account_update_request_data.rs index c76264cb1..2ec678829 100644 --- a/src/datadogV2/model/model_confluent_account_update_request_data.rs +++ b/src/datadogV2/model/model_confluent_account_update_request_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ConfluentAccountUpdateRequestData { /// Attributes object for updating a Confluent account. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::ConfluentAccountUpdateRequestAttributes, /// The JSON:API type for this API. Should always be `confluent-cloud-accounts`. #[serde(rename = "type")] pub type_: crate::datadogV2::model::ConfluentAccountType, @@ -18,7 +18,7 @@ pub struct ConfluentAccountUpdateRequestData { impl ConfluentAccountUpdateRequestData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::ConfluentAccountUpdateRequestAttributes, type_: crate::datadogV2::model::ConfluentAccountType, ) -> ConfluentAccountUpdateRequestData { ConfluentAccountUpdateRequestData { attributes, type_ } diff --git a/src/datadogV2/model/model_confluent_accounts_response.rs b/src/datadogV2/model/model_confluent_accounts_response.rs index 915d20d6d..79c520188 100644 --- a/src/datadogV2/model/model_confluent_accounts_response.rs +++ b/src/datadogV2/model/model_confluent_accounts_response.rs @@ -17,6 +17,14 @@ impl ConfluentAccountsResponse { pub fn new() -> ConfluentAccountsResponse { ConfluentAccountsResponse { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for ConfluentAccountsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_confluent_resource_request.rs b/src/datadogV2/model/model_confluent_resource_request.rs index 1a0adcfc6..4a1315077 100644 --- a/src/datadogV2/model/model_confluent_resource_request.rs +++ b/src/datadogV2/model/model_confluent_resource_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct ConfluentResourceRequest { /// JSON:API request for updating a Confluent resource. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::ConfluentResourceRequestData, } impl ConfluentResourceRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::ConfluentResourceRequestData, ) -> ConfluentResourceRequest { ConfluentResourceRequest { data } } diff --git a/src/datadogV2/model/model_confluent_resource_request_attributes.rs b/src/datadogV2/model/model_confluent_resource_request_attributes.rs index 8880f7368..46b1f7b0e 100644 --- a/src/datadogV2/model/model_confluent_resource_request_attributes.rs +++ b/src/datadogV2/model/model_confluent_resource_request_attributes.rs @@ -27,4 +27,14 @@ impl ConfluentResourceRequestAttributes { tags: None, } } + + pub fn with_enable_custom_metrics(&mut self, value: bool) -> &mut Self { + self.enable_custom_metrics = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } diff --git a/src/datadogV2/model/model_confluent_resource_request_data.rs b/src/datadogV2/model/model_confluent_resource_request_data.rs index 14eee87a5..a1cd16b45 100644 --- a/src/datadogV2/model/model_confluent_resource_request_data.rs +++ b/src/datadogV2/model/model_confluent_resource_request_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ConfluentResourceRequestData { /// Attributes object for updating a Confluent resource. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::ConfluentResourceRequestAttributes, /// The ID associated with a Confluent resource. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct ConfluentResourceRequestData { impl ConfluentResourceRequestData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::ConfluentResourceRequestAttributes, id: String, type_: crate::datadogV2::model::ConfluentResourceType, ) -> ConfluentResourceRequestData { diff --git a/src/datadogV2/model/model_confluent_resource_response.rs b/src/datadogV2/model/model_confluent_resource_response.rs index 78d3b4c41..c4fc48559 100644 --- a/src/datadogV2/model/model_confluent_resource_response.rs +++ b/src/datadogV2/model/model_confluent_resource_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct ConfluentResourceResponse { /// Confluent Cloud resource data. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl ConfluentResourceResponse { pub fn new() -> ConfluentResourceResponse { ConfluentResourceResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::ConfluentResourceResponseData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for ConfluentResourceResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_confluent_resource_response_attributes.rs b/src/datadogV2/model/model_confluent_resource_response_attributes.rs index 3cd3e77e7..6ad2df1ea 100644 --- a/src/datadogV2/model/model_confluent_resource_response_attributes.rs +++ b/src/datadogV2/model/model_confluent_resource_response_attributes.rs @@ -31,4 +31,19 @@ impl ConfluentResourceResponseAttributes { tags: None, } } + + pub fn with_enable_custom_metrics(&mut self, value: bool) -> &mut Self { + self.enable_custom_metrics = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } diff --git a/src/datadogV2/model/model_confluent_resource_response_data.rs b/src/datadogV2/model/model_confluent_resource_response_data.rs index 988eeeecc..79ac9fe0b 100644 --- a/src/datadogV2/model/model_confluent_resource_response_data.rs +++ b/src/datadogV2/model/model_confluent_resource_response_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ConfluentResourceResponseData { /// Model representation of a Confluent Cloud resource. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::ConfluentResourceResponseAttributes, /// The ID associated with the Confluent resource. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct ConfluentResourceResponseData { impl ConfluentResourceResponseData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::ConfluentResourceResponseAttributes, id: String, type_: crate::datadogV2::model::ConfluentResourceType, ) -> ConfluentResourceResponseData { diff --git a/src/datadogV2/model/model_confluent_resources_response.rs b/src/datadogV2/model/model_confluent_resources_response.rs index 755964c98..5db84aa9f 100644 --- a/src/datadogV2/model/model_confluent_resources_response.rs +++ b/src/datadogV2/model/model_confluent_resources_response.rs @@ -17,6 +17,14 @@ impl ConfluentResourcesResponse { pub fn new() -> ConfluentResourcesResponse { ConfluentResourcesResponse { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for ConfluentResourcesResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_container.rs b/src/datadogV2/model/model_container.rs index 5580a7cba..732864294 100644 --- a/src/datadogV2/model/model_container.rs +++ b/src/datadogV2/model/model_container.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct Container { /// Attributes for a container. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Container ID. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl Container { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::ContainerAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::ContainerType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for Container { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_attributes.rs b/src/datadogV2/model/model_container_attributes.rs index 03ef77e62..66130e5a8 100644 --- a/src/datadogV2/model/model_container_attributes.rs +++ b/src/datadogV2/model/model_container_attributes.rs @@ -63,6 +63,56 @@ impl ContainerAttributes { tags: None, } } + + pub fn with_container_id(&mut self, value: String) -> &mut Self { + self.container_id = Some(value); + self + } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn with_image_digest(&mut self, value: Option) -> &mut Self { + self.image_digest = Some(value); + self + } + + pub fn with_image_name(&mut self, value: String) -> &mut Self { + self.image_name = Some(value); + self + } + + pub fn with_image_tags(&mut self, value: Option>) -> &mut Self { + self.image_tags = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_started_at(&mut self, value: String) -> &mut Self { + self.started_at = Some(value); + self + } + + pub fn with_state(&mut self, value: String) -> &mut Self { + self.state = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } impl Default for ContainerAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_group.rs b/src/datadogV2/model/model_container_group.rs index 2249ff6eb..783eac1cf 100644 --- a/src/datadogV2/model/model_container_group.rs +++ b/src/datadogV2/model/model_container_group.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct ContainerGroup { /// Attributes for a container group. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Container Group ID. #[serde(rename = "id")] pub id: Option, /// Relationships to containers inside a container group. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Type of container group. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,32 @@ impl ContainerGroup { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::ContainerGroupAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::ContainerGroupRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::ContainerGroupType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for ContainerGroup { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_group_attributes.rs b/src/datadogV2/model/model_container_group_attributes.rs index 6ff4de2d2..161d5b3ab 100644 --- a/src/datadogV2/model/model_container_group_attributes.rs +++ b/src/datadogV2/model/model_container_group_attributes.rs @@ -23,6 +23,19 @@ impl ContainerGroupAttributes { tags: None, } } + + pub fn with_count(&mut self, value: i64) -> &mut Self { + self.count = Some(value); + self + } + + pub fn with_tags( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.tags = Some(value); + self + } } impl Default for ContainerGroupAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_group_relationships.rs b/src/datadogV2/model/model_container_group_relationships.rs index 5a2c91a37..2d7ea794a 100644 --- a/src/datadogV2/model/model_container_group_relationships.rs +++ b/src/datadogV2/model/model_container_group_relationships.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct ContainerGroupRelationships { /// Relationships to Containers inside a Container Group. #[serde(rename = "containers")] - pub containers: Option>, + pub containers: Option, } impl ContainerGroupRelationships { pub fn new() -> ContainerGroupRelationships { ContainerGroupRelationships { containers: None } } + + pub fn with_containers( + &mut self, + value: crate::datadogV2::model::ContainerGroupRelationshipsLink, + ) -> &mut Self { + self.containers = Some(value); + self + } } impl Default for ContainerGroupRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_group_relationships_link.rs b/src/datadogV2/model/model_container_group_relationships_link.rs index 2afd819dc..236433e8e 100644 --- a/src/datadogV2/model/model_container_group_relationships_link.rs +++ b/src/datadogV2/model/model_container_group_relationships_link.rs @@ -13,7 +13,7 @@ pub struct ContainerGroupRelationshipsLink { pub data: Option>, /// Links attributes. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, } impl ContainerGroupRelationshipsLink { @@ -23,6 +23,19 @@ impl ContainerGroupRelationshipsLink { links: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links( + &mut self, + value: crate::datadogV2::model::ContainerGroupRelationshipsLinks, + ) -> &mut Self { + self.links = Some(value); + self + } } impl Default for ContainerGroupRelationshipsLink { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_group_relationships_links.rs b/src/datadogV2/model/model_container_group_relationships_links.rs index 256a5223e..6b212e0ff 100644 --- a/src/datadogV2/model/model_container_group_relationships_links.rs +++ b/src/datadogV2/model/model_container_group_relationships_links.rs @@ -17,6 +17,11 @@ impl ContainerGroupRelationshipsLinks { pub fn new() -> ContainerGroupRelationshipsLinks { ContainerGroupRelationshipsLinks { related: None } } + + pub fn with_related(&mut self, value: String) -> &mut Self { + self.related = Some(value); + self + } } impl Default for ContainerGroupRelationshipsLinks { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_image.rs b/src/datadogV2/model/model_container_image.rs index 01c84da3a..9846ce86a 100644 --- a/src/datadogV2/model/model_container_image.rs +++ b/src/datadogV2/model/model_container_image.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ContainerImage { /// Attributes for a Container Image. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Container Image ID. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl ContainerImage { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::ContainerImageAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::ContainerImageType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for ContainerImage { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_image_attributes.rs b/src/datadogV2/model/model_container_image_attributes.rs index 409394dab..14691a59d 100644 --- a/src/datadogV2/model/model_container_image_attributes.rs +++ b/src/datadogV2/model/model_container_image_attributes.rs @@ -61,7 +61,7 @@ pub struct ContainerImageAttributes { pub tags: Option>, /// Vulnerability counts associated with the Container Image. #[serde(rename = "vulnerability_count")] - pub vulnerability_count: Option>, + pub vulnerability_count: Option, } impl ContainerImageAttributes { @@ -86,6 +86,97 @@ impl ContainerImageAttributes { vulnerability_count: None, } } + + pub fn with_container_count(&mut self, value: i64) -> &mut Self { + self.container_count = Some(value); + self + } + + pub fn with_image_flavors( + &mut self, + value: Vec, + ) -> &mut Self { + self.image_flavors = Some(value); + self + } + + pub fn with_image_tags(&mut self, value: Vec) -> &mut Self { + self.image_tags = Some(value); + self + } + + pub fn with_images_built_at(&mut self, value: Vec) -> &mut Self { + self.images_built_at = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_os_architectures(&mut self, value: Vec) -> &mut Self { + self.os_architectures = Some(value); + self + } + + pub fn with_os_names(&mut self, value: Vec) -> &mut Self { + self.os_names = Some(value); + self + } + + pub fn with_os_versions(&mut self, value: Vec) -> &mut Self { + self.os_versions = Some(value); + self + } + + pub fn with_published_at(&mut self, value: String) -> &mut Self { + self.published_at = Some(value); + self + } + + pub fn with_registry(&mut self, value: String) -> &mut Self { + self.registry = Some(value); + self + } + + pub fn with_repo_digest(&mut self, value: String) -> &mut Self { + self.repo_digest = Some(value); + self + } + + pub fn with_repository(&mut self, value: String) -> &mut Self { + self.repository = Some(value); + self + } + + pub fn with_short_image(&mut self, value: String) -> &mut Self { + self.short_image = Some(value); + self + } + + pub fn with_sizes(&mut self, value: Vec) -> &mut Self { + self.sizes = Some(value); + self + } + + pub fn with_sources(&mut self, value: Vec) -> &mut Self { + self.sources = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_vulnerability_count( + &mut self, + value: crate::datadogV2::model::ContainerImageVulnerabilities, + ) -> &mut Self { + self.vulnerability_count = Some(value); + self + } } impl Default for ContainerImageAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_image_flavor.rs b/src/datadogV2/model/model_container_image_flavor.rs index e599b2b86..1217aef26 100644 --- a/src/datadogV2/model/model_container_image_flavor.rs +++ b/src/datadogV2/model/model_container_image_flavor.rs @@ -35,6 +35,31 @@ impl ContainerImageFlavor { size: None, } } + + pub fn with_built_at(&mut self, value: String) -> &mut Self { + self.built_at = Some(value); + self + } + + pub fn with_os_architecture(&mut self, value: String) -> &mut Self { + self.os_architecture = Some(value); + self + } + + pub fn with_os_name(&mut self, value: String) -> &mut Self { + self.os_name = Some(value); + self + } + + pub fn with_os_version(&mut self, value: String) -> &mut Self { + self.os_version = Some(value); + self + } + + pub fn with_size(&mut self, value: i64) -> &mut Self { + self.size = Some(value); + self + } } impl Default for ContainerImageFlavor { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_image_group.rs b/src/datadogV2/model/model_container_image_group.rs index a2cf05aca..759c13fd3 100644 --- a/src/datadogV2/model/model_container_image_group.rs +++ b/src/datadogV2/model/model_container_image_group.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct ContainerImageGroup { /// Attributes for a Container Image Group. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Container Image Group ID. #[serde(rename = "id")] pub id: Option, /// Relationships inside a Container Image Group. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Type of Container Image Group. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,35 @@ impl ContainerImageGroup { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::ContainerImageGroupAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::ContainerImageGroupRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::ContainerImageGroupType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for ContainerImageGroup { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_image_group_attributes.rs b/src/datadogV2/model/model_container_image_group_attributes.rs index 51ef88384..064b98965 100644 --- a/src/datadogV2/model/model_container_image_group_attributes.rs +++ b/src/datadogV2/model/model_container_image_group_attributes.rs @@ -27,6 +27,24 @@ impl ContainerImageGroupAttributes { tags: None, } } + + pub fn with_count(&mut self, value: i64) -> &mut Self { + self.count = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_tags( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.tags = Some(value); + self + } } impl Default for ContainerImageGroupAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_image_group_images_relationships_link.rs b/src/datadogV2/model/model_container_image_group_images_relationships_link.rs index 6e0f6c082..7dad3a961 100644 --- a/src/datadogV2/model/model_container_image_group_images_relationships_link.rs +++ b/src/datadogV2/model/model_container_image_group_images_relationships_link.rs @@ -13,7 +13,7 @@ pub struct ContainerImageGroupImagesRelationshipsLink { pub data: Option>, /// Links attributes. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, } impl ContainerImageGroupImagesRelationshipsLink { @@ -23,6 +23,19 @@ impl ContainerImageGroupImagesRelationshipsLink { links: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links( + &mut self, + value: crate::datadogV2::model::ContainerImageGroupRelationshipsLinks, + ) -> &mut Self { + self.links = Some(value); + self + } } impl Default for ContainerImageGroupImagesRelationshipsLink { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_image_group_relationships.rs b/src/datadogV2/model/model_container_image_group_relationships.rs index 12d5db6c6..817035737 100644 --- a/src/datadogV2/model/model_container_image_group_relationships.rs +++ b/src/datadogV2/model/model_container_image_group_relationships.rs @@ -11,7 +11,7 @@ pub struct ContainerImageGroupRelationships { /// Relationships to Container Images inside a Container Image Group. #[serde(rename = "container_images")] pub container_images: - Option>, + Option, } impl ContainerImageGroupRelationships { @@ -20,6 +20,14 @@ impl ContainerImageGroupRelationships { container_images: None, } } + + pub fn with_container_images( + &mut self, + value: crate::datadogV2::model::ContainerImageGroupImagesRelationshipsLink, + ) -> &mut Self { + self.container_images = Some(value); + self + } } impl Default for ContainerImageGroupRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_image_group_relationships_links.rs b/src/datadogV2/model/model_container_image_group_relationships_links.rs index 8ff52df63..ebfb0d4fc 100644 --- a/src/datadogV2/model/model_container_image_group_relationships_links.rs +++ b/src/datadogV2/model/model_container_image_group_relationships_links.rs @@ -17,6 +17,11 @@ impl ContainerImageGroupRelationshipsLinks { pub fn new() -> ContainerImageGroupRelationshipsLinks { ContainerImageGroupRelationshipsLinks { related: None } } + + pub fn with_related(&mut self, value: String) -> &mut Self { + self.related = Some(value); + self + } } impl Default for ContainerImageGroupRelationshipsLinks { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_image_item.rs b/src/datadogV2/model/model_container_image_item.rs index 1b1f75171..6fb11840c 100644 --- a/src/datadogV2/model/model_container_image_item.rs +++ b/src/datadogV2/model/model_container_image_item.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ContainerImageItem { - ContainerImage(Box), - ContainerImageGroup(Box), + ContainerImage(crate::datadogV2::model::ContainerImage), + ContainerImageGroup(crate::datadogV2::model::ContainerImageGroup), } diff --git a/src/datadogV2/model/model_container_image_meta.rs b/src/datadogV2/model/model_container_image_meta.rs index c822b4029..112c662c0 100644 --- a/src/datadogV2/model/model_container_image_meta.rs +++ b/src/datadogV2/model/model_container_image_meta.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct ContainerImageMeta { /// Paging attributes. #[serde(rename = "pagination")] - pub pagination: Option>, + pub pagination: Option, } impl ContainerImageMeta { pub fn new() -> ContainerImageMeta { ContainerImageMeta { pagination: None } } + + pub fn with_pagination( + &mut self, + value: crate::datadogV2::model::ContainerImageMetaPage, + ) -> &mut Self { + self.pagination = Some(value); + self + } } impl Default for ContainerImageMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_image_meta_page.rs b/src/datadogV2/model/model_container_image_meta_page.rs index 8ba18ffb5..927612c67 100644 --- a/src/datadogV2/model/model_container_image_meta_page.rs +++ b/src/datadogV2/model/model_container_image_meta_page.rs @@ -43,6 +43,39 @@ impl ContainerImageMetaPage { type_: None, } } + + pub fn with_cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + self + } + + pub fn with_limit(&mut self, value: i32) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_next_cursor(&mut self, value: String) -> &mut Self { + self.next_cursor = Some(value); + self + } + + pub fn with_prev_cursor(&mut self, value: Option) -> &mut Self { + self.prev_cursor = Some(value); + self + } + + pub fn with_total(&mut self, value: i64) -> &mut Self { + self.total = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::ContainerImageMetaPageType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for ContainerImageMetaPage { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_image_vulnerabilities.rs b/src/datadogV2/model/model_container_image_vulnerabilities.rs index 0c9886dc2..2cfb89735 100644 --- a/src/datadogV2/model/model_container_image_vulnerabilities.rs +++ b/src/datadogV2/model/model_container_image_vulnerabilities.rs @@ -43,6 +43,41 @@ impl ContainerImageVulnerabilities { unknown: None, } } + + pub fn with_asset_id(&mut self, value: String) -> &mut Self { + self.asset_id = Some(value); + self + } + + pub fn with_critical(&mut self, value: i64) -> &mut Self { + self.critical = Some(value); + self + } + + pub fn with_high(&mut self, value: i64) -> &mut Self { + self.high = Some(value); + self + } + + pub fn with_low(&mut self, value: i64) -> &mut Self { + self.low = Some(value); + self + } + + pub fn with_medium(&mut self, value: i64) -> &mut Self { + self.medium = Some(value); + self + } + + pub fn with_none(&mut self, value: i64) -> &mut Self { + self.none = Some(value); + self + } + + pub fn with_unknown(&mut self, value: i64) -> &mut Self { + self.unknown = Some(value); + self + } } impl Default for ContainerImageVulnerabilities { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_images_response.rs b/src/datadogV2/model/model_container_images_response.rs index 4f90a1520..b6c883f5b 100644 --- a/src/datadogV2/model/model_container_images_response.rs +++ b/src/datadogV2/model/model_container_images_response.rs @@ -13,10 +13,10 @@ pub struct ContainerImagesResponse { pub data: Option>, /// Pagination links. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, /// Response metadata object. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl ContainerImagesResponse { @@ -27,6 +27,27 @@ impl ContainerImagesResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links( + &mut self, + value: crate::datadogV2::model::ContainerImagesResponseLinks, + ) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::ContainerImageMeta) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for ContainerImagesResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_images_response_links.rs b/src/datadogV2/model/model_container_images_response_links.rs index e9db501de..8737b7ca8 100644 --- a/src/datadogV2/model/model_container_images_response_links.rs +++ b/src/datadogV2/model/model_container_images_response_links.rs @@ -35,6 +35,31 @@ impl ContainerImagesResponseLinks { self_: None, } } + + pub fn with_first(&mut self, value: String) -> &mut Self { + self.first = Some(value); + self + } + + pub fn with_last(&mut self, value: Option) -> &mut Self { + self.last = Some(value); + self + } + + pub fn with_next(&mut self, value: Option) -> &mut Self { + self.next = Some(value); + self + } + + pub fn with_prev(&mut self, value: Option) -> &mut Self { + self.prev = Some(value); + self + } + + pub fn with_self_(&mut self, value: String) -> &mut Self { + self.self_ = Some(value); + self + } } impl Default for ContainerImagesResponseLinks { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_item.rs b/src/datadogV2/model/model_container_item.rs index 11146742c..d5f9cf971 100644 --- a/src/datadogV2/model/model_container_item.rs +++ b/src/datadogV2/model/model_container_item.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ContainerItem { - Container(Box), - ContainerGroup(Box), + Container(crate::datadogV2::model::Container), + ContainerGroup(crate::datadogV2::model::ContainerGroup), } diff --git a/src/datadogV2/model/model_container_meta.rs b/src/datadogV2/model/model_container_meta.rs index ff8ea51fb..bb5cd8d19 100644 --- a/src/datadogV2/model/model_container_meta.rs +++ b/src/datadogV2/model/model_container_meta.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct ContainerMeta { /// Paging attributes. #[serde(rename = "pagination")] - pub pagination: Option>, + pub pagination: Option, } impl ContainerMeta { pub fn new() -> ContainerMeta { ContainerMeta { pagination: None } } + + pub fn with_pagination( + &mut self, + value: crate::datadogV2::model::ContainerMetaPage, + ) -> &mut Self { + self.pagination = Some(value); + self + } } impl Default for ContainerMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_container_meta_page.rs b/src/datadogV2/model/model_container_meta_page.rs index 225ada620..e251d6487 100644 --- a/src/datadogV2/model/model_container_meta_page.rs +++ b/src/datadogV2/model/model_container_meta_page.rs @@ -43,6 +43,39 @@ impl ContainerMetaPage { type_: None, } } + + pub fn with_cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + self + } + + pub fn with_limit(&mut self, value: i32) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_next_cursor(&mut self, value: String) -> &mut Self { + self.next_cursor = Some(value); + self + } + + pub fn with_prev_cursor(&mut self, value: Option) -> &mut Self { + self.prev_cursor = Some(value); + self + } + + pub fn with_total(&mut self, value: i64) -> &mut Self { + self.total = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::ContainerMetaPageType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for ContainerMetaPage { fn default() -> Self { diff --git a/src/datadogV2/model/model_containers_response.rs b/src/datadogV2/model/model_containers_response.rs index fc84b398b..2ab96fef6 100644 --- a/src/datadogV2/model/model_containers_response.rs +++ b/src/datadogV2/model/model_containers_response.rs @@ -13,10 +13,10 @@ pub struct ContainersResponse { pub data: Option>, /// Pagination links. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, /// Response metadata object. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl ContainersResponse { @@ -27,6 +27,24 @@ impl ContainersResponse { meta: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links( + &mut self, + value: crate::datadogV2::model::ContainersResponseLinks, + ) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::ContainerMeta) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for ContainersResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_containers_response_links.rs b/src/datadogV2/model/model_containers_response_links.rs index bd78a3680..96110005d 100644 --- a/src/datadogV2/model/model_containers_response_links.rs +++ b/src/datadogV2/model/model_containers_response_links.rs @@ -35,6 +35,31 @@ impl ContainersResponseLinks { self_: None, } } + + pub fn with_first(&mut self, value: String) -> &mut Self { + self.first = Some(value); + self + } + + pub fn with_last(&mut self, value: Option) -> &mut Self { + self.last = Some(value); + self + } + + pub fn with_next(&mut self, value: Option) -> &mut Self { + self.next = Some(value); + self + } + + pub fn with_prev(&mut self, value: Option) -> &mut Self { + self.prev = Some(value); + self + } + + pub fn with_self_(&mut self, value: String) -> &mut Self { + self.self_ = Some(value); + self + } } impl Default for ContainersResponseLinks { fn default() -> Self { diff --git a/src/datadogV2/model/model_cost_attribution_aggregates_body.rs b/src/datadogV2/model/model_cost_attribution_aggregates_body.rs index c25898502..b3beda72a 100644 --- a/src/datadogV2/model/model_cost_attribution_aggregates_body.rs +++ b/src/datadogV2/model/model_cost_attribution_aggregates_body.rs @@ -27,6 +27,21 @@ impl CostAttributionAggregatesBody { value: None, } } + + pub fn with_agg_type(&mut self, value: String) -> &mut Self { + self.agg_type = Some(value); + self + } + + pub fn with_field(&mut self, value: String) -> &mut Self { + self.field = Some(value); + self + } + + pub fn with_value(&mut self, value: f64) -> &mut Self { + self.value = Some(value); + self + } } impl Default for CostAttributionAggregatesBody { fn default() -> Self { diff --git a/src/datadogV2/model/model_cost_by_org.rs b/src/datadogV2/model/model_cost_by_org.rs index e1f98ca36..c11afd998 100644 --- a/src/datadogV2/model/model_cost_by_org.rs +++ b/src/datadogV2/model/model_cost_by_org.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct CostByOrg { /// Cost attributes data. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Unique ID of the response. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl CostByOrg { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::CostByOrgAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::CostByOrgType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for CostByOrg { fn default() -> Self { diff --git a/src/datadogV2/model/model_cost_by_org_attributes.rs b/src/datadogV2/model/model_cost_by_org_attributes.rs index 73be882c6..9d70f62d9 100644 --- a/src/datadogV2/model/model_cost_by_org_attributes.rs +++ b/src/datadogV2/model/model_cost_by_org_attributes.rs @@ -39,6 +39,39 @@ impl CostByOrgAttributes { total_cost: None, } } + + pub fn with_charges( + &mut self, + value: Vec, + ) -> &mut Self { + self.charges = Some(value); + self + } + + pub fn with_date(&mut self, value: String) -> &mut Self { + self.date = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } + + pub fn with_total_cost(&mut self, value: f64) -> &mut Self { + self.total_cost = Some(value); + self + } } impl Default for CostByOrgAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_cost_by_org_response.rs b/src/datadogV2/model/model_cost_by_org_response.rs index 7ead2cdd3..ce4161049 100644 --- a/src/datadogV2/model/model_cost_by_org_response.rs +++ b/src/datadogV2/model/model_cost_by_org_response.rs @@ -17,6 +17,11 @@ impl CostByOrgResponse { pub fn new() -> CostByOrgResponse { CostByOrgResponse { data: None } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } } impl Default for CostByOrgResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_create_rule_request.rs b/src/datadogV2/model/model_create_rule_request.rs index 52522cb06..abbc67c85 100644 --- a/src/datadogV2/model/model_create_rule_request.rs +++ b/src/datadogV2/model/model_create_rule_request.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct CreateRuleRequest { /// Scorecard create rule request data. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl CreateRuleRequest { pub fn new() -> CreateRuleRequest { CreateRuleRequest { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::CreateRuleRequestData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for CreateRuleRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_create_rule_request_data.rs b/src/datadogV2/model/model_create_rule_request_data.rs index b0f215b41..827912a36 100644 --- a/src/datadogV2/model/model_create_rule_request_data.rs +++ b/src/datadogV2/model/model_create_rule_request_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct CreateRuleRequestData { /// Details of a rule. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The JSON:API type for scorecard rules. #[serde(rename = "type")] pub type_: Option, @@ -23,6 +23,16 @@ impl CreateRuleRequestData { type_: None, } } + + pub fn with_attributes(&mut self, value: crate::datadogV2::model::RuleAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::RuleType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for CreateRuleRequestData { fn default() -> Self { diff --git a/src/datadogV2/model/model_create_rule_response.rs b/src/datadogV2/model/model_create_rule_response.rs index 44d1f8a7d..5a081b0ed 100644 --- a/src/datadogV2/model/model_create_rule_response.rs +++ b/src/datadogV2/model/model_create_rule_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct CreateRuleResponse { /// Create rule response data. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl CreateRuleResponse { pub fn new() -> CreateRuleResponse { CreateRuleResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::CreateRuleResponseData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for CreateRuleResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_create_rule_response_data.rs b/src/datadogV2/model/model_create_rule_response_data.rs index d474daefe..36f1767f9 100644 --- a/src/datadogV2/model/model_create_rule_response_data.rs +++ b/src/datadogV2/model/model_create_rule_response_data.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct CreateRuleResponseData { /// Details of a rule. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The unique ID for a scorecard rule. #[serde(rename = "id")] pub id: Option, /// Scorecard create rule response relationship. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// The JSON:API type for scorecard rules. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,29 @@ impl CreateRuleResponseData { type_: None, } } + + pub fn with_attributes(&mut self, value: crate::datadogV2::model::RuleAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::RelationshipToRule, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::RuleType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for CreateRuleResponseData { fn default() -> Self { diff --git a/src/datadogV2/model/model_creator.rs b/src/datadogV2/model/model_creator.rs index 994833fb0..091b15e1e 100644 --- a/src/datadogV2/model/model_creator.rs +++ b/src/datadogV2/model/model_creator.rs @@ -27,6 +27,21 @@ impl Creator { name: None, } } + + pub fn with_email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn with_handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + self + } + + pub fn with_name(&mut self, value: Option) -> &mut Self { + self.name = Some(value); + self + } } impl Default for Creator { fn default() -> Self { diff --git a/src/datadogV2/model/model_dashboard_list_add_items_request.rs b/src/datadogV2/model/model_dashboard_list_add_items_request.rs index dd09f11fd..28861dc37 100644 --- a/src/datadogV2/model/model_dashboard_list_add_items_request.rs +++ b/src/datadogV2/model/model_dashboard_list_add_items_request.rs @@ -17,6 +17,14 @@ impl DashboardListAddItemsRequest { pub fn new() -> DashboardListAddItemsRequest { DashboardListAddItemsRequest { dashboards: None } } + + pub fn with_dashboards( + &mut self, + value: Vec, + ) -> &mut Self { + self.dashboards = Some(value); + self + } } impl Default for DashboardListAddItemsRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_dashboard_list_add_items_response.rs b/src/datadogV2/model/model_dashboard_list_add_items_response.rs index c4c066e06..76e1da1d0 100644 --- a/src/datadogV2/model/model_dashboard_list_add_items_response.rs +++ b/src/datadogV2/model/model_dashboard_list_add_items_response.rs @@ -19,6 +19,14 @@ impl DashboardListAddItemsResponse { added_dashboards_to_list: None, } } + + pub fn with_added_dashboards_to_list( + &mut self, + value: Vec, + ) -> &mut Self { + self.added_dashboards_to_list = Some(value); + self + } } impl Default for DashboardListAddItemsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_dashboard_list_delete_items_request.rs b/src/datadogV2/model/model_dashboard_list_delete_items_request.rs index 88224fde5..bfd730ed2 100644 --- a/src/datadogV2/model/model_dashboard_list_delete_items_request.rs +++ b/src/datadogV2/model/model_dashboard_list_delete_items_request.rs @@ -17,6 +17,14 @@ impl DashboardListDeleteItemsRequest { pub fn new() -> DashboardListDeleteItemsRequest { DashboardListDeleteItemsRequest { dashboards: None } } + + pub fn with_dashboards( + &mut self, + value: Vec, + ) -> &mut Self { + self.dashboards = Some(value); + self + } } impl Default for DashboardListDeleteItemsRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_dashboard_list_delete_items_response.rs b/src/datadogV2/model/model_dashboard_list_delete_items_response.rs index c1ba214bd..bef2f74d1 100644 --- a/src/datadogV2/model/model_dashboard_list_delete_items_response.rs +++ b/src/datadogV2/model/model_dashboard_list_delete_items_response.rs @@ -20,6 +20,14 @@ impl DashboardListDeleteItemsResponse { deleted_dashboards_from_list: None, } } + + pub fn with_deleted_dashboards_from_list( + &mut self, + value: Vec, + ) -> &mut Self { + self.deleted_dashboards_from_list = Some(value); + self + } } impl Default for DashboardListDeleteItemsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_dashboard_list_item.rs b/src/datadogV2/model/model_dashboard_list_item.rs index 2bf9b0795..1fd1636c4 100644 --- a/src/datadogV2/model/model_dashboard_list_item.rs +++ b/src/datadogV2/model/model_dashboard_list_item.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct DashboardListItem { /// Creator of the object. #[serde(rename = "author")] - pub author: Option>, + pub author: Option, /// Date of creation of the dashboard. #[serde(rename = "created")] pub created: Option, @@ -75,4 +75,64 @@ impl DashboardListItem { url: None, } } + + pub fn with_author(&mut self, value: crate::datadogV2::model::Creator) -> &mut Self { + self.author = Some(value); + self + } + + pub fn with_created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn with_icon(&mut self, value: Option) -> &mut Self { + self.icon = Some(value); + self + } + + pub fn with_integration_id(&mut self, value: Option) -> &mut Self { + self.integration_id = Some(value); + self + } + + pub fn with_is_favorite(&mut self, value: bool) -> &mut Self { + self.is_favorite = Some(value); + self + } + + pub fn with_is_read_only(&mut self, value: bool) -> &mut Self { + self.is_read_only = Some(value); + self + } + + pub fn with_is_shared(&mut self, value: bool) -> &mut Self { + self.is_shared = Some(value); + self + } + + pub fn with_modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn with_popularity(&mut self, value: i32) -> &mut Self { + self.popularity = Some(value); + self + } + + pub fn with_tags(&mut self, value: Option>) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_url(&mut self, value: String) -> &mut Self { + self.url = Some(value); + self + } } diff --git a/src/datadogV2/model/model_dashboard_list_items.rs b/src/datadogV2/model/model_dashboard_list_items.rs index cf30363a3..e0227e8cc 100644 --- a/src/datadogV2/model/model_dashboard_list_items.rs +++ b/src/datadogV2/model/model_dashboard_list_items.rs @@ -23,4 +23,9 @@ impl DashboardListItems { total: None, } } + + pub fn with_total(&mut self, value: i64) -> &mut Self { + self.total = Some(value); + self + } } diff --git a/src/datadogV2/model/model_dashboard_list_update_items_request.rs b/src/datadogV2/model/model_dashboard_list_update_items_request.rs index 3afb47e8d..f32ab6266 100644 --- a/src/datadogV2/model/model_dashboard_list_update_items_request.rs +++ b/src/datadogV2/model/model_dashboard_list_update_items_request.rs @@ -17,6 +17,14 @@ impl DashboardListUpdateItemsRequest { pub fn new() -> DashboardListUpdateItemsRequest { DashboardListUpdateItemsRequest { dashboards: None } } + + pub fn with_dashboards( + &mut self, + value: Vec, + ) -> &mut Self { + self.dashboards = Some(value); + self + } } impl Default for DashboardListUpdateItemsRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_dashboard_list_update_items_response.rs b/src/datadogV2/model/model_dashboard_list_update_items_response.rs index 72358ed5c..a1f846839 100644 --- a/src/datadogV2/model/model_dashboard_list_update_items_response.rs +++ b/src/datadogV2/model/model_dashboard_list_update_items_response.rs @@ -17,6 +17,14 @@ impl DashboardListUpdateItemsResponse { pub fn new() -> DashboardListUpdateItemsResponse { DashboardListUpdateItemsResponse { dashboards: None } } + + pub fn with_dashboards( + &mut self, + value: Vec, + ) -> &mut Self { + self.dashboards = Some(value); + self + } } impl Default for DashboardListUpdateItemsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_data_scalar_column.rs b/src/datadogV2/model/model_data_scalar_column.rs index 13c100440..65c0c1434 100644 --- a/src/datadogV2/model/model_data_scalar_column.rs +++ b/src/datadogV2/model/model_data_scalar_column.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct DataScalarColumn { /// Metadata for the resulting numerical values. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, /// The name referencing the formula or query for this column. #[serde(rename = "name")] pub name: Option, @@ -31,6 +31,29 @@ impl DataScalarColumn { values: None, } } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::ScalarMeta) -> &mut Self { + self.meta = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::ScalarColumnTypeNumber, + ) -> &mut Self { + self.type_ = Some(value); + self + } + + pub fn with_values(&mut self, value: Vec>) -> &mut Self { + self.values = Some(value); + self + } } impl Default for DataScalarColumn { fn default() -> Self { diff --git a/src/datadogV2/model/model_detailed_finding.rs b/src/datadogV2/model/model_detailed_finding.rs index b6d09a21a..1b1d67ae1 100644 --- a/src/datadogV2/model/model_detailed_finding.rs +++ b/src/datadogV2/model/model_detailed_finding.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct DetailedFinding { /// The JSON:API attributes of the detailed finding. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The unique ID for this finding. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl DetailedFinding { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::DetailedFindingAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::DetailedFindingType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for DetailedFinding { fn default() -> Self { diff --git a/src/datadogV2/model/model_detailed_finding_attributes.rs b/src/datadogV2/model/model_detailed_finding_attributes.rs index c24da0421..8678c6143 100644 --- a/src/datadogV2/model/model_detailed_finding_attributes.rs +++ b/src/datadogV2/model/model_detailed_finding_attributes.rs @@ -19,7 +19,7 @@ pub struct DetailedFindingAttributes { pub message: Option, /// Information about the mute status of this finding. #[serde(rename = "mute")] - pub mute: Option>, + pub mute: Option, /// The resource name of this finding. #[serde(rename = "resource")] pub resource: Option, @@ -34,7 +34,7 @@ pub struct DetailedFindingAttributes { pub resource_type: Option, /// The rule that triggered this finding. #[serde(rename = "rule")] - pub rule: Option>, + pub rule: Option, /// The status of the finding. #[serde(rename = "status")] pub status: Option, @@ -59,6 +59,67 @@ impl DetailedFindingAttributes { tags: None, } } + + pub fn with_evaluation( + &mut self, + value: crate::datadogV2::model::FindingEvaluation, + ) -> &mut Self { + self.evaluation = Some(value); + self + } + + pub fn with_evaluation_changed_at(&mut self, value: i64) -> &mut Self { + self.evaluation_changed_at = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_mute(&mut self, value: crate::datadogV2::model::FindingMute) -> &mut Self { + self.mute = Some(value); + self + } + + pub fn with_resource(&mut self, value: String) -> &mut Self { + self.resource = Some(value); + self + } + + pub fn with_resource_configuration( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.resource_configuration = Some(value); + self + } + + pub fn with_resource_discovery_date(&mut self, value: i64) -> &mut Self { + self.resource_discovery_date = Some(value); + self + } + + pub fn with_resource_type(&mut self, value: String) -> &mut Self { + self.resource_type = Some(value); + self + } + + pub fn with_rule(&mut self, value: crate::datadogV2::model::FindingRule) -> &mut Self { + self.rule = Some(value); + self + } + + pub fn with_status(&mut self, value: crate::datadogV2::model::FindingStatus) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } impl Default for DetailedFindingAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_dora_deployment_request.rs b/src/datadogV2/model/model_dora_deployment_request.rs index 6a5d1387b..8c69ededc 100644 --- a/src/datadogV2/model/model_dora_deployment_request.rs +++ b/src/datadogV2/model/model_dora_deployment_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct DORADeploymentRequest { /// The JSON:API data. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::DORADeploymentRequestData, } impl DORADeploymentRequest { - pub fn new( - data: Box, - ) -> DORADeploymentRequest { + pub fn new(data: crate::datadogV2::model::DORADeploymentRequestData) -> DORADeploymentRequest { DORADeploymentRequest { data } } } diff --git a/src/datadogV2/model/model_dora_deployment_request_attributes.rs b/src/datadogV2/model/model_dora_deployment_request_attributes.rs index 8399b2a36..19f9aaaaa 100644 --- a/src/datadogV2/model/model_dora_deployment_request_attributes.rs +++ b/src/datadogV2/model/model_dora_deployment_request_attributes.rs @@ -13,7 +13,7 @@ pub struct DORADeploymentRequestAttributes { pub finished_at: i64, /// Git info for DORA Metrics events. #[serde(rename = "git")] - pub git: Option>, + pub git: Option, /// Deployment ID. #[serde(rename = "id")] pub id: Option, @@ -43,4 +43,19 @@ impl DORADeploymentRequestAttributes { version: None, } } + + pub fn with_git(&mut self, value: crate::datadogV2::model::DORAGitInfo) -> &mut Self { + self.git = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_version(&mut self, value: String) -> &mut Self { + self.version = Some(value); + self + } } diff --git a/src/datadogV2/model/model_dora_deployment_request_data.rs b/src/datadogV2/model/model_dora_deployment_request_data.rs index 72c907fde..481fabdde 100644 --- a/src/datadogV2/model/model_dora_deployment_request_data.rs +++ b/src/datadogV2/model/model_dora_deployment_request_data.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct DORADeploymentRequestData { /// Attributes to create a DORA deployment event. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::DORADeploymentRequestAttributes, } impl DORADeploymentRequestData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::DORADeploymentRequestAttributes, ) -> DORADeploymentRequestData { DORADeploymentRequestData { attributes } } diff --git a/src/datadogV2/model/model_dora_deployment_response.rs b/src/datadogV2/model/model_dora_deployment_response.rs index e601f0525..0a00d8c48 100644 --- a/src/datadogV2/model/model_dora_deployment_response.rs +++ b/src/datadogV2/model/model_dora_deployment_response.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct DORADeploymentResponse { /// The JSON:API data. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::DORADeploymentResponseData, } impl DORADeploymentResponse { pub fn new( - data: Box, + data: crate::datadogV2::model::DORADeploymentResponseData, ) -> DORADeploymentResponse { DORADeploymentResponse { data } } diff --git a/src/datadogV2/model/model_dora_deployment_response_data.rs b/src/datadogV2/model/model_dora_deployment_response_data.rs index 9489070e5..59a8f71a7 100644 --- a/src/datadogV2/model/model_dora_deployment_response_data.rs +++ b/src/datadogV2/model/model_dora_deployment_response_data.rs @@ -20,4 +20,9 @@ impl DORADeploymentResponseData { pub fn new(id: String) -> DORADeploymentResponseData { DORADeploymentResponseData { id, type_: None } } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::DORADeploymentType) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV2/model/model_dora_incident_request.rs b/src/datadogV2/model/model_dora_incident_request.rs index 03376efe9..df74e6f93 100644 --- a/src/datadogV2/model/model_dora_incident_request.rs +++ b/src/datadogV2/model/model_dora_incident_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct DORAIncidentRequest { /// The JSON:API data. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::DORAIncidentRequestData, } impl DORAIncidentRequest { - pub fn new(data: Box) -> DORAIncidentRequest { + pub fn new(data: crate::datadogV2::model::DORAIncidentRequestData) -> DORAIncidentRequest { DORAIncidentRequest { data } } } diff --git a/src/datadogV2/model/model_dora_incident_request_attributes.rs b/src/datadogV2/model/model_dora_incident_request_attributes.rs index de0db0db1..b7e89c4a4 100644 --- a/src/datadogV2/model/model_dora_incident_request_attributes.rs +++ b/src/datadogV2/model/model_dora_incident_request_attributes.rs @@ -13,7 +13,7 @@ pub struct DORAIncidentRequestAttributes { pub finished_at: Option, /// Git info for DORA Metrics events. #[serde(rename = "git")] - pub git: Option>, + pub git: Option, /// Incident ID #[serde(rename = "id")] pub id: Option, @@ -47,4 +47,34 @@ impl DORAIncidentRequestAttributes { version: None, } } + + pub fn with_finished_at(&mut self, value: i64) -> &mut Self { + self.finished_at = Some(value); + self + } + + pub fn with_git(&mut self, value: crate::datadogV2::model::DORAGitInfo) -> &mut Self { + self.git = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_severity(&mut self, value: String) -> &mut Self { + self.severity = Some(value); + self + } + + pub fn with_version(&mut self, value: String) -> &mut Self { + self.version = Some(value); + self + } } diff --git a/src/datadogV2/model/model_dora_incident_request_data.rs b/src/datadogV2/model/model_dora_incident_request_data.rs index 4b7baa5b3..b8419ecb9 100644 --- a/src/datadogV2/model/model_dora_incident_request_data.rs +++ b/src/datadogV2/model/model_dora_incident_request_data.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct DORAIncidentRequestData { /// Attributes to create a DORA incident event. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::DORAIncidentRequestAttributes, } impl DORAIncidentRequestData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::DORAIncidentRequestAttributes, ) -> DORAIncidentRequestData { DORAIncidentRequestData { attributes } } diff --git a/src/datadogV2/model/model_dora_incident_response.rs b/src/datadogV2/model/model_dora_incident_response.rs index 63c013c54..1c91280ba 100644 --- a/src/datadogV2/model/model_dora_incident_response.rs +++ b/src/datadogV2/model/model_dora_incident_response.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct DORAIncidentResponse { /// Response after receiving a DORA incident event. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::DORAIncidentResponseData, } impl DORAIncidentResponse { - pub fn new( - data: Box, - ) -> DORAIncidentResponse { + pub fn new(data: crate::datadogV2::model::DORAIncidentResponseData) -> DORAIncidentResponse { DORAIncidentResponse { data } } } diff --git a/src/datadogV2/model/model_dora_incident_response_data.rs b/src/datadogV2/model/model_dora_incident_response_data.rs index 24ee768ae..f549f708c 100644 --- a/src/datadogV2/model/model_dora_incident_response_data.rs +++ b/src/datadogV2/model/model_dora_incident_response_data.rs @@ -20,4 +20,9 @@ impl DORAIncidentResponseData { pub fn new(id: String) -> DORAIncidentResponseData { DORAIncidentResponseData { id, type_: None } } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::DORAIncidentType) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV2/model/model_downtime_create_request.rs b/src/datadogV2/model/model_downtime_create_request.rs index 56feccb99..6beb88aa0 100644 --- a/src/datadogV2/model/model_downtime_create_request.rs +++ b/src/datadogV2/model/model_downtime_create_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct DowntimeCreateRequest { /// Object to create a downtime. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::DowntimeCreateRequestData, } impl DowntimeCreateRequest { - pub fn new( - data: Box, - ) -> DowntimeCreateRequest { + pub fn new(data: crate::datadogV2::model::DowntimeCreateRequestData) -> DowntimeCreateRequest { DowntimeCreateRequest { data } } } diff --git a/src/datadogV2/model/model_downtime_create_request_attributes.rs b/src/datadogV2/model/model_downtime_create_request_attributes.rs index 7d3e2e1d1..8495bdb2e 100644 --- a/src/datadogV2/model/model_downtime_create_request_attributes.rs +++ b/src/datadogV2/model/model_downtime_create_request_attributes.rs @@ -26,7 +26,7 @@ pub struct DowntimeCreateRequestAttributes { pub message: Option>, /// Monitor identifier for the downtime. #[serde(rename = "monitor_identifier")] - pub monitor_identifier: Box, + pub monitor_identifier: crate::datadogV2::model::DowntimeMonitorIdentifier, /// If the first recovery notification during a downtime should be muted. #[serde(rename = "mute_first_recovery_notification")] pub mute_first_recovery_notification: Option, @@ -38,7 +38,7 @@ pub struct DowntimeCreateRequestAttributes { pub notify_end_types: Option>, /// Schedule for the downtime. #[serde(rename = "schedule")] - pub schedule: Option>, + pub schedule: Option, /// The scope to which the downtime applies. Must follow the [common search syntax](). #[serde(rename = "scope")] pub scope: String, @@ -46,7 +46,7 @@ pub struct DowntimeCreateRequestAttributes { impl DowntimeCreateRequestAttributes { pub fn new( - monitor_identifier: Box, + monitor_identifier: crate::datadogV2::model::DowntimeMonitorIdentifier, scope: String, ) -> DowntimeCreateRequestAttributes { DowntimeCreateRequestAttributes { @@ -60,4 +60,43 @@ impl DowntimeCreateRequestAttributes { scope, } } + + pub fn with_display_timezone(&mut self, value: Option) -> &mut Self { + self.display_timezone = Some(value); + self + } + + pub fn with_message(&mut self, value: Option) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { + self.mute_first_recovery_notification = Some(value); + self + } + + pub fn with_notify_end_states( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_states = Some(value); + self + } + + pub fn with_notify_end_types( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_types = Some(value); + self + } + + pub fn with_schedule( + &mut self, + value: crate::datadogV2::model::DowntimeScheduleCreateRequest, + ) -> &mut Self { + self.schedule = Some(value); + self + } } diff --git a/src/datadogV2/model/model_downtime_create_request_data.rs b/src/datadogV2/model/model_downtime_create_request_data.rs index b214a41ad..7f57e0bca 100644 --- a/src/datadogV2/model/model_downtime_create_request_data.rs +++ b/src/datadogV2/model/model_downtime_create_request_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct DowntimeCreateRequestData { /// Downtime details. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::DowntimeCreateRequestAttributes, /// Downtime resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::DowntimeResourceType, @@ -18,7 +18,7 @@ pub struct DowntimeCreateRequestData { impl DowntimeCreateRequestData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::DowntimeCreateRequestAttributes, type_: crate::datadogV2::model::DowntimeResourceType, ) -> DowntimeCreateRequestData { DowntimeCreateRequestData { attributes, type_ } diff --git a/src/datadogV2/model/model_downtime_meta.rs b/src/datadogV2/model/model_downtime_meta.rs index c0a76bb0f..4f9c32499 100644 --- a/src/datadogV2/model/model_downtime_meta.rs +++ b/src/datadogV2/model/model_downtime_meta.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct DowntimeMeta { /// Object containing the total filtered count. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, } impl DowntimeMeta { pub fn new() -> DowntimeMeta { DowntimeMeta { page: None } } + + pub fn with_page(&mut self, value: crate::datadogV2::model::DowntimeMetaPage) -> &mut Self { + self.page = Some(value); + self + } } impl Default for DowntimeMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_downtime_meta_page.rs b/src/datadogV2/model/model_downtime_meta_page.rs index cdb22d0ad..f9d866807 100644 --- a/src/datadogV2/model/model_downtime_meta_page.rs +++ b/src/datadogV2/model/model_downtime_meta_page.rs @@ -19,6 +19,11 @@ impl DowntimeMetaPage { total_filtered_count: None, } } + + pub fn with_total_filtered_count(&mut self, value: i64) -> &mut Self { + self.total_filtered_count = Some(value); + self + } } impl Default for DowntimeMetaPage { fn default() -> Self { diff --git a/src/datadogV2/model/model_downtime_monitor_identifier.rs b/src/datadogV2/model/model_downtime_monitor_identifier.rs index 590be8eb6..10532083a 100644 --- a/src/datadogV2/model/model_downtime_monitor_identifier.rs +++ b/src/datadogV2/model/model_downtime_monitor_identifier.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum DowntimeMonitorIdentifier { - DowntimeMonitorIdentifierId(Box), - DowntimeMonitorIdentifierTags(Box), + DowntimeMonitorIdentifierId(crate::datadogV2::model::DowntimeMonitorIdentifierId), + DowntimeMonitorIdentifierTags(crate::datadogV2::model::DowntimeMonitorIdentifierTags), } diff --git a/src/datadogV2/model/model_downtime_monitor_included_attributes.rs b/src/datadogV2/model/model_downtime_monitor_included_attributes.rs index 97a4fac35..3ce07c80f 100644 --- a/src/datadogV2/model/model_downtime_monitor_included_attributes.rs +++ b/src/datadogV2/model/model_downtime_monitor_included_attributes.rs @@ -17,6 +17,11 @@ impl DowntimeMonitorIncludedAttributes { pub fn new() -> DowntimeMonitorIncludedAttributes { DowntimeMonitorIncludedAttributes { name: None } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } impl Default for DowntimeMonitorIncludedAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_downtime_monitor_included_item.rs b/src/datadogV2/model/model_downtime_monitor_included_item.rs index fe17e4383..eadf4fbd8 100644 --- a/src/datadogV2/model/model_downtime_monitor_included_item.rs +++ b/src/datadogV2/model/model_downtime_monitor_included_item.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct DowntimeMonitorIncludedItem { /// Attributes of the monitor identified by the downtime. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of the monitor identified by the downtime. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,27 @@ impl DowntimeMonitorIncludedItem { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::DowntimeMonitorIncludedAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::DowntimeIncludedMonitorType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for DowntimeMonitorIncludedItem { fn default() -> Self { diff --git a/src/datadogV2/model/model_downtime_relationships.rs b/src/datadogV2/model/model_downtime_relationships.rs index e252556fd..327831b0f 100644 --- a/src/datadogV2/model/model_downtime_relationships.rs +++ b/src/datadogV2/model/model_downtime_relationships.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct DowntimeRelationships { /// The user who created the downtime. #[serde(rename = "created_by")] - pub created_by: Option>, + pub created_by: Option, /// The monitor identified by the downtime. #[serde(rename = "monitor")] - pub monitor: Option>, + pub monitor: Option, } impl DowntimeRelationships { @@ -23,6 +23,22 @@ impl DowntimeRelationships { monitor: None, } } + + pub fn with_created_by( + &mut self, + value: crate::datadogV2::model::DowntimeRelationshipsCreatedBy, + ) -> &mut Self { + self.created_by = Some(value); + self + } + + pub fn with_monitor( + &mut self, + value: crate::datadogV2::model::DowntimeRelationshipsMonitor, + ) -> &mut Self { + self.monitor = Some(value); + self + } } impl Default for DowntimeRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_downtime_relationships_created_by.rs b/src/datadogV2/model/model_downtime_relationships_created_by.rs index 0cc03e878..8cc18dece 100644 --- a/src/datadogV2/model/model_downtime_relationships_created_by.rs +++ b/src/datadogV2/model/model_downtime_relationships_created_by.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct DowntimeRelationshipsCreatedBy { /// Data for the user who created the downtime. #[serde(rename = "data", default, with = "::serde_with::rust::double_option")] - pub data: Option>>, + pub data: Option>, } impl DowntimeRelationshipsCreatedBy { pub fn new() -> DowntimeRelationshipsCreatedBy { DowntimeRelationshipsCreatedBy { data: None } } + + pub fn with_data( + &mut self, + value: Option, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for DowntimeRelationshipsCreatedBy { fn default() -> Self { diff --git a/src/datadogV2/model/model_downtime_relationships_created_by_data.rs b/src/datadogV2/model/model_downtime_relationships_created_by_data.rs index 5bfd3025e..f270e6b58 100644 --- a/src/datadogV2/model/model_downtime_relationships_created_by_data.rs +++ b/src/datadogV2/model/model_downtime_relationships_created_by_data.rs @@ -23,6 +23,16 @@ impl DowntimeRelationshipsCreatedByData { type_: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::UsersType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for DowntimeRelationshipsCreatedByData { fn default() -> Self { diff --git a/src/datadogV2/model/model_downtime_relationships_monitor.rs b/src/datadogV2/model/model_downtime_relationships_monitor.rs index 293329683..1944e9f33 100644 --- a/src/datadogV2/model/model_downtime_relationships_monitor.rs +++ b/src/datadogV2/model/model_downtime_relationships_monitor.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct DowntimeRelationshipsMonitor { /// Data for the monitor. #[serde(rename = "data", default, with = "::serde_with::rust::double_option")] - pub data: Option>>, + pub data: Option>, } impl DowntimeRelationshipsMonitor { pub fn new() -> DowntimeRelationshipsMonitor { DowntimeRelationshipsMonitor { data: None } } + + pub fn with_data( + &mut self, + value: Option, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for DowntimeRelationshipsMonitor { fn default() -> Self { diff --git a/src/datadogV2/model/model_downtime_relationships_monitor_data.rs b/src/datadogV2/model/model_downtime_relationships_monitor_data.rs index e0d7ed892..c8834fc93 100644 --- a/src/datadogV2/model/model_downtime_relationships_monitor_data.rs +++ b/src/datadogV2/model/model_downtime_relationships_monitor_data.rs @@ -23,6 +23,19 @@ impl DowntimeRelationshipsMonitorData { type_: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::DowntimeIncludedMonitorType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for DowntimeRelationshipsMonitorData { fn default() -> Self { diff --git a/src/datadogV2/model/model_downtime_response.rs b/src/datadogV2/model/model_downtime_response.rs index 06e5492f7..a60580018 100644 --- a/src/datadogV2/model/model_downtime_response.rs +++ b/src/datadogV2/model/model_downtime_response.rs @@ -13,7 +13,7 @@ use serde_with::skip_serializing_none; pub struct DowntimeResponse { /// Downtime data. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// Array of objects related to the downtime that the user requested. #[serde(rename = "included")] pub included: Option>, @@ -26,6 +26,19 @@ impl DowntimeResponse { included: None, } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::DowntimeResponseData) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } } impl Default for DowntimeResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_downtime_response_attributes.rs b/src/datadogV2/model/model_downtime_response_attributes.rs index 521229555..cc9e86285 100644 --- a/src/datadogV2/model/model_downtime_response_attributes.rs +++ b/src/datadogV2/model/model_downtime_response_attributes.rs @@ -39,7 +39,7 @@ pub struct DowntimeResponseAttributes { pub modified: Option, /// Monitor identifier for the downtime. #[serde(rename = "monitor_identifier")] - pub monitor_identifier: Option>, + pub monitor_identifier: Option, /// If the first recovery notification during a downtime should be muted. #[serde(rename = "mute_first_recovery_notification")] pub mute_first_recovery_notification: Option, @@ -53,7 +53,7 @@ pub struct DowntimeResponseAttributes { /// one-time and recurring. Recurring schedules may have up to five RRULE-based recurrences. If no schedules are /// provided, the downtime will begin immediately and never end. #[serde(rename = "schedule")] - pub schedule: Option>, + pub schedule: Option, /// The scope to which the downtime applies. Must follow the [common search syntax](). #[serde(rename = "scope")] pub scope: Option, @@ -79,6 +79,78 @@ impl DowntimeResponseAttributes { status: None, } } + + pub fn with_canceled(&mut self, value: Option) -> &mut Self { + self.canceled = Some(value); + self + } + + pub fn with_created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn with_display_timezone(&mut self, value: Option) -> &mut Self { + self.display_timezone = Some(value); + self + } + + pub fn with_message(&mut self, value: Option) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn with_monitor_identifier( + &mut self, + value: crate::datadogV2::model::DowntimeMonitorIdentifier, + ) -> &mut Self { + self.monitor_identifier = Some(value); + self + } + + pub fn with_mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { + self.mute_first_recovery_notification = Some(value); + self + } + + pub fn with_notify_end_states( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_states = Some(value); + self + } + + pub fn with_notify_end_types( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_types = Some(value); + self + } + + pub fn with_schedule( + &mut self, + value: crate::datadogV2::model::DowntimeScheduleResponse, + ) -> &mut Self { + self.schedule = Some(value); + self + } + + pub fn with_scope(&mut self, value: String) -> &mut Self { + self.scope = Some(value); + self + } + + pub fn with_status(&mut self, value: crate::datadogV2::model::DowntimeStatus) -> &mut Self { + self.status = Some(value); + self + } } impl Default for DowntimeResponseAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_downtime_response_data.rs b/src/datadogV2/model/model_downtime_response_data.rs index c39b28a88..f81e5d2f6 100644 --- a/src/datadogV2/model/model_downtime_response_data.rs +++ b/src/datadogV2/model/model_downtime_response_data.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct DowntimeResponseData { /// Downtime details. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The downtime ID. #[serde(rename = "id")] pub id: Option, /// All relationships associated with downtime. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Downtime resource type. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,35 @@ impl DowntimeResponseData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::DowntimeResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::DowntimeRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::DowntimeResourceType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for DowntimeResponseData { fn default() -> Self { diff --git a/src/datadogV2/model/model_downtime_response_included_item.rs b/src/datadogV2/model/model_downtime_response_included_item.rs index 65f88bdfc..d2381118e 100644 --- a/src/datadogV2/model/model_downtime_response_included_item.rs +++ b/src/datadogV2/model/model_downtime_response_included_item.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum DowntimeResponseIncludedItem { - User(Box), - DowntimeMonitorIncludedItem(Box), + User(crate::datadogV2::model::User), + DowntimeMonitorIncludedItem(crate::datadogV2::model::DowntimeMonitorIncludedItem), } diff --git a/src/datadogV2/model/model_downtime_schedule_create_request.rs b/src/datadogV2/model/model_downtime_schedule_create_request.rs index bbb44600d..de317e188 100644 --- a/src/datadogV2/model/model_downtime_schedule_create_request.rs +++ b/src/datadogV2/model/model_downtime_schedule_create_request.rs @@ -8,9 +8,9 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum DowntimeScheduleCreateRequest { DowntimeScheduleRecurrencesCreateRequest( - Box, + crate::datadogV2::model::DowntimeScheduleRecurrencesCreateRequest, ), DowntimeScheduleOneTimeCreateUpdateRequest( - Box, + crate::datadogV2::model::DowntimeScheduleOneTimeCreateUpdateRequest, ), } diff --git a/src/datadogV2/model/model_downtime_schedule_current_downtime_response.rs b/src/datadogV2/model/model_downtime_schedule_current_downtime_response.rs index 5f423a1d7..71ddbbd43 100644 --- a/src/datadogV2/model/model_downtime_schedule_current_downtime_response.rs +++ b/src/datadogV2/model/model_downtime_schedule_current_downtime_response.rs @@ -25,6 +25,16 @@ impl DowntimeScheduleCurrentDowntimeResponse { start: None, } } + + pub fn with_end(&mut self, value: Option) -> &mut Self { + self.end = Some(value); + self + } + + pub fn with_start(&mut self, value: String) -> &mut Self { + self.start = Some(value); + self + } } impl Default for DowntimeScheduleCurrentDowntimeResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_downtime_schedule_one_time_create_update_request.rs b/src/datadogV2/model/model_downtime_schedule_one_time_create_update_request.rs index b36c54775..e3ef92119 100644 --- a/src/datadogV2/model/model_downtime_schedule_one_time_create_update_request.rs +++ b/src/datadogV2/model/model_downtime_schedule_one_time_create_update_request.rs @@ -28,6 +28,16 @@ impl DowntimeScheduleOneTimeCreateUpdateRequest { additional_properties: std::collections::BTreeMap::new(), } } + + pub fn with_end(&mut self, value: Option) -> &mut Self { + self.end = Some(value); + self + } + + pub fn with_start(&mut self, value: Option) -> &mut Self { + self.start = Some(value); + self + } } impl Default for DowntimeScheduleOneTimeCreateUpdateRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_downtime_schedule_one_time_response.rs b/src/datadogV2/model/model_downtime_schedule_one_time_response.rs index 63b943c59..ae0034049 100644 --- a/src/datadogV2/model/model_downtime_schedule_one_time_response.rs +++ b/src/datadogV2/model/model_downtime_schedule_one_time_response.rs @@ -20,4 +20,9 @@ impl DowntimeScheduleOneTimeResponse { pub fn new(start: String) -> DowntimeScheduleOneTimeResponse { DowntimeScheduleOneTimeResponse { end: None, start } } + + pub fn with_end(&mut self, value: Option) -> &mut Self { + self.end = Some(value); + self + } } diff --git a/src/datadogV2/model/model_downtime_schedule_recurrence_create_update_request.rs b/src/datadogV2/model/model_downtime_schedule_recurrence_create_update_request.rs index 93bc6dc3c..c023bf8e8 100644 --- a/src/datadogV2/model/model_downtime_schedule_recurrence_create_update_request.rs +++ b/src/datadogV2/model/model_downtime_schedule_recurrence_create_update_request.rs @@ -36,4 +36,9 @@ impl DowntimeScheduleRecurrenceCreateUpdateRequest { additional_properties: std::collections::BTreeMap::new(), } } + + pub fn with_start(&mut self, value: Option) -> &mut Self { + self.start = Some(value); + self + } } diff --git a/src/datadogV2/model/model_downtime_schedule_recurrence_response.rs b/src/datadogV2/model/model_downtime_schedule_recurrence_response.rs index 3b9050628..4293890b2 100644 --- a/src/datadogV2/model/model_downtime_schedule_recurrence_response.rs +++ b/src/datadogV2/model/model_downtime_schedule_recurrence_response.rs @@ -33,6 +33,21 @@ impl DowntimeScheduleRecurrenceResponse { start: None, } } + + pub fn with_duration(&mut self, value: String) -> &mut Self { + self.duration = Some(value); + self + } + + pub fn with_rrule(&mut self, value: String) -> &mut Self { + self.rrule = Some(value); + self + } + + pub fn with_start(&mut self, value: String) -> &mut Self { + self.start = Some(value); + self + } } impl Default for DowntimeScheduleRecurrenceResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_downtime_schedule_recurrences_create_request.rs b/src/datadogV2/model/model_downtime_schedule_recurrences_create_request.rs index 644054ab5..65c57a263 100644 --- a/src/datadogV2/model/model_downtime_schedule_recurrences_create_request.rs +++ b/src/datadogV2/model/model_downtime_schedule_recurrences_create_request.rs @@ -25,4 +25,9 @@ impl DowntimeScheduleRecurrencesCreateRequest { timezone: None, } } + + pub fn with_timezone(&mut self, value: String) -> &mut Self { + self.timezone = Some(value); + self + } } diff --git a/src/datadogV2/model/model_downtime_schedule_recurrences_response.rs b/src/datadogV2/model/model_downtime_schedule_recurrences_response.rs index 5dfd44b13..65cbb6909 100644 --- a/src/datadogV2/model/model_downtime_schedule_recurrences_response.rs +++ b/src/datadogV2/model/model_downtime_schedule_recurrences_response.rs @@ -12,8 +12,7 @@ pub struct DowntimeScheduleRecurrencesResponse { /// this is the previously occurring downtime. For active downtimes, this is the ongoing downtime, and for scheduled /// downtimes it is the upcoming downtime. #[serde(rename = "current_downtime")] - pub current_downtime: - Option>, + pub current_downtime: Option, /// A list of downtime recurrences. #[serde(rename = "recurrences")] pub recurrences: Vec, @@ -33,4 +32,17 @@ impl DowntimeScheduleRecurrencesResponse { timezone: None, } } + + pub fn with_current_downtime( + &mut self, + value: crate::datadogV2::model::DowntimeScheduleCurrentDowntimeResponse, + ) -> &mut Self { + self.current_downtime = Some(value); + self + } + + pub fn with_timezone(&mut self, value: String) -> &mut Self { + self.timezone = Some(value); + self + } } diff --git a/src/datadogV2/model/model_downtime_schedule_recurrences_update_request.rs b/src/datadogV2/model/model_downtime_schedule_recurrences_update_request.rs index 98b507b51..307b7fb93 100644 --- a/src/datadogV2/model/model_downtime_schedule_recurrences_update_request.rs +++ b/src/datadogV2/model/model_downtime_schedule_recurrences_update_request.rs @@ -24,6 +24,19 @@ impl DowntimeScheduleRecurrencesUpdateRequest { timezone: None, } } + + pub fn with_recurrences( + &mut self, + value: Vec, + ) -> &mut Self { + self.recurrences = Some(value); + self + } + + pub fn with_timezone(&mut self, value: String) -> &mut Self { + self.timezone = Some(value); + self + } } impl Default for DowntimeScheduleRecurrencesUpdateRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_downtime_schedule_response.rs b/src/datadogV2/model/model_downtime_schedule_response.rs index 3044aa8e2..d875e12fc 100644 --- a/src/datadogV2/model/model_downtime_schedule_response.rs +++ b/src/datadogV2/model/model_downtime_schedule_response.rs @@ -10,7 +10,7 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum DowntimeScheduleResponse { DowntimeScheduleRecurrencesResponse( - Box, + crate::datadogV2::model::DowntimeScheduleRecurrencesResponse, ), - DowntimeScheduleOneTimeResponse(Box), + DowntimeScheduleOneTimeResponse(crate::datadogV2::model::DowntimeScheduleOneTimeResponse), } diff --git a/src/datadogV2/model/model_downtime_schedule_update_request.rs b/src/datadogV2/model/model_downtime_schedule_update_request.rs index 327ee133e..68b1d8c95 100644 --- a/src/datadogV2/model/model_downtime_schedule_update_request.rs +++ b/src/datadogV2/model/model_downtime_schedule_update_request.rs @@ -8,9 +8,9 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum DowntimeScheduleUpdateRequest { DowntimeScheduleRecurrencesUpdateRequest( - Box, + crate::datadogV2::model::DowntimeScheduleRecurrencesUpdateRequest, ), DowntimeScheduleOneTimeCreateUpdateRequest( - Box, + crate::datadogV2::model::DowntimeScheduleOneTimeCreateUpdateRequest, ), } diff --git a/src/datadogV2/model/model_downtime_update_request.rs b/src/datadogV2/model/model_downtime_update_request.rs index ae1442b85..1dcd5fcca 100644 --- a/src/datadogV2/model/model_downtime_update_request.rs +++ b/src/datadogV2/model/model_downtime_update_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct DowntimeUpdateRequest { /// Object to update a downtime. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::DowntimeUpdateRequestData, } impl DowntimeUpdateRequest { - pub fn new( - data: Box, - ) -> DowntimeUpdateRequest { + pub fn new(data: crate::datadogV2::model::DowntimeUpdateRequestData) -> DowntimeUpdateRequest { DowntimeUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_downtime_update_request_attributes.rs b/src/datadogV2/model/model_downtime_update_request_attributes.rs index 47858e116..f8d84933b 100644 --- a/src/datadogV2/model/model_downtime_update_request_attributes.rs +++ b/src/datadogV2/model/model_downtime_update_request_attributes.rs @@ -26,7 +26,7 @@ pub struct DowntimeUpdateRequestAttributes { pub message: Option>, /// Monitor identifier for the downtime. #[serde(rename = "monitor_identifier")] - pub monitor_identifier: Option>, + pub monitor_identifier: Option, /// If the first recovery notification during a downtime should be muted. #[serde(rename = "mute_first_recovery_notification")] pub mute_first_recovery_notification: Option, @@ -38,7 +38,7 @@ pub struct DowntimeUpdateRequestAttributes { pub notify_end_types: Option>, /// Schedule for the downtime. #[serde(rename = "schedule")] - pub schedule: Option>, + pub schedule: Option, /// The scope to which the downtime applies. Must follow the [common search syntax](). #[serde(rename = "scope")] pub scope: Option, @@ -57,6 +57,58 @@ impl DowntimeUpdateRequestAttributes { scope: None, } } + + pub fn with_display_timezone(&mut self, value: Option) -> &mut Self { + self.display_timezone = Some(value); + self + } + + pub fn with_message(&mut self, value: Option) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_monitor_identifier( + &mut self, + value: crate::datadogV2::model::DowntimeMonitorIdentifier, + ) -> &mut Self { + self.monitor_identifier = Some(value); + self + } + + pub fn with_mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { + self.mute_first_recovery_notification = Some(value); + self + } + + pub fn with_notify_end_states( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_states = Some(value); + self + } + + pub fn with_notify_end_types( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_types = Some(value); + self + } + + pub fn with_schedule( + &mut self, + value: crate::datadogV2::model::DowntimeScheduleUpdateRequest, + ) -> &mut Self { + self.schedule = Some(value); + self + } + + pub fn with_scope(&mut self, value: String) -> &mut Self { + self.scope = Some(value); + self + } } impl Default for DowntimeUpdateRequestAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_downtime_update_request_data.rs b/src/datadogV2/model/model_downtime_update_request_data.rs index 646aa0cf6..1fcd87750 100644 --- a/src/datadogV2/model/model_downtime_update_request_data.rs +++ b/src/datadogV2/model/model_downtime_update_request_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct DowntimeUpdateRequestData { /// Attributes of the downtime to update. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::DowntimeUpdateRequestAttributes, /// ID of this downtime. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct DowntimeUpdateRequestData { impl DowntimeUpdateRequestData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::DowntimeUpdateRequestAttributes, id: String, type_: crate::datadogV2::model::DowntimeResourceType, ) -> DowntimeUpdateRequestData { diff --git a/src/datadogV2/model/model_event.rs b/src/datadogV2/model/model_event.rs index a5d0a3ebb..c11106e86 100644 --- a/src/datadogV2/model/model_event.rs +++ b/src/datadogV2/model/model_event.rs @@ -31,6 +31,26 @@ impl Event { type_: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_source_id(&mut self, value: i64) -> &mut Self { + self.source_id = Some(value); + self + } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for Event { fn default() -> Self { diff --git a/src/datadogV2/model/model_event_attributes.rs b/src/datadogV2/model/model_event_attributes.rs index 26f145600..7285b3054 100644 --- a/src/datadogV2/model/model_event_attributes.rs +++ b/src/datadogV2/model/model_event_attributes.rs @@ -26,7 +26,7 @@ pub struct EventAttributes { pub event_object: Option, /// The metadata associated with a request. #[serde(rename = "evt")] - pub evt: Option>, + pub evt: Option, /// Host name to associate with the event. /// Any tags associated with the host are also applied to this event. #[serde(rename = "hostname")] @@ -37,7 +37,7 @@ pub struct EventAttributes { default, with = "::serde_with::rust::double_option" )] - pub monitor: Option>>, + pub monitor: Option>, /// List of groups referred to in the event. #[serde( rename = "monitor_groups", @@ -113,6 +113,107 @@ impl EventAttributes { title: None, } } + + pub fn with_aggregation_key(&mut self, value: String) -> &mut Self { + self.aggregation_key = Some(value); + self + } + + pub fn with_date_happened(&mut self, value: i64) -> &mut Self { + self.date_happened = Some(value); + self + } + + pub fn with_device_name(&mut self, value: String) -> &mut Self { + self.device_name = Some(value); + self + } + + pub fn with_duration(&mut self, value: i64) -> &mut Self { + self.duration = Some(value); + self + } + + pub fn with_event_object(&mut self, value: String) -> &mut Self { + self.event_object = Some(value); + self + } + + pub fn with_evt(&mut self, value: crate::datadogV2::model::Event) -> &mut Self { + self.evt = Some(value); + self + } + + pub fn with_hostname(&mut self, value: String) -> &mut Self { + self.hostname = Some(value); + self + } + + pub fn with_monitor( + &mut self, + value: Option, + ) -> &mut Self { + self.monitor = Some(value); + self + } + + pub fn with_monitor_groups(&mut self, value: Option>) -> &mut Self { + self.monitor_groups = Some(value); + self + } + + pub fn with_monitor_id(&mut self, value: Option) -> &mut Self { + self.monitor_id = Some(value); + self + } + + pub fn with_priority( + &mut self, + value: Option, + ) -> &mut Self { + self.priority = Some(value); + self + } + + pub fn with_related_event_id(&mut self, value: i64) -> &mut Self { + self.related_event_id = Some(value); + self + } + + pub fn with_service(&mut self, value: String) -> &mut Self { + self.service = Some(value); + self + } + + pub fn with_source_type_name(&mut self, value: String) -> &mut Self { + self.source_type_name = Some(value); + self + } + + pub fn with_sourcecategory(&mut self, value: String) -> &mut Self { + self.sourcecategory = Some(value); + self + } + + pub fn with_status(&mut self, value: crate::datadogV2::model::EventStatusType) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_timestamp(&mut self, value: i64) -> &mut Self { + self.timestamp = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } } impl Default for EventAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_event_response.rs b/src/datadogV2/model/model_event_response.rs index 60ff0ca4d..b542b894d 100644 --- a/src/datadogV2/model/model_event_response.rs +++ b/src/datadogV2/model/model_event_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct EventResponse { /// The object description of an event response attribute. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// the unique ID of the event. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl EventResponse { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::EventResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::EventType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for EventResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_event_response_attributes.rs b/src/datadogV2/model/model_event_response_attributes.rs index 686518222..f75838e83 100644 --- a/src/datadogV2/model/model_event_response_attributes.rs +++ b/src/datadogV2/model/model_event_response_attributes.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct EventResponseAttributes { /// Object description of attributes from your event. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The message of the event. #[serde(rename = "message")] pub message: Option, @@ -31,6 +31,29 @@ impl EventResponseAttributes { timestamp: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::EventAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_timestamp(&mut self, value: String) -> &mut Self { + self.timestamp = Some(value); + self + } } impl Default for EventResponseAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_events_compute.rs b/src/datadogV2/model/model_events_compute.rs index e1fbedde9..eaac3dacf 100644 --- a/src/datadogV2/model/model_events_compute.rs +++ b/src/datadogV2/model/model_events_compute.rs @@ -27,4 +27,14 @@ impl EventsCompute { metric: None, } } + + pub fn with_interval(&mut self, value: i64) -> &mut Self { + self.interval = Some(value); + self + } + + pub fn with_metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } } diff --git a/src/datadogV2/model/model_events_group_by.rs b/src/datadogV2/model/model_events_group_by.rs index 3a3c27684..89ab4fe98 100644 --- a/src/datadogV2/model/model_events_group_by.rs +++ b/src/datadogV2/model/model_events_group_by.rs @@ -16,7 +16,7 @@ pub struct EventsGroupBy { pub limit: Option, /// The dimension by which to sort a query's results. #[serde(rename = "sort")] - pub sort: Option>, + pub sort: Option, } impl EventsGroupBy { @@ -27,4 +27,14 @@ impl EventsGroupBy { sort: None, } } + + pub fn with_limit(&mut self, value: i32) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_sort(&mut self, value: crate::datadogV2::model::EventsGroupBySort) -> &mut Self { + self.sort = Some(value); + self + } } diff --git a/src/datadogV2/model/model_events_group_by_sort.rs b/src/datadogV2/model/model_events_group_by_sort.rs index 99d8eb674..c0c8d3e97 100644 --- a/src/datadogV2/model/model_events_group_by_sort.rs +++ b/src/datadogV2/model/model_events_group_by_sort.rs @@ -31,4 +31,19 @@ impl EventsGroupBySort { type_: None, } } + + pub fn with_metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn with_order(&mut self, value: crate::datadogV2::model::QuerySortOrder) -> &mut Self { + self.order = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::EventsSortType) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV2/model/model_events_list_request.rs b/src/datadogV2/model/model_events_list_request.rs index 28b0741ae..fc901514c 100644 --- a/src/datadogV2/model/model_events_list_request.rs +++ b/src/datadogV2/model/model_events_list_request.rs @@ -10,14 +10,14 @@ use serde_with::skip_serializing_none; pub struct EventsListRequest { /// The search and filter query settings. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// The global query options that are used. Either provide a timezone or a time offset but not both, /// otherwise the query fails. #[serde(rename = "options")] - pub options: Option>, + pub options: Option, /// Pagination settings. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, /// The sort parameters when querying events. #[serde(rename = "sort")] pub sort: Option, @@ -32,6 +32,29 @@ impl EventsListRequest { sort: None, } } + + pub fn with_filter(&mut self, value: crate::datadogV2::model::EventsQueryFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_options( + &mut self, + value: crate::datadogV2::model::EventsQueryOptions, + ) -> &mut Self { + self.options = Some(value); + self + } + + pub fn with_page(&mut self, value: crate::datadogV2::model::EventsRequestPage) -> &mut Self { + self.page = Some(value); + self + } + + pub fn with_sort(&mut self, value: crate::datadogV2::model::EventsSort) -> &mut Self { + self.sort = Some(value); + self + } } impl Default for EventsListRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_events_list_response.rs b/src/datadogV2/model/model_events_list_response.rs index 02c58a4ab..2ff4402b1 100644 --- a/src/datadogV2/model/model_events_list_response.rs +++ b/src/datadogV2/model/model_events_list_response.rs @@ -13,10 +13,10 @@ pub struct EventsListResponse { pub data: Option>, /// Links attributes. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, /// The metadata associated with a request. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl EventsListResponse { @@ -27,6 +27,27 @@ impl EventsListResponse { meta: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links( + &mut self, + value: crate::datadogV2::model::EventsListResponseLinks, + ) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::EventsResponseMetadata, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for EventsListResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_events_list_response_links.rs b/src/datadogV2/model/model_events_list_response_links.rs index d3271d5ad..b8b8187ac 100644 --- a/src/datadogV2/model/model_events_list_response_links.rs +++ b/src/datadogV2/model/model_events_list_response_links.rs @@ -18,6 +18,11 @@ impl EventsListResponseLinks { pub fn new() -> EventsListResponseLinks { EventsListResponseLinks { next: None } } + + pub fn with_next(&mut self, value: String) -> &mut Self { + self.next = Some(value); + self + } } impl Default for EventsListResponseLinks { fn default() -> Self { diff --git a/src/datadogV2/model/model_events_query_filter.rs b/src/datadogV2/model/model_events_query_filter.rs index 045a34d0a..1ee48ed0f 100644 --- a/src/datadogV2/model/model_events_query_filter.rs +++ b/src/datadogV2/model/model_events_query_filter.rs @@ -27,6 +27,21 @@ impl EventsQueryFilter { to: None, } } + + pub fn with_from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_to(&mut self, value: String) -> &mut Self { + self.to = Some(value); + self + } } impl Default for EventsQueryFilter { fn default() -> Self { diff --git a/src/datadogV2/model/model_events_query_options.rs b/src/datadogV2/model/model_events_query_options.rs index af4ea649d..f0e8ace36 100644 --- a/src/datadogV2/model/model_events_query_options.rs +++ b/src/datadogV2/model/model_events_query_options.rs @@ -24,6 +24,16 @@ impl EventsQueryOptions { timezone: None, } } + + pub fn with_time_offset(&mut self, value: i64) -> &mut Self { + self.time_offset = Some(value); + self + } + + pub fn with_timezone(&mut self, value: String) -> &mut Self { + self.timezone = Some(value); + self + } } impl Default for EventsQueryOptions { fn default() -> Self { diff --git a/src/datadogV2/model/model_events_request_page.rs b/src/datadogV2/model/model_events_request_page.rs index c2fb98380..38bbf4ce2 100644 --- a/src/datadogV2/model/model_events_request_page.rs +++ b/src/datadogV2/model/model_events_request_page.rs @@ -23,6 +23,16 @@ impl EventsRequestPage { limit: None, } } + + pub fn with_cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + self + } + + pub fn with_limit(&mut self, value: i32) -> &mut Self { + self.limit = Some(value); + self + } } impl Default for EventsRequestPage { fn default() -> Self { diff --git a/src/datadogV2/model/model_events_response_metadata.rs b/src/datadogV2/model/model_events_response_metadata.rs index 8d69c8c21..d9d5614c2 100644 --- a/src/datadogV2/model/model_events_response_metadata.rs +++ b/src/datadogV2/model/model_events_response_metadata.rs @@ -13,7 +13,7 @@ pub struct EventsResponseMetadata { pub elapsed: Option, /// Pagination attributes. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, /// The identifier of the request. #[serde(rename = "request_id")] pub request_id: Option, @@ -36,6 +36,37 @@ impl EventsResponseMetadata { warnings: None, } } + + pub fn with_elapsed(&mut self, value: i64) -> &mut Self { + self.elapsed = Some(value); + self + } + + pub fn with_page( + &mut self, + value: crate::datadogV2::model::EventsResponseMetadataPage, + ) -> &mut Self { + self.page = Some(value); + self + } + + pub fn with_request_id(&mut self, value: String) -> &mut Self { + self.request_id = Some(value); + self + } + + pub fn with_status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_warnings( + &mut self, + value: Vec, + ) -> &mut Self { + self.warnings = Some(value); + self + } } impl Default for EventsResponseMetadata { fn default() -> Self { diff --git a/src/datadogV2/model/model_events_response_metadata_page.rs b/src/datadogV2/model/model_events_response_metadata_page.rs index f3d2b570c..47dcc4f80 100644 --- a/src/datadogV2/model/model_events_response_metadata_page.rs +++ b/src/datadogV2/model/model_events_response_metadata_page.rs @@ -18,6 +18,11 @@ impl EventsResponseMetadataPage { pub fn new() -> EventsResponseMetadataPage { EventsResponseMetadataPage { after: None } } + + pub fn with_after(&mut self, value: String) -> &mut Self { + self.after = Some(value); + self + } } impl Default for EventsResponseMetadataPage { fn default() -> Self { diff --git a/src/datadogV2/model/model_events_scalar_query.rs b/src/datadogV2/model/model_events_scalar_query.rs index b2781049d..4b7220d91 100644 --- a/src/datadogV2/model/model_events_scalar_query.rs +++ b/src/datadogV2/model/model_events_scalar_query.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct EventsScalarQuery { /// The instructions for what to compute for this query. #[serde(rename = "compute")] - pub compute: Box, + pub compute: crate::datadogV2::model::EventsCompute, /// A data source that is powered by the Events Platform. #[serde(rename = "data_source")] pub data_source: crate::datadogV2::model::EventsDataSource, @@ -25,12 +25,12 @@ pub struct EventsScalarQuery { pub name: Option, /// Configuration of the search/filter for an events query. #[serde(rename = "search")] - pub search: Option>, + pub search: Option, } impl EventsScalarQuery { pub fn new( - compute: Box, + compute: crate::datadogV2::model::EventsCompute, data_source: crate::datadogV2::model::EventsDataSource, ) -> EventsScalarQuery { EventsScalarQuery { @@ -42,4 +42,27 @@ impl EventsScalarQuery { search: None, } } + + pub fn with_group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn with_indexes(&mut self, value: Vec) -> &mut Self { + self.indexes = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_search(&mut self, value: crate::datadogV2::model::EventsSearch) -> &mut Self { + self.search = Some(value); + self + } } diff --git a/src/datadogV2/model/model_events_search.rs b/src/datadogV2/model/model_events_search.rs index dcf3b6498..a10c4c4ff 100644 --- a/src/datadogV2/model/model_events_search.rs +++ b/src/datadogV2/model/model_events_search.rs @@ -17,6 +17,11 @@ impl EventsSearch { pub fn new() -> EventsSearch { EventsSearch { query: None } } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } } impl Default for EventsSearch { fn default() -> Self { diff --git a/src/datadogV2/model/model_events_timeseries_query.rs b/src/datadogV2/model/model_events_timeseries_query.rs index 0c81a08c1..bed1ae783 100644 --- a/src/datadogV2/model/model_events_timeseries_query.rs +++ b/src/datadogV2/model/model_events_timeseries_query.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct EventsTimeseriesQuery { /// The instructions for what to compute for this query. #[serde(rename = "compute")] - pub compute: Box, + pub compute: crate::datadogV2::model::EventsCompute, /// A data source that is powered by the Events Platform. #[serde(rename = "data_source")] pub data_source: crate::datadogV2::model::EventsDataSource, @@ -25,12 +25,12 @@ pub struct EventsTimeseriesQuery { pub name: Option, /// Configuration of the search/filter for an events query. #[serde(rename = "search")] - pub search: Option>, + pub search: Option, } impl EventsTimeseriesQuery { pub fn new( - compute: Box, + compute: crate::datadogV2::model::EventsCompute, data_source: crate::datadogV2::model::EventsDataSource, ) -> EventsTimeseriesQuery { EventsTimeseriesQuery { @@ -42,4 +42,27 @@ impl EventsTimeseriesQuery { search: None, } } + + pub fn with_group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn with_indexes(&mut self, value: Vec) -> &mut Self { + self.indexes = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_search(&mut self, value: crate::datadogV2::model::EventsSearch) -> &mut Self { + self.search = Some(value); + self + } } diff --git a/src/datadogV2/model/model_events_warning.rs b/src/datadogV2/model/model_events_warning.rs index 4154dfc51..f9c9c0a50 100644 --- a/src/datadogV2/model/model_events_warning.rs +++ b/src/datadogV2/model/model_events_warning.rs @@ -27,6 +27,21 @@ impl EventsWarning { title: None, } } + + pub fn with_code(&mut self, value: String) -> &mut Self { + self.code = Some(value); + self + } + + pub fn with_detail(&mut self, value: String) -> &mut Self { + self.detail = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } } impl Default for EventsWarning { fn default() -> Self { diff --git a/src/datadogV2/model/model_fastly_accoun_response_attributes.rs b/src/datadogV2/model/model_fastly_accoun_response_attributes.rs index f2b665b11..95892264a 100644 --- a/src/datadogV2/model/model_fastly_accoun_response_attributes.rs +++ b/src/datadogV2/model/model_fastly_accoun_response_attributes.rs @@ -23,4 +23,12 @@ impl FastlyAccounResponseAttributes { services: None, } } + + pub fn with_services( + &mut self, + value: Vec, + ) -> &mut Self { + self.services = Some(value); + self + } } diff --git a/src/datadogV2/model/model_fastly_account_create_request.rs b/src/datadogV2/model/model_fastly_account_create_request.rs index a79b1d0e6..c88b1b8ee 100644 --- a/src/datadogV2/model/model_fastly_account_create_request.rs +++ b/src/datadogV2/model/model_fastly_account_create_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct FastlyAccountCreateRequest { /// Data object for creating a Fastly account. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::FastlyAccountCreateRequestData, } impl FastlyAccountCreateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::FastlyAccountCreateRequestData, ) -> FastlyAccountCreateRequest { FastlyAccountCreateRequest { data } } diff --git a/src/datadogV2/model/model_fastly_account_create_request_attributes.rs b/src/datadogV2/model/model_fastly_account_create_request_attributes.rs index ad366ce43..b56230687 100644 --- a/src/datadogV2/model/model_fastly_account_create_request_attributes.rs +++ b/src/datadogV2/model/model_fastly_account_create_request_attributes.rs @@ -27,4 +27,12 @@ impl FastlyAccountCreateRequestAttributes { services: None, } } + + pub fn with_services( + &mut self, + value: Vec, + ) -> &mut Self { + self.services = Some(value); + self + } } diff --git a/src/datadogV2/model/model_fastly_account_create_request_data.rs b/src/datadogV2/model/model_fastly_account_create_request_data.rs index 11e518089..3bb578ba8 100644 --- a/src/datadogV2/model/model_fastly_account_create_request_data.rs +++ b/src/datadogV2/model/model_fastly_account_create_request_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct FastlyAccountCreateRequestData { /// Attributes object for creating a Fastly account. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::FastlyAccountCreateRequestAttributes, /// The JSON:API type for this API. Should always be `fastly-accounts`. #[serde(rename = "type")] pub type_: crate::datadogV2::model::FastlyAccountType, @@ -18,7 +18,7 @@ pub struct FastlyAccountCreateRequestData { impl FastlyAccountCreateRequestData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::FastlyAccountCreateRequestAttributes, type_: crate::datadogV2::model::FastlyAccountType, ) -> FastlyAccountCreateRequestData { FastlyAccountCreateRequestData { attributes, type_ } diff --git a/src/datadogV2/model/model_fastly_account_response.rs b/src/datadogV2/model/model_fastly_account_response.rs index 31a19edb2..06355aeb4 100644 --- a/src/datadogV2/model/model_fastly_account_response.rs +++ b/src/datadogV2/model/model_fastly_account_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct FastlyAccountResponse { /// Data object of a Fastly account. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl FastlyAccountResponse { pub fn new() -> FastlyAccountResponse { FastlyAccountResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::FastlyAccountResponseData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for FastlyAccountResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_fastly_account_response_data.rs b/src/datadogV2/model/model_fastly_account_response_data.rs index a432874c7..eb1bfcb77 100644 --- a/src/datadogV2/model/model_fastly_account_response_data.rs +++ b/src/datadogV2/model/model_fastly_account_response_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct FastlyAccountResponseData { /// Attributes object of a Fastly account. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::FastlyAccounResponseAttributes, /// The ID of the Fastly account, a hash of the account name. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct FastlyAccountResponseData { impl FastlyAccountResponseData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::FastlyAccounResponseAttributes, id: String, type_: crate::datadogV2::model::FastlyAccountType, ) -> FastlyAccountResponseData { diff --git a/src/datadogV2/model/model_fastly_account_update_request.rs b/src/datadogV2/model/model_fastly_account_update_request.rs index 75844fdd2..650d5b423 100644 --- a/src/datadogV2/model/model_fastly_account_update_request.rs +++ b/src/datadogV2/model/model_fastly_account_update_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct FastlyAccountUpdateRequest { /// Data object for updating a Fastly account. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::FastlyAccountUpdateRequestData, } impl FastlyAccountUpdateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::FastlyAccountUpdateRequestData, ) -> FastlyAccountUpdateRequest { FastlyAccountUpdateRequest { data } } diff --git a/src/datadogV2/model/model_fastly_account_update_request_attributes.rs b/src/datadogV2/model/model_fastly_account_update_request_attributes.rs index ac26f16a8..3db08fe10 100644 --- a/src/datadogV2/model/model_fastly_account_update_request_attributes.rs +++ b/src/datadogV2/model/model_fastly_account_update_request_attributes.rs @@ -17,6 +17,11 @@ impl FastlyAccountUpdateRequestAttributes { pub fn new() -> FastlyAccountUpdateRequestAttributes { FastlyAccountUpdateRequestAttributes { api_key: None } } + + pub fn with_api_key(&mut self, value: String) -> &mut Self { + self.api_key = Some(value); + self + } } impl Default for FastlyAccountUpdateRequestAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_fastly_account_update_request_data.rs b/src/datadogV2/model/model_fastly_account_update_request_data.rs index 0f142c58c..9c6bf7a02 100644 --- a/src/datadogV2/model/model_fastly_account_update_request_data.rs +++ b/src/datadogV2/model/model_fastly_account_update_request_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct FastlyAccountUpdateRequestData { /// Attributes object for updating a Fastly account. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The JSON:API type for this API. Should always be `fastly-accounts`. #[serde(rename = "type")] pub type_: Option, @@ -23,6 +23,19 @@ impl FastlyAccountUpdateRequestData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::FastlyAccountUpdateRequestAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::FastlyAccountType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for FastlyAccountUpdateRequestData { fn default() -> Self { diff --git a/src/datadogV2/model/model_fastly_accounts_response.rs b/src/datadogV2/model/model_fastly_accounts_response.rs index 47050cc93..1fbe23674 100644 --- a/src/datadogV2/model/model_fastly_accounts_response.rs +++ b/src/datadogV2/model/model_fastly_accounts_response.rs @@ -17,6 +17,14 @@ impl FastlyAccountsResponse { pub fn new() -> FastlyAccountsResponse { FastlyAccountsResponse { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for FastlyAccountsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_fastly_service.rs b/src/datadogV2/model/model_fastly_service.rs index 8229082d2..b666e6f6c 100644 --- a/src/datadogV2/model/model_fastly_service.rs +++ b/src/datadogV2/model/model_fastly_service.rs @@ -20,4 +20,9 @@ impl FastlyService { pub fn new(id: String) -> FastlyService { FastlyService { id, tags: None } } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } diff --git a/src/datadogV2/model/model_fastly_service_attributes.rs b/src/datadogV2/model/model_fastly_service_attributes.rs index 66f822f5a..c45ab550a 100644 --- a/src/datadogV2/model/model_fastly_service_attributes.rs +++ b/src/datadogV2/model/model_fastly_service_attributes.rs @@ -17,6 +17,11 @@ impl FastlyServiceAttributes { pub fn new() -> FastlyServiceAttributes { FastlyServiceAttributes { tags: None } } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } impl Default for FastlyServiceAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_fastly_service_data.rs b/src/datadogV2/model/model_fastly_service_data.rs index 398db4cbf..e6b7b9519 100644 --- a/src/datadogV2/model/model_fastly_service_data.rs +++ b/src/datadogV2/model/model_fastly_service_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct FastlyServiceData { /// Attributes object for Fastly service requests. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The ID of the Fastly service. #[serde(rename = "id")] pub id: String, @@ -27,4 +27,12 @@ impl FastlyServiceData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::FastlyServiceAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } } diff --git a/src/datadogV2/model/model_fastly_service_request.rs b/src/datadogV2/model/model_fastly_service_request.rs index e9bb45f74..9a14ea47e 100644 --- a/src/datadogV2/model/model_fastly_service_request.rs +++ b/src/datadogV2/model/model_fastly_service_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct FastlyServiceRequest { /// Data object for Fastly service requests. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::FastlyServiceData, } impl FastlyServiceRequest { - pub fn new(data: Box) -> FastlyServiceRequest { + pub fn new(data: crate::datadogV2::model::FastlyServiceData) -> FastlyServiceRequest { FastlyServiceRequest { data } } } diff --git a/src/datadogV2/model/model_fastly_service_response.rs b/src/datadogV2/model/model_fastly_service_response.rs index 7eaca064f..a8110c9eb 100644 --- a/src/datadogV2/model/model_fastly_service_response.rs +++ b/src/datadogV2/model/model_fastly_service_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct FastlyServiceResponse { /// Data object for Fastly service requests. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl FastlyServiceResponse { pub fn new() -> FastlyServiceResponse { FastlyServiceResponse { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::FastlyServiceData) -> &mut Self { + self.data = Some(value); + self + } } impl Default for FastlyServiceResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_fastly_services_response.rs b/src/datadogV2/model/model_fastly_services_response.rs index f744e18e7..88172fc5d 100644 --- a/src/datadogV2/model/model_fastly_services_response.rs +++ b/src/datadogV2/model/model_fastly_services_response.rs @@ -17,6 +17,14 @@ impl FastlyServicesResponse { pub fn new() -> FastlyServicesResponse { FastlyServicesResponse { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for FastlyServicesResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_finding.rs b/src/datadogV2/model/model_finding.rs index 3829f50b3..68e0de2fc 100644 --- a/src/datadogV2/model/model_finding.rs +++ b/src/datadogV2/model/model_finding.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct Finding { /// The JSON:API attributes of the finding. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The unique ID for this finding. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl Finding { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::FindingAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::FindingType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for Finding { fn default() -> Self { diff --git a/src/datadogV2/model/model_finding_attributes.rs b/src/datadogV2/model/model_finding_attributes.rs index 044cd8900..03420b755 100644 --- a/src/datadogV2/model/model_finding_attributes.rs +++ b/src/datadogV2/model/model_finding_attributes.rs @@ -16,7 +16,7 @@ pub struct FindingAttributes { pub evaluation_changed_at: Option, /// Information about the mute status of this finding. #[serde(rename = "mute")] - pub mute: Option>, + pub mute: Option, /// The resource name of this finding. #[serde(rename = "resource")] pub resource: Option, @@ -28,7 +28,7 @@ pub struct FindingAttributes { pub resource_type: Option, /// The rule that triggered this finding. #[serde(rename = "rule")] - pub rule: Option>, + pub rule: Option, /// The status of the finding. #[serde(rename = "status")] pub status: Option, @@ -51,6 +51,54 @@ impl FindingAttributes { tags: None, } } + + pub fn with_evaluation( + &mut self, + value: crate::datadogV2::model::FindingEvaluation, + ) -> &mut Self { + self.evaluation = Some(value); + self + } + + pub fn with_evaluation_changed_at(&mut self, value: i64) -> &mut Self { + self.evaluation_changed_at = Some(value); + self + } + + pub fn with_mute(&mut self, value: crate::datadogV2::model::FindingMute) -> &mut Self { + self.mute = Some(value); + self + } + + pub fn with_resource(&mut self, value: String) -> &mut Self { + self.resource = Some(value); + self + } + + pub fn with_resource_discovery_date(&mut self, value: i64) -> &mut Self { + self.resource_discovery_date = Some(value); + self + } + + pub fn with_resource_type(&mut self, value: String) -> &mut Self { + self.resource_type = Some(value); + self + } + + pub fn with_rule(&mut self, value: crate::datadogV2::model::FindingRule) -> &mut Self { + self.rule = Some(value); + self + } + + pub fn with_status(&mut self, value: crate::datadogV2::model::FindingStatus) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } impl Default for FindingAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_finding_mute.rs b/src/datadogV2/model/model_finding_mute.rs index 10df22a25..52e46255b 100644 --- a/src/datadogV2/model/model_finding_mute.rs +++ b/src/datadogV2/model/model_finding_mute.rs @@ -39,6 +39,36 @@ impl FindingMute { uuid: None, } } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_expiration_date(&mut self, value: i64) -> &mut Self { + self.expiration_date = Some(value); + self + } + + pub fn with_muted(&mut self, value: bool) -> &mut Self { + self.muted = Some(value); + self + } + + pub fn with_reason(&mut self, value: crate::datadogV2::model::FindingMuteReason) -> &mut Self { + self.reason = Some(value); + self + } + + pub fn with_start_date(&mut self, value: i64) -> &mut Self { + self.start_date = Some(value); + self + } + + pub fn with_uuid(&mut self, value: String) -> &mut Self { + self.uuid = Some(value); + self + } } impl Default for FindingMute { fn default() -> Self { diff --git a/src/datadogV2/model/model_finding_rule.rs b/src/datadogV2/model/model_finding_rule.rs index 875e804ea..cedb0323a 100644 --- a/src/datadogV2/model/model_finding_rule.rs +++ b/src/datadogV2/model/model_finding_rule.rs @@ -23,6 +23,16 @@ impl FindingRule { name: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } impl Default for FindingRule { fn default() -> Self { diff --git a/src/datadogV2/model/model_formula_limit.rs b/src/datadogV2/model/model_formula_limit.rs index b8a63af6b..e77f49c6b 100644 --- a/src/datadogV2/model/model_formula_limit.rs +++ b/src/datadogV2/model/model_formula_limit.rs @@ -24,6 +24,16 @@ impl FormulaLimit { order: None, } } + + pub fn with_count(&mut self, value: i32) -> &mut Self { + self.count = Some(value); + self + } + + pub fn with_order(&mut self, value: crate::datadogV2::model::QuerySortOrder) -> &mut Self { + self.order = Some(value); + self + } } impl Default for FormulaLimit { fn default() -> Self { diff --git a/src/datadogV2/model/model_full_api_key.rs b/src/datadogV2/model/model_full_api_key.rs index 63d3ebc1d..59ce84c6c 100644 --- a/src/datadogV2/model/model_full_api_key.rs +++ b/src/datadogV2/model/model_full_api_key.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct FullAPIKey { /// Attributes of a full API key. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of the API key. #[serde(rename = "id")] pub id: Option, /// Resources related to the API key. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// API Keys resource type. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,32 @@ impl FullAPIKey { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::FullAPIKeyAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::APIKeyRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::APIKeysType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for FullAPIKey { fn default() -> Self { diff --git a/src/datadogV2/model/model_full_api_key_attributes.rs b/src/datadogV2/model/model_full_api_key_attributes.rs index d0d9539c8..ff60e65ed 100644 --- a/src/datadogV2/model/model_full_api_key_attributes.rs +++ b/src/datadogV2/model/model_full_api_key_attributes.rs @@ -43,6 +43,41 @@ impl FullAPIKeyAttributes { remote_config_read_enabled: None, } } + + pub fn with_category(&mut self, value: String) -> &mut Self { + self.category = Some(value); + self + } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_key(&mut self, value: String) -> &mut Self { + self.key = Some(value); + self + } + + pub fn with_last4(&mut self, value: String) -> &mut Self { + self.last4 = Some(value); + self + } + + pub fn with_modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_remote_config_read_enabled(&mut self, value: bool) -> &mut Self { + self.remote_config_read_enabled = Some(value); + self + } } impl Default for FullAPIKeyAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_full_application_key.rs b/src/datadogV2/model/model_full_application_key.rs index f0e91b170..79ff0c6f1 100644 --- a/src/datadogV2/model/model_full_application_key.rs +++ b/src/datadogV2/model/model_full_application_key.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct FullApplicationKey { /// Attributes of a full application key. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of the application key. #[serde(rename = "id")] pub id: Option, /// Resources related to the application key. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Application Keys resource type. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,32 @@ impl FullApplicationKey { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::FullApplicationKeyAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::ApplicationKeyRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::ApplicationKeysType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for FullApplicationKey { fn default() -> Self { diff --git a/src/datadogV2/model/model_full_application_key_attributes.rs b/src/datadogV2/model/model_full_application_key_attributes.rs index a06c7b9e1..c08eb4e61 100644 --- a/src/datadogV2/model/model_full_application_key_attributes.rs +++ b/src/datadogV2/model/model_full_application_key_attributes.rs @@ -35,6 +35,31 @@ impl FullApplicationKeyAttributes { scopes: None, } } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_key(&mut self, value: String) -> &mut Self { + self.key = Some(value); + self + } + + pub fn with_last4(&mut self, value: String) -> &mut Self { + self.last4 = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_scopes(&mut self, value: Option>) -> &mut Self { + self.scopes = Some(value); + self + } } impl Default for FullApplicationKeyAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_gcp_service_account_meta.rs b/src/datadogV2/model/model_gcp_service_account_meta.rs index 82061ab8e..14ecd3208 100644 --- a/src/datadogV2/model/model_gcp_service_account_meta.rs +++ b/src/datadogV2/model/model_gcp_service_account_meta.rs @@ -19,6 +19,11 @@ impl GCPServiceAccountMeta { accessible_projects: None, } } + + pub fn with_accessible_projects(&mut self, value: Vec) -> &mut Self { + self.accessible_projects = Some(value); + self + } } impl Default for GCPServiceAccountMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_gcpsts_delegate_account.rs b/src/datadogV2/model/model_gcpsts_delegate_account.rs index 7b30c7c8e..b846672a8 100644 --- a/src/datadogV2/model/model_gcpsts_delegate_account.rs +++ b/src/datadogV2/model/model_gcpsts_delegate_account.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct GCPSTSDelegateAccount { /// Your delegate account attributes. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The ID of the delegate service account. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,27 @@ impl GCPSTSDelegateAccount { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::GCPSTSDelegateAccountAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::GCPSTSDelegateAccountType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for GCPSTSDelegateAccount { fn default() -> Self { diff --git a/src/datadogV2/model/model_gcpsts_delegate_account_attributes.rs b/src/datadogV2/model/model_gcpsts_delegate_account_attributes.rs index d44f862de..78b33a642 100644 --- a/src/datadogV2/model/model_gcpsts_delegate_account_attributes.rs +++ b/src/datadogV2/model/model_gcpsts_delegate_account_attributes.rs @@ -19,6 +19,11 @@ impl GCPSTSDelegateAccountAttributes { delegate_account_email: None, } } + + pub fn with_delegate_account_email(&mut self, value: String) -> &mut Self { + self.delegate_account_email = Some(value); + self + } } impl Default for GCPSTSDelegateAccountAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_gcpsts_delegate_account_response.rs b/src/datadogV2/model/model_gcpsts_delegate_account_response.rs index 5f908896d..7fc138f98 100644 --- a/src/datadogV2/model/model_gcpsts_delegate_account_response.rs +++ b/src/datadogV2/model/model_gcpsts_delegate_account_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct GCPSTSDelegateAccountResponse { /// Datadog principal service account info. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl GCPSTSDelegateAccountResponse { pub fn new() -> GCPSTSDelegateAccountResponse { GCPSTSDelegateAccountResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::GCPSTSDelegateAccount, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for GCPSTSDelegateAccountResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_gcpsts_service_account.rs b/src/datadogV2/model/model_gcpsts_service_account.rs index 2c6ffad3a..1b03e4f68 100644 --- a/src/datadogV2/model/model_gcpsts_service_account.rs +++ b/src/datadogV2/model/model_gcpsts_service_account.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct GCPSTSServiceAccount { /// Attributes associated with your service account. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Your service account's unique ID. #[serde(rename = "id")] pub id: Option, /// Additional information related to your service account. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, /// The type of account. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,35 @@ impl GCPSTSServiceAccount { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::GCPSTSServiceAccountAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::GCPServiceAccountMeta, + ) -> &mut Self { + self.meta = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::GCPServiceAccountType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for GCPSTSServiceAccount { fn default() -> Self { diff --git a/src/datadogV2/model/model_gcpsts_service_account_attributes.rs b/src/datadogV2/model/model_gcpsts_service_account_attributes.rs index 8e55134d8..387434d34 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_attributes.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_attributes.rs @@ -43,6 +43,41 @@ impl GCPSTSServiceAccountAttributes { resource_collection_enabled: None, } } + + pub fn with_account_tags(&mut self, value: Vec) -> &mut Self { + self.account_tags = Some(value); + self + } + + pub fn with_automute(&mut self, value: bool) -> &mut Self { + self.automute = Some(value); + self + } + + pub fn with_client_email(&mut self, value: String) -> &mut Self { + self.client_email = Some(value); + self + } + + pub fn with_host_filters(&mut self, value: Vec) -> &mut Self { + self.host_filters = Some(value); + self + } + + pub fn with_is_cspm_enabled(&mut self, value: bool) -> &mut Self { + self.is_cspm_enabled = Some(value); + self + } + + pub fn with_is_security_command_center_enabled(&mut self, value: bool) -> &mut Self { + self.is_security_command_center_enabled = Some(value); + self + } + + pub fn with_resource_collection_enabled(&mut self, value: bool) -> &mut Self { + self.resource_collection_enabled = Some(value); + self + } } impl Default for GCPSTSServiceAccountAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_gcpsts_service_account_create_request.rs b/src/datadogV2/model/model_gcpsts_service_account_create_request.rs index d79568c08..c28a95411 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_create_request.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_create_request.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct GCPSTSServiceAccountCreateRequest { /// Additional metadata on your generated service account. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl GCPSTSServiceAccountCreateRequest { pub fn new() -> GCPSTSServiceAccountCreateRequest { GCPSTSServiceAccountCreateRequest { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::GCPSTSServiceAccountData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for GCPSTSServiceAccountCreateRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_gcpsts_service_account_data.rs b/src/datadogV2/model/model_gcpsts_service_account_data.rs index bbea22730..9f6b7722d 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_data.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct GCPSTSServiceAccountData { /// Attributes associated with your service account. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The type of account. #[serde(rename = "type")] pub type_: Option, @@ -23,6 +23,22 @@ impl GCPSTSServiceAccountData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::GCPSTSServiceAccountAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::GCPServiceAccountType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for GCPSTSServiceAccountData { fn default() -> Self { diff --git a/src/datadogV2/model/model_gcpsts_service_account_response.rs b/src/datadogV2/model/model_gcpsts_service_account_response.rs index e508475af..e3b3357a7 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_response.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct GCPSTSServiceAccountResponse { /// Info on your service account. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl GCPSTSServiceAccountResponse { pub fn new() -> GCPSTSServiceAccountResponse { GCPSTSServiceAccountResponse { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::GCPSTSServiceAccount) -> &mut Self { + self.data = Some(value); + self + } } impl Default for GCPSTSServiceAccountResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_gcpsts_service_account_update_request.rs b/src/datadogV2/model/model_gcpsts_service_account_update_request.rs index fcc2e4462..c8290522a 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_update_request.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_update_request.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct GCPSTSServiceAccountUpdateRequest { /// Data on your service account. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl GCPSTSServiceAccountUpdateRequest { pub fn new() -> GCPSTSServiceAccountUpdateRequest { GCPSTSServiceAccountUpdateRequest { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::GCPSTSServiceAccountUpdateRequestData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for GCPSTSServiceAccountUpdateRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_gcpsts_service_account_update_request_data.rs b/src/datadogV2/model/model_gcpsts_service_account_update_request_data.rs index 5bb24d583..daee0d481 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_update_request_data.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_update_request_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct GCPSTSServiceAccountUpdateRequestData { /// Attributes associated with your service account. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Your service account's unique ID. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,27 @@ impl GCPSTSServiceAccountUpdateRequestData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::GCPSTSServiceAccountAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::GCPServiceAccountType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for GCPSTSServiceAccountUpdateRequestData { fn default() -> Self { diff --git a/src/datadogV2/model/model_gcpsts_service_accounts_response.rs b/src/datadogV2/model/model_gcpsts_service_accounts_response.rs index e2ba9013e..75917bda9 100644 --- a/src/datadogV2/model/model_gcpsts_service_accounts_response.rs +++ b/src/datadogV2/model/model_gcpsts_service_accounts_response.rs @@ -17,6 +17,14 @@ impl GCPSTSServiceAccountsResponse { pub fn new() -> GCPSTSServiceAccountsResponse { GCPSTSServiceAccountsResponse { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for GCPSTSServiceAccountsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_get_finding_response.rs b/src/datadogV2/model/model_get_finding_response.rs index 5423b213a..bdef5f6ec 100644 --- a/src/datadogV2/model/model_get_finding_response.rs +++ b/src/datadogV2/model/model_get_finding_response.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct GetFindingResponse { /// A single finding with with message and resource configuration. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::DetailedFinding, } impl GetFindingResponse { - pub fn new(data: Box) -> GetFindingResponse { + pub fn new(data: crate::datadogV2::model::DetailedFinding) -> GetFindingResponse { GetFindingResponse { data } } } diff --git a/src/datadogV2/model/model_group_scalar_column.rs b/src/datadogV2/model/model_group_scalar_column.rs index a78aaa6aa..f8cf63d4d 100644 --- a/src/datadogV2/model/model_group_scalar_column.rs +++ b/src/datadogV2/model/model_group_scalar_column.rs @@ -27,6 +27,24 @@ impl GroupScalarColumn { values: None, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::ScalarColumnTypeGroup, + ) -> &mut Self { + self.type_ = Some(value); + self + } + + pub fn with_values(&mut self, value: Vec>) -> &mut Self { + self.values = Some(value); + self + } } impl Default for GroupScalarColumn { fn default() -> Self { diff --git a/src/datadogV2/model/model_hourly_usage.rs b/src/datadogV2/model/model_hourly_usage.rs index cd359bcae..25e40be45 100644 --- a/src/datadogV2/model/model_hourly_usage.rs +++ b/src/datadogV2/model/model_hourly_usage.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct HourlyUsage { /// Attributes of hourly usage for a product family for an org for a time period. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Unique ID of the response. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl HourlyUsage { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::HourlyUsageAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::UsageTimeSeriesType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for HourlyUsage { fn default() -> Self { diff --git a/src/datadogV2/model/model_hourly_usage_attributes.rs b/src/datadogV2/model/model_hourly_usage_attributes.rs index 5678bc43d..c71c9d89f 100644 --- a/src/datadogV2/model/model_hourly_usage_attributes.rs +++ b/src/datadogV2/model/model_hourly_usage_attributes.rs @@ -39,6 +39,39 @@ impl HourlyUsageAttributes { timestamp: None, } } + + pub fn with_measurements( + &mut self, + value: Vec, + ) -> &mut Self { + self.measurements = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_product_family(&mut self, value: String) -> &mut Self { + self.product_family = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } + + pub fn with_timestamp(&mut self, value: String) -> &mut Self { + self.timestamp = Some(value); + self + } } impl Default for HourlyUsageAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_hourly_usage_measurement.rs b/src/datadogV2/model/model_hourly_usage_measurement.rs index 968501545..ed2f6b362 100644 --- a/src/datadogV2/model/model_hourly_usage_measurement.rs +++ b/src/datadogV2/model/model_hourly_usage_measurement.rs @@ -23,6 +23,16 @@ impl HourlyUsageMeasurement { value: None, } } + + pub fn with_usage_type(&mut self, value: String) -> &mut Self { + self.usage_type = Some(value); + self + } + + pub fn with_value(&mut self, value: Option) -> &mut Self { + self.value = Some(value); + self + } } impl Default for HourlyUsageMeasurement { fn default() -> Self { diff --git a/src/datadogV2/model/model_hourly_usage_metadata.rs b/src/datadogV2/model/model_hourly_usage_metadata.rs index bd7efe048..b2da8a23a 100644 --- a/src/datadogV2/model/model_hourly_usage_metadata.rs +++ b/src/datadogV2/model/model_hourly_usage_metadata.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct HourlyUsageMetadata { /// The metadata for the current pagination. #[serde(rename = "pagination")] - pub pagination: Option>, + pub pagination: Option, } impl HourlyUsageMetadata { pub fn new() -> HourlyUsageMetadata { HourlyUsageMetadata { pagination: None } } + + pub fn with_pagination( + &mut self, + value: crate::datadogV2::model::HourlyUsagePagination, + ) -> &mut Self { + self.pagination = Some(value); + self + } } impl Default for HourlyUsageMetadata { fn default() -> Self { diff --git a/src/datadogV2/model/model_hourly_usage_pagination.rs b/src/datadogV2/model/model_hourly_usage_pagination.rs index 4dadd5ff3..d65cb8328 100644 --- a/src/datadogV2/model/model_hourly_usage_pagination.rs +++ b/src/datadogV2/model/model_hourly_usage_pagination.rs @@ -23,6 +23,11 @@ impl HourlyUsagePagination { next_record_id: None, } } + + pub fn with_next_record_id(&mut self, value: Option) -> &mut Self { + self.next_record_id = Some(value); + self + } } impl Default for HourlyUsagePagination { fn default() -> Self { diff --git a/src/datadogV2/model/model_hourly_usage_response.rs b/src/datadogV2/model/model_hourly_usage_response.rs index 7a6a622a0..42cc1c4d0 100644 --- a/src/datadogV2/model/model_hourly_usage_response.rs +++ b/src/datadogV2/model/model_hourly_usage_response.rs @@ -13,7 +13,7 @@ pub struct HourlyUsageResponse { pub data: Option>, /// The object containing document metadata. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl HourlyUsageResponse { @@ -23,6 +23,16 @@ impl HourlyUsageResponse { meta: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::HourlyUsageMetadata) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for HourlyUsageResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_http_log_error.rs b/src/datadogV2/model/model_http_log_error.rs index 5fb39369a..1bcae0ddd 100644 --- a/src/datadogV2/model/model_http_log_error.rs +++ b/src/datadogV2/model/model_http_log_error.rs @@ -27,6 +27,21 @@ impl HTTPLogError { title: None, } } + + pub fn with_detail(&mut self, value: String) -> &mut Self { + self.detail = Some(value); + self + } + + pub fn with_status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } } impl Default for HTTPLogError { fn default() -> Self { diff --git a/src/datadogV2/model/model_http_log_errors.rs b/src/datadogV2/model/model_http_log_errors.rs index 358c917ce..da8d0346e 100644 --- a/src/datadogV2/model/model_http_log_errors.rs +++ b/src/datadogV2/model/model_http_log_errors.rs @@ -17,6 +17,11 @@ impl HTTPLogErrors { pub fn new() -> HTTPLogErrors { HTTPLogErrors { errors: None } } + + pub fn with_errors(&mut self, value: Vec) -> &mut Self { + self.errors = Some(value); + self + } } impl Default for HTTPLogErrors { fn default() -> Self { diff --git a/src/datadogV2/model/model_http_log_item.rs b/src/datadogV2/model/model_http_log_item.rs index cd934f5ef..2d481c6fa 100644 --- a/src/datadogV2/model/model_http_log_item.rs +++ b/src/datadogV2/model/model_http_log_item.rs @@ -44,4 +44,24 @@ impl HTTPLogItem { additional_properties: std::collections::BTreeMap::new(), } } + + pub fn with_ddsource(&mut self, value: String) -> &mut Self { + self.ddsource = Some(value); + self + } + + pub fn with_ddtags(&mut self, value: String) -> &mut Self { + self.ddtags = Some(value); + self + } + + pub fn with_hostname(&mut self, value: String) -> &mut Self { + self.hostname = Some(value); + self + } + + pub fn with_service(&mut self, value: String) -> &mut Self { + self.service = Some(value); + self + } } diff --git a/src/datadogV2/model/model_httpci_app_error.rs b/src/datadogV2/model/model_httpci_app_error.rs index 7e2041457..6c905a46c 100644 --- a/src/datadogV2/model/model_httpci_app_error.rs +++ b/src/datadogV2/model/model_httpci_app_error.rs @@ -27,6 +27,21 @@ impl HTTPCIAppError { title: None, } } + + pub fn with_detail(&mut self, value: String) -> &mut Self { + self.detail = Some(value); + self + } + + pub fn with_status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } } impl Default for HTTPCIAppError { fn default() -> Self { diff --git a/src/datadogV2/model/model_httpci_app_errors.rs b/src/datadogV2/model/model_httpci_app_errors.rs index 4804035f1..3e4c8904f 100644 --- a/src/datadogV2/model/model_httpci_app_errors.rs +++ b/src/datadogV2/model/model_httpci_app_errors.rs @@ -17,6 +17,14 @@ impl HTTPCIAppErrors { pub fn new() -> HTTPCIAppErrors { HTTPCIAppErrors { errors: None } } + + pub fn with_errors( + &mut self, + value: Vec, + ) -> &mut Self { + self.errors = Some(value); + self + } } impl Default for HTTPCIAppErrors { fn default() -> Self { diff --git a/src/datadogV2/model/model_id_p_metadata_form_data.rs b/src/datadogV2/model/model_id_p_metadata_form_data.rs index 8dec5a5b8..efa91875c 100644 --- a/src/datadogV2/model/model_id_p_metadata_form_data.rs +++ b/src/datadogV2/model/model_id_p_metadata_form_data.rs @@ -17,6 +17,11 @@ impl IdPMetadataFormData { pub fn new() -> IdPMetadataFormData { IdPMetadataFormData { idp_file: None } } + + pub fn with_idp_file(&mut self, value: Vec) -> &mut Self { + self.idp_file = Some(value); + self + } } impl Default for IdPMetadataFormData { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_attachment_attributes.rs b/src/datadogV2/model/model_incident_attachment_attributes.rs index 6d42055e9..cbb6431a0 100644 --- a/src/datadogV2/model/model_incident_attachment_attributes.rs +++ b/src/datadogV2/model/model_incident_attachment_attributes.rs @@ -8,9 +8,7 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum IncidentAttachmentAttributes { IncidentAttachmentPostmortemAttributes( - Box, - ), - IncidentAttachmentLinkAttributes( - Box, + crate::datadogV2::model::IncidentAttachmentPostmortemAttributes, ), + IncidentAttachmentLinkAttributes(crate::datadogV2::model::IncidentAttachmentLinkAttributes), } diff --git a/src/datadogV2/model/model_incident_attachment_data.rs b/src/datadogV2/model/model_incident_attachment_data.rs index a726c1d4f..8a182cc70 100644 --- a/src/datadogV2/model/model_incident_attachment_data.rs +++ b/src/datadogV2/model/model_incident_attachment_data.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct IncidentAttachmentData { /// The attributes object for an attachment. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::IncidentAttachmentAttributes, /// A unique identifier that represents the incident attachment. #[serde(rename = "id")] pub id: String, /// The incident attachment's relationships. #[serde(rename = "relationships")] - pub relationships: Box, + pub relationships: crate::datadogV2::model::IncidentAttachmentRelationships, /// The incident attachment resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::IncidentAttachmentType, @@ -24,9 +24,9 @@ pub struct IncidentAttachmentData { impl IncidentAttachmentData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::IncidentAttachmentAttributes, id: String, - relationships: Box, + relationships: crate::datadogV2::model::IncidentAttachmentRelationships, type_: crate::datadogV2::model::IncidentAttachmentType, ) -> IncidentAttachmentData { IncidentAttachmentData { diff --git a/src/datadogV2/model/model_incident_attachment_link_attributes.rs b/src/datadogV2/model/model_incident_attachment_link_attributes.rs index f3b367818..bed2f11da 100644 --- a/src/datadogV2/model/model_incident_attachment_link_attributes.rs +++ b/src/datadogV2/model/model_incident_attachment_link_attributes.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct IncidentAttachmentLinkAttributes { /// The link attachment. #[serde(rename = "attachment")] - pub attachment: Box, + pub attachment: crate::datadogV2::model::IncidentAttachmentLinkAttributesAttachmentObject, /// The type of link attachment attributes. #[serde(rename = "attachment_type")] pub attachment_type: crate::datadogV2::model::IncidentAttachmentLinkAttachmentType, @@ -21,7 +21,7 @@ pub struct IncidentAttachmentLinkAttributes { impl IncidentAttachmentLinkAttributes { pub fn new( - attachment: Box, + attachment: crate::datadogV2::model::IncidentAttachmentLinkAttributesAttachmentObject, attachment_type: crate::datadogV2::model::IncidentAttachmentLinkAttachmentType, ) -> IncidentAttachmentLinkAttributes { IncidentAttachmentLinkAttributes { @@ -30,4 +30,9 @@ impl IncidentAttachmentLinkAttributes { modified: None, } } + + pub fn with_modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_attachment_postmortem_attributes.rs b/src/datadogV2/model/model_incident_attachment_postmortem_attributes.rs index ac91a520e..b8fde4ca4 100644 --- a/src/datadogV2/model/model_incident_attachment_postmortem_attributes.rs +++ b/src/datadogV2/model/model_incident_attachment_postmortem_attributes.rs @@ -11,7 +11,7 @@ pub struct IncidentAttachmentPostmortemAttributes { /// The postmortem attachment. #[serde(rename = "attachment")] pub attachment: - Box, + crate::datadogV2::model::IncidentAttachmentsPostmortemAttributesAttachmentObject, /// The type of postmortem attachment attributes. #[serde(rename = "attachment_type")] pub attachment_type: crate::datadogV2::model::IncidentAttachmentPostmortemAttachmentType, @@ -19,9 +19,7 @@ pub struct IncidentAttachmentPostmortemAttributes { impl IncidentAttachmentPostmortemAttributes { pub fn new( - attachment: Box< - crate::datadogV2::model::IncidentAttachmentsPostmortemAttributesAttachmentObject, - >, + attachment: crate::datadogV2::model::IncidentAttachmentsPostmortemAttributesAttachmentObject, attachment_type: crate::datadogV2::model::IncidentAttachmentPostmortemAttachmentType, ) -> IncidentAttachmentPostmortemAttributes { IncidentAttachmentPostmortemAttributes { diff --git a/src/datadogV2/model/model_incident_attachment_relationships.rs b/src/datadogV2/model/model_incident_attachment_relationships.rs index 2fdd778f5..dc2f9b131 100644 --- a/src/datadogV2/model/model_incident_attachment_relationships.rs +++ b/src/datadogV2/model/model_incident_attachment_relationships.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct IncidentAttachmentRelationships { /// Relationship to user. #[serde(rename = "last_modified_by_user")] - pub last_modified_by_user: Option>, + pub last_modified_by_user: Option, } impl IncidentAttachmentRelationships { @@ -19,6 +19,14 @@ impl IncidentAttachmentRelationships { last_modified_by_user: None, } } + + pub fn with_last_modified_by_user( + &mut self, + value: crate::datadogV2::model::RelationshipToUser, + ) -> &mut Self { + self.last_modified_by_user = Some(value); + self + } } impl Default for IncidentAttachmentRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_attachment_update_attributes.rs b/src/datadogV2/model/model_incident_attachment_update_attributes.rs index 45e8eb4ba..ff61ec8cd 100644 --- a/src/datadogV2/model/model_incident_attachment_update_attributes.rs +++ b/src/datadogV2/model/model_incident_attachment_update_attributes.rs @@ -8,9 +8,7 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum IncidentAttachmentUpdateAttributes { IncidentAttachmentPostmortemAttributes( - Box, - ), - IncidentAttachmentLinkAttributes( - Box, + crate::datadogV2::model::IncidentAttachmentPostmortemAttributes, ), + IncidentAttachmentLinkAttributes(crate::datadogV2::model::IncidentAttachmentLinkAttributes), } diff --git a/src/datadogV2/model/model_incident_attachment_update_data.rs b/src/datadogV2/model/model_incident_attachment_update_data.rs index 179946804..988c2b073 100644 --- a/src/datadogV2/model/model_incident_attachment_update_data.rs +++ b/src/datadogV2/model/model_incident_attachment_update_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct IncidentAttachmentUpdateData { /// Incident attachment attributes. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// A unique identifier that represents the incident attachment. #[serde(rename = "id")] pub id: Option, @@ -29,4 +29,17 @@ impl IncidentAttachmentUpdateData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::IncidentAttachmentUpdateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_attachment_update_response.rs b/src/datadogV2/model/model_incident_attachment_update_response.rs index cd7af3797..140e6121a 100644 --- a/src/datadogV2/model/model_incident_attachment_update_response.rs +++ b/src/datadogV2/model/model_incident_attachment_update_response.rs @@ -26,4 +26,12 @@ impl IncidentAttachmentUpdateResponse { included: None, } } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_attachments_response.rs b/src/datadogV2/model/model_incident_attachments_response.rs index 7723015e5..8525d0d4d 100644 --- a/src/datadogV2/model/model_incident_attachments_response.rs +++ b/src/datadogV2/model/model_incident_attachments_response.rs @@ -25,4 +25,12 @@ impl IncidentAttachmentsResponse { included: None, } } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_attachments_response_included_item.rs b/src/datadogV2/model/model_incident_attachments_response_included_item.rs index 2b6f5d5fb..d6b7eb8b9 100644 --- a/src/datadogV2/model/model_incident_attachments_response_included_item.rs +++ b/src/datadogV2/model/model_incident_attachments_response_included_item.rs @@ -7,5 +7,5 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum IncidentAttachmentsResponseIncludedItem { - User(Box), + User(crate::datadogV2::model::User), } diff --git a/src/datadogV2/model/model_incident_create_attributes.rs b/src/datadogV2/model/model_incident_create_attributes.rs index 6ae87fc08..e4ecebab8 100644 --- a/src/datadogV2/model/model_incident_create_attributes.rs +++ b/src/datadogV2/model/model_incident_create_attributes.rs @@ -41,4 +41,33 @@ impl IncidentCreateAttributes { title, } } + + pub fn with_customer_impact_scope(&mut self, value: String) -> &mut Self { + self.customer_impact_scope = Some(value); + self + } + + pub fn with_fields( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.fields = Some(value); + self + } + + pub fn with_initial_cells( + &mut self, + value: Vec, + ) -> &mut Self { + self.initial_cells = Some(value); + self + } + + pub fn with_notification_handles( + &mut self, + value: Vec, + ) -> &mut Self { + self.notification_handles = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_create_data.rs b/src/datadogV2/model/model_incident_create_data.rs index fc2003399..5e427e916 100644 --- a/src/datadogV2/model/model_incident_create_data.rs +++ b/src/datadogV2/model/model_incident_create_data.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct IncidentCreateData { /// The incident's attributes for a create request. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::IncidentCreateAttributes, /// The relationships the incident will have with other resources once created. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Incident resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::IncidentType, @@ -21,7 +21,7 @@ pub struct IncidentCreateData { impl IncidentCreateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::IncidentCreateAttributes, type_: crate::datadogV2::model::IncidentType, ) -> IncidentCreateData { IncidentCreateData { @@ -30,4 +30,12 @@ impl IncidentCreateData { type_, } } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::IncidentCreateRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_create_relationships.rs b/src/datadogV2/model/model_incident_create_relationships.rs index ec6d69706..646f53b31 100644 --- a/src/datadogV2/model/model_incident_create_relationships.rs +++ b/src/datadogV2/model/model_incident_create_relationships.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct IncidentCreateRelationships { /// Relationship to user. #[serde(rename = "commander_user")] - pub commander_user: Option>, + pub commander_user: Option, } impl IncidentCreateRelationships { pub fn new( - commander_user: Option>, + commander_user: Option, ) -> IncidentCreateRelationships { IncidentCreateRelationships { commander_user } } diff --git a/src/datadogV2/model/model_incident_create_request.rs b/src/datadogV2/model/model_incident_create_request.rs index 3d3bc52fc..3dd11838a 100644 --- a/src/datadogV2/model/model_incident_create_request.rs +++ b/src/datadogV2/model/model_incident_create_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct IncidentCreateRequest { /// Incident data for a create request. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::IncidentCreateData, } impl IncidentCreateRequest { - pub fn new(data: Box) -> IncidentCreateRequest { + pub fn new(data: crate::datadogV2::model::IncidentCreateData) -> IncidentCreateRequest { IncidentCreateRequest { data } } } diff --git a/src/datadogV2/model/model_incident_field_attributes.rs b/src/datadogV2/model/model_incident_field_attributes.rs index 5371dde1b..04c156de6 100644 --- a/src/datadogV2/model/model_incident_field_attributes.rs +++ b/src/datadogV2/model/model_incident_field_attributes.rs @@ -7,10 +7,8 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum IncidentFieldAttributes { - IncidentFieldAttributesSingleValue( - Box, - ), + IncidentFieldAttributesSingleValue(crate::datadogV2::model::IncidentFieldAttributesSingleValue), IncidentFieldAttributesMultipleValue( - Box, + crate::datadogV2::model::IncidentFieldAttributesMultipleValue, ), } diff --git a/src/datadogV2/model/model_incident_field_attributes_multiple_value.rs b/src/datadogV2/model/model_incident_field_attributes_multiple_value.rs index afaa03496..4f0926eb8 100644 --- a/src/datadogV2/model/model_incident_field_attributes_multiple_value.rs +++ b/src/datadogV2/model/model_incident_field_attributes_multiple_value.rs @@ -23,6 +23,19 @@ impl IncidentFieldAttributesMultipleValue { value: None, } } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::IncidentFieldAttributesValueType, + ) -> &mut Self { + self.type_ = Some(value); + self + } + + pub fn with_value(&mut self, value: Option>) -> &mut Self { + self.value = Some(value); + self + } } impl Default for IncidentFieldAttributesMultipleValue { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_field_attributes_single_value.rs b/src/datadogV2/model/model_incident_field_attributes_single_value.rs index 136f163d8..56c6c220c 100644 --- a/src/datadogV2/model/model_incident_field_attributes_single_value.rs +++ b/src/datadogV2/model/model_incident_field_attributes_single_value.rs @@ -23,6 +23,19 @@ impl IncidentFieldAttributesSingleValue { value: None, } } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::IncidentFieldAttributesSingleValueType, + ) -> &mut Self { + self.type_ = Some(value); + self + } + + pub fn with_value(&mut self, value: Option) -> &mut Self { + self.value = Some(value); + self + } } impl Default for IncidentFieldAttributesSingleValue { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_integration_metadata_attributes.rs b/src/datadogV2/model/model_incident_integration_metadata_attributes.rs index d93bc60fe..66ef23030 100644 --- a/src/datadogV2/model/model_incident_integration_metadata_attributes.rs +++ b/src/datadogV2/model/model_incident_integration_metadata_attributes.rs @@ -20,7 +20,7 @@ pub struct IncidentIntegrationMetadataAttributes { pub integration_type: i32, /// Incident integration metadata's metadata attribute. #[serde(rename = "metadata")] - pub metadata: Box, + pub metadata: crate::datadogV2::model::IncidentIntegrationMetadataMetadata, /// Timestamp when the incident todo was last modified. #[serde(rename = "modified")] pub modified: Option, @@ -34,7 +34,7 @@ pub struct IncidentIntegrationMetadataAttributes { impl IncidentIntegrationMetadataAttributes { pub fn new( integration_type: i32, - metadata: Box, + metadata: crate::datadogV2::model::IncidentIntegrationMetadataMetadata, ) -> IncidentIntegrationMetadataAttributes { IncidentIntegrationMetadataAttributes { created: None, @@ -45,4 +45,24 @@ impl IncidentIntegrationMetadataAttributes { status: None, } } + + pub fn with_created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn with_incident_id(&mut self, value: String) -> &mut Self { + self.incident_id = Some(value); + self + } + + pub fn with_modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn with_status(&mut self, value: i32) -> &mut Self { + self.status = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_integration_metadata_create_data.rs b/src/datadogV2/model/model_incident_integration_metadata_create_data.rs index 34ed4d870..28b58573d 100644 --- a/src/datadogV2/model/model_incident_integration_metadata_create_data.rs +++ b/src/datadogV2/model/model_incident_integration_metadata_create_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct IncidentIntegrationMetadataCreateData { /// Incident integration metadata's attributes for a create request. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::IncidentIntegrationMetadataAttributes, /// Integration metadata resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::IncidentIntegrationMetadataType, @@ -18,7 +18,7 @@ pub struct IncidentIntegrationMetadataCreateData { impl IncidentIntegrationMetadataCreateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::IncidentIntegrationMetadataAttributes, type_: crate::datadogV2::model::IncidentIntegrationMetadataType, ) -> IncidentIntegrationMetadataCreateData { IncidentIntegrationMetadataCreateData { attributes, type_ } diff --git a/src/datadogV2/model/model_incident_integration_metadata_create_request.rs b/src/datadogV2/model/model_incident_integration_metadata_create_request.rs index 307150f98..3510680f4 100644 --- a/src/datadogV2/model/model_incident_integration_metadata_create_request.rs +++ b/src/datadogV2/model/model_incident_integration_metadata_create_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct IncidentIntegrationMetadataCreateRequest { /// Incident integration metadata data for a create request. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::IncidentIntegrationMetadataCreateData, } impl IncidentIntegrationMetadataCreateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::IncidentIntegrationMetadataCreateData, ) -> IncidentIntegrationMetadataCreateRequest { IncidentIntegrationMetadataCreateRequest { data } } diff --git a/src/datadogV2/model/model_incident_integration_metadata_list_response.rs b/src/datadogV2/model/model_incident_integration_metadata_list_response.rs index de75cb2c8..b1655b703 100644 --- a/src/datadogV2/model/model_incident_integration_metadata_list_response.rs +++ b/src/datadogV2/model/model_incident_integration_metadata_list_response.rs @@ -17,7 +17,7 @@ pub struct IncidentIntegrationMetadataListResponse { Option>, /// The metadata object containing pagination metadata. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl IncidentIntegrationMetadataListResponse { @@ -30,4 +30,17 @@ impl IncidentIntegrationMetadataListResponse { meta: None, } } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::IncidentResponseMeta) -> &mut Self { + self.meta = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_integration_metadata_metadata.rs b/src/datadogV2/model/model_incident_integration_metadata_metadata.rs index a2e33623d..6af56b6c3 100644 --- a/src/datadogV2/model/model_incident_integration_metadata_metadata.rs +++ b/src/datadogV2/model/model_incident_integration_metadata_metadata.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum IncidentIntegrationMetadataMetadata { - SlackIntegrationMetadata(Box), - JiraIntegrationMetadata(Box), + SlackIntegrationMetadata(crate::datadogV2::model::SlackIntegrationMetadata), + JiraIntegrationMetadata(crate::datadogV2::model::JiraIntegrationMetadata), } diff --git a/src/datadogV2/model/model_incident_integration_metadata_patch_data.rs b/src/datadogV2/model/model_incident_integration_metadata_patch_data.rs index ccc0909ff..d541d96e9 100644 --- a/src/datadogV2/model/model_incident_integration_metadata_patch_data.rs +++ b/src/datadogV2/model/model_incident_integration_metadata_patch_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct IncidentIntegrationMetadataPatchData { /// Incident integration metadata's attributes for a create request. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::IncidentIntegrationMetadataAttributes, /// Integration metadata resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::IncidentIntegrationMetadataType, @@ -18,7 +18,7 @@ pub struct IncidentIntegrationMetadataPatchData { impl IncidentIntegrationMetadataPatchData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::IncidentIntegrationMetadataAttributes, type_: crate::datadogV2::model::IncidentIntegrationMetadataType, ) -> IncidentIntegrationMetadataPatchData { IncidentIntegrationMetadataPatchData { attributes, type_ } diff --git a/src/datadogV2/model/model_incident_integration_metadata_patch_request.rs b/src/datadogV2/model/model_incident_integration_metadata_patch_request.rs index 6ed01a2ca..6173c191b 100644 --- a/src/datadogV2/model/model_incident_integration_metadata_patch_request.rs +++ b/src/datadogV2/model/model_incident_integration_metadata_patch_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct IncidentIntegrationMetadataPatchRequest { /// Incident integration metadata data for a patch request. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::IncidentIntegrationMetadataPatchData, } impl IncidentIntegrationMetadataPatchRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::IncidentIntegrationMetadataPatchData, ) -> IncidentIntegrationMetadataPatchRequest { IncidentIntegrationMetadataPatchRequest { data } } diff --git a/src/datadogV2/model/model_incident_integration_metadata_response.rs b/src/datadogV2/model/model_incident_integration_metadata_response.rs index 87a5f55a9..dab11dc0e 100644 --- a/src/datadogV2/model/model_incident_integration_metadata_response.rs +++ b/src/datadogV2/model/model_incident_integration_metadata_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct IncidentIntegrationMetadataResponse { /// Incident integration metadata from a response. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::IncidentIntegrationMetadataResponseData, /// Included related resources that the user requested. #[serde(rename = "included")] pub included: @@ -19,11 +19,19 @@ pub struct IncidentIntegrationMetadataResponse { impl IncidentIntegrationMetadataResponse { pub fn new( - data: Box, + data: crate::datadogV2::model::IncidentIntegrationMetadataResponseData, ) -> IncidentIntegrationMetadataResponse { IncidentIntegrationMetadataResponse { data, included: None, } } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_integration_metadata_response_data.rs b/src/datadogV2/model/model_incident_integration_metadata_response_data.rs index a1c79dca8..611692eca 100644 --- a/src/datadogV2/model/model_incident_integration_metadata_response_data.rs +++ b/src/datadogV2/model/model_incident_integration_metadata_response_data.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct IncidentIntegrationMetadataResponseData { /// Incident integration metadata's attributes for a create request. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The incident integration metadata's ID. #[serde(rename = "id")] pub id: String, /// The incident's integration relationships from a response. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Integration metadata resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::IncidentIntegrationMetadataType, @@ -34,4 +34,20 @@ impl IncidentIntegrationMetadataResponseData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::IncidentIntegrationMetadataAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::IncidentIntegrationRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_integration_metadata_response_included_item.rs b/src/datadogV2/model/model_incident_integration_metadata_response_included_item.rs index b0876bab3..517037343 100644 --- a/src/datadogV2/model/model_incident_integration_metadata_response_included_item.rs +++ b/src/datadogV2/model/model_incident_integration_metadata_response_included_item.rs @@ -7,5 +7,5 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum IncidentIntegrationMetadataResponseIncludedItem { - User(Box), + User(crate::datadogV2::model::User), } diff --git a/src/datadogV2/model/model_incident_integration_relationships.rs b/src/datadogV2/model/model_incident_integration_relationships.rs index d96a3dee7..1a3292e8f 100644 --- a/src/datadogV2/model/model_incident_integration_relationships.rs +++ b/src/datadogV2/model/model_incident_integration_relationships.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct IncidentIntegrationRelationships { /// Relationship to user. #[serde(rename = "created_by_user")] - pub created_by_user: Option>, + pub created_by_user: Option, /// Relationship to user. #[serde(rename = "last_modified_by_user")] - pub last_modified_by_user: Option>, + pub last_modified_by_user: Option, } impl IncidentIntegrationRelationships { @@ -23,6 +23,22 @@ impl IncidentIntegrationRelationships { last_modified_by_user: None, } } + + pub fn with_created_by_user( + &mut self, + value: crate::datadogV2::model::RelationshipToUser, + ) -> &mut Self { + self.created_by_user = Some(value); + self + } + + pub fn with_last_modified_by_user( + &mut self, + value: crate::datadogV2::model::RelationshipToUser, + ) -> &mut Self { + self.last_modified_by_user = Some(value); + self + } } impl Default for IncidentIntegrationRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_non_datadog_creator.rs b/src/datadogV2/model/model_incident_non_datadog_creator.rs index 9d8b59ea9..ca08c5da5 100644 --- a/src/datadogV2/model/model_incident_non_datadog_creator.rs +++ b/src/datadogV2/model/model_incident_non_datadog_creator.rs @@ -23,6 +23,16 @@ impl IncidentNonDatadogCreator { name: None, } } + + pub fn with_image_48_px(&mut self, value: String) -> &mut Self { + self.image_48_px = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } impl Default for IncidentNonDatadogCreator { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_notification_handle.rs b/src/datadogV2/model/model_incident_notification_handle.rs index 451c9b34f..c5b63e58a 100644 --- a/src/datadogV2/model/model_incident_notification_handle.rs +++ b/src/datadogV2/model/model_incident_notification_handle.rs @@ -23,6 +23,16 @@ impl IncidentNotificationHandle { handle: None, } } + + pub fn with_display_name(&mut self, value: String) -> &mut Self { + self.display_name = Some(value); + self + } + + pub fn with_handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + self + } } impl Default for IncidentNotificationHandle { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_response.rs b/src/datadogV2/model/model_incident_response.rs index 8b5d47840..8a79739c0 100644 --- a/src/datadogV2/model/model_incident_response.rs +++ b/src/datadogV2/model/model_incident_response.rs @@ -10,17 +10,25 @@ use serde_with::skip_serializing_none; pub struct IncidentResponse { /// Incident data from a response. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::IncidentResponseData, /// Included related resources that the user requested. #[serde(rename = "included")] pub included: Option>, } impl IncidentResponse { - pub fn new(data: Box) -> IncidentResponse { + pub fn new(data: crate::datadogV2::model::IncidentResponseData) -> IncidentResponse { IncidentResponse { data, included: None, } } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_response_attributes.rs b/src/datadogV2/model/model_incident_response_attributes.rs index a6dea808e..8b1062d9a 100644 --- a/src/datadogV2/model/model_incident_response_attributes.rs +++ b/src/datadogV2/model/model_incident_response_attributes.rs @@ -74,8 +74,7 @@ pub struct IncidentResponseAttributes { default, with = "::serde_with::rust::double_option" )] - pub non_datadog_creator: - Option>>, + pub non_datadog_creator: Option>, /// Notification handles that will be notified of the incident during update. #[serde( rename = "notification_handles", @@ -153,4 +152,123 @@ impl IncidentResponseAttributes { visibility: None, } } + + pub fn with_archived(&mut self, value: Option) -> &mut Self { + self.archived = Some(value); + self + } + + pub fn with_case_id(&mut self, value: Option) -> &mut Self { + self.case_id = Some(value); + self + } + + pub fn with_created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn with_customer_impact_duration(&mut self, value: i64) -> &mut Self { + self.customer_impact_duration = Some(value); + self + } + + pub fn with_customer_impact_end(&mut self, value: Option) -> &mut Self { + self.customer_impact_end = Some(value); + self + } + + pub fn with_customer_impact_scope(&mut self, value: Option) -> &mut Self { + self.customer_impact_scope = Some(value); + self + } + + pub fn with_customer_impact_start(&mut self, value: Option) -> &mut Self { + self.customer_impact_start = Some(value); + self + } + + pub fn with_customer_impacted(&mut self, value: bool) -> &mut Self { + self.customer_impacted = Some(value); + self + } + + pub fn with_detected(&mut self, value: Option) -> &mut Self { + self.detected = Some(value); + self + } + + pub fn with_fields( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.fields = Some(value); + self + } + + pub fn with_modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn with_non_datadog_creator( + &mut self, + value: Option, + ) -> &mut Self { + self.non_datadog_creator = Some(value); + self + } + + pub fn with_notification_handles( + &mut self, + value: Option>, + ) -> &mut Self { + self.notification_handles = Some(value); + self + } + + pub fn with_public_id(&mut self, value: i64) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_resolved(&mut self, value: Option) -> &mut Self { + self.resolved = Some(value); + self + } + + pub fn with_severity(&mut self, value: crate::datadogV2::model::IncidentSeverity) -> &mut Self { + self.severity = Some(value); + self + } + + pub fn with_state(&mut self, value: Option) -> &mut Self { + self.state = Some(value); + self + } + + pub fn with_time_to_detect(&mut self, value: i64) -> &mut Self { + self.time_to_detect = Some(value); + self + } + + pub fn with_time_to_internal_response(&mut self, value: i64) -> &mut Self { + self.time_to_internal_response = Some(value); + self + } + + pub fn with_time_to_repair(&mut self, value: i64) -> &mut Self { + self.time_to_repair = Some(value); + self + } + + pub fn with_time_to_resolve(&mut self, value: i64) -> &mut Self { + self.time_to_resolve = Some(value); + self + } + + pub fn with_visibility(&mut self, value: Option) -> &mut Self { + self.visibility = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_response_data.rs b/src/datadogV2/model/model_incident_response_data.rs index 5b77321dd..0f78cc13f 100644 --- a/src/datadogV2/model/model_incident_response_data.rs +++ b/src/datadogV2/model/model_incident_response_data.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct IncidentResponseData { /// The incident's attributes from a response. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The incident's ID. #[serde(rename = "id")] pub id: String, /// The incident's relationships from a response. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Incident resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::IncidentType, @@ -31,4 +31,20 @@ impl IncidentResponseData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::IncidentResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::IncidentResponseRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_response_included_item.rs b/src/datadogV2/model/model_incident_response_included_item.rs index d8548196c..54b679c2c 100644 --- a/src/datadogV2/model/model_incident_response_included_item.rs +++ b/src/datadogV2/model/model_incident_response_included_item.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum IncidentResponseIncludedItem { - User(Box), - IncidentAttachmentData(Box), + User(crate::datadogV2::model::User), + IncidentAttachmentData(crate::datadogV2::model::IncidentAttachmentData), } diff --git a/src/datadogV2/model/model_incident_response_meta.rs b/src/datadogV2/model/model_incident_response_meta.rs index 297ac3d34..11ba5528d 100644 --- a/src/datadogV2/model/model_incident_response_meta.rs +++ b/src/datadogV2/model/model_incident_response_meta.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct IncidentResponseMeta { /// Pagination properties. #[serde(rename = "pagination")] - pub pagination: Option>, + pub pagination: Option, } impl IncidentResponseMeta { pub fn new() -> IncidentResponseMeta { IncidentResponseMeta { pagination: None } } + + pub fn with_pagination( + &mut self, + value: crate::datadogV2::model::IncidentResponseMetaPagination, + ) -> &mut Self { + self.pagination = Some(value); + self + } } impl Default for IncidentResponseMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_response_meta_pagination.rs b/src/datadogV2/model/model_incident_response_meta_pagination.rs index 1b70fb490..58dffbcf4 100644 --- a/src/datadogV2/model/model_incident_response_meta_pagination.rs +++ b/src/datadogV2/model/model_incident_response_meta_pagination.rs @@ -27,6 +27,21 @@ impl IncidentResponseMetaPagination { size: None, } } + + pub fn with_next_offset(&mut self, value: i64) -> &mut Self { + self.next_offset = Some(value); + self + } + + pub fn with_offset(&mut self, value: i64) -> &mut Self { + self.offset = Some(value); + self + } + + pub fn with_size(&mut self, value: i64) -> &mut Self { + self.size = Some(value); + self + } } impl Default for IncidentResponseMetaPagination { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_response_relationships.rs b/src/datadogV2/model/model_incident_response_relationships.rs index 48c639c09..92cbfe50b 100644 --- a/src/datadogV2/model/model_incident_response_relationships.rs +++ b/src/datadogV2/model/model_incident_response_relationships.rs @@ -10,34 +10,33 @@ use serde_with::skip_serializing_none; pub struct IncidentResponseRelationships { /// A relationship reference for attachments. #[serde(rename = "attachments")] - pub attachments: Option>, + pub attachments: Option, /// Relationship to user. #[serde( rename = "commander_user", default, with = "::serde_with::rust::double_option" )] - pub commander_user: Option>>, + pub commander_user: Option>, /// Relationship to user. #[serde(rename = "created_by_user")] - pub created_by_user: Option>, + pub created_by_user: Option, /// Relationship to impacts. #[serde(rename = "impacts")] - pub impacts: Option>, + pub impacts: Option, /// A relationship reference for multiple integration metadata objects. #[serde(rename = "integrations")] - pub integrations: - Option>, + pub integrations: Option, /// Relationship to user. #[serde(rename = "last_modified_by_user")] - pub last_modified_by_user: Option>, + pub last_modified_by_user: Option, /// Relationship to incident responders. #[serde(rename = "responders")] - pub responders: Option>, + pub responders: Option, /// Relationship to incident user defined fields. #[serde(rename = "user_defined_fields")] pub user_defined_fields: - Option>, + Option, } impl IncidentResponseRelationships { @@ -53,6 +52,70 @@ impl IncidentResponseRelationships { user_defined_fields: None, } } + + pub fn with_attachments( + &mut self, + value: crate::datadogV2::model::RelationshipToIncidentAttachment, + ) -> &mut Self { + self.attachments = Some(value); + self + } + + pub fn with_commander_user( + &mut self, + value: Option, + ) -> &mut Self { + self.commander_user = Some(value); + self + } + + pub fn with_created_by_user( + &mut self, + value: crate::datadogV2::model::RelationshipToUser, + ) -> &mut Self { + self.created_by_user = Some(value); + self + } + + pub fn with_impacts( + &mut self, + value: crate::datadogV2::model::RelationshipToIncidentImpacts, + ) -> &mut Self { + self.impacts = Some(value); + self + } + + pub fn with_integrations( + &mut self, + value: crate::datadogV2::model::RelationshipToIncidentIntegrationMetadatas, + ) -> &mut Self { + self.integrations = Some(value); + self + } + + pub fn with_last_modified_by_user( + &mut self, + value: crate::datadogV2::model::RelationshipToUser, + ) -> &mut Self { + self.last_modified_by_user = Some(value); + self + } + + pub fn with_responders( + &mut self, + value: crate::datadogV2::model::RelationshipToIncidentResponders, + ) -> &mut Self { + self.responders = Some(value); + self + } + + pub fn with_user_defined_fields( + &mut self, + value: crate::datadogV2::model::RelationshipToIncidentUserDefinedFields, + ) -> &mut Self { + self.user_defined_fields = Some(value); + self + } } impl Default for IncidentResponseRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_search_response.rs b/src/datadogV2/model/model_incident_search_response.rs index 92f05e819..0950cb9b6 100644 --- a/src/datadogV2/model/model_incident_search_response.rs +++ b/src/datadogV2/model/model_incident_search_response.rs @@ -10,18 +10,18 @@ use serde_with::skip_serializing_none; pub struct IncidentSearchResponse { /// Data returned by an incident search. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::IncidentSearchResponseData, /// Included related resources that the user requested. #[serde(rename = "included")] pub included: Option>, /// The metadata object containing pagination metadata. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl IncidentSearchResponse { pub fn new( - data: Box, + data: crate::datadogV2::model::IncidentSearchResponseData, ) -> IncidentSearchResponse { IncidentSearchResponse { data, @@ -29,4 +29,20 @@ impl IncidentSearchResponse { meta: None, } } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::IncidentSearchResponseMeta, + ) -> &mut Self { + self.meta = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_search_response_attributes.rs b/src/datadogV2/model/model_incident_search_response_attributes.rs index d4adeb2d0..5e794d81a 100644 --- a/src/datadogV2/model/model_incident_search_response_attributes.rs +++ b/src/datadogV2/model/model_incident_search_response_attributes.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct IncidentSearchResponseAttributes { /// Facet data for incidents returned by a search query. #[serde(rename = "facets")] - pub facets: Box, + pub facets: crate::datadogV2::model::IncidentSearchResponseFacetsData, /// Incidents returned by the search. #[serde(rename = "incidents")] pub incidents: Vec, @@ -21,7 +21,7 @@ pub struct IncidentSearchResponseAttributes { impl IncidentSearchResponseAttributes { pub fn new( - facets: Box, + facets: crate::datadogV2::model::IncidentSearchResponseFacetsData, incidents: Vec, total: i32, ) -> IncidentSearchResponseAttributes { diff --git a/src/datadogV2/model/model_incident_search_response_data.rs b/src/datadogV2/model/model_incident_search_response_data.rs index 755ba6945..13df8b3db 100644 --- a/src/datadogV2/model/model_incident_search_response_data.rs +++ b/src/datadogV2/model/model_incident_search_response_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct IncidentSearchResponseData { /// Attributes returned by an incident search. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Incident search result type. #[serde(rename = "type")] pub type_: Option, @@ -23,6 +23,22 @@ impl IncidentSearchResponseData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::IncidentSearchResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::IncidentSearchResultsType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for IncidentSearchResponseData { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_search_response_facets_data.rs b/src/datadogV2/model/model_incident_search_response_facets_data.rs index b807940d4..389ccfb1c 100644 --- a/src/datadogV2/model/model_incident_search_response_facets_data.rs +++ b/src/datadogV2/model/model_incident_search_response_facets_data.rs @@ -61,6 +61,94 @@ impl IncidentSearchResponseFacetsData { time_to_resolve: None, } } + + pub fn with_commander( + &mut self, + value: Vec, + ) -> &mut Self { + self.commander = Some(value); + self + } + + pub fn with_created_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.created_by = Some(value); + self + } + + pub fn with_fields( + &mut self, + value: Vec, + ) -> &mut Self { + self.fields = Some(value); + self + } + + pub fn with_impact( + &mut self, + value: Vec, + ) -> &mut Self { + self.impact = Some(value); + self + } + + pub fn with_last_modified_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.last_modified_by = Some(value); + self + } + + pub fn with_postmortem( + &mut self, + value: Vec, + ) -> &mut Self { + self.postmortem = Some(value); + self + } + + pub fn with_responder( + &mut self, + value: Vec, + ) -> &mut Self { + self.responder = Some(value); + self + } + + pub fn with_severity( + &mut self, + value: Vec, + ) -> &mut Self { + self.severity = Some(value); + self + } + + pub fn with_state( + &mut self, + value: Vec, + ) -> &mut Self { + self.state = Some(value); + self + } + + pub fn with_time_to_repair( + &mut self, + value: Vec, + ) -> &mut Self { + self.time_to_repair = Some(value); + self + } + + pub fn with_time_to_resolve( + &mut self, + value: Vec, + ) -> &mut Self { + self.time_to_resolve = Some(value); + self + } } impl Default for IncidentSearchResponseFacetsData { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_search_response_field_facet_data.rs b/src/datadogV2/model/model_incident_search_response_field_facet_data.rs index fd25cd39e..f0e334723 100644 --- a/src/datadogV2/model/model_incident_search_response_field_facet_data.rs +++ b/src/datadogV2/model/model_incident_search_response_field_facet_data.rs @@ -23,6 +23,16 @@ impl IncidentSearchResponseFieldFacetData { name: None, } } + + pub fn with_count(&mut self, value: i32) -> &mut Self { + self.count = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } impl Default for IncidentSearchResponseFieldFacetData { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_search_response_incidents_data.rs b/src/datadogV2/model/model_incident_search_response_incidents_data.rs index 6f799295a..69c9d6c55 100644 --- a/src/datadogV2/model/model_incident_search_response_incidents_data.rs +++ b/src/datadogV2/model/model_incident_search_response_incidents_data.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct IncidentSearchResponseIncidentsData { /// Incident data from a response. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::IncidentResponseData, } impl IncidentSearchResponseIncidentsData { pub fn new( - data: Box, + data: crate::datadogV2::model::IncidentResponseData, ) -> IncidentSearchResponseIncidentsData { IncidentSearchResponseIncidentsData { data } } diff --git a/src/datadogV2/model/model_incident_search_response_meta.rs b/src/datadogV2/model/model_incident_search_response_meta.rs index 9eb3ee634..2b0c21b81 100644 --- a/src/datadogV2/model/model_incident_search_response_meta.rs +++ b/src/datadogV2/model/model_incident_search_response_meta.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct IncidentSearchResponseMeta { /// Pagination properties. #[serde(rename = "pagination")] - pub pagination: Option>, + pub pagination: Option, } impl IncidentSearchResponseMeta { pub fn new() -> IncidentSearchResponseMeta { IncidentSearchResponseMeta { pagination: None } } + + pub fn with_pagination( + &mut self, + value: crate::datadogV2::model::IncidentResponseMetaPagination, + ) -> &mut Self { + self.pagination = Some(value); + self + } } impl Default for IncidentSearchResponseMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_search_response_numeric_facet_data.rs b/src/datadogV2/model/model_incident_search_response_numeric_facet_data.rs index 39dbce302..21fe28012 100644 --- a/src/datadogV2/model/model_incident_search_response_numeric_facet_data.rs +++ b/src/datadogV2/model/model_incident_search_response_numeric_facet_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct IncidentSearchResponseNumericFacetData { /// Aggregate information for numeric incident data. #[serde(rename = "aggregates")] - pub aggregates: Box, + pub aggregates: crate::datadogV2::model::IncidentSearchResponseNumericFacetDataAggregates, /// Name of the incident property field. #[serde(rename = "name")] pub name: String, @@ -18,7 +18,7 @@ pub struct IncidentSearchResponseNumericFacetData { impl IncidentSearchResponseNumericFacetData { pub fn new( - aggregates: Box, + aggregates: crate::datadogV2::model::IncidentSearchResponseNumericFacetDataAggregates, name: String, ) -> IncidentSearchResponseNumericFacetData { IncidentSearchResponseNumericFacetData { aggregates, name } diff --git a/src/datadogV2/model/model_incident_search_response_numeric_facet_data_aggregates.rs b/src/datadogV2/model/model_incident_search_response_numeric_facet_data_aggregates.rs index 8cbf4ff28..fda3cb12c 100644 --- a/src/datadogV2/model/model_incident_search_response_numeric_facet_data_aggregates.rs +++ b/src/datadogV2/model/model_incident_search_response_numeric_facet_data_aggregates.rs @@ -23,6 +23,16 @@ impl IncidentSearchResponseNumericFacetDataAggregates { min: None, } } + + pub fn with_max(&mut self, value: Option) -> &mut Self { + self.max = Some(value); + self + } + + pub fn with_min(&mut self, value: Option) -> &mut Self { + self.min = Some(value); + self + } } impl Default for IncidentSearchResponseNumericFacetDataAggregates { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_search_response_property_field_facet_data.rs b/src/datadogV2/model/model_incident_search_response_property_field_facet_data.rs index 6aeaf1eae..0e047e6e0 100644 --- a/src/datadogV2/model/model_incident_search_response_property_field_facet_data.rs +++ b/src/datadogV2/model/model_incident_search_response_property_field_facet_data.rs @@ -11,7 +11,7 @@ pub struct IncidentSearchResponsePropertyFieldFacetData { /// Aggregate information for numeric incident data. #[serde(rename = "aggregates")] pub aggregates: - Option>, + Option, /// Facet data for the property field of an incident. #[serde(rename = "facets")] pub facets: Vec, @@ -31,4 +31,12 @@ impl IncidentSearchResponsePropertyFieldFacetData { name, } } + + pub fn with_aggregates( + &mut self, + value: crate::datadogV2::model::IncidentSearchResponseNumericFacetDataAggregates, + ) -> &mut Self { + self.aggregates = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_search_response_user_facet_data.rs b/src/datadogV2/model/model_incident_search_response_user_facet_data.rs index 4f533e9a0..3e60cf536 100644 --- a/src/datadogV2/model/model_incident_search_response_user_facet_data.rs +++ b/src/datadogV2/model/model_incident_search_response_user_facet_data.rs @@ -35,6 +35,31 @@ impl IncidentSearchResponseUserFacetData { uuid: None, } } + + pub fn with_count(&mut self, value: i32) -> &mut Self { + self.count = Some(value); + self + } + + pub fn with_email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn with_handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_uuid(&mut self, value: String) -> &mut Self { + self.uuid = Some(value); + self + } } impl Default for IncidentSearchResponseUserFacetData { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_service_create_data.rs b/src/datadogV2/model/model_incident_service_create_data.rs index ffd205a9f..3cb12b96d 100644 --- a/src/datadogV2/model/model_incident_service_create_data.rs +++ b/src/datadogV2/model/model_incident_service_create_data.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct IncidentServiceCreateData { /// The incident service's attributes for a create request. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The incident service's relationships. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Incident service resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::IncidentServiceType, @@ -27,4 +27,20 @@ impl IncidentServiceCreateData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::IncidentServiceCreateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::IncidentServiceRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_service_create_request.rs b/src/datadogV2/model/model_incident_service_create_request.rs index aaf4fb890..0d9a41549 100644 --- a/src/datadogV2/model/model_incident_service_create_request.rs +++ b/src/datadogV2/model/model_incident_service_create_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct IncidentServiceCreateRequest { /// Incident Service payload for create requests. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::IncidentServiceCreateData, } impl IncidentServiceCreateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::IncidentServiceCreateData, ) -> IncidentServiceCreateRequest { IncidentServiceCreateRequest { data } } diff --git a/src/datadogV2/model/model_incident_service_included_items.rs b/src/datadogV2/model/model_incident_service_included_items.rs index 234742abb..22496f240 100644 --- a/src/datadogV2/model/model_incident_service_included_items.rs +++ b/src/datadogV2/model/model_incident_service_included_items.rs @@ -7,5 +7,5 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum IncidentServiceIncludedItems { - User(Box), + User(crate::datadogV2::model::User), } diff --git a/src/datadogV2/model/model_incident_service_relationships.rs b/src/datadogV2/model/model_incident_service_relationships.rs index 47680edc1..b19ddcbae 100644 --- a/src/datadogV2/model/model_incident_service_relationships.rs +++ b/src/datadogV2/model/model_incident_service_relationships.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct IncidentServiceRelationships { /// Relationship to user. #[serde(rename = "created_by")] - pub created_by: Option>, + pub created_by: Option, /// Relationship to user. #[serde(rename = "last_modified_by")] - pub last_modified_by: Option>, + pub last_modified_by: Option, } impl IncidentServiceRelationships { @@ -23,6 +23,22 @@ impl IncidentServiceRelationships { last_modified_by: None, } } + + pub fn with_created_by( + &mut self, + value: crate::datadogV2::model::RelationshipToUser, + ) -> &mut Self { + self.created_by = Some(value); + self + } + + pub fn with_last_modified_by( + &mut self, + value: crate::datadogV2::model::RelationshipToUser, + ) -> &mut Self { + self.last_modified_by = Some(value); + self + } } impl Default for IncidentServiceRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_service_response.rs b/src/datadogV2/model/model_incident_service_response.rs index a2b0366bc..ffeb7b822 100644 --- a/src/datadogV2/model/model_incident_service_response.rs +++ b/src/datadogV2/model/model_incident_service_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct IncidentServiceResponse { /// Incident Service data from responses. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::IncidentServiceResponseData, /// Included objects from relationships. #[serde(rename = "included")] pub included: Option>, @@ -18,11 +18,19 @@ pub struct IncidentServiceResponse { impl IncidentServiceResponse { pub fn new( - data: Box, + data: crate::datadogV2::model::IncidentServiceResponseData, ) -> IncidentServiceResponse { IncidentServiceResponse { data, included: None, } } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_service_response_attributes.rs b/src/datadogV2/model/model_incident_service_response_attributes.rs index 4d76f36ad..14ba57a09 100644 --- a/src/datadogV2/model/model_incident_service_response_attributes.rs +++ b/src/datadogV2/model/model_incident_service_response_attributes.rs @@ -27,6 +27,21 @@ impl IncidentServiceResponseAttributes { name: None, } } + + pub fn with_created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn with_modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } impl Default for IncidentServiceResponseAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_service_response_data.rs b/src/datadogV2/model/model_incident_service_response_data.rs index fd2f4afc0..d0ba92046 100644 --- a/src/datadogV2/model/model_incident_service_response_data.rs +++ b/src/datadogV2/model/model_incident_service_response_data.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct IncidentServiceResponseData { /// The incident service's attributes from a response. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The incident service's ID. #[serde(rename = "id")] pub id: String, /// The incident service's relationships. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Incident service resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::IncidentServiceType, @@ -34,4 +34,20 @@ impl IncidentServiceResponseData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::IncidentServiceResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::IncidentServiceRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_service_update_data.rs b/src/datadogV2/model/model_incident_service_update_data.rs index b38b7ddf5..3eb93723d 100644 --- a/src/datadogV2/model/model_incident_service_update_data.rs +++ b/src/datadogV2/model/model_incident_service_update_data.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct IncidentServiceUpdateData { /// The incident service's attributes for an update request. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The incident service's ID. #[serde(rename = "id")] pub id: Option, /// The incident service's relationships. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Incident service resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::IncidentServiceType, @@ -31,4 +31,25 @@ impl IncidentServiceUpdateData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::IncidentServiceUpdateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::IncidentServiceRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_service_update_request.rs b/src/datadogV2/model/model_incident_service_update_request.rs index 104963083..ca0173011 100644 --- a/src/datadogV2/model/model_incident_service_update_request.rs +++ b/src/datadogV2/model/model_incident_service_update_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct IncidentServiceUpdateRequest { /// Incident Service payload for update requests. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::IncidentServiceUpdateData, } impl IncidentServiceUpdateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::IncidentServiceUpdateData, ) -> IncidentServiceUpdateRequest { IncidentServiceUpdateRequest { data } } diff --git a/src/datadogV2/model/model_incident_services_response.rs b/src/datadogV2/model/model_incident_services_response.rs index b8627f356..aeace4753 100644 --- a/src/datadogV2/model/model_incident_services_response.rs +++ b/src/datadogV2/model/model_incident_services_response.rs @@ -16,7 +16,7 @@ pub struct IncidentServicesResponse { pub included: Option>, /// The metadata object containing pagination metadata. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl IncidentServicesResponse { @@ -29,4 +29,17 @@ impl IncidentServicesResponse { meta: None, } } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::IncidentResponseMeta) -> &mut Self { + self.meta = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_team_create_data.rs b/src/datadogV2/model/model_incident_team_create_data.rs index 2f2e2618b..ae8855100 100644 --- a/src/datadogV2/model/model_incident_team_create_data.rs +++ b/src/datadogV2/model/model_incident_team_create_data.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct IncidentTeamCreateData { /// The incident team's attributes for a create request. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The incident team's relationships. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Incident Team resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::IncidentTeamType, @@ -27,4 +27,20 @@ impl IncidentTeamCreateData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::IncidentTeamCreateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::IncidentTeamRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_team_create_request.rs b/src/datadogV2/model/model_incident_team_create_request.rs index e57df0348..982e876ff 100644 --- a/src/datadogV2/model/model_incident_team_create_request.rs +++ b/src/datadogV2/model/model_incident_team_create_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct IncidentTeamCreateRequest { /// Incident Team data for a create request. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::IncidentTeamCreateData, } impl IncidentTeamCreateRequest { - pub fn new( - data: Box, - ) -> IncidentTeamCreateRequest { + pub fn new(data: crate::datadogV2::model::IncidentTeamCreateData) -> IncidentTeamCreateRequest { IncidentTeamCreateRequest { data } } } diff --git a/src/datadogV2/model/model_incident_team_included_items.rs b/src/datadogV2/model/model_incident_team_included_items.rs index e94d314e5..5f5106e0c 100644 --- a/src/datadogV2/model/model_incident_team_included_items.rs +++ b/src/datadogV2/model/model_incident_team_included_items.rs @@ -7,5 +7,5 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum IncidentTeamIncludedItems { - User(Box), + User(crate::datadogV2::model::User), } diff --git a/src/datadogV2/model/model_incident_team_relationships.rs b/src/datadogV2/model/model_incident_team_relationships.rs index 988554626..6c4a71135 100644 --- a/src/datadogV2/model/model_incident_team_relationships.rs +++ b/src/datadogV2/model/model_incident_team_relationships.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct IncidentTeamRelationships { /// Relationship to user. #[serde(rename = "created_by")] - pub created_by: Option>, + pub created_by: Option, /// Relationship to user. #[serde(rename = "last_modified_by")] - pub last_modified_by: Option>, + pub last_modified_by: Option, } impl IncidentTeamRelationships { @@ -23,6 +23,22 @@ impl IncidentTeamRelationships { last_modified_by: None, } } + + pub fn with_created_by( + &mut self, + value: crate::datadogV2::model::RelationshipToUser, + ) -> &mut Self { + self.created_by = Some(value); + self + } + + pub fn with_last_modified_by( + &mut self, + value: crate::datadogV2::model::RelationshipToUser, + ) -> &mut Self { + self.last_modified_by = Some(value); + self + } } impl Default for IncidentTeamRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_team_response.rs b/src/datadogV2/model/model_incident_team_response.rs index aa17239cc..012170899 100644 --- a/src/datadogV2/model/model_incident_team_response.rs +++ b/src/datadogV2/model/model_incident_team_response.rs @@ -10,19 +10,25 @@ use serde_with::skip_serializing_none; pub struct IncidentTeamResponse { /// Incident Team data from a response. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::IncidentTeamResponseData, /// Included objects from relationships. #[serde(rename = "included")] pub included: Option>, } impl IncidentTeamResponse { - pub fn new( - data: Box, - ) -> IncidentTeamResponse { + pub fn new(data: crate::datadogV2::model::IncidentTeamResponseData) -> IncidentTeamResponse { IncidentTeamResponse { data, included: None, } } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_team_response_attributes.rs b/src/datadogV2/model/model_incident_team_response_attributes.rs index 8bcd88657..adfc2150c 100644 --- a/src/datadogV2/model/model_incident_team_response_attributes.rs +++ b/src/datadogV2/model/model_incident_team_response_attributes.rs @@ -27,6 +27,21 @@ impl IncidentTeamResponseAttributes { name: None, } } + + pub fn with_created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn with_modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } impl Default for IncidentTeamResponseAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_team_response_data.rs b/src/datadogV2/model/model_incident_team_response_data.rs index 63795a26e..7932297ca 100644 --- a/src/datadogV2/model/model_incident_team_response_data.rs +++ b/src/datadogV2/model/model_incident_team_response_data.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct IncidentTeamResponseData { /// The incident team's attributes from a response. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The incident team's ID. #[serde(rename = "id")] pub id: Option, /// The incident team's relationships. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Incident Team resource type. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,32 @@ impl IncidentTeamResponseData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::IncidentTeamResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::IncidentTeamRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::IncidentTeamType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for IncidentTeamResponseData { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_team_update_data.rs b/src/datadogV2/model/model_incident_team_update_data.rs index 0ecda33d6..75994706f 100644 --- a/src/datadogV2/model/model_incident_team_update_data.rs +++ b/src/datadogV2/model/model_incident_team_update_data.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct IncidentTeamUpdateData { /// The incident team's attributes for an update request. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The incident team's ID. #[serde(rename = "id")] pub id: Option, /// The incident team's relationships. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Incident Team resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::IncidentTeamType, @@ -31,4 +31,25 @@ impl IncidentTeamUpdateData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::IncidentTeamUpdateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::IncidentTeamRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_team_update_request.rs b/src/datadogV2/model/model_incident_team_update_request.rs index 05cb352bc..c71a55f6e 100644 --- a/src/datadogV2/model/model_incident_team_update_request.rs +++ b/src/datadogV2/model/model_incident_team_update_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct IncidentTeamUpdateRequest { /// Incident Team data for an update request. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::IncidentTeamUpdateData, } impl IncidentTeamUpdateRequest { - pub fn new( - data: Box, - ) -> IncidentTeamUpdateRequest { + pub fn new(data: crate::datadogV2::model::IncidentTeamUpdateData) -> IncidentTeamUpdateRequest { IncidentTeamUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_incident_teams_response.rs b/src/datadogV2/model/model_incident_teams_response.rs index a7c1cc0df..16d144073 100644 --- a/src/datadogV2/model/model_incident_teams_response.rs +++ b/src/datadogV2/model/model_incident_teams_response.rs @@ -16,7 +16,7 @@ pub struct IncidentTeamsResponse { pub included: Option>, /// The metadata object containing pagination metadata. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl IncidentTeamsResponse { @@ -29,4 +29,17 @@ impl IncidentTeamsResponse { meta: None, } } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::IncidentResponseMeta) -> &mut Self { + self.meta = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_timeline_cell_create_attributes.rs b/src/datadogV2/model/model_incident_timeline_cell_create_attributes.rs index 73af70e87..24b16d7e1 100644 --- a/src/datadogV2/model/model_incident_timeline_cell_create_attributes.rs +++ b/src/datadogV2/model/model_incident_timeline_cell_create_attributes.rs @@ -8,6 +8,6 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum IncidentTimelineCellCreateAttributes { IncidentTimelineCellMarkdownCreateAttributes( - Box, + crate::datadogV2::model::IncidentTimelineCellMarkdownCreateAttributes, ), } diff --git a/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes.rs b/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes.rs index ba8f3e7e0..7b3246c11 100644 --- a/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes.rs +++ b/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes.rs @@ -13,7 +13,7 @@ pub struct IncidentTimelineCellMarkdownCreateAttributes { pub cell_type: crate::datadogV2::model::IncidentTimelineCellMarkdownContentType, /// The Markdown timeline cell contents. #[serde(rename = "content")] - pub content: Box, + pub content: crate::datadogV2::model::IncidentTimelineCellMarkdownCreateAttributesContent, /// A flag indicating whether the timeline cell is important and should be highlighted. #[serde(rename = "important")] pub important: Option, @@ -22,7 +22,7 @@ pub struct IncidentTimelineCellMarkdownCreateAttributes { impl IncidentTimelineCellMarkdownCreateAttributes { pub fn new( cell_type: crate::datadogV2::model::IncidentTimelineCellMarkdownContentType, - content: Box, + content: crate::datadogV2::model::IncidentTimelineCellMarkdownCreateAttributesContent, ) -> IncidentTimelineCellMarkdownCreateAttributes { IncidentTimelineCellMarkdownCreateAttributes { cell_type, @@ -30,4 +30,9 @@ impl IncidentTimelineCellMarkdownCreateAttributes { important: None, } } + + pub fn with_important(&mut self, value: bool) -> &mut Self { + self.important = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes_content.rs b/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes_content.rs index 00902accb..b8572ae5a 100644 --- a/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes_content.rs +++ b/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes_content.rs @@ -17,6 +17,11 @@ impl IncidentTimelineCellMarkdownCreateAttributesContent { pub fn new() -> IncidentTimelineCellMarkdownCreateAttributesContent { IncidentTimelineCellMarkdownCreateAttributesContent { content: None } } + + pub fn with_content(&mut self, value: String) -> &mut Self { + self.content = Some(value); + self + } } impl Default for IncidentTimelineCellMarkdownCreateAttributesContent { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_todo_assignee.rs b/src/datadogV2/model/model_incident_todo_assignee.rs index d0056cef2..80d646d79 100644 --- a/src/datadogV2/model/model_incident_todo_assignee.rs +++ b/src/datadogV2/model/model_incident_todo_assignee.rs @@ -8,5 +8,5 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum IncidentTodoAssignee { IncidentTodoAssigneeHandle(String), - IncidentTodoAnonymousAssignee(Box), + IncidentTodoAnonymousAssignee(crate::datadogV2::model::IncidentTodoAnonymousAssignee), } diff --git a/src/datadogV2/model/model_incident_todo_attributes.rs b/src/datadogV2/model/model_incident_todo_attributes.rs index deaab79b1..6963f47e9 100644 --- a/src/datadogV2/model/model_incident_todo_attributes.rs +++ b/src/datadogV2/model/model_incident_todo_attributes.rs @@ -54,4 +54,29 @@ impl IncidentTodoAttributes { modified: None, } } + + pub fn with_completed(&mut self, value: Option) -> &mut Self { + self.completed = Some(value); + self + } + + pub fn with_created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn with_due_date(&mut self, value: Option) -> &mut Self { + self.due_date = Some(value); + self + } + + pub fn with_incident_id(&mut self, value: String) -> &mut Self { + self.incident_id = Some(value); + self + } + + pub fn with_modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_todo_create_data.rs b/src/datadogV2/model/model_incident_todo_create_data.rs index d35396097..573c3c4c3 100644 --- a/src/datadogV2/model/model_incident_todo_create_data.rs +++ b/src/datadogV2/model/model_incident_todo_create_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct IncidentTodoCreateData { /// Incident todo's attributes. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::IncidentTodoAttributes, /// Todo resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::IncidentTodoType, @@ -18,7 +18,7 @@ pub struct IncidentTodoCreateData { impl IncidentTodoCreateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::IncidentTodoAttributes, type_: crate::datadogV2::model::IncidentTodoType, ) -> IncidentTodoCreateData { IncidentTodoCreateData { attributes, type_ } diff --git a/src/datadogV2/model/model_incident_todo_create_request.rs b/src/datadogV2/model/model_incident_todo_create_request.rs index 4432cd231..24d48a1eb 100644 --- a/src/datadogV2/model/model_incident_todo_create_request.rs +++ b/src/datadogV2/model/model_incident_todo_create_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct IncidentTodoCreateRequest { /// Incident todo data for a create request. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::IncidentTodoCreateData, } impl IncidentTodoCreateRequest { - pub fn new( - data: Box, - ) -> IncidentTodoCreateRequest { + pub fn new(data: crate::datadogV2::model::IncidentTodoCreateData) -> IncidentTodoCreateRequest { IncidentTodoCreateRequest { data } } } diff --git a/src/datadogV2/model/model_incident_todo_list_response.rs b/src/datadogV2/model/model_incident_todo_list_response.rs index 0c7abfb02..bc20b7f73 100644 --- a/src/datadogV2/model/model_incident_todo_list_response.rs +++ b/src/datadogV2/model/model_incident_todo_list_response.rs @@ -16,7 +16,7 @@ pub struct IncidentTodoListResponse { pub included: Option>, /// The metadata object containing pagination metadata. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl IncidentTodoListResponse { @@ -29,4 +29,17 @@ impl IncidentTodoListResponse { meta: None, } } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::IncidentResponseMeta) -> &mut Self { + self.meta = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_todo_patch_data.rs b/src/datadogV2/model/model_incident_todo_patch_data.rs index b9f491306..04db5a32f 100644 --- a/src/datadogV2/model/model_incident_todo_patch_data.rs +++ b/src/datadogV2/model/model_incident_todo_patch_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct IncidentTodoPatchData { /// Incident todo's attributes. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::IncidentTodoAttributes, /// Todo resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::IncidentTodoType, @@ -18,7 +18,7 @@ pub struct IncidentTodoPatchData { impl IncidentTodoPatchData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::IncidentTodoAttributes, type_: crate::datadogV2::model::IncidentTodoType, ) -> IncidentTodoPatchData { IncidentTodoPatchData { attributes, type_ } diff --git a/src/datadogV2/model/model_incident_todo_patch_request.rs b/src/datadogV2/model/model_incident_todo_patch_request.rs index 429686bef..adefe7a47 100644 --- a/src/datadogV2/model/model_incident_todo_patch_request.rs +++ b/src/datadogV2/model/model_incident_todo_patch_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct IncidentTodoPatchRequest { /// Incident todo data for a patch request. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::IncidentTodoPatchData, } impl IncidentTodoPatchRequest { - pub fn new( - data: Box, - ) -> IncidentTodoPatchRequest { + pub fn new(data: crate::datadogV2::model::IncidentTodoPatchData) -> IncidentTodoPatchRequest { IncidentTodoPatchRequest { data } } } diff --git a/src/datadogV2/model/model_incident_todo_relationships.rs b/src/datadogV2/model/model_incident_todo_relationships.rs index 677ea80f1..94427dc3d 100644 --- a/src/datadogV2/model/model_incident_todo_relationships.rs +++ b/src/datadogV2/model/model_incident_todo_relationships.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct IncidentTodoRelationships { /// Relationship to user. #[serde(rename = "created_by_user")] - pub created_by_user: Option>, + pub created_by_user: Option, /// Relationship to user. #[serde(rename = "last_modified_by_user")] - pub last_modified_by_user: Option>, + pub last_modified_by_user: Option, } impl IncidentTodoRelationships { @@ -23,6 +23,22 @@ impl IncidentTodoRelationships { last_modified_by_user: None, } } + + pub fn with_created_by_user( + &mut self, + value: crate::datadogV2::model::RelationshipToUser, + ) -> &mut Self { + self.created_by_user = Some(value); + self + } + + pub fn with_last_modified_by_user( + &mut self, + value: crate::datadogV2::model::RelationshipToUser, + ) -> &mut Self { + self.last_modified_by_user = Some(value); + self + } } impl Default for IncidentTodoRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_todo_response.rs b/src/datadogV2/model/model_incident_todo_response.rs index 5d7077206..5eaea7f3c 100644 --- a/src/datadogV2/model/model_incident_todo_response.rs +++ b/src/datadogV2/model/model_incident_todo_response.rs @@ -10,19 +10,25 @@ use serde_with::skip_serializing_none; pub struct IncidentTodoResponse { /// Incident todo response data. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::IncidentTodoResponseData, /// Included related resources that the user requested. #[serde(rename = "included")] pub included: Option>, } impl IncidentTodoResponse { - pub fn new( - data: Box, - ) -> IncidentTodoResponse { + pub fn new(data: crate::datadogV2::model::IncidentTodoResponseData) -> IncidentTodoResponse { IncidentTodoResponse { data, included: None, } } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_todo_response_data.rs b/src/datadogV2/model/model_incident_todo_response_data.rs index 27392cdb5..44e1a3808 100644 --- a/src/datadogV2/model/model_incident_todo_response_data.rs +++ b/src/datadogV2/model/model_incident_todo_response_data.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct IncidentTodoResponseData { /// Incident todo's attributes. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The incident todo's ID. #[serde(rename = "id")] pub id: String, /// The incident's relationships from a response. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Todo resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::IncidentTodoType, @@ -34,4 +34,20 @@ impl IncidentTodoResponseData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::IncidentTodoAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::IncidentTodoRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_todo_response_included_item.rs b/src/datadogV2/model/model_incident_todo_response_included_item.rs index b12e5eb84..d1f284afb 100644 --- a/src/datadogV2/model/model_incident_todo_response_included_item.rs +++ b/src/datadogV2/model/model_incident_todo_response_included_item.rs @@ -7,5 +7,5 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum IncidentTodoResponseIncludedItem { - User(Box), + User(crate::datadogV2::model::User), } diff --git a/src/datadogV2/model/model_incident_update_attributes.rs b/src/datadogV2/model/model_incident_update_attributes.rs index ce7610516..a6a79a9b3 100644 --- a/src/datadogV2/model/model_incident_update_attributes.rs +++ b/src/datadogV2/model/model_incident_update_attributes.rs @@ -61,6 +61,52 @@ impl IncidentUpdateAttributes { title: None, } } + + pub fn with_customer_impact_end(&mut self, value: Option) -> &mut Self { + self.customer_impact_end = Some(value); + self + } + + pub fn with_customer_impact_scope(&mut self, value: String) -> &mut Self { + self.customer_impact_scope = Some(value); + self + } + + pub fn with_customer_impact_start(&mut self, value: Option) -> &mut Self { + self.customer_impact_start = Some(value); + self + } + + pub fn with_customer_impacted(&mut self, value: bool) -> &mut Self { + self.customer_impacted = Some(value); + self + } + + pub fn with_detected(&mut self, value: Option) -> &mut Self { + self.detected = Some(value); + self + } + + pub fn with_fields( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.fields = Some(value); + self + } + + pub fn with_notification_handles( + &mut self, + value: Vec, + ) -> &mut Self { + self.notification_handles = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } } impl Default for IncidentUpdateAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_update_data.rs b/src/datadogV2/model/model_incident_update_data.rs index 68659b80a..adfc95995 100644 --- a/src/datadogV2/model/model_incident_update_data.rs +++ b/src/datadogV2/model/model_incident_update_data.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct IncidentUpdateData { /// The incident's attributes for an update request. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The incident's ID. #[serde(rename = "id")] pub id: String, /// The incident's relationships for an update request. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Incident resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::IncidentType, @@ -31,4 +31,20 @@ impl IncidentUpdateData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::IncidentUpdateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::IncidentUpdateRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_update_relationships.rs b/src/datadogV2/model/model_incident_update_relationships.rs index 8699f8469..b38be76f4 100644 --- a/src/datadogV2/model/model_incident_update_relationships.rs +++ b/src/datadogV2/model/model_incident_update_relationships.rs @@ -14,14 +14,13 @@ pub struct IncidentUpdateRelationships { default, with = "::serde_with::rust::double_option" )] - pub commander_user: Option>>, + pub commander_user: Option>, /// A relationship reference for multiple integration metadata objects. #[serde(rename = "integrations")] - pub integrations: - Option>, + pub integrations: Option, /// A relationship reference for postmortems. #[serde(rename = "postmortem")] - pub postmortem: Option>, + pub postmortem: Option, } impl IncidentUpdateRelationships { @@ -32,6 +31,30 @@ impl IncidentUpdateRelationships { postmortem: None, } } + + pub fn with_commander_user( + &mut self, + value: Option, + ) -> &mut Self { + self.commander_user = Some(value); + self + } + + pub fn with_integrations( + &mut self, + value: crate::datadogV2::model::RelationshipToIncidentIntegrationMetadatas, + ) -> &mut Self { + self.integrations = Some(value); + self + } + + pub fn with_postmortem( + &mut self, + value: crate::datadogV2::model::RelationshipToIncidentPostmortem, + ) -> &mut Self { + self.postmortem = Some(value); + self + } } impl Default for IncidentUpdateRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_incident_update_request.rs b/src/datadogV2/model/model_incident_update_request.rs index 693cc2377..e22c2444e 100644 --- a/src/datadogV2/model/model_incident_update_request.rs +++ b/src/datadogV2/model/model_incident_update_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct IncidentUpdateRequest { /// Incident data for an update request. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::IncidentUpdateData, } impl IncidentUpdateRequest { - pub fn new(data: Box) -> IncidentUpdateRequest { + pub fn new(data: crate::datadogV2::model::IncidentUpdateData) -> IncidentUpdateRequest { IncidentUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_incidents_response.rs b/src/datadogV2/model/model_incidents_response.rs index 3bd57c7d0..b2ca4dd23 100644 --- a/src/datadogV2/model/model_incidents_response.rs +++ b/src/datadogV2/model/model_incidents_response.rs @@ -16,7 +16,7 @@ pub struct IncidentsResponse { pub included: Option>, /// The metadata object containing pagination metadata. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl IncidentsResponse { @@ -27,4 +27,17 @@ impl IncidentsResponse { meta: None, } } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::IncidentResponseMeta) -> &mut Self { + self.meta = Some(value); + self + } } diff --git a/src/datadogV2/model/model_intake_payload_accepted.rs b/src/datadogV2/model/model_intake_payload_accepted.rs index c101dadd9..473d740b7 100644 --- a/src/datadogV2/model/model_intake_payload_accepted.rs +++ b/src/datadogV2/model/model_intake_payload_accepted.rs @@ -17,6 +17,11 @@ impl IntakePayloadAccepted { pub fn new() -> IntakePayloadAccepted { IntakePayloadAccepted { errors: None } } + + pub fn with_errors(&mut self, value: Vec) -> &mut Self { + self.errors = Some(value); + self + } } impl Default for IntakePayloadAccepted { fn default() -> Self { diff --git a/src/datadogV2/model/model_ip_allowlist_attributes.rs b/src/datadogV2/model/model_ip_allowlist_attributes.rs index 3e66f0c8e..447e879a7 100644 --- a/src/datadogV2/model/model_ip_allowlist_attributes.rs +++ b/src/datadogV2/model/model_ip_allowlist_attributes.rs @@ -23,6 +23,19 @@ impl IPAllowlistAttributes { entries: None, } } + + pub fn with_enabled(&mut self, value: bool) -> &mut Self { + self.enabled = Some(value); + self + } + + pub fn with_entries( + &mut self, + value: Vec, + ) -> &mut Self { + self.entries = Some(value); + self + } } impl Default for IPAllowlistAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_ip_allowlist_data.rs b/src/datadogV2/model/model_ip_allowlist_data.rs index 606b6e073..05a336dcd 100644 --- a/src/datadogV2/model/model_ip_allowlist_data.rs +++ b/src/datadogV2/model/model_ip_allowlist_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct IPAllowlistData { /// Attributes of the IP allowlist. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The unique identifier of the org. #[serde(rename = "id")] pub id: Option, @@ -27,4 +27,17 @@ impl IPAllowlistData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::IPAllowlistAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } } diff --git a/src/datadogV2/model/model_ip_allowlist_entry.rs b/src/datadogV2/model/model_ip_allowlist_entry.rs index 8b8e77631..8d27e5db0 100644 --- a/src/datadogV2/model/model_ip_allowlist_entry.rs +++ b/src/datadogV2/model/model_ip_allowlist_entry.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct IPAllowlistEntry { /// Data of the IP allowlist entry object. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::IPAllowlistEntryData, } impl IPAllowlistEntry { - pub fn new(data: Box) -> IPAllowlistEntry { + pub fn new(data: crate::datadogV2::model::IPAllowlistEntryData) -> IPAllowlistEntry { IPAllowlistEntry { data } } } diff --git a/src/datadogV2/model/model_ip_allowlist_entry_attributes.rs b/src/datadogV2/model/model_ip_allowlist_entry_attributes.rs index 8e5502fb4..1d4c35cc8 100644 --- a/src/datadogV2/model/model_ip_allowlist_entry_attributes.rs +++ b/src/datadogV2/model/model_ip_allowlist_entry_attributes.rs @@ -31,6 +31,26 @@ impl IPAllowlistEntryAttributes { note: None, } } + + pub fn with_cidr_block(&mut self, value: String) -> &mut Self { + self.cidr_block = Some(value); + self + } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn with_note(&mut self, value: String) -> &mut Self { + self.note = Some(value); + self + } } impl Default for IPAllowlistEntryAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_ip_allowlist_entry_data.rs b/src/datadogV2/model/model_ip_allowlist_entry_data.rs index acf5dfeea..caa5885bf 100644 --- a/src/datadogV2/model/model_ip_allowlist_entry_data.rs +++ b/src/datadogV2/model/model_ip_allowlist_entry_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct IPAllowlistEntryData { /// Attributes of the IP allowlist entry. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The unique identifier of the IP allowlist entry. #[serde(rename = "id")] pub id: Option, @@ -27,4 +27,17 @@ impl IPAllowlistEntryData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::IPAllowlistEntryAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } } diff --git a/src/datadogV2/model/model_ip_allowlist_response.rs b/src/datadogV2/model/model_ip_allowlist_response.rs index 7476eb33b..53739a9e9 100644 --- a/src/datadogV2/model/model_ip_allowlist_response.rs +++ b/src/datadogV2/model/model_ip_allowlist_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct IPAllowlistResponse { /// IP allowlist data. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl IPAllowlistResponse { pub fn new() -> IPAllowlistResponse { IPAllowlistResponse { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::IPAllowlistData) -> &mut Self { + self.data = Some(value); + self + } } impl Default for IPAllowlistResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_ip_allowlist_update_request.rs b/src/datadogV2/model/model_ip_allowlist_update_request.rs index 21fcf3640..50dbbc56f 100644 --- a/src/datadogV2/model/model_ip_allowlist_update_request.rs +++ b/src/datadogV2/model/model_ip_allowlist_update_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct IPAllowlistUpdateRequest { /// IP allowlist data. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::IPAllowlistData, } impl IPAllowlistUpdateRequest { - pub fn new(data: Box) -> IPAllowlistUpdateRequest { + pub fn new(data: crate::datadogV2::model::IPAllowlistData) -> IPAllowlistUpdateRequest { IPAllowlistUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_jira_integration_metadata_issues_item.rs b/src/datadogV2/model/model_jira_integration_metadata_issues_item.rs index 70fd8bf6e..a26cce301 100644 --- a/src/datadogV2/model/model_jira_integration_metadata_issues_item.rs +++ b/src/datadogV2/model/model_jira_integration_metadata_issues_item.rs @@ -35,4 +35,19 @@ impl JiraIntegrationMetadataIssuesItem { redirect_url: None, } } + + pub fn with_issue_key(&mut self, value: String) -> &mut Self { + self.issue_key = Some(value); + self + } + + pub fn with_issuetype_id(&mut self, value: String) -> &mut Self { + self.issuetype_id = Some(value); + self + } + + pub fn with_redirect_url(&mut self, value: String) -> &mut Self { + self.redirect_url = Some(value); + self + } } diff --git a/src/datadogV2/model/model_jsonapi_error_item.rs b/src/datadogV2/model/model_jsonapi_error_item.rs index 1f328c9ef..b47909f15 100644 --- a/src/datadogV2/model/model_jsonapi_error_item.rs +++ b/src/datadogV2/model/model_jsonapi_error_item.rs @@ -27,6 +27,21 @@ impl JSONAPIErrorItem { title: None, } } + + pub fn with_detail(&mut self, value: String) -> &mut Self { + self.detail = Some(value); + self + } + + pub fn with_status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } } impl Default for JSONAPIErrorItem { fn default() -> Self { diff --git a/src/datadogV2/model/model_list_application_keys_response.rs b/src/datadogV2/model/model_list_application_keys_response.rs index 2d1d36bbf..70de43b43 100644 --- a/src/datadogV2/model/model_list_application_keys_response.rs +++ b/src/datadogV2/model/model_list_application_keys_response.rs @@ -16,7 +16,7 @@ pub struct ListApplicationKeysResponse { pub included: Option>, /// Additional information related to the application key response. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl ListApplicationKeysResponse { @@ -27,6 +27,30 @@ impl ListApplicationKeysResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::ApplicationKeyResponseMeta, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for ListApplicationKeysResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_list_downtimes_response.rs b/src/datadogV2/model/model_list_downtimes_response.rs index 0c231d7d7..8708b338e 100644 --- a/src/datadogV2/model/model_list_downtimes_response.rs +++ b/src/datadogV2/model/model_list_downtimes_response.rs @@ -16,7 +16,7 @@ pub struct ListDowntimesResponse { pub included: Option>, /// Pagination metadata returned by the API. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl ListDowntimesResponse { @@ -27,6 +27,27 @@ impl ListDowntimesResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::DowntimeMeta) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for ListDowntimesResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_list_findings_meta.rs b/src/datadogV2/model/model_list_findings_meta.rs index 3e7006a2c..4f31f22a7 100644 --- a/src/datadogV2/model/model_list_findings_meta.rs +++ b/src/datadogV2/model/model_list_findings_meta.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ListFindingsMeta { /// Pagination and findings count information. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, /// The point in time corresponding to the listed findings. #[serde(rename = "snapshot_timestamp")] pub snapshot_timestamp: Option, @@ -23,6 +23,16 @@ impl ListFindingsMeta { snapshot_timestamp: None, } } + + pub fn with_page(&mut self, value: crate::datadogV2::model::ListFindingsPage) -> &mut Self { + self.page = Some(value); + self + } + + pub fn with_snapshot_timestamp(&mut self, value: i64) -> &mut Self { + self.snapshot_timestamp = Some(value); + self + } } impl Default for ListFindingsMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_list_findings_page.rs b/src/datadogV2/model/model_list_findings_page.rs index 3836898ce..dfb40db7c 100644 --- a/src/datadogV2/model/model_list_findings_page.rs +++ b/src/datadogV2/model/model_list_findings_page.rs @@ -23,6 +23,16 @@ impl ListFindingsPage { total_filtered_count: None, } } + + pub fn with_cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + self + } + + pub fn with_total_filtered_count(&mut self, value: i64) -> &mut Self { + self.total_filtered_count = Some(value); + self + } } impl Default for ListFindingsPage { fn default() -> Self { diff --git a/src/datadogV2/model/model_list_findings_response.rs b/src/datadogV2/model/model_list_findings_response.rs index 50225234f..c856580d6 100644 --- a/src/datadogV2/model/model_list_findings_response.rs +++ b/src/datadogV2/model/model_list_findings_response.rs @@ -13,13 +13,13 @@ pub struct ListFindingsResponse { pub data: Vec, /// Metadata for pagination. #[serde(rename = "meta")] - pub meta: Box, + pub meta: crate::datadogV2::model::ListFindingsMeta, } impl ListFindingsResponse { pub fn new( data: Vec, - meta: Box, + meta: crate::datadogV2::model::ListFindingsMeta, ) -> ListFindingsResponse { ListFindingsResponse { data, meta } } diff --git a/src/datadogV2/model/model_list_powerpacks_response.rs b/src/datadogV2/model/model_list_powerpacks_response.rs index 080d28ca9..a9abb63c2 100644 --- a/src/datadogV2/model/model_list_powerpacks_response.rs +++ b/src/datadogV2/model/model_list_powerpacks_response.rs @@ -16,10 +16,10 @@ pub struct ListPowerpacksResponse { pub included: Option>, /// Links attributes. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, /// Powerpack response metadata. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl ListPowerpacksResponse { @@ -31,6 +31,32 @@ impl ListPowerpacksResponse { meta: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_included(&mut self, value: Vec) -> &mut Self { + self.included = Some(value); + self + } + + pub fn with_links( + &mut self, + value: crate::datadogV2::model::PowerpackResponseLinks, + ) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::PowerpacksResponseMeta, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for ListPowerpacksResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_list_rules_response.rs b/src/datadogV2/model/model_list_rules_response.rs index 42364e335..148b26934 100644 --- a/src/datadogV2/model/model_list_rules_response.rs +++ b/src/datadogV2/model/model_list_rules_response.rs @@ -13,7 +13,7 @@ pub struct ListRulesResponse { pub data: Option>, /// Links attributes. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, } impl ListRulesResponse { @@ -23,6 +23,22 @@ impl ListRulesResponse { links: None, } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links( + &mut self, + value: crate::datadogV2::model::ListRulesResponseLinks, + ) -> &mut Self { + self.links = Some(value); + self + } } impl Default for ListRulesResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_list_rules_response_data_item.rs b/src/datadogV2/model/model_list_rules_response_data_item.rs index 86b6aabac..59ff2c1f3 100644 --- a/src/datadogV2/model/model_list_rules_response_data_item.rs +++ b/src/datadogV2/model/model_list_rules_response_data_item.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct ListRulesResponseDataItem { /// Details of a rule. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The unique ID for a scorecard rule. #[serde(rename = "id")] pub id: Option, /// Scorecard create rule response relationship. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// The JSON:API type for scorecard rules. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,29 @@ impl ListRulesResponseDataItem { type_: None, } } + + pub fn with_attributes(&mut self, value: crate::datadogV2::model::RuleAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::RelationshipToRule, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::RuleType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for ListRulesResponseDataItem { fn default() -> Self { diff --git a/src/datadogV2/model/model_list_rules_response_links.rs b/src/datadogV2/model/model_list_rules_response_links.rs index ccd846025..c6a36f7f9 100644 --- a/src/datadogV2/model/model_list_rules_response_links.rs +++ b/src/datadogV2/model/model_list_rules_response_links.rs @@ -17,6 +17,11 @@ impl ListRulesResponseLinks { pub fn new() -> ListRulesResponseLinks { ListRulesResponseLinks { next: None } } + + pub fn with_next(&mut self, value: String) -> &mut Self { + self.next = Some(value); + self + } } impl Default for ListRulesResponseLinks { fn default() -> Self { diff --git a/src/datadogV2/model/model_log.rs b/src/datadogV2/model/model_log.rs index 6adf1ad2d..4267602ed 100644 --- a/src/datadogV2/model/model_log.rs +++ b/src/datadogV2/model/model_log.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct Log { /// JSON object containing all log attributes and their associated values. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Unique ID of the Log. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,21 @@ impl Log { type_: None, } } + + pub fn with_attributes(&mut self, value: crate::datadogV2::model::LogAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::LogType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for Log { fn default() -> Self { diff --git a/src/datadogV2/model/model_log_attributes.rs b/src/datadogV2/model/model_log_attributes.rs index 230dfe58a..5a781bbc0 100644 --- a/src/datadogV2/model/model_log_attributes.rs +++ b/src/datadogV2/model/model_log_attributes.rs @@ -47,6 +47,44 @@ impl LogAttributes { timestamp: None, } } + + pub fn with_attributes( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_service(&mut self, value: String) -> &mut Self { + self.service = Some(value); + self + } + + pub fn with_status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_timestamp(&mut self, value: String) -> &mut Self { + self.timestamp = Some(value); + self + } } impl Default for LogAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_aggregate_bucket.rs b/src/datadogV2/model/model_logs_aggregate_bucket.rs index 3841453c7..d6d5d3a9d 100644 --- a/src/datadogV2/model/model_logs_aggregate_bucket.rs +++ b/src/datadogV2/model/model_logs_aggregate_bucket.rs @@ -25,6 +25,25 @@ impl LogsAggregateBucket { computes: None, } } + + pub fn with_by( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.by = Some(value); + self + } + + pub fn with_computes( + &mut self, + value: std::collections::BTreeMap< + String, + crate::datadogV2::model::LogsAggregateBucketValue, + >, + ) -> &mut Self { + self.computes = Some(value); + self + } } impl Default for LogsAggregateBucket { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_aggregate_bucket_value_timeseries_point.rs b/src/datadogV2/model/model_logs_aggregate_bucket_value_timeseries_point.rs index 999d33759..389fed47c 100644 --- a/src/datadogV2/model/model_logs_aggregate_bucket_value_timeseries_point.rs +++ b/src/datadogV2/model/model_logs_aggregate_bucket_value_timeseries_point.rs @@ -23,6 +23,16 @@ impl LogsAggregateBucketValueTimeseriesPoint { value: None, } } + + pub fn with_time(&mut self, value: String) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_value(&mut self, value: f64) -> &mut Self { + self.value = Some(value); + self + } } impl Default for LogsAggregateBucketValueTimeseriesPoint { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_aggregate_request.rs b/src/datadogV2/model/model_logs_aggregate_request.rs index 7ad4a5cb1..d834f2ea6 100644 --- a/src/datadogV2/model/model_logs_aggregate_request.rs +++ b/src/datadogV2/model/model_logs_aggregate_request.rs @@ -13,17 +13,17 @@ pub struct LogsAggregateRequest { pub compute: Option>, /// The search and filter query settings #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// The rules for the group by #[serde(rename = "group_by")] pub group_by: Option>, /// Global query options that are used during the query. /// Note: you should supply either timezone or time offset, but not both. Otherwise, the query will fail. #[serde(rename = "options")] - pub options: Option>, + pub options: Option, /// Paging settings #[serde(rename = "page")] - pub page: Option>, + pub page: Option, } impl LogsAggregateRequest { @@ -36,6 +36,34 @@ impl LogsAggregateRequest { page: None, } } + + pub fn with_compute(&mut self, value: Vec) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn with_filter(&mut self, value: crate::datadogV2::model::LogsQueryFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_group_by(&mut self, value: Vec) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn with_options(&mut self, value: crate::datadogV2::model::LogsQueryOptions) -> &mut Self { + self.options = Some(value); + self + } + + pub fn with_page( + &mut self, + value: crate::datadogV2::model::LogsAggregateRequestPage, + ) -> &mut Self { + self.page = Some(value); + self + } } impl Default for LogsAggregateRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_aggregate_request_page.rs b/src/datadogV2/model/model_logs_aggregate_request_page.rs index 587b45d5c..f0f54cf87 100644 --- a/src/datadogV2/model/model_logs_aggregate_request_page.rs +++ b/src/datadogV2/model/model_logs_aggregate_request_page.rs @@ -17,6 +17,11 @@ impl LogsAggregateRequestPage { pub fn new() -> LogsAggregateRequestPage { LogsAggregateRequestPage { cursor: None } } + + pub fn with_cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + self + } } impl Default for LogsAggregateRequestPage { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_aggregate_response.rs b/src/datadogV2/model/model_logs_aggregate_response.rs index cfb03478b..ec011f37a 100644 --- a/src/datadogV2/model/model_logs_aggregate_response.rs +++ b/src/datadogV2/model/model_logs_aggregate_response.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct LogsAggregateResponse { /// The query results #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// The metadata associated with a request #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl LogsAggregateResponse { @@ -23,6 +23,19 @@ impl LogsAggregateResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::LogsAggregateResponseData, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::LogsResponseMetadata) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for LogsAggregateResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_aggregate_response_data.rs b/src/datadogV2/model/model_logs_aggregate_response_data.rs index 8ee657377..a5d5861b7 100644 --- a/src/datadogV2/model/model_logs_aggregate_response_data.rs +++ b/src/datadogV2/model/model_logs_aggregate_response_data.rs @@ -17,6 +17,14 @@ impl LogsAggregateResponseData { pub fn new() -> LogsAggregateResponseData { LogsAggregateResponseData { buckets: None } } + + pub fn with_buckets( + &mut self, + value: Vec, + ) -> &mut Self { + self.buckets = Some(value); + self + } } impl Default for LogsAggregateResponseData { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_aggregate_sort.rs b/src/datadogV2/model/model_logs_aggregate_sort.rs index bd9901571..1f50559e0 100644 --- a/src/datadogV2/model/model_logs_aggregate_sort.rs +++ b/src/datadogV2/model/model_logs_aggregate_sort.rs @@ -31,6 +31,32 @@ impl LogsAggregateSort { type_: None, } } + + pub fn with_aggregation( + &mut self, + value: crate::datadogV2::model::LogsAggregationFunction, + ) -> &mut Self { + self.aggregation = Some(value); + self + } + + pub fn with_metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn with_order(&mut self, value: crate::datadogV2::model::LogsSortOrder) -> &mut Self { + self.order = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::LogsAggregateSortType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for LogsAggregateSort { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_archive.rs b/src/datadogV2/model/model_logs_archive.rs index 8cfd18318..89fcc2711 100644 --- a/src/datadogV2/model/model_logs_archive.rs +++ b/src/datadogV2/model/model_logs_archive.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct LogsArchive { /// The definition of an archive. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl LogsArchive { pub fn new() -> LogsArchive { LogsArchive { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::LogsArchiveDefinition, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for LogsArchive { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_archive_attributes.rs b/src/datadogV2/model/model_logs_archive_attributes.rs index 2aa0461a7..bd6525710 100644 --- a/src/datadogV2/model/model_logs_archive_attributes.rs +++ b/src/datadogV2/model/model_logs_archive_attributes.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct LogsArchiveAttributes { /// An archive's destination. #[serde(rename = "destination")] - pub destination: Option>, + pub destination: Option, /// To store the tags in the archive, set the value "true". /// If it is set to "false", the tags will be deleted when the logs are sent to the archive. #[serde(rename = "include_tags")] @@ -38,7 +38,7 @@ pub struct LogsArchiveAttributes { impl LogsArchiveAttributes { pub fn new( - destination: Option>, + destination: Option, name: String, query: String, ) -> LogsArchiveAttributes { @@ -52,4 +52,24 @@ impl LogsArchiveAttributes { state: None, } } + + pub fn with_include_tags(&mut self, value: bool) -> &mut Self { + self.include_tags = Some(value); + self + } + + pub fn with_rehydration_max_scan_size_in_gb(&mut self, value: Option) -> &mut Self { + self.rehydration_max_scan_size_in_gb = Some(value); + self + } + + pub fn with_rehydration_tags(&mut self, value: Vec) -> &mut Self { + self.rehydration_tags = Some(value); + self + } + + pub fn with_state(&mut self, value: crate::datadogV2::model::LogsArchiveState) -> &mut Self { + self.state = Some(value); + self + } } diff --git a/src/datadogV2/model/model_logs_archive_create_request.rs b/src/datadogV2/model/model_logs_archive_create_request.rs index 864e98199..1d3a1bef4 100644 --- a/src/datadogV2/model/model_logs_archive_create_request.rs +++ b/src/datadogV2/model/model_logs_archive_create_request.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct LogsArchiveCreateRequest { /// The definition of an archive. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl LogsArchiveCreateRequest { pub fn new() -> LogsArchiveCreateRequest { LogsArchiveCreateRequest { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::LogsArchiveCreateRequestDefinition, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for LogsArchiveCreateRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_archive_create_request_attributes.rs b/src/datadogV2/model/model_logs_archive_create_request_attributes.rs index fd65fafb9..78726a612 100644 --- a/src/datadogV2/model/model_logs_archive_create_request_attributes.rs +++ b/src/datadogV2/model/model_logs_archive_create_request_attributes.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct LogsArchiveCreateRequestAttributes { /// An archive's destination. #[serde(rename = "destination")] - pub destination: Box, + pub destination: crate::datadogV2::model::LogsArchiveCreateRequestDestination, /// To store the tags in the archive, set the value "true". /// If it is set to "false", the tags will be deleted when the logs are sent to the archive. #[serde(rename = "include_tags")] @@ -35,7 +35,7 @@ pub struct LogsArchiveCreateRequestAttributes { impl LogsArchiveCreateRequestAttributes { pub fn new( - destination: Box, + destination: crate::datadogV2::model::LogsArchiveCreateRequestDestination, name: String, query: String, ) -> LogsArchiveCreateRequestAttributes { @@ -48,4 +48,19 @@ impl LogsArchiveCreateRequestAttributes { rehydration_tags: None, } } + + pub fn with_include_tags(&mut self, value: bool) -> &mut Self { + self.include_tags = Some(value); + self + } + + pub fn with_rehydration_max_scan_size_in_gb(&mut self, value: Option) -> &mut Self { + self.rehydration_max_scan_size_in_gb = Some(value); + self + } + + pub fn with_rehydration_tags(&mut self, value: Vec) -> &mut Self { + self.rehydration_tags = Some(value); + self + } } diff --git a/src/datadogV2/model/model_logs_archive_create_request_definition.rs b/src/datadogV2/model/model_logs_archive_create_request_definition.rs index 716dea05b..6ef80653f 100644 --- a/src/datadogV2/model/model_logs_archive_create_request_definition.rs +++ b/src/datadogV2/model/model_logs_archive_create_request_definition.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct LogsArchiveCreateRequestDefinition { /// The attributes associated with the archive. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The type of the resource. The value should always be archives. #[serde(rename = "type")] pub type_: String, @@ -23,4 +23,12 @@ impl LogsArchiveCreateRequestDefinition { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::LogsArchiveCreateRequestAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } } diff --git a/src/datadogV2/model/model_logs_archive_create_request_destination.rs b/src/datadogV2/model/model_logs_archive_create_request_destination.rs index 847efce87..ebc69c037 100644 --- a/src/datadogV2/model/model_logs_archive_create_request_destination.rs +++ b/src/datadogV2/model/model_logs_archive_create_request_destination.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum LogsArchiveCreateRequestDestination { - LogsArchiveDestinationAzure(Box), - LogsArchiveDestinationGCS(Box), - LogsArchiveDestinationS3(Box), + LogsArchiveDestinationAzure(crate::datadogV2::model::LogsArchiveDestinationAzure), + LogsArchiveDestinationGCS(crate::datadogV2::model::LogsArchiveDestinationGCS), + LogsArchiveDestinationS3(crate::datadogV2::model::LogsArchiveDestinationS3), } diff --git a/src/datadogV2/model/model_logs_archive_definition.rs b/src/datadogV2/model/model_logs_archive_definition.rs index 9b7ae925f..3b2063233 100644 --- a/src/datadogV2/model/model_logs_archive_definition.rs +++ b/src/datadogV2/model/model_logs_archive_definition.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct LogsArchiveDefinition { /// The attributes associated with the archive. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The archive ID. #[serde(rename = "id")] pub id: Option, @@ -27,4 +27,17 @@ impl LogsArchiveDefinition { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::LogsArchiveAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } } diff --git a/src/datadogV2/model/model_logs_archive_destination.rs b/src/datadogV2/model/model_logs_archive_destination.rs index 0d175ae7d..f0e5406fb 100644 --- a/src/datadogV2/model/model_logs_archive_destination.rs +++ b/src/datadogV2/model/model_logs_archive_destination.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum LogsArchiveDestination { - LogsArchiveDestinationAzure(Box), - LogsArchiveDestinationGCS(Box), - LogsArchiveDestinationS3(Box), + LogsArchiveDestinationAzure(crate::datadogV2::model::LogsArchiveDestinationAzure), + LogsArchiveDestinationGCS(crate::datadogV2::model::LogsArchiveDestinationGCS), + LogsArchiveDestinationS3(crate::datadogV2::model::LogsArchiveDestinationS3), } diff --git a/src/datadogV2/model/model_logs_archive_destination_azure.rs b/src/datadogV2/model/model_logs_archive_destination_azure.rs index 06c5c5d09..8b216d1a5 100644 --- a/src/datadogV2/model/model_logs_archive_destination_azure.rs +++ b/src/datadogV2/model/model_logs_archive_destination_azure.rs @@ -13,7 +13,7 @@ pub struct LogsArchiveDestinationAzure { pub container: String, /// The Azure archive's integration destination. #[serde(rename = "integration")] - pub integration: Box, + pub integration: crate::datadogV2::model::LogsArchiveIntegrationAzure, /// The archive path. #[serde(rename = "path")] pub path: Option, @@ -31,7 +31,7 @@ pub struct LogsArchiveDestinationAzure { impl LogsArchiveDestinationAzure { pub fn new( container: String, - integration: Box, + integration: crate::datadogV2::model::LogsArchiveIntegrationAzure, storage_account: String, type_: crate::datadogV2::model::LogsArchiveDestinationAzureType, ) -> LogsArchiveDestinationAzure { @@ -44,4 +44,14 @@ impl LogsArchiveDestinationAzure { type_, } } + + pub fn with_path(&mut self, value: String) -> &mut Self { + self.path = Some(value); + self + } + + pub fn with_region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } } diff --git a/src/datadogV2/model/model_logs_archive_destination_gcs.rs b/src/datadogV2/model/model_logs_archive_destination_gcs.rs index 17cf4c2ac..816220415 100644 --- a/src/datadogV2/model/model_logs_archive_destination_gcs.rs +++ b/src/datadogV2/model/model_logs_archive_destination_gcs.rs @@ -13,7 +13,7 @@ pub struct LogsArchiveDestinationGCS { pub bucket: String, /// The GCS archive's integration destination. #[serde(rename = "integration")] - pub integration: Box, + pub integration: crate::datadogV2::model::LogsArchiveIntegrationGCS, /// The archive path. #[serde(rename = "path")] pub path: Option, @@ -25,7 +25,7 @@ pub struct LogsArchiveDestinationGCS { impl LogsArchiveDestinationGCS { pub fn new( bucket: String, - integration: Box, + integration: crate::datadogV2::model::LogsArchiveIntegrationGCS, type_: crate::datadogV2::model::LogsArchiveDestinationGCSType, ) -> LogsArchiveDestinationGCS { LogsArchiveDestinationGCS { @@ -35,4 +35,9 @@ impl LogsArchiveDestinationGCS { type_, } } + + pub fn with_path(&mut self, value: String) -> &mut Self { + self.path = Some(value); + self + } } diff --git a/src/datadogV2/model/model_logs_archive_destination_s3.rs b/src/datadogV2/model/model_logs_archive_destination_s3.rs index cf5b3efbf..d476e970e 100644 --- a/src/datadogV2/model/model_logs_archive_destination_s3.rs +++ b/src/datadogV2/model/model_logs_archive_destination_s3.rs @@ -13,7 +13,7 @@ pub struct LogsArchiveDestinationS3 { pub bucket: String, /// The S3 Archive's integration destination. #[serde(rename = "integration")] - pub integration: Box, + pub integration: crate::datadogV2::model::LogsArchiveIntegrationS3, /// The archive path. #[serde(rename = "path")] pub path: Option, @@ -25,7 +25,7 @@ pub struct LogsArchiveDestinationS3 { impl LogsArchiveDestinationS3 { pub fn new( bucket: String, - integration: Box, + integration: crate::datadogV2::model::LogsArchiveIntegrationS3, type_: crate::datadogV2::model::LogsArchiveDestinationS3Type, ) -> LogsArchiveDestinationS3 { LogsArchiveDestinationS3 { @@ -35,4 +35,9 @@ impl LogsArchiveDestinationS3 { type_, } } + + pub fn with_path(&mut self, value: String) -> &mut Self { + self.path = Some(value); + self + } } diff --git a/src/datadogV2/model/model_logs_archive_order.rs b/src/datadogV2/model/model_logs_archive_order.rs index 39d70b123..3e598b06c 100644 --- a/src/datadogV2/model/model_logs_archive_order.rs +++ b/src/datadogV2/model/model_logs_archive_order.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct LogsArchiveOrder { /// The definition of an archive order. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl LogsArchiveOrder { pub fn new() -> LogsArchiveOrder { LogsArchiveOrder { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::LogsArchiveOrderDefinition, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for LogsArchiveOrder { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_archive_order_definition.rs b/src/datadogV2/model/model_logs_archive_order_definition.rs index d1aae42e3..c3cbaa1f3 100644 --- a/src/datadogV2/model/model_logs_archive_order_definition.rs +++ b/src/datadogV2/model/model_logs_archive_order_definition.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct LogsArchiveOrderDefinition { /// The attributes associated with the archive order. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::LogsArchiveOrderAttributes, /// Type of the archive order definition. #[serde(rename = "type")] pub type_: crate::datadogV2::model::LogsArchiveOrderDefinitionType, @@ -18,7 +18,7 @@ pub struct LogsArchiveOrderDefinition { impl LogsArchiveOrderDefinition { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::LogsArchiveOrderAttributes, type_: crate::datadogV2::model::LogsArchiveOrderDefinitionType, ) -> LogsArchiveOrderDefinition { LogsArchiveOrderDefinition { attributes, type_ } diff --git a/src/datadogV2/model/model_logs_archives.rs b/src/datadogV2/model/model_logs_archives.rs index f089888ba..99e115799 100644 --- a/src/datadogV2/model/model_logs_archives.rs +++ b/src/datadogV2/model/model_logs_archives.rs @@ -17,6 +17,14 @@ impl LogsArchives { pub fn new() -> LogsArchives { LogsArchives { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for LogsArchives { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_compute.rs b/src/datadogV2/model/model_logs_compute.rs index d22749e0b..941412667 100644 --- a/src/datadogV2/model/model_logs_compute.rs +++ b/src/datadogV2/model/model_logs_compute.rs @@ -32,4 +32,19 @@ impl LogsCompute { type_: None, } } + + pub fn with_interval(&mut self, value: String) -> &mut Self { + self.interval = Some(value); + self + } + + pub fn with_metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::LogsComputeType) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV2/model/model_logs_group_by.rs b/src/datadogV2/model/model_logs_group_by.rs index a22d150c6..c615297d7 100644 --- a/src/datadogV2/model/model_logs_group_by.rs +++ b/src/datadogV2/model/model_logs_group_by.rs @@ -14,20 +14,20 @@ pub struct LogsGroupBy { /// Used to perform a histogram computation (only for measure facets). /// Note: at most 100 buckets are allowed, the number of buckets is (max - min)/interval. #[serde(rename = "histogram")] - pub histogram: Option>, + pub histogram: Option, /// The maximum buckets to return for this group by. Note: at most 10000 buckets are allowed. /// If grouping by multiple facets, the product of limits must not exceed 10000. #[serde(rename = "limit")] pub limit: Option, /// The value to use for logs that don't have the facet used to group by #[serde(rename = "missing")] - pub missing: Option>, + pub missing: Option, /// A sort rule #[serde(rename = "sort")] - pub sort: Option>, + pub sort: Option, /// A resulting object to put the given computes in over all the matching records. #[serde(rename = "total")] - pub total: Option>, + pub total: Option, } impl LogsGroupBy { @@ -41,4 +41,35 @@ impl LogsGroupBy { total: None, } } + + pub fn with_histogram( + &mut self, + value: crate::datadogV2::model::LogsGroupByHistogram, + ) -> &mut Self { + self.histogram = Some(value); + self + } + + pub fn with_limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_missing( + &mut self, + value: crate::datadogV2::model::LogsGroupByMissing, + ) -> &mut Self { + self.missing = Some(value); + self + } + + pub fn with_sort(&mut self, value: crate::datadogV2::model::LogsAggregateSort) -> &mut Self { + self.sort = Some(value); + self + } + + pub fn with_total(&mut self, value: crate::datadogV2::model::LogsGroupByTotal) -> &mut Self { + self.total = Some(value); + self + } } diff --git a/src/datadogV2/model/model_logs_list_request.rs b/src/datadogV2/model/model_logs_list_request.rs index 75cfcd36a..63e0d761a 100644 --- a/src/datadogV2/model/model_logs_list_request.rs +++ b/src/datadogV2/model/model_logs_list_request.rs @@ -10,14 +10,14 @@ use serde_with::skip_serializing_none; pub struct LogsListRequest { /// The search and filter query settings #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// Global query options that are used during the query. /// Note: you should supply either timezone or time offset, but not both. Otherwise, the query will fail. #[serde(rename = "options")] - pub options: Option>, + pub options: Option, /// Paging attributes for listing logs. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, /// Sort parameters when querying logs. #[serde(rename = "sort")] pub sort: Option, @@ -32,6 +32,26 @@ impl LogsListRequest { sort: None, } } + + pub fn with_filter(&mut self, value: crate::datadogV2::model::LogsQueryFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_options(&mut self, value: crate::datadogV2::model::LogsQueryOptions) -> &mut Self { + self.options = Some(value); + self + } + + pub fn with_page(&mut self, value: crate::datadogV2::model::LogsListRequestPage) -> &mut Self { + self.page = Some(value); + self + } + + pub fn with_sort(&mut self, value: crate::datadogV2::model::LogsSort) -> &mut Self { + self.sort = Some(value); + self + } } impl Default for LogsListRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_list_request_page.rs b/src/datadogV2/model/model_logs_list_request_page.rs index 8bcf26d05..806e58933 100644 --- a/src/datadogV2/model/model_logs_list_request_page.rs +++ b/src/datadogV2/model/model_logs_list_request_page.rs @@ -23,6 +23,16 @@ impl LogsListRequestPage { limit: None, } } + + pub fn with_cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + self + } + + pub fn with_limit(&mut self, value: i32) -> &mut Self { + self.limit = Some(value); + self + } } impl Default for LogsListRequestPage { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_list_response.rs b/src/datadogV2/model/model_logs_list_response.rs index d841ef9cb..73f3c3dc3 100644 --- a/src/datadogV2/model/model_logs_list_response.rs +++ b/src/datadogV2/model/model_logs_list_response.rs @@ -13,10 +13,10 @@ pub struct LogsListResponse { pub data: Option>, /// Links attributes. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, /// The metadata associated with a request #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl LogsListResponse { @@ -27,6 +27,24 @@ impl LogsListResponse { meta: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links( + &mut self, + value: crate::datadogV2::model::LogsListResponseLinks, + ) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::LogsResponseMetadata) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for LogsListResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_list_response_links.rs b/src/datadogV2/model/model_logs_list_response_links.rs index 6cc8f8bbb..d238dedb1 100644 --- a/src/datadogV2/model/model_logs_list_response_links.rs +++ b/src/datadogV2/model/model_logs_list_response_links.rs @@ -18,6 +18,11 @@ impl LogsListResponseLinks { pub fn new() -> LogsListResponseLinks { LogsListResponseLinks { next: None } } + + pub fn with_next(&mut self, value: String) -> &mut Self { + self.next = Some(value); + self + } } impl Default for LogsListResponseLinks { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_metric_compute.rs b/src/datadogV2/model/model_logs_metric_compute.rs index c9338c206..8f0cd22ea 100644 --- a/src/datadogV2/model/model_logs_metric_compute.rs +++ b/src/datadogV2/model/model_logs_metric_compute.rs @@ -30,4 +30,14 @@ impl LogsMetricCompute { path: None, } } + + pub fn with_include_percentiles(&mut self, value: bool) -> &mut Self { + self.include_percentiles = Some(value); + self + } + + pub fn with_path(&mut self, value: String) -> &mut Self { + self.path = Some(value); + self + } } diff --git a/src/datadogV2/model/model_logs_metric_create_attributes.rs b/src/datadogV2/model/model_logs_metric_create_attributes.rs index 823f4ab82..ee1f40696 100644 --- a/src/datadogV2/model/model_logs_metric_create_attributes.rs +++ b/src/datadogV2/model/model_logs_metric_create_attributes.rs @@ -10,23 +10,34 @@ use serde_with::skip_serializing_none; pub struct LogsMetricCreateAttributes { /// The compute rule to compute the log-based metric. #[serde(rename = "compute")] - pub compute: Box, + pub compute: crate::datadogV2::model::LogsMetricCompute, /// The log-based metric filter. Logs matching this filter will be aggregated in this metric. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// The rules for the group by. #[serde(rename = "group_by")] pub group_by: Option>, } impl LogsMetricCreateAttributes { - pub fn new( - compute: Box, - ) -> LogsMetricCreateAttributes { + pub fn new(compute: crate::datadogV2::model::LogsMetricCompute) -> LogsMetricCreateAttributes { LogsMetricCreateAttributes { compute, filter: None, group_by: None, } } + + pub fn with_filter(&mut self, value: crate::datadogV2::model::LogsMetricFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + self + } } diff --git a/src/datadogV2/model/model_logs_metric_create_data.rs b/src/datadogV2/model/model_logs_metric_create_data.rs index e7fe231ef..edbc9eaca 100644 --- a/src/datadogV2/model/model_logs_metric_create_data.rs +++ b/src/datadogV2/model/model_logs_metric_create_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct LogsMetricCreateData { /// The object describing the Datadog log-based metric to create. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::LogsMetricCreateAttributes, /// The name of the log-based metric. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct LogsMetricCreateData { impl LogsMetricCreateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::LogsMetricCreateAttributes, id: String, type_: crate::datadogV2::model::LogsMetricType, ) -> LogsMetricCreateData { diff --git a/src/datadogV2/model/model_logs_metric_create_request.rs b/src/datadogV2/model/model_logs_metric_create_request.rs index 70b601e4b..e36da3c42 100644 --- a/src/datadogV2/model/model_logs_metric_create_request.rs +++ b/src/datadogV2/model/model_logs_metric_create_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct LogsMetricCreateRequest { /// The new log-based metric properties. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::LogsMetricCreateData, } impl LogsMetricCreateRequest { - pub fn new( - data: Box, - ) -> LogsMetricCreateRequest { + pub fn new(data: crate::datadogV2::model::LogsMetricCreateData) -> LogsMetricCreateRequest { LogsMetricCreateRequest { data } } } diff --git a/src/datadogV2/model/model_logs_metric_filter.rs b/src/datadogV2/model/model_logs_metric_filter.rs index de9fc261b..ce03d88eb 100644 --- a/src/datadogV2/model/model_logs_metric_filter.rs +++ b/src/datadogV2/model/model_logs_metric_filter.rs @@ -17,6 +17,11 @@ impl LogsMetricFilter { pub fn new() -> LogsMetricFilter { LogsMetricFilter { query: None } } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } } impl Default for LogsMetricFilter { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_metric_group_by.rs b/src/datadogV2/model/model_logs_metric_group_by.rs index 481210362..b03e077cf 100644 --- a/src/datadogV2/model/model_logs_metric_group_by.rs +++ b/src/datadogV2/model/model_logs_metric_group_by.rs @@ -23,4 +23,9 @@ impl LogsMetricGroupBy { tag_name: None, } } + + pub fn with_tag_name(&mut self, value: String) -> &mut Self { + self.tag_name = Some(value); + self + } } diff --git a/src/datadogV2/model/model_logs_metric_response.rs b/src/datadogV2/model/model_logs_metric_response.rs index 4ca768f02..642fb4ee1 100644 --- a/src/datadogV2/model/model_logs_metric_response.rs +++ b/src/datadogV2/model/model_logs_metric_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct LogsMetricResponse { /// The log-based metric properties. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl LogsMetricResponse { pub fn new() -> LogsMetricResponse { LogsMetricResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::LogsMetricResponseData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for LogsMetricResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_metric_response_attributes.rs b/src/datadogV2/model/model_logs_metric_response_attributes.rs index 3dc6ef2be..4f2946e58 100644 --- a/src/datadogV2/model/model_logs_metric_response_attributes.rs +++ b/src/datadogV2/model/model_logs_metric_response_attributes.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct LogsMetricResponseAttributes { /// The compute rule to compute the log-based metric. #[serde(rename = "compute")] - pub compute: Option>, + pub compute: Option, /// The log-based metric filter. Logs matching this filter will be aggregated in this metric. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// The rules for the group by. #[serde(rename = "group_by")] pub group_by: Option>, @@ -27,6 +27,30 @@ impl LogsMetricResponseAttributes { group_by: None, } } + + pub fn with_compute( + &mut self, + value: crate::datadogV2::model::LogsMetricResponseCompute, + ) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn with_filter( + &mut self, + value: crate::datadogV2::model::LogsMetricResponseFilter, + ) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + self + } } impl Default for LogsMetricResponseAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_metric_response_compute.rs b/src/datadogV2/model/model_logs_metric_response_compute.rs index 96c04aee9..56231cd33 100644 --- a/src/datadogV2/model/model_logs_metric_response_compute.rs +++ b/src/datadogV2/model/model_logs_metric_response_compute.rs @@ -28,6 +28,24 @@ impl LogsMetricResponseCompute { path: None, } } + + pub fn with_aggregation_type( + &mut self, + value: crate::datadogV2::model::LogsMetricResponseComputeAggregationType, + ) -> &mut Self { + self.aggregation_type = Some(value); + self + } + + pub fn with_include_percentiles(&mut self, value: bool) -> &mut Self { + self.include_percentiles = Some(value); + self + } + + pub fn with_path(&mut self, value: String) -> &mut Self { + self.path = Some(value); + self + } } impl Default for LogsMetricResponseCompute { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_metric_response_data.rs b/src/datadogV2/model/model_logs_metric_response_data.rs index 0f03eeed2..b69ab058f 100644 --- a/src/datadogV2/model/model_logs_metric_response_data.rs +++ b/src/datadogV2/model/model_logs_metric_response_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct LogsMetricResponseData { /// The object describing a Datadog log-based metric. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The name of the log-based metric. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl LogsMetricResponseData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::LogsMetricResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::LogsMetricType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for LogsMetricResponseData { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_metric_response_filter.rs b/src/datadogV2/model/model_logs_metric_response_filter.rs index 225ad442b..ab9128e20 100644 --- a/src/datadogV2/model/model_logs_metric_response_filter.rs +++ b/src/datadogV2/model/model_logs_metric_response_filter.rs @@ -17,6 +17,11 @@ impl LogsMetricResponseFilter { pub fn new() -> LogsMetricResponseFilter { LogsMetricResponseFilter { query: None } } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } } impl Default for LogsMetricResponseFilter { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_metric_response_group_by.rs b/src/datadogV2/model/model_logs_metric_response_group_by.rs index d5d835e58..d38494aab 100644 --- a/src/datadogV2/model/model_logs_metric_response_group_by.rs +++ b/src/datadogV2/model/model_logs_metric_response_group_by.rs @@ -23,6 +23,16 @@ impl LogsMetricResponseGroupBy { tag_name: None, } } + + pub fn with_path(&mut self, value: String) -> &mut Self { + self.path = Some(value); + self + } + + pub fn with_tag_name(&mut self, value: String) -> &mut Self { + self.tag_name = Some(value); + self + } } impl Default for LogsMetricResponseGroupBy { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_metric_update_attributes.rs b/src/datadogV2/model/model_logs_metric_update_attributes.rs index 6ce5a236c..333b945ce 100644 --- a/src/datadogV2/model/model_logs_metric_update_attributes.rs +++ b/src/datadogV2/model/model_logs_metric_update_attributes.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct LogsMetricUpdateAttributes { /// The compute rule to compute the log-based metric. #[serde(rename = "compute")] - pub compute: Option>, + pub compute: Option, /// The log-based metric filter. Logs matching this filter will be aggregated in this metric. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// The rules for the group by. #[serde(rename = "group_by")] pub group_by: Option>, @@ -27,6 +27,27 @@ impl LogsMetricUpdateAttributes { group_by: None, } } + + pub fn with_compute( + &mut self, + value: crate::datadogV2::model::LogsMetricUpdateCompute, + ) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn with_filter(&mut self, value: crate::datadogV2::model::LogsMetricFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + self + } } impl Default for LogsMetricUpdateAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_metric_update_compute.rs b/src/datadogV2/model/model_logs_metric_update_compute.rs index 6f59fd7d2..9bb482af0 100644 --- a/src/datadogV2/model/model_logs_metric_update_compute.rs +++ b/src/datadogV2/model/model_logs_metric_update_compute.rs @@ -20,6 +20,11 @@ impl LogsMetricUpdateCompute { include_percentiles: None, } } + + pub fn with_include_percentiles(&mut self, value: bool) -> &mut Self { + self.include_percentiles = Some(value); + self + } } impl Default for LogsMetricUpdateCompute { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_metric_update_data.rs b/src/datadogV2/model/model_logs_metric_update_data.rs index a06830815..0fa2d1cef 100644 --- a/src/datadogV2/model/model_logs_metric_update_data.rs +++ b/src/datadogV2/model/model_logs_metric_update_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct LogsMetricUpdateData { /// The log-based metric properties that will be updated. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::LogsMetricUpdateAttributes, /// The type of the resource. The value should always be logs_metrics. #[serde(rename = "type")] pub type_: crate::datadogV2::model::LogsMetricType, @@ -18,7 +18,7 @@ pub struct LogsMetricUpdateData { impl LogsMetricUpdateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::LogsMetricUpdateAttributes, type_: crate::datadogV2::model::LogsMetricType, ) -> LogsMetricUpdateData { LogsMetricUpdateData { attributes, type_ } diff --git a/src/datadogV2/model/model_logs_metric_update_request.rs b/src/datadogV2/model/model_logs_metric_update_request.rs index da516b815..b00b20301 100644 --- a/src/datadogV2/model/model_logs_metric_update_request.rs +++ b/src/datadogV2/model/model_logs_metric_update_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct LogsMetricUpdateRequest { /// The new log-based metric properties. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::LogsMetricUpdateData, } impl LogsMetricUpdateRequest { - pub fn new( - data: Box, - ) -> LogsMetricUpdateRequest { + pub fn new(data: crate::datadogV2::model::LogsMetricUpdateData) -> LogsMetricUpdateRequest { LogsMetricUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_logs_metrics_response.rs b/src/datadogV2/model/model_logs_metrics_response.rs index 5c529144d..9a151cf51 100644 --- a/src/datadogV2/model/model_logs_metrics_response.rs +++ b/src/datadogV2/model/model_logs_metrics_response.rs @@ -17,6 +17,14 @@ impl LogsMetricsResponse { pub fn new() -> LogsMetricsResponse { LogsMetricsResponse { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for LogsMetricsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_query_filter.rs b/src/datadogV2/model/model_logs_query_filter.rs index 6e4a70f00..00944c9f8 100644 --- a/src/datadogV2/model/model_logs_query_filter.rs +++ b/src/datadogV2/model/model_logs_query_filter.rs @@ -35,6 +35,34 @@ impl LogsQueryFilter { to: None, } } + + pub fn with_from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + self + } + + pub fn with_indexes(&mut self, value: Vec) -> &mut Self { + self.indexes = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_storage_tier( + &mut self, + value: crate::datadogV2::model::LogsStorageTier, + ) -> &mut Self { + self.storage_tier = Some(value); + self + } + + pub fn with_to(&mut self, value: String) -> &mut Self { + self.to = Some(value); + self + } } impl Default for LogsQueryFilter { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_query_options.rs b/src/datadogV2/model/model_logs_query_options.rs index 1cf63b207..6f14d58ea 100644 --- a/src/datadogV2/model/model_logs_query_options.rs +++ b/src/datadogV2/model/model_logs_query_options.rs @@ -24,6 +24,16 @@ impl LogsQueryOptions { timezone: None, } } + + pub fn with_time_offset(&mut self, value: i64) -> &mut Self { + self.time_offset = Some(value); + self + } + + pub fn with_timezone(&mut self, value: String) -> &mut Self { + self.timezone = Some(value); + self + } } impl Default for LogsQueryOptions { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_response_metadata.rs b/src/datadogV2/model/model_logs_response_metadata.rs index 878bb1a56..e36958b3d 100644 --- a/src/datadogV2/model/model_logs_response_metadata.rs +++ b/src/datadogV2/model/model_logs_response_metadata.rs @@ -13,7 +13,7 @@ pub struct LogsResponseMetadata { pub elapsed: Option, /// Paging attributes. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, /// The identifier of the request #[serde(rename = "request_id")] pub request_id: Option, @@ -36,6 +36,37 @@ impl LogsResponseMetadata { warnings: None, } } + + pub fn with_elapsed(&mut self, value: i64) -> &mut Self { + self.elapsed = Some(value); + self + } + + pub fn with_page( + &mut self, + value: crate::datadogV2::model::LogsResponseMetadataPage, + ) -> &mut Self { + self.page = Some(value); + self + } + + pub fn with_request_id(&mut self, value: String) -> &mut Self { + self.request_id = Some(value); + self + } + + pub fn with_status( + &mut self, + value: crate::datadogV2::model::LogsAggregateResponseStatus, + ) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_warnings(&mut self, value: Vec) -> &mut Self { + self.warnings = Some(value); + self + } } impl Default for LogsResponseMetadata { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_response_metadata_page.rs b/src/datadogV2/model/model_logs_response_metadata_page.rs index 798d5dae6..3d1c1c4c0 100644 --- a/src/datadogV2/model/model_logs_response_metadata_page.rs +++ b/src/datadogV2/model/model_logs_response_metadata_page.rs @@ -18,6 +18,11 @@ impl LogsResponseMetadataPage { pub fn new() -> LogsResponseMetadataPage { LogsResponseMetadataPage { after: None } } + + pub fn with_after(&mut self, value: String) -> &mut Self { + self.after = Some(value); + self + } } impl Default for LogsResponseMetadataPage { fn default() -> Self { diff --git a/src/datadogV2/model/model_logs_warning.rs b/src/datadogV2/model/model_logs_warning.rs index 0890026d6..d11937dbc 100644 --- a/src/datadogV2/model/model_logs_warning.rs +++ b/src/datadogV2/model/model_logs_warning.rs @@ -27,6 +27,21 @@ impl LogsWarning { title: None, } } + + pub fn with_code(&mut self, value: String) -> &mut Self { + self.code = Some(value); + self + } + + pub fn with_detail(&mut self, value: String) -> &mut Self { + self.detail = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } } impl Default for LogsWarning { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric.rs b/src/datadogV2/model/model_metric.rs index 348e920db..3b126c088 100644 --- a/src/datadogV2/model/model_metric.rs +++ b/src/datadogV2/model/model_metric.rs @@ -23,6 +23,16 @@ impl Metric { type_: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::MetricType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for Metric { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_all_tags.rs b/src/datadogV2/model/model_metric_all_tags.rs index c02a07a7c..88e829176 100644 --- a/src/datadogV2/model/model_metric_all_tags.rs +++ b/src/datadogV2/model/model_metric_all_tags.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MetricAllTags { /// Object containing the definition of a metric's tags. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The metric name for this resource. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl MetricAllTags { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::MetricAllTagsAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::MetricType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for MetricAllTags { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_all_tags_attributes.rs b/src/datadogV2/model/model_metric_all_tags_attributes.rs index be3ffb6d2..23647e9c9 100644 --- a/src/datadogV2/model/model_metric_all_tags_attributes.rs +++ b/src/datadogV2/model/model_metric_all_tags_attributes.rs @@ -17,6 +17,11 @@ impl MetricAllTagsAttributes { pub fn new() -> MetricAllTagsAttributes { MetricAllTagsAttributes { tags: None } } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } impl Default for MetricAllTagsAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_all_tags_response.rs b/src/datadogV2/model/model_metric_all_tags_response.rs index fc571b1b5..f11ee42f7 100644 --- a/src/datadogV2/model/model_metric_all_tags_response.rs +++ b/src/datadogV2/model/model_metric_all_tags_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct MetricAllTagsResponse { /// Object for a single metric's indexed tags. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl MetricAllTagsResponse { pub fn new() -> MetricAllTagsResponse { MetricAllTagsResponse { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::MetricAllTags) -> &mut Self { + self.data = Some(value); + self + } } impl Default for MetricAllTagsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_create.rs b/src/datadogV2/model/model_metric_bulk_tag_config_create.rs index 24be7fd2e..1bd76717c 100644 --- a/src/datadogV2/model/model_metric_bulk_tag_config_create.rs +++ b/src/datadogV2/model/model_metric_bulk_tag_config_create.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MetricBulkTagConfigCreate { /// Optional parameters for bulk creating metric tag configurations. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// A text prefix to match against metric names. #[serde(rename = "id")] pub id: String, @@ -30,4 +30,12 @@ impl MetricBulkTagConfigCreate { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::MetricBulkTagConfigCreateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } } diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_create_attributes.rs b/src/datadogV2/model/model_metric_bulk_tag_config_create_attributes.rs index a84ec538b..ac6693083 100644 --- a/src/datadogV2/model/model_metric_bulk_tag_config_create_attributes.rs +++ b/src/datadogV2/model/model_metric_bulk_tag_config_create_attributes.rs @@ -29,6 +29,21 @@ impl MetricBulkTagConfigCreateAttributes { tags: None, } } + + pub fn with_emails(&mut self, value: Vec) -> &mut Self { + self.emails = Some(value); + self + } + + pub fn with_exclude_tags_mode(&mut self, value: bool) -> &mut Self { + self.exclude_tags_mode = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } impl Default for MetricBulkTagConfigCreateAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_create_request.rs b/src/datadogV2/model/model_metric_bulk_tag_config_create_request.rs index eac80b4fb..7ec53a82c 100644 --- a/src/datadogV2/model/model_metric_bulk_tag_config_create_request.rs +++ b/src/datadogV2/model/model_metric_bulk_tag_config_create_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct MetricBulkTagConfigCreateRequest { /// Request object to bulk configure tags for metrics matching the given prefix. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::MetricBulkTagConfigCreate, } impl MetricBulkTagConfigCreateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::MetricBulkTagConfigCreate, ) -> MetricBulkTagConfigCreateRequest { MetricBulkTagConfigCreateRequest { data } } diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_delete.rs b/src/datadogV2/model/model_metric_bulk_tag_config_delete.rs index 8bf0fd8be..2d334e8a0 100644 --- a/src/datadogV2/model/model_metric_bulk_tag_config_delete.rs +++ b/src/datadogV2/model/model_metric_bulk_tag_config_delete.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MetricBulkTagConfigDelete { /// Optional parameters for bulk deleting metric tag configurations. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// A text prefix to match against metric names. #[serde(rename = "id")] pub id: String, @@ -30,4 +30,12 @@ impl MetricBulkTagConfigDelete { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::MetricBulkTagConfigDeleteAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } } diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_delete_attributes.rs b/src/datadogV2/model/model_metric_bulk_tag_config_delete_attributes.rs index e03aa87b9..47ef5e393 100644 --- a/src/datadogV2/model/model_metric_bulk_tag_config_delete_attributes.rs +++ b/src/datadogV2/model/model_metric_bulk_tag_config_delete_attributes.rs @@ -17,6 +17,11 @@ impl MetricBulkTagConfigDeleteAttributes { pub fn new() -> MetricBulkTagConfigDeleteAttributes { MetricBulkTagConfigDeleteAttributes { emails: None } } + + pub fn with_emails(&mut self, value: Vec) -> &mut Self { + self.emails = Some(value); + self + } } impl Default for MetricBulkTagConfigDeleteAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_delete_request.rs b/src/datadogV2/model/model_metric_bulk_tag_config_delete_request.rs index fea385463..7ed25863c 100644 --- a/src/datadogV2/model/model_metric_bulk_tag_config_delete_request.rs +++ b/src/datadogV2/model/model_metric_bulk_tag_config_delete_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct MetricBulkTagConfigDeleteRequest { /// Request object to bulk delete all tag configurations for metrics matching the given prefix. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::MetricBulkTagConfigDelete, } impl MetricBulkTagConfigDeleteRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::MetricBulkTagConfigDelete, ) -> MetricBulkTagConfigDeleteRequest { MetricBulkTagConfigDeleteRequest { data } } diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_response.rs b/src/datadogV2/model/model_metric_bulk_tag_config_response.rs index a14e86f85..73db46d0c 100644 --- a/src/datadogV2/model/model_metric_bulk_tag_config_response.rs +++ b/src/datadogV2/model/model_metric_bulk_tag_config_response.rs @@ -11,13 +11,21 @@ pub struct MetricBulkTagConfigResponse { /// The status of a request to bulk configure metric tags. /// It contains the fields from the original request for reference. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl MetricBulkTagConfigResponse { pub fn new() -> MetricBulkTagConfigResponse { MetricBulkTagConfigResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::MetricBulkTagConfigStatus, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for MetricBulkTagConfigResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_status.rs b/src/datadogV2/model/model_metric_bulk_tag_config_status.rs index 3c01a11ef..81b8b3def 100644 --- a/src/datadogV2/model/model_metric_bulk_tag_config_status.rs +++ b/src/datadogV2/model/model_metric_bulk_tag_config_status.rs @@ -11,7 +11,7 @@ use serde_with::skip_serializing_none; pub struct MetricBulkTagConfigStatus { /// Optional attributes for the status of a bulk tag configuration request. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// A text prefix to match against metric names. #[serde(rename = "id")] pub id: String, @@ -31,4 +31,12 @@ impl MetricBulkTagConfigStatus { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::MetricBulkTagConfigStatusAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } } diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_status_attributes.rs b/src/datadogV2/model/model_metric_bulk_tag_config_status_attributes.rs index 9e3b6a61a..3a2fbbe9a 100644 --- a/src/datadogV2/model/model_metric_bulk_tag_config_status_attributes.rs +++ b/src/datadogV2/model/model_metric_bulk_tag_config_status_attributes.rs @@ -32,6 +32,26 @@ impl MetricBulkTagConfigStatusAttributes { tags: None, } } + + pub fn with_emails(&mut self, value: Vec) -> &mut Self { + self.emails = Some(value); + self + } + + pub fn with_exclude_tags_mode(&mut self, value: bool) -> &mut Self { + self.exclude_tags_mode = Some(value); + self + } + + pub fn with_status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } impl Default for MetricBulkTagConfigStatusAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_distinct_volume.rs b/src/datadogV2/model/model_metric_distinct_volume.rs index f5fd95e74..0bfd7adf0 100644 --- a/src/datadogV2/model/model_metric_distinct_volume.rs +++ b/src/datadogV2/model/model_metric_distinct_volume.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MetricDistinctVolume { /// Object containing the definition of a metric's distinct volume. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The metric name for this resource. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,27 @@ impl MetricDistinctVolume { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::MetricDistinctVolumeAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::MetricDistinctVolumeType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for MetricDistinctVolume { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_distinct_volume_attributes.rs b/src/datadogV2/model/model_metric_distinct_volume_attributes.rs index e44c2c8bb..be0443a74 100644 --- a/src/datadogV2/model/model_metric_distinct_volume_attributes.rs +++ b/src/datadogV2/model/model_metric_distinct_volume_attributes.rs @@ -19,6 +19,11 @@ impl MetricDistinctVolumeAttributes { distinct_volume: None, } } + + pub fn with_distinct_volume(&mut self, value: i64) -> &mut Self { + self.distinct_volume = Some(value); + self + } } impl Default for MetricDistinctVolumeAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_estimate.rs b/src/datadogV2/model/model_metric_estimate.rs index dc646edad..aa296f151 100644 --- a/src/datadogV2/model/model_metric_estimate.rs +++ b/src/datadogV2/model/model_metric_estimate.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MetricEstimate { /// Object containing the definition of a metric estimate attribute. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The metric name for this resource. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,27 @@ impl MetricEstimate { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::MetricEstimateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::MetricEstimateResourceType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for MetricEstimate { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_estimate_attributes.rs b/src/datadogV2/model/model_metric_estimate_attributes.rs index f790e527e..66809afc5 100644 --- a/src/datadogV2/model/model_metric_estimate_attributes.rs +++ b/src/datadogV2/model/model_metric_estimate_attributes.rs @@ -27,6 +27,24 @@ impl MetricEstimateAttributes { estimated_output_series: None, } } + + pub fn with_estimate_type( + &mut self, + value: crate::datadogV2::model::MetricEstimateType, + ) -> &mut Self { + self.estimate_type = Some(value); + self + } + + pub fn with_estimated_at(&mut self, value: String) -> &mut Self { + self.estimated_at = Some(value); + self + } + + pub fn with_estimated_output_series(&mut self, value: i64) -> &mut Self { + self.estimated_output_series = Some(value); + self + } } impl Default for MetricEstimateAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_estimate_response.rs b/src/datadogV2/model/model_metric_estimate_response.rs index 37931bc4a..dbfefa821 100644 --- a/src/datadogV2/model/model_metric_estimate_response.rs +++ b/src/datadogV2/model/model_metric_estimate_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct MetricEstimateResponse { /// Object for a metric cardinality estimate. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl MetricEstimateResponse { pub fn new() -> MetricEstimateResponse { MetricEstimateResponse { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::MetricEstimate) -> &mut Self { + self.data = Some(value); + self + } } impl Default for MetricEstimateResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_ingested_indexed_volume.rs b/src/datadogV2/model/model_metric_ingested_indexed_volume.rs index 1a1cf3a90..ab87a3744 100644 --- a/src/datadogV2/model/model_metric_ingested_indexed_volume.rs +++ b/src/datadogV2/model/model_metric_ingested_indexed_volume.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MetricIngestedIndexedVolume { /// Object containing the definition of a metric's ingested and indexed volume. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The metric name for this resource. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,27 @@ impl MetricIngestedIndexedVolume { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::MetricIngestedIndexedVolumeAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::MetricIngestedIndexedVolumeType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for MetricIngestedIndexedVolume { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_ingested_indexed_volume_attributes.rs b/src/datadogV2/model/model_metric_ingested_indexed_volume_attributes.rs index 24758dbe1..fc4c49f89 100644 --- a/src/datadogV2/model/model_metric_ingested_indexed_volume_attributes.rs +++ b/src/datadogV2/model/model_metric_ingested_indexed_volume_attributes.rs @@ -23,6 +23,16 @@ impl MetricIngestedIndexedVolumeAttributes { ingested_volume: None, } } + + pub fn with_indexed_volume(&mut self, value: i64) -> &mut Self { + self.indexed_volume = Some(value); + self + } + + pub fn with_ingested_volume(&mut self, value: i64) -> &mut Self { + self.ingested_volume = Some(value); + self + } } impl Default for MetricIngestedIndexedVolumeAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_metadata.rs b/src/datadogV2/model/model_metric_metadata.rs index 36e6c2003..c9d95823d 100644 --- a/src/datadogV2/model/model_metric_metadata.rs +++ b/src/datadogV2/model/model_metric_metadata.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct MetricMetadata { /// Metric origin information. #[serde(rename = "origin")] - pub origin: Option>, + pub origin: Option, } impl MetricMetadata { pub fn new() -> MetricMetadata { MetricMetadata { origin: None } } + + pub fn with_origin(&mut self, value: crate::datadogV2::model::MetricOrigin) -> &mut Self { + self.origin = Some(value); + self + } } impl Default for MetricMetadata { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_origin.rs b/src/datadogV2/model/model_metric_origin.rs index 2e8a77074..1d62fc0b3 100644 --- a/src/datadogV2/model/model_metric_origin.rs +++ b/src/datadogV2/model/model_metric_origin.rs @@ -27,6 +27,21 @@ impl MetricOrigin { service: None, } } + + pub fn with_metric_type(&mut self, value: i32) -> &mut Self { + self.metric_type = Some(value); + self + } + + pub fn with_product(&mut self, value: i32) -> &mut Self { + self.product = Some(value); + self + } + + pub fn with_service(&mut self, value: i32) -> &mut Self { + self.service = Some(value); + self + } } impl Default for MetricOrigin { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_point.rs b/src/datadogV2/model/model_metric_point.rs index c54eecf01..b51d03dbf 100644 --- a/src/datadogV2/model/model_metric_point.rs +++ b/src/datadogV2/model/model_metric_point.rs @@ -24,6 +24,16 @@ impl MetricPoint { value: None, } } + + pub fn with_timestamp(&mut self, value: i64) -> &mut Self { + self.timestamp = Some(value); + self + } + + pub fn with_value(&mut self, value: f64) -> &mut Self { + self.value = Some(value); + self + } } impl Default for MetricPoint { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_resource.rs b/src/datadogV2/model/model_metric_resource.rs index 7ba53384c..932ca9d07 100644 --- a/src/datadogV2/model/model_metric_resource.rs +++ b/src/datadogV2/model/model_metric_resource.rs @@ -23,6 +23,16 @@ impl MetricResource { type_: None, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for MetricResource { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_series.rs b/src/datadogV2/model/model_metric_series.rs index 390632dec..426af10da 100644 --- a/src/datadogV2/model/model_metric_series.rs +++ b/src/datadogV2/model/model_metric_series.rs @@ -14,7 +14,7 @@ pub struct MetricSeries { pub interval: Option, /// Metadata for the metric. #[serde(rename = "metadata")] - pub metadata: Option>, + pub metadata: Option, /// The name of the timeseries. #[serde(rename = "metric")] pub metric: String, @@ -52,4 +52,42 @@ impl MetricSeries { unit: None, } } + + pub fn with_interval(&mut self, value: i64) -> &mut Self { + self.interval = Some(value); + self + } + + pub fn with_metadata(&mut self, value: crate::datadogV2::model::MetricMetadata) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn with_resources( + &mut self, + value: Vec, + ) -> &mut Self { + self.resources = Some(value); + self + } + + pub fn with_source_type_name(&mut self, value: String) -> &mut Self { + self.source_type_name = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::MetricIntakeType) -> &mut Self { + self.type_ = Some(value); + self + } + + pub fn with_unit(&mut self, value: String) -> &mut Self { + self.unit = Some(value); + self + } } diff --git a/src/datadogV2/model/model_metric_suggested_tags_and_aggregations.rs b/src/datadogV2/model/model_metric_suggested_tags_and_aggregations.rs index fd2880028..8f9998b88 100644 --- a/src/datadogV2/model/model_metric_suggested_tags_and_aggregations.rs +++ b/src/datadogV2/model/model_metric_suggested_tags_and_aggregations.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MetricSuggestedTagsAndAggregations { /// Object containing the definition of a metric's actively queried tags and aggregations. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The metric name for this resource. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,27 @@ impl MetricSuggestedTagsAndAggregations { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::MetricSuggestedTagsAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::MetricActiveConfigurationType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for MetricSuggestedTagsAndAggregations { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_suggested_tags_and_aggregations_response.rs b/src/datadogV2/model/model_metric_suggested_tags_and_aggregations_response.rs index 6e12766e9..9bb854ba1 100644 --- a/src/datadogV2/model/model_metric_suggested_tags_and_aggregations_response.rs +++ b/src/datadogV2/model/model_metric_suggested_tags_and_aggregations_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct MetricSuggestedTagsAndAggregationsResponse { /// Object for a single metric's actively queried tags and aggregations. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl MetricSuggestedTagsAndAggregationsResponse { pub fn new() -> MetricSuggestedTagsAndAggregationsResponse { MetricSuggestedTagsAndAggregationsResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::MetricSuggestedTagsAndAggregations, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for MetricSuggestedTagsAndAggregationsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_suggested_tags_attributes.rs b/src/datadogV2/model/model_metric_suggested_tags_attributes.rs index 7697ded63..67af6a24b 100644 --- a/src/datadogV2/model/model_metric_suggested_tags_attributes.rs +++ b/src/datadogV2/model/model_metric_suggested_tags_attributes.rs @@ -23,6 +23,19 @@ impl MetricSuggestedTagsAttributes { active_tags: None, } } + + pub fn with_active_aggregations( + &mut self, + value: Vec, + ) -> &mut Self { + self.active_aggregations = Some(value); + self + } + + pub fn with_active_tags(&mut self, value: Vec) -> &mut Self { + self.active_tags = Some(value); + self + } } impl Default for MetricSuggestedTagsAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_tag_configuration.rs b/src/datadogV2/model/model_metric_tag_configuration.rs index 2e2cee82c..3a9c2b291 100644 --- a/src/datadogV2/model/model_metric_tag_configuration.rs +++ b/src/datadogV2/model/model_metric_tag_configuration.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MetricTagConfiguration { /// Object containing the definition of a metric tag configuration attributes. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The metric name for this resource. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,27 @@ impl MetricTagConfiguration { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::MetricTagConfigurationAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::MetricTagConfigurationType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for MetricTagConfiguration { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_tag_configuration_attributes.rs b/src/datadogV2/model/model_metric_tag_configuration_attributes.rs index 7eb28766e..102b168db 100644 --- a/src/datadogV2/model/model_metric_tag_configuration_attributes.rs +++ b/src/datadogV2/model/model_metric_tag_configuration_attributes.rs @@ -61,6 +61,47 @@ impl MetricTagConfigurationAttributes { tags: None, } } + + pub fn with_aggregations( + &mut self, + value: Vec, + ) -> &mut Self { + self.aggregations = Some(value); + self + } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_exclude_tags_mode(&mut self, value: bool) -> &mut Self { + self.exclude_tags_mode = Some(value); + self + } + + pub fn with_include_percentiles(&mut self, value: bool) -> &mut Self { + self.include_percentiles = Some(value); + self + } + + pub fn with_metric_type( + &mut self, + value: crate::datadogV2::model::MetricTagConfigurationMetricTypes, + ) -> &mut Self { + self.metric_type = Some(value); + self + } + + pub fn with_modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } impl Default for MetricTagConfigurationAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_tag_configuration_create_attributes.rs b/src/datadogV2/model/model_metric_tag_configuration_create_attributes.rs index 5f4aba2c0..cfc05709e 100644 --- a/src/datadogV2/model/model_metric_tag_configuration_create_attributes.rs +++ b/src/datadogV2/model/model_metric_tag_configuration_create_attributes.rs @@ -56,4 +56,22 @@ impl MetricTagConfigurationCreateAttributes { tags, } } + + pub fn with_aggregations( + &mut self, + value: Vec, + ) -> &mut Self { + self.aggregations = Some(value); + self + } + + pub fn with_exclude_tags_mode(&mut self, value: bool) -> &mut Self { + self.exclude_tags_mode = Some(value); + self + } + + pub fn with_include_percentiles(&mut self, value: bool) -> &mut Self { + self.include_percentiles = Some(value); + self + } } diff --git a/src/datadogV2/model/model_metric_tag_configuration_create_data.rs b/src/datadogV2/model/model_metric_tag_configuration_create_data.rs index 7c48226f0..31d6d0ed6 100644 --- a/src/datadogV2/model/model_metric_tag_configuration_create_data.rs +++ b/src/datadogV2/model/model_metric_tag_configuration_create_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MetricTagConfigurationCreateData { /// Object containing the definition of a metric tag configuration to be created. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The metric name for this resource. #[serde(rename = "id")] pub id: String, @@ -30,4 +30,12 @@ impl MetricTagConfigurationCreateData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::MetricTagConfigurationCreateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } } diff --git a/src/datadogV2/model/model_metric_tag_configuration_create_request.rs b/src/datadogV2/model/model_metric_tag_configuration_create_request.rs index 8e2df0c8b..aacc2ac5b 100644 --- a/src/datadogV2/model/model_metric_tag_configuration_create_request.rs +++ b/src/datadogV2/model/model_metric_tag_configuration_create_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct MetricTagConfigurationCreateRequest { /// Object for a single metric to be configure tags on. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::MetricTagConfigurationCreateData, } impl MetricTagConfigurationCreateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::MetricTagConfigurationCreateData, ) -> MetricTagConfigurationCreateRequest { MetricTagConfigurationCreateRequest { data } } diff --git a/src/datadogV2/model/model_metric_tag_configuration_response.rs b/src/datadogV2/model/model_metric_tag_configuration_response.rs index 144c2bbde..054515232 100644 --- a/src/datadogV2/model/model_metric_tag_configuration_response.rs +++ b/src/datadogV2/model/model_metric_tag_configuration_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct MetricTagConfigurationResponse { /// Object for a single metric tag configuration. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl MetricTagConfigurationResponse { pub fn new() -> MetricTagConfigurationResponse { MetricTagConfigurationResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::MetricTagConfiguration, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for MetricTagConfigurationResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_tag_configuration_update_attributes.rs b/src/datadogV2/model/model_metric_tag_configuration_update_attributes.rs index dca92b672..63588896c 100644 --- a/src/datadogV2/model/model_metric_tag_configuration_update_attributes.rs +++ b/src/datadogV2/model/model_metric_tag_configuration_update_attributes.rs @@ -49,6 +49,29 @@ impl MetricTagConfigurationUpdateAttributes { tags: None, } } + + pub fn with_aggregations( + &mut self, + value: Vec, + ) -> &mut Self { + self.aggregations = Some(value); + self + } + + pub fn with_exclude_tags_mode(&mut self, value: bool) -> &mut Self { + self.exclude_tags_mode = Some(value); + self + } + + pub fn with_include_percentiles(&mut self, value: bool) -> &mut Self { + self.include_percentiles = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } impl Default for MetricTagConfigurationUpdateAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_metric_tag_configuration_update_data.rs b/src/datadogV2/model/model_metric_tag_configuration_update_data.rs index 88158d031..1c7209d56 100644 --- a/src/datadogV2/model/model_metric_tag_configuration_update_data.rs +++ b/src/datadogV2/model/model_metric_tag_configuration_update_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MetricTagConfigurationUpdateData { /// Object containing the definition of a metric tag configuration to be updated. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The metric name for this resource. #[serde(rename = "id")] pub id: String, @@ -30,4 +30,12 @@ impl MetricTagConfigurationUpdateData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::MetricTagConfigurationUpdateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } } diff --git a/src/datadogV2/model/model_metric_tag_configuration_update_request.rs b/src/datadogV2/model/model_metric_tag_configuration_update_request.rs index b8d06f5c4..b4d0d92cf 100644 --- a/src/datadogV2/model/model_metric_tag_configuration_update_request.rs +++ b/src/datadogV2/model/model_metric_tag_configuration_update_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct MetricTagConfigurationUpdateRequest { /// Object for a single tag configuration to be edited. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::MetricTagConfigurationUpdateData, } impl MetricTagConfigurationUpdateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::MetricTagConfigurationUpdateData, ) -> MetricTagConfigurationUpdateRequest { MetricTagConfigurationUpdateRequest { data } } diff --git a/src/datadogV2/model/model_metric_volumes.rs b/src/datadogV2/model/model_metric_volumes.rs index 10bf75ee6..f49c69340 100644 --- a/src/datadogV2/model/model_metric_volumes.rs +++ b/src/datadogV2/model/model_metric_volumes.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum MetricVolumes { - MetricDistinctVolume(Box), - MetricIngestedIndexedVolume(Box), + MetricDistinctVolume(crate::datadogV2::model::MetricDistinctVolume), + MetricIngestedIndexedVolume(crate::datadogV2::model::MetricIngestedIndexedVolume), } diff --git a/src/datadogV2/model/model_metric_volumes_response.rs b/src/datadogV2/model/model_metric_volumes_response.rs index 106b3f811..64a5e4e12 100644 --- a/src/datadogV2/model/model_metric_volumes_response.rs +++ b/src/datadogV2/model/model_metric_volumes_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct MetricVolumesResponse { /// Possible response objects for a metric's volume. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl MetricVolumesResponse { pub fn new() -> MetricVolumesResponse { MetricVolumesResponse { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::MetricVolumes) -> &mut Self { + self.data = Some(value); + self + } } impl Default for MetricVolumesResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_metrics_and_metric_tag_configurations.rs b/src/datadogV2/model/model_metrics_and_metric_tag_configurations.rs index 68d4e9e68..bdee97ae2 100644 --- a/src/datadogV2/model/model_metrics_and_metric_tag_configurations.rs +++ b/src/datadogV2/model/model_metrics_and_metric_tag_configurations.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum MetricsAndMetricTagConfigurations { - Metric(Box), - MetricTagConfiguration(Box), + Metric(crate::datadogV2::model::Metric), + MetricTagConfiguration(crate::datadogV2::model::MetricTagConfiguration), } diff --git a/src/datadogV2/model/model_metrics_and_metric_tag_configurations_response.rs b/src/datadogV2/model/model_metrics_and_metric_tag_configurations_response.rs index e5311b863..694d027cf 100644 --- a/src/datadogV2/model/model_metrics_and_metric_tag_configurations_response.rs +++ b/src/datadogV2/model/model_metrics_and_metric_tag_configurations_response.rs @@ -17,6 +17,14 @@ impl MetricsAndMetricTagConfigurationsResponse { pub fn new() -> MetricsAndMetricTagConfigurationsResponse { MetricsAndMetricTagConfigurationsResponse { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for MetricsAndMetricTagConfigurationsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_metrics_scalar_query.rs b/src/datadogV2/model/model_metrics_scalar_query.rs index e9ff4f78d..6ade753fa 100644 --- a/src/datadogV2/model/model_metrics_scalar_query.rs +++ b/src/datadogV2/model/model_metrics_scalar_query.rs @@ -35,4 +35,9 @@ impl MetricsScalarQuery { query, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV2/model/model_metrics_timeseries_query.rs b/src/datadogV2/model/model_metrics_timeseries_query.rs index 491eace1e..afc6cbb96 100644 --- a/src/datadogV2/model/model_metrics_timeseries_query.rs +++ b/src/datadogV2/model/model_metrics_timeseries_query.rs @@ -30,4 +30,9 @@ impl MetricsTimeseriesQuery { query, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV2/model/model_monitor_config_policy_attribute_create_request.rs b/src/datadogV2/model/model_monitor_config_policy_attribute_create_request.rs index f5682382a..a8d223373 100644 --- a/src/datadogV2/model/model_monitor_config_policy_attribute_create_request.rs +++ b/src/datadogV2/model/model_monitor_config_policy_attribute_create_request.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MonitorConfigPolicyAttributeCreateRequest { /// Configuration for the policy. #[serde(rename = "policy")] - pub policy: Box, + pub policy: crate::datadogV2::model::MonitorConfigPolicyPolicyCreateRequest, /// The monitor configuration policy type. #[serde(rename = "policy_type")] pub policy_type: crate::datadogV2::model::MonitorConfigPolicyType, @@ -18,7 +18,7 @@ pub struct MonitorConfigPolicyAttributeCreateRequest { impl MonitorConfigPolicyAttributeCreateRequest { pub fn new( - policy: Box, + policy: crate::datadogV2::model::MonitorConfigPolicyPolicyCreateRequest, policy_type: crate::datadogV2::model::MonitorConfigPolicyType, ) -> MonitorConfigPolicyAttributeCreateRequest { MonitorConfigPolicyAttributeCreateRequest { diff --git a/src/datadogV2/model/model_monitor_config_policy_attribute_edit_request.rs b/src/datadogV2/model/model_monitor_config_policy_attribute_edit_request.rs index 1a8c1c772..bc921f0d5 100644 --- a/src/datadogV2/model/model_monitor_config_policy_attribute_edit_request.rs +++ b/src/datadogV2/model/model_monitor_config_policy_attribute_edit_request.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MonitorConfigPolicyAttributeEditRequest { /// Configuration for the policy. #[serde(rename = "policy")] - pub policy: Box, + pub policy: crate::datadogV2::model::MonitorConfigPolicyPolicy, /// The monitor configuration policy type. #[serde(rename = "policy_type")] pub policy_type: crate::datadogV2::model::MonitorConfigPolicyType, @@ -18,7 +18,7 @@ pub struct MonitorConfigPolicyAttributeEditRequest { impl MonitorConfigPolicyAttributeEditRequest { pub fn new( - policy: Box, + policy: crate::datadogV2::model::MonitorConfigPolicyPolicy, policy_type: crate::datadogV2::model::MonitorConfigPolicyType, ) -> MonitorConfigPolicyAttributeEditRequest { MonitorConfigPolicyAttributeEditRequest { diff --git a/src/datadogV2/model/model_monitor_config_policy_attribute_response.rs b/src/datadogV2/model/model_monitor_config_policy_attribute_response.rs index 9a20cdc29..d02f514e3 100644 --- a/src/datadogV2/model/model_monitor_config_policy_attribute_response.rs +++ b/src/datadogV2/model/model_monitor_config_policy_attribute_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MonitorConfigPolicyAttributeResponse { /// Configuration for the policy. #[serde(rename = "policy")] - pub policy: Option>, + pub policy: Option, /// The monitor configuration policy type. #[serde(rename = "policy_type")] pub policy_type: Option, @@ -23,6 +23,22 @@ impl MonitorConfigPolicyAttributeResponse { policy_type: None, } } + + pub fn with_policy( + &mut self, + value: crate::datadogV2::model::MonitorConfigPolicyPolicy, + ) -> &mut Self { + self.policy = Some(value); + self + } + + pub fn with_policy_type( + &mut self, + value: crate::datadogV2::model::MonitorConfigPolicyType, + ) -> &mut Self { + self.policy_type = Some(value); + self + } } impl Default for MonitorConfigPolicyAttributeResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_monitor_config_policy_create_data.rs b/src/datadogV2/model/model_monitor_config_policy_create_data.rs index 038f85e93..613e9abaf 100644 --- a/src/datadogV2/model/model_monitor_config_policy_create_data.rs +++ b/src/datadogV2/model/model_monitor_config_policy_create_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MonitorConfigPolicyCreateData { /// Policy and policy type for a monitor configuration policy. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::MonitorConfigPolicyAttributeCreateRequest, /// Monitor configuration policy resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::MonitorConfigPolicyResourceType, @@ -18,7 +18,7 @@ pub struct MonitorConfigPolicyCreateData { impl MonitorConfigPolicyCreateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::MonitorConfigPolicyAttributeCreateRequest, type_: crate::datadogV2::model::MonitorConfigPolicyResourceType, ) -> MonitorConfigPolicyCreateData { MonitorConfigPolicyCreateData { attributes, type_ } diff --git a/src/datadogV2/model/model_monitor_config_policy_create_request.rs b/src/datadogV2/model/model_monitor_config_policy_create_request.rs index 819277994..dc964d4a1 100644 --- a/src/datadogV2/model/model_monitor_config_policy_create_request.rs +++ b/src/datadogV2/model/model_monitor_config_policy_create_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct MonitorConfigPolicyCreateRequest { /// A monitor configuration policy data. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::MonitorConfigPolicyCreateData, } impl MonitorConfigPolicyCreateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::MonitorConfigPolicyCreateData, ) -> MonitorConfigPolicyCreateRequest { MonitorConfigPolicyCreateRequest { data } } diff --git a/src/datadogV2/model/model_monitor_config_policy_edit_data.rs b/src/datadogV2/model/model_monitor_config_policy_edit_data.rs index b6e7c2201..72374a856 100644 --- a/src/datadogV2/model/model_monitor_config_policy_edit_data.rs +++ b/src/datadogV2/model/model_monitor_config_policy_edit_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MonitorConfigPolicyEditData { /// Policy and policy type for a monitor configuration policy. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::MonitorConfigPolicyAttributeEditRequest, /// ID of this monitor configuration policy. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct MonitorConfigPolicyEditData { impl MonitorConfigPolicyEditData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::MonitorConfigPolicyAttributeEditRequest, id: String, type_: crate::datadogV2::model::MonitorConfigPolicyResourceType, ) -> MonitorConfigPolicyEditData { diff --git a/src/datadogV2/model/model_monitor_config_policy_edit_request.rs b/src/datadogV2/model/model_monitor_config_policy_edit_request.rs index 4151a3b0c..9a1ed4d83 100644 --- a/src/datadogV2/model/model_monitor_config_policy_edit_request.rs +++ b/src/datadogV2/model/model_monitor_config_policy_edit_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct MonitorConfigPolicyEditRequest { /// A monitor configuration policy data. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::MonitorConfigPolicyEditData, } impl MonitorConfigPolicyEditRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::MonitorConfigPolicyEditData, ) -> MonitorConfigPolicyEditRequest { MonitorConfigPolicyEditRequest { data } } diff --git a/src/datadogV2/model/model_monitor_config_policy_list_response.rs b/src/datadogV2/model/model_monitor_config_policy_list_response.rs index 297af94ac..980caff43 100644 --- a/src/datadogV2/model/model_monitor_config_policy_list_response.rs +++ b/src/datadogV2/model/model_monitor_config_policy_list_response.rs @@ -17,6 +17,14 @@ impl MonitorConfigPolicyListResponse { pub fn new() -> MonitorConfigPolicyListResponse { MonitorConfigPolicyListResponse { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for MonitorConfigPolicyListResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_monitor_config_policy_policy.rs b/src/datadogV2/model/model_monitor_config_policy_policy.rs index 0a0dc53a2..a66519074 100644 --- a/src/datadogV2/model/model_monitor_config_policy_policy.rs +++ b/src/datadogV2/model/model_monitor_config_policy_policy.rs @@ -7,5 +7,5 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum MonitorConfigPolicyPolicy { - MonitorConfigPolicyTagPolicy(Box), + MonitorConfigPolicyTagPolicy(crate::datadogV2::model::MonitorConfigPolicyTagPolicy), } diff --git a/src/datadogV2/model/model_monitor_config_policy_policy_create_request.rs b/src/datadogV2/model/model_monitor_config_policy_policy_create_request.rs index c0624ff85..b8e777a8a 100644 --- a/src/datadogV2/model/model_monitor_config_policy_policy_create_request.rs +++ b/src/datadogV2/model/model_monitor_config_policy_policy_create_request.rs @@ -8,6 +8,6 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum MonitorConfigPolicyPolicyCreateRequest { MonitorConfigPolicyTagPolicyCreateRequest( - Box, + crate::datadogV2::model::MonitorConfigPolicyTagPolicyCreateRequest, ), } diff --git a/src/datadogV2/model/model_monitor_config_policy_response.rs b/src/datadogV2/model/model_monitor_config_policy_response.rs index aa118c363..92052590b 100644 --- a/src/datadogV2/model/model_monitor_config_policy_response.rs +++ b/src/datadogV2/model/model_monitor_config_policy_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct MonitorConfigPolicyResponse { /// A monitor configuration policy data. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl MonitorConfigPolicyResponse { pub fn new() -> MonitorConfigPolicyResponse { MonitorConfigPolicyResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::MonitorConfigPolicyResponseData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for MonitorConfigPolicyResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_monitor_config_policy_response_data.rs b/src/datadogV2/model/model_monitor_config_policy_response_data.rs index 092bdc6c7..b3e5882f2 100644 --- a/src/datadogV2/model/model_monitor_config_policy_response_data.rs +++ b/src/datadogV2/model/model_monitor_config_policy_response_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MonitorConfigPolicyResponseData { /// Policy and policy type for a monitor configuration policy. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of this monitor configuration policy. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,27 @@ impl MonitorConfigPolicyResponseData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::MonitorConfigPolicyAttributeResponse, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::MonitorConfigPolicyResourceType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for MonitorConfigPolicyResponseData { fn default() -> Self { diff --git a/src/datadogV2/model/model_monitor_config_policy_tag_policy.rs b/src/datadogV2/model/model_monitor_config_policy_tag_policy.rs index 068033f0b..49b83109e 100644 --- a/src/datadogV2/model/model_monitor_config_policy_tag_policy.rs +++ b/src/datadogV2/model/model_monitor_config_policy_tag_policy.rs @@ -27,6 +27,21 @@ impl MonitorConfigPolicyTagPolicy { valid_tag_values: None, } } + + pub fn with_tag_key(&mut self, value: String) -> &mut Self { + self.tag_key = Some(value); + self + } + + pub fn with_tag_key_required(&mut self, value: bool) -> &mut Self { + self.tag_key_required = Some(value); + self + } + + pub fn with_valid_tag_values(&mut self, value: Vec) -> &mut Self { + self.valid_tag_values = Some(value); + self + } } impl Default for MonitorConfigPolicyTagPolicy { fn default() -> Self { diff --git a/src/datadogV2/model/model_monitor_downtime_match_response.rs b/src/datadogV2/model/model_monitor_downtime_match_response.rs index fb8c9f1d7..b629a9ca7 100644 --- a/src/datadogV2/model/model_monitor_downtime_match_response.rs +++ b/src/datadogV2/model/model_monitor_downtime_match_response.rs @@ -13,7 +13,7 @@ pub struct MonitorDowntimeMatchResponse { pub data: Option>, /// Pagination metadata returned by the API. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl MonitorDowntimeMatchResponse { @@ -23,6 +23,19 @@ impl MonitorDowntimeMatchResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::DowntimeMeta) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for MonitorDowntimeMatchResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_monitor_downtime_match_response_attributes.rs b/src/datadogV2/model/model_monitor_downtime_match_response_attributes.rs index 5a5c7e2dd..69654d245 100644 --- a/src/datadogV2/model/model_monitor_downtime_match_response_attributes.rs +++ b/src/datadogV2/model/model_monitor_downtime_match_response_attributes.rs @@ -31,6 +31,26 @@ impl MonitorDowntimeMatchResponseAttributes { start: None, } } + + pub fn with_end(&mut self, value: Option) -> &mut Self { + self.end = Some(value); + self + } + + pub fn with_groups(&mut self, value: Vec) -> &mut Self { + self.groups = Some(value); + self + } + + pub fn with_scope(&mut self, value: String) -> &mut Self { + self.scope = Some(value); + self + } + + pub fn with_start(&mut self, value: String) -> &mut Self { + self.start = Some(value); + self + } } impl Default for MonitorDowntimeMatchResponseAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_monitor_downtime_match_response_data.rs b/src/datadogV2/model/model_monitor_downtime_match_response_data.rs index 82a4251c6..953e8a3dd 100644 --- a/src/datadogV2/model/model_monitor_downtime_match_response_data.rs +++ b/src/datadogV2/model/model_monitor_downtime_match_response_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MonitorDowntimeMatchResponseData { /// Downtime match details. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The downtime ID. #[serde(rename = "id", default, with = "::serde_with::rust::double_option")] pub id: Option>, @@ -27,6 +27,27 @@ impl MonitorDowntimeMatchResponseData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::MonitorDowntimeMatchResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: Option) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::MonitorDowntimeMatchResourceType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for MonitorDowntimeMatchResponseData { fn default() -> Self { diff --git a/src/datadogV2/model/model_monitor_type.rs b/src/datadogV2/model/model_monitor_type.rs index e2e64d0d0..f9079d329 100644 --- a/src/datadogV2/model/model_monitor_type.rs +++ b/src/datadogV2/model/model_monitor_type.rs @@ -59,6 +59,61 @@ impl MonitorType { type_: None, } } + + pub fn with_created_at(&mut self, value: i64) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_group_status(&mut self, value: i32) -> &mut Self { + self.group_status = Some(value); + self + } + + pub fn with_groups(&mut self, value: Vec) -> &mut Self { + self.groups = Some(value); + self + } + + pub fn with_id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_modified(&mut self, value: i64) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_templated_name(&mut self, value: String) -> &mut Self { + self.templated_name = Some(value); + self + } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for MonitorType { fn default() -> Self { diff --git a/src/datadogV2/model/model_monthly_cost_attribution_attributes.rs b/src/datadogV2/model/model_monthly_cost_attribution_attributes.rs index 276ef23e0..010ad1491 100644 --- a/src/datadogV2/model/model_monthly_cost_attribution_attributes.rs +++ b/src/datadogV2/model/model_monthly_cost_attribution_attributes.rs @@ -46,6 +46,47 @@ impl MonthlyCostAttributionAttributes { values: None, } } + + pub fn with_month(&mut self, value: String) -> &mut Self { + self.month = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_tag_config_source(&mut self, value: String) -> &mut Self { + self.tag_config_source = Some(value); + self + } + + pub fn with_tags( + &mut self, + value: Option>>>, + ) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_updated_at(&mut self, value: String) -> &mut Self { + self.updated_at = Some(value); + self + } + + pub fn with_values( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.values = Some(value); + self + } } impl Default for MonthlyCostAttributionAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_monthly_cost_attribution_body.rs b/src/datadogV2/model/model_monthly_cost_attribution_body.rs index 3bf1e42b9..8139c1ad3 100644 --- a/src/datadogV2/model/model_monthly_cost_attribution_body.rs +++ b/src/datadogV2/model/model_monthly_cost_attribution_body.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct MonthlyCostAttributionBody { /// Cost Attribution by Tag for a given organization. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Unique ID of the response. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl MonthlyCostAttributionBody { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::MonthlyCostAttributionAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::CostAttributionType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for MonthlyCostAttributionBody { fn default() -> Self { diff --git a/src/datadogV2/model/model_monthly_cost_attribution_meta.rs b/src/datadogV2/model/model_monthly_cost_attribution_meta.rs index 2d982481e..b0027a80b 100644 --- a/src/datadogV2/model/model_monthly_cost_attribution_meta.rs +++ b/src/datadogV2/model/model_monthly_cost_attribution_meta.rs @@ -13,7 +13,7 @@ pub struct MonthlyCostAttributionMeta { pub aggregates: Option>, /// The metadata for the current pagination. #[serde(rename = "pagination")] - pub pagination: Option>, + pub pagination: Option, } impl MonthlyCostAttributionMeta { @@ -23,6 +23,22 @@ impl MonthlyCostAttributionMeta { pagination: None, } } + + pub fn with_aggregates( + &mut self, + value: Vec, + ) -> &mut Self { + self.aggregates = Some(value); + self + } + + pub fn with_pagination( + &mut self, + value: crate::datadogV2::model::MonthlyCostAttributionPagination, + ) -> &mut Self { + self.pagination = Some(value); + self + } } impl Default for MonthlyCostAttributionMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_monthly_cost_attribution_pagination.rs b/src/datadogV2/model/model_monthly_cost_attribution_pagination.rs index 235d8a20d..5243bd7ee 100644 --- a/src/datadogV2/model/model_monthly_cost_attribution_pagination.rs +++ b/src/datadogV2/model/model_monthly_cost_attribution_pagination.rs @@ -23,6 +23,11 @@ impl MonthlyCostAttributionPagination { next_record_id: None, } } + + pub fn with_next_record_id(&mut self, value: Option) -> &mut Self { + self.next_record_id = Some(value); + self + } } impl Default for MonthlyCostAttributionPagination { fn default() -> Self { diff --git a/src/datadogV2/model/model_monthly_cost_attribution_response.rs b/src/datadogV2/model/model_monthly_cost_attribution_response.rs index 54994a11b..8f915e40d 100644 --- a/src/datadogV2/model/model_monthly_cost_attribution_response.rs +++ b/src/datadogV2/model/model_monthly_cost_attribution_response.rs @@ -13,7 +13,7 @@ pub struct MonthlyCostAttributionResponse { pub data: Option>, /// The object containing document metadata. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl MonthlyCostAttributionResponse { @@ -23,6 +23,22 @@ impl MonthlyCostAttributionResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::MonthlyCostAttributionMeta, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for MonthlyCostAttributionResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_nullable_relationship_to_user.rs b/src/datadogV2/model/model_nullable_relationship_to_user.rs index b3c343c6e..25e120e6f 100644 --- a/src/datadogV2/model/model_nullable_relationship_to_user.rs +++ b/src/datadogV2/model/model_nullable_relationship_to_user.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct NullableRelationshipToUser { /// Relationship to user object. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl NullableRelationshipToUser { pub fn new( - data: Option>, + data: Option, ) -> NullableRelationshipToUser { NullableRelationshipToUser { data } } diff --git a/src/datadogV2/model/model_okta_account.rs b/src/datadogV2/model/model_okta_account.rs index 06ce4daec..2f31e6000 100644 --- a/src/datadogV2/model/model_okta_account.rs +++ b/src/datadogV2/model/model_okta_account.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct OktaAccount { /// Attributes object for an Okta account. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::OktaAccountAttributes, /// The ID of the Okta account, a UUID hash of the account name. #[serde(rename = "id")] pub id: Option, @@ -21,7 +21,7 @@ pub struct OktaAccount { impl OktaAccount { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::OktaAccountAttributes, type_: crate::datadogV2::model::OktaAccountType, ) -> OktaAccount { OktaAccount { @@ -30,4 +30,9 @@ impl OktaAccount { type_, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } } diff --git a/src/datadogV2/model/model_okta_account_attributes.rs b/src/datadogV2/model/model_okta_account_attributes.rs index a41b42cd1..7dfdc1879 100644 --- a/src/datadogV2/model/model_okta_account_attributes.rs +++ b/src/datadogV2/model/model_okta_account_attributes.rs @@ -39,4 +39,19 @@ impl OktaAccountAttributes { name, } } + + pub fn with_api_key(&mut self, value: String) -> &mut Self { + self.api_key = Some(value); + self + } + + pub fn with_client_id(&mut self, value: String) -> &mut Self { + self.client_id = Some(value); + self + } + + pub fn with_client_secret(&mut self, value: String) -> &mut Self { + self.client_secret = Some(value); + self + } } diff --git a/src/datadogV2/model/model_okta_account_request.rs b/src/datadogV2/model/model_okta_account_request.rs index 955a8204e..e1102cc50 100644 --- a/src/datadogV2/model/model_okta_account_request.rs +++ b/src/datadogV2/model/model_okta_account_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct OktaAccountRequest { /// Schema for an Okta account. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::OktaAccount, } impl OktaAccountRequest { - pub fn new(data: Box) -> OktaAccountRequest { + pub fn new(data: crate::datadogV2::model::OktaAccount) -> OktaAccountRequest { OktaAccountRequest { data } } } diff --git a/src/datadogV2/model/model_okta_account_response.rs b/src/datadogV2/model/model_okta_account_response.rs index f476a6979..60406afbb 100644 --- a/src/datadogV2/model/model_okta_account_response.rs +++ b/src/datadogV2/model/model_okta_account_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct OktaAccountResponse { /// Schema for an Okta account. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl OktaAccountResponse { pub fn new() -> OktaAccountResponse { OktaAccountResponse { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::OktaAccount) -> &mut Self { + self.data = Some(value); + self + } } impl Default for OktaAccountResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_okta_account_response_data.rs b/src/datadogV2/model/model_okta_account_response_data.rs index ac892ecc6..82342d87a 100644 --- a/src/datadogV2/model/model_okta_account_response_data.rs +++ b/src/datadogV2/model/model_okta_account_response_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct OktaAccountResponseData { /// Attributes object for an Okta account. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::OktaAccountAttributes, /// The ID of the Okta account, a UUID hash of the account name. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct OktaAccountResponseData { impl OktaAccountResponseData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::OktaAccountAttributes, id: String, type_: crate::datadogV2::model::OktaAccountType, ) -> OktaAccountResponseData { diff --git a/src/datadogV2/model/model_okta_account_update_request.rs b/src/datadogV2/model/model_okta_account_update_request.rs index d2f0be69c..75f1e96a1 100644 --- a/src/datadogV2/model/model_okta_account_update_request.rs +++ b/src/datadogV2/model/model_okta_account_update_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct OktaAccountUpdateRequest { /// Data object for updating an Okta account. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::OktaAccountUpdateRequestData, } impl OktaAccountUpdateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::OktaAccountUpdateRequestData, ) -> OktaAccountUpdateRequest { OktaAccountUpdateRequest { data } } diff --git a/src/datadogV2/model/model_okta_account_update_request_attributes.rs b/src/datadogV2/model/model_okta_account_update_request_attributes.rs index ccd62c76a..9642833c7 100644 --- a/src/datadogV2/model/model_okta_account_update_request_attributes.rs +++ b/src/datadogV2/model/model_okta_account_update_request_attributes.rs @@ -35,4 +35,19 @@ impl OktaAccountUpdateRequestAttributes { domain, } } + + pub fn with_api_key(&mut self, value: String) -> &mut Self { + self.api_key = Some(value); + self + } + + pub fn with_client_id(&mut self, value: String) -> &mut Self { + self.client_id = Some(value); + self + } + + pub fn with_client_secret(&mut self, value: String) -> &mut Self { + self.client_secret = Some(value); + self + } } diff --git a/src/datadogV2/model/model_okta_account_update_request_data.rs b/src/datadogV2/model/model_okta_account_update_request_data.rs index 3ae3bd8e3..9443feebb 100644 --- a/src/datadogV2/model/model_okta_account_update_request_data.rs +++ b/src/datadogV2/model/model_okta_account_update_request_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct OktaAccountUpdateRequestData { /// Attributes object for updating an Okta account. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Account type for an Okta account. #[serde(rename = "type")] pub type_: Option, @@ -23,6 +23,19 @@ impl OktaAccountUpdateRequestData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::OktaAccountUpdateRequestAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::OktaAccountType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for OktaAccountUpdateRequestData { fn default() -> Self { diff --git a/src/datadogV2/model/model_okta_accounts_response.rs b/src/datadogV2/model/model_okta_accounts_response.rs index 28ea8419f..ab99129b7 100644 --- a/src/datadogV2/model/model_okta_accounts_response.rs +++ b/src/datadogV2/model/model_okta_accounts_response.rs @@ -17,6 +17,14 @@ impl OktaAccountsResponse { pub fn new() -> OktaAccountsResponse { OktaAccountsResponse { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for OktaAccountsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_on_demand_concurrency_cap.rs b/src/datadogV2/model/model_on_demand_concurrency_cap.rs index 7550d1abd..2e39241c1 100644 --- a/src/datadogV2/model/model_on_demand_concurrency_cap.rs +++ b/src/datadogV2/model/model_on_demand_concurrency_cap.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct OnDemandConcurrencyCap { /// On-demand concurrency cap attributes. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// On-demand concurrency cap type. #[serde(rename = "type")] pub type_: Option, @@ -23,6 +23,22 @@ impl OnDemandConcurrencyCap { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::OnDemandConcurrencyCapAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::OnDemandConcurrencyCapType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for OnDemandConcurrencyCap { fn default() -> Self { diff --git a/src/datadogV2/model/model_on_demand_concurrency_cap_attributes.rs b/src/datadogV2/model/model_on_demand_concurrency_cap_attributes.rs index 4eff362ae..bee482341 100644 --- a/src/datadogV2/model/model_on_demand_concurrency_cap_attributes.rs +++ b/src/datadogV2/model/model_on_demand_concurrency_cap_attributes.rs @@ -19,6 +19,11 @@ impl OnDemandConcurrencyCapAttributes { on_demand_concurrency_cap: None, } } + + pub fn with_on_demand_concurrency_cap(&mut self, value: f64) -> &mut Self { + self.on_demand_concurrency_cap = Some(value); + self + } } impl Default for OnDemandConcurrencyCapAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_on_demand_concurrency_cap_response.rs b/src/datadogV2/model/model_on_demand_concurrency_cap_response.rs index c802bfed6..226b17cf6 100644 --- a/src/datadogV2/model/model_on_demand_concurrency_cap_response.rs +++ b/src/datadogV2/model/model_on_demand_concurrency_cap_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct OnDemandConcurrencyCapResponse { /// On-demand concurrency cap. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl OnDemandConcurrencyCapResponse { pub fn new() -> OnDemandConcurrencyCapResponse { OnDemandConcurrencyCapResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::OnDemandConcurrencyCap, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for OnDemandConcurrencyCapResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_opsgenie_service_create_attributes.rs b/src/datadogV2/model/model_opsgenie_service_create_attributes.rs index 7c19fb874..00ed6cec1 100644 --- a/src/datadogV2/model/model_opsgenie_service_create_attributes.rs +++ b/src/datadogV2/model/model_opsgenie_service_create_attributes.rs @@ -35,4 +35,9 @@ impl OpsgenieServiceCreateAttributes { region, } } + + pub fn with_custom_url(&mut self, value: String) -> &mut Self { + self.custom_url = Some(value); + self + } } diff --git a/src/datadogV2/model/model_opsgenie_service_create_data.rs b/src/datadogV2/model/model_opsgenie_service_create_data.rs index c8e9ae3fa..ad68df950 100644 --- a/src/datadogV2/model/model_opsgenie_service_create_data.rs +++ b/src/datadogV2/model/model_opsgenie_service_create_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct OpsgenieServiceCreateData { /// The Opsgenie service attributes for a create request. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::OpsgenieServiceCreateAttributes, /// Opsgenie service resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::OpsgenieServiceType, @@ -18,7 +18,7 @@ pub struct OpsgenieServiceCreateData { impl OpsgenieServiceCreateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::OpsgenieServiceCreateAttributes, type_: crate::datadogV2::model::OpsgenieServiceType, ) -> OpsgenieServiceCreateData { OpsgenieServiceCreateData { attributes, type_ } diff --git a/src/datadogV2/model/model_opsgenie_service_create_request.rs b/src/datadogV2/model/model_opsgenie_service_create_request.rs index 1cb606280..5226f8e21 100644 --- a/src/datadogV2/model/model_opsgenie_service_create_request.rs +++ b/src/datadogV2/model/model_opsgenie_service_create_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct OpsgenieServiceCreateRequest { /// Opsgenie service data for a create request. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::OpsgenieServiceCreateData, } impl OpsgenieServiceCreateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::OpsgenieServiceCreateData, ) -> OpsgenieServiceCreateRequest { OpsgenieServiceCreateRequest { data } } diff --git a/src/datadogV2/model/model_opsgenie_service_response.rs b/src/datadogV2/model/model_opsgenie_service_response.rs index 7f2e94a78..be75bd8b4 100644 --- a/src/datadogV2/model/model_opsgenie_service_response.rs +++ b/src/datadogV2/model/model_opsgenie_service_response.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct OpsgenieServiceResponse { /// Opsgenie service data from a response. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::OpsgenieServiceResponseData, } impl OpsgenieServiceResponse { pub fn new( - data: Box, + data: crate::datadogV2::model::OpsgenieServiceResponseData, ) -> OpsgenieServiceResponse { OpsgenieServiceResponse { data } } diff --git a/src/datadogV2/model/model_opsgenie_service_response_attributes.rs b/src/datadogV2/model/model_opsgenie_service_response_attributes.rs index 651c1b13d..dd99082ec 100644 --- a/src/datadogV2/model/model_opsgenie_service_response_attributes.rs +++ b/src/datadogV2/model/model_opsgenie_service_response_attributes.rs @@ -31,6 +31,24 @@ impl OpsgenieServiceResponseAttributes { region: None, } } + + pub fn with_custom_url(&mut self, value: Option) -> &mut Self { + self.custom_url = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_region( + &mut self, + value: crate::datadogV2::model::OpsgenieServiceRegionType, + ) -> &mut Self { + self.region = Some(value); + self + } } impl Default for OpsgenieServiceResponseAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_opsgenie_service_response_data.rs b/src/datadogV2/model/model_opsgenie_service_response_data.rs index fcbc4f64a..e70fd5431 100644 --- a/src/datadogV2/model/model_opsgenie_service_response_data.rs +++ b/src/datadogV2/model/model_opsgenie_service_response_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct OpsgenieServiceResponseData { /// The attributes from an Opsgenie service response. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::OpsgenieServiceResponseAttributes, /// The ID of the Opsgenie service. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct OpsgenieServiceResponseData { impl OpsgenieServiceResponseData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::OpsgenieServiceResponseAttributes, id: String, type_: crate::datadogV2::model::OpsgenieServiceType, ) -> OpsgenieServiceResponseData { diff --git a/src/datadogV2/model/model_opsgenie_service_update_attributes.rs b/src/datadogV2/model/model_opsgenie_service_update_attributes.rs index 9fa647dd4..d45f2a218 100644 --- a/src/datadogV2/model/model_opsgenie_service_update_attributes.rs +++ b/src/datadogV2/model/model_opsgenie_service_update_attributes.rs @@ -35,6 +35,29 @@ impl OpsgenieServiceUpdateAttributes { region: None, } } + + pub fn with_custom_url(&mut self, value: Option) -> &mut Self { + self.custom_url = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_opsgenie_api_key(&mut self, value: String) -> &mut Self { + self.opsgenie_api_key = Some(value); + self + } + + pub fn with_region( + &mut self, + value: crate::datadogV2::model::OpsgenieServiceRegionType, + ) -> &mut Self { + self.region = Some(value); + self + } } impl Default for OpsgenieServiceUpdateAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_opsgenie_service_update_data.rs b/src/datadogV2/model/model_opsgenie_service_update_data.rs index 202200ebc..73761b148 100644 --- a/src/datadogV2/model/model_opsgenie_service_update_data.rs +++ b/src/datadogV2/model/model_opsgenie_service_update_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct OpsgenieServiceUpdateData { /// The Opsgenie service attributes for an update request. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::OpsgenieServiceUpdateAttributes, /// The ID of the Opsgenie service. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct OpsgenieServiceUpdateData { impl OpsgenieServiceUpdateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::OpsgenieServiceUpdateAttributes, id: String, type_: crate::datadogV2::model::OpsgenieServiceType, ) -> OpsgenieServiceUpdateData { diff --git a/src/datadogV2/model/model_opsgenie_service_update_request.rs b/src/datadogV2/model/model_opsgenie_service_update_request.rs index c63010534..0fb997fc6 100644 --- a/src/datadogV2/model/model_opsgenie_service_update_request.rs +++ b/src/datadogV2/model/model_opsgenie_service_update_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct OpsgenieServiceUpdateRequest { /// Opsgenie service for an update request. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::OpsgenieServiceUpdateData, } impl OpsgenieServiceUpdateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::OpsgenieServiceUpdateData, ) -> OpsgenieServiceUpdateRequest { OpsgenieServiceUpdateRequest { data } } diff --git a/src/datadogV2/model/model_organization.rs b/src/datadogV2/model/model_organization.rs index 4d01e0b6f..da6a3a402 100644 --- a/src/datadogV2/model/model_organization.rs +++ b/src/datadogV2/model/model_organization.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct Organization { /// Attributes of the organization. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of the organization. #[serde(rename = "id")] pub id: Option, @@ -27,4 +27,17 @@ impl Organization { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::OrganizationAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } } diff --git a/src/datadogV2/model/model_organization_attributes.rs b/src/datadogV2/model/model_organization_attributes.rs index 155defe2b..04d5402e3 100644 --- a/src/datadogV2/model/model_organization_attributes.rs +++ b/src/datadogV2/model/model_organization_attributes.rs @@ -47,6 +47,46 @@ impl OrganizationAttributes { url: None, } } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_disabled(&mut self, value: bool) -> &mut Self { + self.disabled = Some(value); + self + } + + pub fn with_modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_sharing(&mut self, value: String) -> &mut Self { + self.sharing = Some(value); + self + } + + pub fn with_url(&mut self, value: String) -> &mut Self { + self.url = Some(value); + self + } } impl Default for OrganizationAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_outcomes_batch_attributes.rs b/src/datadogV2/model/model_outcomes_batch_attributes.rs index 098999fad..0696b2800 100644 --- a/src/datadogV2/model/model_outcomes_batch_attributes.rs +++ b/src/datadogV2/model/model_outcomes_batch_attributes.rs @@ -17,6 +17,14 @@ impl OutcomesBatchAttributes { pub fn new() -> OutcomesBatchAttributes { OutcomesBatchAttributes { results: None } } + + pub fn with_results( + &mut self, + value: Vec, + ) -> &mut Self { + self.results = Some(value); + self + } } impl Default for OutcomesBatchAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_outcomes_batch_request.rs b/src/datadogV2/model/model_outcomes_batch_request.rs index 96f7aa656..5f029b904 100644 --- a/src/datadogV2/model/model_outcomes_batch_request.rs +++ b/src/datadogV2/model/model_outcomes_batch_request.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct OutcomesBatchRequest { /// Scorecard outcomes batch request data. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl OutcomesBatchRequest { pub fn new() -> OutcomesBatchRequest { OutcomesBatchRequest { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::OutcomesBatchRequestData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for OutcomesBatchRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_outcomes_batch_request_data.rs b/src/datadogV2/model/model_outcomes_batch_request_data.rs index df589e0f2..af54b2310 100644 --- a/src/datadogV2/model/model_outcomes_batch_request_data.rs +++ b/src/datadogV2/model/model_outcomes_batch_request_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct OutcomesBatchRequestData { /// The JSON:API attributes for a batched set of scorecard outcomes. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The JSON:API type for scorecard outcomes. #[serde(rename = "type")] pub type_: Option, @@ -23,6 +23,19 @@ impl OutcomesBatchRequestData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::OutcomesBatchAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::OutcomesBatchType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for OutcomesBatchRequestData { fn default() -> Self { diff --git a/src/datadogV2/model/model_outcomes_batch_request_item.rs b/src/datadogV2/model/model_outcomes_batch_request_item.rs index eb0210a61..6af8561f2 100644 --- a/src/datadogV2/model/model_outcomes_batch_request_item.rs +++ b/src/datadogV2/model/model_outcomes_batch_request_item.rs @@ -35,4 +35,9 @@ impl OutcomesBatchRequestItem { state, } } + + pub fn with_remarks(&mut self, value: String) -> &mut Self { + self.remarks = Some(value); + self + } } diff --git a/src/datadogV2/model/model_outcomes_batch_response.rs b/src/datadogV2/model/model_outcomes_batch_response.rs index 53b3af544..b497d2cfd 100644 --- a/src/datadogV2/model/model_outcomes_batch_response.rs +++ b/src/datadogV2/model/model_outcomes_batch_response.rs @@ -13,13 +13,13 @@ pub struct OutcomesBatchResponse { pub data: Vec, /// Metadata pertaining to the bulk operation. #[serde(rename = "meta")] - pub meta: Box, + pub meta: crate::datadogV2::model::OutcomesBatchResponseMeta, } impl OutcomesBatchResponse { pub fn new( data: Vec, - meta: Box, + meta: crate::datadogV2::model::OutcomesBatchResponseMeta, ) -> OutcomesBatchResponse { OutcomesBatchResponse { data, meta } } diff --git a/src/datadogV2/model/model_outcomes_batch_response_attributes.rs b/src/datadogV2/model/model_outcomes_batch_response_attributes.rs index e30b8eb5f..8e982b3c1 100644 --- a/src/datadogV2/model/model_outcomes_batch_response_attributes.rs +++ b/src/datadogV2/model/model_outcomes_batch_response_attributes.rs @@ -35,6 +35,31 @@ impl OutcomesBatchResponseAttributes { state: None, } } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn with_remarks(&mut self, value: String) -> &mut Self { + self.remarks = Some(value); + self + } + + pub fn with_service_name(&mut self, value: String) -> &mut Self { + self.service_name = Some(value); + self + } + + pub fn with_state(&mut self, value: crate::datadogV2::model::State) -> &mut Self { + self.state = Some(value); + self + } } impl Default for OutcomesBatchResponseAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_outcomes_batch_response_meta.rs b/src/datadogV2/model/model_outcomes_batch_response_meta.rs index b2154fe64..025569d7f 100644 --- a/src/datadogV2/model/model_outcomes_batch_response_meta.rs +++ b/src/datadogV2/model/model_outcomes_batch_response_meta.rs @@ -23,6 +23,16 @@ impl OutcomesBatchResponseMeta { total_updated: None, } } + + pub fn with_total_received(&mut self, value: i64) -> &mut Self { + self.total_received = Some(value); + self + } + + pub fn with_total_updated(&mut self, value: i64) -> &mut Self { + self.total_updated = Some(value); + self + } } impl Default for OutcomesBatchResponseMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_outcomes_response.rs b/src/datadogV2/model/model_outcomes_response.rs index b78dad21e..fe2c9539e 100644 --- a/src/datadogV2/model/model_outcomes_response.rs +++ b/src/datadogV2/model/model_outcomes_response.rs @@ -16,7 +16,7 @@ pub struct OutcomesResponse { pub included: Option>, /// Links attributes. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, } impl OutcomesResponse { @@ -27,6 +27,30 @@ impl OutcomesResponse { links: None, } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } + + pub fn with_links( + &mut self, + value: crate::datadogV2::model::OutcomesResponseLinks, + ) -> &mut Self { + self.links = Some(value); + self + } } impl Default for OutcomesResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_outcomes_response_data_item.rs b/src/datadogV2/model/model_outcomes_response_data_item.rs index 468031b3e..e62e6ddcf 100644 --- a/src/datadogV2/model/model_outcomes_response_data_item.rs +++ b/src/datadogV2/model/model_outcomes_response_data_item.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct OutcomesResponseDataItem { /// The JSON:API attributes for an outcome. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The unique ID for a rule outcome. #[serde(rename = "id")] pub id: Option, /// The JSON:API relationship to a scorecard rule. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// The JSON:API type for an outcome. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,32 @@ impl OutcomesResponseDataItem { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::OutcomesBatchResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::RuleOutcomeRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::OutcomeType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for OutcomesResponseDataItem { fn default() -> Self { diff --git a/src/datadogV2/model/model_outcomes_response_included_item.rs b/src/datadogV2/model/model_outcomes_response_included_item.rs index d726a0e04..eb3af6cbb 100644 --- a/src/datadogV2/model/model_outcomes_response_included_item.rs +++ b/src/datadogV2/model/model_outcomes_response_included_item.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct OutcomesResponseIncludedItem { /// Details of a rule. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The unique ID for a scorecard rule. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl OutcomesResponseIncludedItem { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::OutcomesResponseIncludedRuleAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::RuleType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for OutcomesResponseIncludedItem { fn default() -> Self { diff --git a/src/datadogV2/model/model_outcomes_response_included_rule_attributes.rs b/src/datadogV2/model/model_outcomes_response_included_rule_attributes.rs index 368bd8f7a..3fd6232a0 100644 --- a/src/datadogV2/model/model_outcomes_response_included_rule_attributes.rs +++ b/src/datadogV2/model/model_outcomes_response_included_rule_attributes.rs @@ -23,6 +23,16 @@ impl OutcomesResponseIncludedRuleAttributes { scorecard_name: None, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_scorecard_name(&mut self, value: String) -> &mut Self { + self.scorecard_name = Some(value); + self + } } impl Default for OutcomesResponseIncludedRuleAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_outcomes_response_links.rs b/src/datadogV2/model/model_outcomes_response_links.rs index d1d07ac33..59d92ea94 100644 --- a/src/datadogV2/model/model_outcomes_response_links.rs +++ b/src/datadogV2/model/model_outcomes_response_links.rs @@ -17,6 +17,11 @@ impl OutcomesResponseLinks { pub fn new() -> OutcomesResponseLinks { OutcomesResponseLinks { next: None } } + + pub fn with_next(&mut self, value: String) -> &mut Self { + self.next = Some(value); + self + } } impl Default for OutcomesResponseLinks { fn default() -> Self { diff --git a/src/datadogV2/model/model_pagination.rs b/src/datadogV2/model/model_pagination.rs index dbbe59bca..70afe1080 100644 --- a/src/datadogV2/model/model_pagination.rs +++ b/src/datadogV2/model/model_pagination.rs @@ -23,6 +23,16 @@ impl Pagination { total_filtered_count: None, } } + + pub fn with_total_count(&mut self, value: i64) -> &mut Self { + self.total_count = Some(value); + self + } + + pub fn with_total_filtered_count(&mut self, value: i64) -> &mut Self { + self.total_filtered_count = Some(value); + self + } } impl Default for Pagination { fn default() -> Self { diff --git a/src/datadogV2/model/model_partial_api_key.rs b/src/datadogV2/model/model_partial_api_key.rs index fb5d1aa35..a1b53c63f 100644 --- a/src/datadogV2/model/model_partial_api_key.rs +++ b/src/datadogV2/model/model_partial_api_key.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct PartialAPIKey { /// Attributes of a partial API key. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of the API key. #[serde(rename = "id")] pub id: Option, /// Resources related to the API key. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// API Keys resource type. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,32 @@ impl PartialAPIKey { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::PartialAPIKeyAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::APIKeyRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::APIKeysType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for PartialAPIKey { fn default() -> Self { diff --git a/src/datadogV2/model/model_partial_api_key_attributes.rs b/src/datadogV2/model/model_partial_api_key_attributes.rs index d35f1cb11..4519f7617 100644 --- a/src/datadogV2/model/model_partial_api_key_attributes.rs +++ b/src/datadogV2/model/model_partial_api_key_attributes.rs @@ -39,6 +39,36 @@ impl PartialAPIKeyAttributes { remote_config_read_enabled: None, } } + + pub fn with_category(&mut self, value: String) -> &mut Self { + self.category = Some(value); + self + } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_last4(&mut self, value: String) -> &mut Self { + self.last4 = Some(value); + self + } + + pub fn with_modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_remote_config_read_enabled(&mut self, value: bool) -> &mut Self { + self.remote_config_read_enabled = Some(value); + self + } } impl Default for PartialAPIKeyAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_partial_application_key.rs b/src/datadogV2/model/model_partial_application_key.rs index 3f3669948..471e05295 100644 --- a/src/datadogV2/model/model_partial_application_key.rs +++ b/src/datadogV2/model/model_partial_application_key.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct PartialApplicationKey { /// Attributes of a partial application key. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of the application key. #[serde(rename = "id")] pub id: Option, /// Resources related to the application key. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Application Keys resource type. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,32 @@ impl PartialApplicationKey { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::PartialApplicationKeyAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::ApplicationKeyRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::ApplicationKeysType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for PartialApplicationKey { fn default() -> Self { diff --git a/src/datadogV2/model/model_partial_application_key_attributes.rs b/src/datadogV2/model/model_partial_application_key_attributes.rs index 8977bb094..a4fe16962 100644 --- a/src/datadogV2/model/model_partial_application_key_attributes.rs +++ b/src/datadogV2/model/model_partial_application_key_attributes.rs @@ -31,6 +31,26 @@ impl PartialApplicationKeyAttributes { scopes: None, } } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_last4(&mut self, value: String) -> &mut Self { + self.last4 = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_scopes(&mut self, value: Option>) -> &mut Self { + self.scopes = Some(value); + self + } } impl Default for PartialApplicationKeyAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_partial_application_key_response.rs b/src/datadogV2/model/model_partial_application_key_response.rs index f5bb88b44..c4878bf0c 100644 --- a/src/datadogV2/model/model_partial_application_key_response.rs +++ b/src/datadogV2/model/model_partial_application_key_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct PartialApplicationKeyResponse { /// Partial Datadog application key. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// Array of objects related to the application key. #[serde(rename = "included")] pub included: Option>, @@ -23,6 +23,22 @@ impl PartialApplicationKeyResponse { included: None, } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::PartialApplicationKey, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } } impl Default for PartialApplicationKeyResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_permission.rs b/src/datadogV2/model/model_permission.rs index f329df766..45cb795a6 100644 --- a/src/datadogV2/model/model_permission.rs +++ b/src/datadogV2/model/model_permission.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct Permission { /// Attributes of a permission. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of the permission. #[serde(rename = "id")] pub id: Option, @@ -27,4 +27,17 @@ impl Permission { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::PermissionAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } } diff --git a/src/datadogV2/model/model_permission_attributes.rs b/src/datadogV2/model/model_permission_attributes.rs index 83f389f63..61afeadd4 100644 --- a/src/datadogV2/model/model_permission_attributes.rs +++ b/src/datadogV2/model/model_permission_attributes.rs @@ -43,6 +43,41 @@ impl PermissionAttributes { restricted: None, } } + + pub fn with_created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_display_name(&mut self, value: String) -> &mut Self { + self.display_name = Some(value); + self + } + + pub fn with_display_type(&mut self, value: String) -> &mut Self { + self.display_type = Some(value); + self + } + + pub fn with_group_name(&mut self, value: String) -> &mut Self { + self.group_name = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_restricted(&mut self, value: bool) -> &mut Self { + self.restricted = Some(value); + self + } } impl Default for PermissionAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_permissions_response.rs b/src/datadogV2/model/model_permissions_response.rs index 647b69245..709fa2c5b 100644 --- a/src/datadogV2/model/model_permissions_response.rs +++ b/src/datadogV2/model/model_permissions_response.rs @@ -17,6 +17,11 @@ impl PermissionsResponse { pub fn new() -> PermissionsResponse { PermissionsResponse { data: None } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } } impl Default for PermissionsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_powerpack.rs b/src/datadogV2/model/model_powerpack.rs index 14bb8a591..0d8d0bd78 100644 --- a/src/datadogV2/model/model_powerpack.rs +++ b/src/datadogV2/model/model_powerpack.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct Powerpack { /// Powerpack data object. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl Powerpack { pub fn new() -> Powerpack { Powerpack { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::PowerpackData) -> &mut Self { + self.data = Some(value); + self + } } impl Default for Powerpack { fn default() -> Self { diff --git a/src/datadogV2/model/model_powerpack_attributes.rs b/src/datadogV2/model/model_powerpack_attributes.rs index ff311864d..52fb68958 100644 --- a/src/datadogV2/model/model_powerpack_attributes.rs +++ b/src/datadogV2/model/model_powerpack_attributes.rs @@ -13,7 +13,7 @@ pub struct PowerpackAttributes { pub description: Option, /// Powerpack group widget definition object. #[serde(rename = "group_widget")] - pub group_widget: Box, + pub group_widget: crate::datadogV2::model::PowerpackGroupWidget, /// Name of the powerpack. #[serde(rename = "name")] pub name: String, @@ -27,7 +27,7 @@ pub struct PowerpackAttributes { impl PowerpackAttributes { pub fn new( - group_widget: Box, + group_widget: crate::datadogV2::model::PowerpackGroupWidget, name: String, ) -> PowerpackAttributes { PowerpackAttributes { @@ -38,4 +38,22 @@ impl PowerpackAttributes { template_variables: None, } } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_template_variables( + &mut self, + value: Vec, + ) -> &mut Self { + self.template_variables = Some(value); + self + } } diff --git a/src/datadogV2/model/model_powerpack_data.rs b/src/datadogV2/model/model_powerpack_data.rs index d4a345e10..439a53a9b 100644 --- a/src/datadogV2/model/model_powerpack_data.rs +++ b/src/datadogV2/model/model_powerpack_data.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct PowerpackData { /// Powerpack attribute object. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of the powerpack. #[serde(rename = "id")] pub id: Option, /// Powerpack relationship object. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Type of widget, must be powerpack. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,32 @@ impl PowerpackData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::PowerpackAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::PowerpackRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for PowerpackData { fn default() -> Self { diff --git a/src/datadogV2/model/model_powerpack_group_widget.rs b/src/datadogV2/model/model_powerpack_group_widget.rs index f0aaddbf5..3975dd6d2 100644 --- a/src/datadogV2/model/model_powerpack_group_widget.rs +++ b/src/datadogV2/model/model_powerpack_group_widget.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct PowerpackGroupWidget { /// Powerpack group widget object. #[serde(rename = "definition")] - pub definition: Box, + pub definition: crate::datadogV2::model::PowerpackGroupWidgetDefinition, /// Powerpack group widget layout. #[serde(rename = "layout")] - pub layout: Option>, + pub layout: Option, /// The available timeframes depend on the widget you are using. #[serde(rename = "live_span")] pub live_span: Option, @@ -21,7 +21,7 @@ pub struct PowerpackGroupWidget { impl PowerpackGroupWidget { pub fn new( - definition: Box, + definition: crate::datadogV2::model::PowerpackGroupWidgetDefinition, ) -> PowerpackGroupWidget { PowerpackGroupWidget { definition, @@ -29,4 +29,17 @@ impl PowerpackGroupWidget { live_span: None, } } + + pub fn with_layout( + &mut self, + value: crate::datadogV2::model::PowerpackGroupWidgetLayout, + ) -> &mut Self { + self.layout = Some(value); + self + } + + pub fn with_live_span(&mut self, value: crate::datadogV2::model::WidgetLiveSpan) -> &mut Self { + self.live_span = Some(value); + self + } } diff --git a/src/datadogV2/model/model_powerpack_group_widget_definition.rs b/src/datadogV2/model/model_powerpack_group_widget_definition.rs index ff20d1426..7a4b9c503 100644 --- a/src/datadogV2/model/model_powerpack_group_widget_definition.rs +++ b/src/datadogV2/model/model_powerpack_group_widget_definition.rs @@ -39,4 +39,14 @@ impl PowerpackGroupWidgetDefinition { widgets, } } + + pub fn with_show_title(&mut self, value: bool) -> &mut Self { + self.show_title = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } } diff --git a/src/datadogV2/model/model_powerpack_inner_widgets.rs b/src/datadogV2/model/model_powerpack_inner_widgets.rs index f1fabe21f..f452295dd 100644 --- a/src/datadogV2/model/model_powerpack_inner_widgets.rs +++ b/src/datadogV2/model/model_powerpack_inner_widgets.rs @@ -13,7 +13,7 @@ pub struct PowerpackInnerWidgets { pub definition: std::collections::BTreeMap, /// Powerpack inner widget layout. #[serde(rename = "layout")] - pub layout: Option>, + pub layout: Option, } impl PowerpackInnerWidgets { @@ -25,4 +25,12 @@ impl PowerpackInnerWidgets { layout: None, } } + + pub fn with_layout( + &mut self, + value: crate::datadogV2::model::PowerpackInnerWidgetLayout, + ) -> &mut Self { + self.layout = Some(value); + self + } } diff --git a/src/datadogV2/model/model_powerpack_relationships.rs b/src/datadogV2/model/model_powerpack_relationships.rs index b519c2b46..894593d47 100644 --- a/src/datadogV2/model/model_powerpack_relationships.rs +++ b/src/datadogV2/model/model_powerpack_relationships.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct PowerpackRelationships { /// Relationship to user. #[serde(rename = "author")] - pub author: Option>, + pub author: Option, } impl PowerpackRelationships { pub fn new() -> PowerpackRelationships { PowerpackRelationships { author: None } } + + pub fn with_author(&mut self, value: crate::datadogV2::model::RelationshipToUser) -> &mut Self { + self.author = Some(value); + self + } } impl Default for PowerpackRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_powerpack_response.rs b/src/datadogV2/model/model_powerpack_response.rs index 9c78ccbfd..73cc85673 100644 --- a/src/datadogV2/model/model_powerpack_response.rs +++ b/src/datadogV2/model/model_powerpack_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct PowerpackResponse { /// Powerpack data object. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// Array of objects related to the users. #[serde(rename = "included")] pub included: Option>, @@ -23,6 +23,16 @@ impl PowerpackResponse { included: None, } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::PowerpackData) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_included(&mut self, value: Vec) -> &mut Self { + self.included = Some(value); + self + } } impl Default for PowerpackResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_powerpack_response_links.rs b/src/datadogV2/model/model_powerpack_response_links.rs index d6a4ec8aa..18e78db3c 100644 --- a/src/datadogV2/model/model_powerpack_response_links.rs +++ b/src/datadogV2/model/model_powerpack_response_links.rs @@ -35,6 +35,31 @@ impl PowerpackResponseLinks { self_: None, } } + + pub fn with_first(&mut self, value: String) -> &mut Self { + self.first = Some(value); + self + } + + pub fn with_last(&mut self, value: Option) -> &mut Self { + self.last = Some(value); + self + } + + pub fn with_next(&mut self, value: String) -> &mut Self { + self.next = Some(value); + self + } + + pub fn with_prev(&mut self, value: Option) -> &mut Self { + self.prev = Some(value); + self + } + + pub fn with_self_(&mut self, value: String) -> &mut Self { + self.self_ = Some(value); + self + } } impl Default for PowerpackResponseLinks { fn default() -> Self { diff --git a/src/datadogV2/model/model_powerpack_template_variable.rs b/src/datadogV2/model/model_powerpack_template_variable.rs index 005cd3b74..9310440b3 100644 --- a/src/datadogV2/model/model_powerpack_template_variable.rs +++ b/src/datadogV2/model/model_powerpack_template_variable.rs @@ -23,4 +23,9 @@ impl PowerpackTemplateVariable { name, } } + + pub fn with_defaults(&mut self, value: Vec) -> &mut Self { + self.defaults = Some(value); + self + } } diff --git a/src/datadogV2/model/model_powerpacks_response_meta.rs b/src/datadogV2/model/model_powerpacks_response_meta.rs index 93e165697..e6ea7f625 100644 --- a/src/datadogV2/model/model_powerpacks_response_meta.rs +++ b/src/datadogV2/model/model_powerpacks_response_meta.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct PowerpacksResponseMeta { /// Powerpack response pagination metadata. #[serde(rename = "pagination")] - pub pagination: Option>, + pub pagination: Option, } impl PowerpacksResponseMeta { pub fn new() -> PowerpacksResponseMeta { PowerpacksResponseMeta { pagination: None } } + + pub fn with_pagination( + &mut self, + value: crate::datadogV2::model::PowerpacksResponseMetaPagination, + ) -> &mut Self { + self.pagination = Some(value); + self + } } impl Default for PowerpacksResponseMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_powerpacks_response_meta_pagination.rs b/src/datadogV2/model/model_powerpacks_response_meta_pagination.rs index d6371093f..e452f7aac 100644 --- a/src/datadogV2/model/model_powerpacks_response_meta_pagination.rs +++ b/src/datadogV2/model/model_powerpacks_response_meta_pagination.rs @@ -51,6 +51,46 @@ impl PowerpacksResponseMetaPagination { type_: None, } } + + pub fn with_first_offset(&mut self, value: i64) -> &mut Self { + self.first_offset = Some(value); + self + } + + pub fn with_last_offset(&mut self, value: Option) -> &mut Self { + self.last_offset = Some(value); + self + } + + pub fn with_limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_next_offset(&mut self, value: i64) -> &mut Self { + self.next_offset = Some(value); + self + } + + pub fn with_offset(&mut self, value: i64) -> &mut Self { + self.offset = Some(value); + self + } + + pub fn with_prev_offset(&mut self, value: i64) -> &mut Self { + self.prev_offset = Some(value); + self + } + + pub fn with_total(&mut self, value: i64) -> &mut Self { + self.total = Some(value); + self + } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for PowerpacksResponseMetaPagination { fn default() -> Self { diff --git a/src/datadogV2/model/model_process_summaries_meta.rs b/src/datadogV2/model/model_process_summaries_meta.rs index a18e63544..98feeccef 100644 --- a/src/datadogV2/model/model_process_summaries_meta.rs +++ b/src/datadogV2/model/model_process_summaries_meta.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct ProcessSummariesMeta { /// Paging attributes. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, } impl ProcessSummariesMeta { pub fn new() -> ProcessSummariesMeta { ProcessSummariesMeta { page: None } } + + pub fn with_page( + &mut self, + value: crate::datadogV2::model::ProcessSummariesMetaPage, + ) -> &mut Self { + self.page = Some(value); + self + } } impl Default for ProcessSummariesMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_process_summaries_meta_page.rs b/src/datadogV2/model/model_process_summaries_meta_page.rs index e82ab2efc..4f2527afe 100644 --- a/src/datadogV2/model/model_process_summaries_meta_page.rs +++ b/src/datadogV2/model/model_process_summaries_meta_page.rs @@ -24,6 +24,16 @@ impl ProcessSummariesMetaPage { size: None, } } + + pub fn with_after(&mut self, value: String) -> &mut Self { + self.after = Some(value); + self + } + + pub fn with_size(&mut self, value: i32) -> &mut Self { + self.size = Some(value); + self + } } impl Default for ProcessSummariesMetaPage { fn default() -> Self { diff --git a/src/datadogV2/model/model_process_summaries_response.rs b/src/datadogV2/model/model_process_summaries_response.rs index 790eb9bb7..1773f8114 100644 --- a/src/datadogV2/model/model_process_summaries_response.rs +++ b/src/datadogV2/model/model_process_summaries_response.rs @@ -13,7 +13,7 @@ pub struct ProcessSummariesResponse { pub data: Option>, /// Response metadata object. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl ProcessSummariesResponse { @@ -23,6 +23,16 @@ impl ProcessSummariesResponse { meta: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::ProcessSummariesMeta) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for ProcessSummariesResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_process_summary.rs b/src/datadogV2/model/model_process_summary.rs index cb387befd..41280b471 100644 --- a/src/datadogV2/model/model_process_summary.rs +++ b/src/datadogV2/model/model_process_summary.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ProcessSummary { /// Attributes for a process summary. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Process ID. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl ProcessSummary { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::ProcessSummaryAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::ProcessSummaryType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for ProcessSummary { fn default() -> Self { diff --git a/src/datadogV2/model/model_process_summary_attributes.rs b/src/datadogV2/model/model_process_summary_attributes.rs index a9f694976..55d1eac28 100644 --- a/src/datadogV2/model/model_process_summary_attributes.rs +++ b/src/datadogV2/model/model_process_summary_attributes.rs @@ -47,6 +47,46 @@ impl ProcessSummaryAttributes { user: None, } } + + pub fn with_cmdline(&mut self, value: String) -> &mut Self { + self.cmdline = Some(value); + self + } + + pub fn with_host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn with_pid(&mut self, value: i64) -> &mut Self { + self.pid = Some(value); + self + } + + pub fn with_ppid(&mut self, value: i64) -> &mut Self { + self.ppid = Some(value); + self + } + + pub fn with_start(&mut self, value: String) -> &mut Self { + self.start = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_timestamp(&mut self, value: String) -> &mut Self { + self.timestamp = Some(value); + self + } + + pub fn with_user(&mut self, value: String) -> &mut Self { + self.user = Some(value); + self + } } impl Default for ProcessSummaryAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_projected_cost.rs b/src/datadogV2/model/model_projected_cost.rs index 8eed73235..8f4071610 100644 --- a/src/datadogV2/model/model_projected_cost.rs +++ b/src/datadogV2/model/model_projected_cost.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ProjectedCost { /// Projected Cost attributes data. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Unique ID of the response. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl ProjectedCost { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::ProjectedCostAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::ProjectedCostType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for ProjectedCost { fn default() -> Self { diff --git a/src/datadogV2/model/model_projected_cost_attributes.rs b/src/datadogV2/model/model_projected_cost_attributes.rs index 5b60fcf8e..a8215f076 100644 --- a/src/datadogV2/model/model_projected_cost_attributes.rs +++ b/src/datadogV2/model/model_projected_cost_attributes.rs @@ -39,6 +39,39 @@ impl ProjectedCostAttributes { region: None, } } + + pub fn with_charges( + &mut self, + value: Vec, + ) -> &mut Self { + self.charges = Some(value); + self + } + + pub fn with_date(&mut self, value: String) -> &mut Self { + self.date = Some(value); + self + } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_projected_total_cost(&mut self, value: f64) -> &mut Self { + self.projected_total_cost = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } } impl Default for ProjectedCostAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_projected_cost_response.rs b/src/datadogV2/model/model_projected_cost_response.rs index 044ee3f2d..2ba5b1d35 100644 --- a/src/datadogV2/model/model_projected_cost_response.rs +++ b/src/datadogV2/model/model_projected_cost_response.rs @@ -17,6 +17,11 @@ impl ProjectedCostResponse { pub fn new() -> ProjectedCostResponse { ProjectedCostResponse { data: None } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } } impl Default for ProjectedCostResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_query_formula.rs b/src/datadogV2/model/model_query_formula.rs index 9ee7eb1db..2fe2df9ec 100644 --- a/src/datadogV2/model/model_query_formula.rs +++ b/src/datadogV2/model/model_query_formula.rs @@ -14,7 +14,7 @@ pub struct QueryFormula { /// Message for specifying limits to the number of values returned by a query. /// This limit is only for scalar queries and has no effect on timeseries queries. #[serde(rename = "limit")] - pub limit: Option>, + pub limit: Option, } impl QueryFormula { @@ -24,4 +24,9 @@ impl QueryFormula { limit: None, } } + + pub fn with_limit(&mut self, value: crate::datadogV2::model::FormulaLimit) -> &mut Self { + self.limit = Some(value); + self + } } diff --git a/src/datadogV2/model/model_relationship_to_incident_postmortem.rs b/src/datadogV2/model/model_relationship_to_incident_postmortem.rs index 63f0d9096..0fba0aeb9 100644 --- a/src/datadogV2/model/model_relationship_to_incident_postmortem.rs +++ b/src/datadogV2/model/model_relationship_to_incident_postmortem.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct RelationshipToIncidentPostmortem { /// The postmortem relationship data. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::RelationshipToIncidentPostmortemData, } impl RelationshipToIncidentPostmortem { pub fn new( - data: Box, + data: crate::datadogV2::model::RelationshipToIncidentPostmortemData, ) -> RelationshipToIncidentPostmortem { RelationshipToIncidentPostmortem { data } } diff --git a/src/datadogV2/model/model_relationship_to_organization.rs b/src/datadogV2/model/model_relationship_to_organization.rs index ec8d5293c..1e70f44d0 100644 --- a/src/datadogV2/model/model_relationship_to_organization.rs +++ b/src/datadogV2/model/model_relationship_to_organization.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct RelationshipToOrganization { /// Relationship to organization object. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::RelationshipToOrganizationData, } impl RelationshipToOrganization { pub fn new( - data: Box, + data: crate::datadogV2::model::RelationshipToOrganizationData, ) -> RelationshipToOrganization { RelationshipToOrganization { data } } diff --git a/src/datadogV2/model/model_relationship_to_outcome.rs b/src/datadogV2/model/model_relationship_to_outcome.rs index 8af59f781..a864358f3 100644 --- a/src/datadogV2/model/model_relationship_to_outcome.rs +++ b/src/datadogV2/model/model_relationship_to_outcome.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct RelationshipToOutcome { /// The JSON:API relationship to an outcome, which returns the related rule id. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl RelationshipToOutcome { pub fn new() -> RelationshipToOutcome { RelationshipToOutcome { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::RelationshipToOutcomeData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for RelationshipToOutcome { fn default() -> Self { diff --git a/src/datadogV2/model/model_relationship_to_outcome_data.rs b/src/datadogV2/model/model_relationship_to_outcome_data.rs index 9b5d04244..19625057c 100644 --- a/src/datadogV2/model/model_relationship_to_outcome_data.rs +++ b/src/datadogV2/model/model_relationship_to_outcome_data.rs @@ -23,6 +23,16 @@ impl RelationshipToOutcomeData { type_: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::RuleType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for RelationshipToOutcomeData { fn default() -> Self { diff --git a/src/datadogV2/model/model_relationship_to_permission.rs b/src/datadogV2/model/model_relationship_to_permission.rs index 5ad94ba51..3ee0ba008 100644 --- a/src/datadogV2/model/model_relationship_to_permission.rs +++ b/src/datadogV2/model/model_relationship_to_permission.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct RelationshipToPermission { /// Relationship to permission object. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl RelationshipToPermission { pub fn new() -> RelationshipToPermission { RelationshipToPermission { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::RelationshipToPermissionData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for RelationshipToPermission { fn default() -> Self { diff --git a/src/datadogV2/model/model_relationship_to_permission_data.rs b/src/datadogV2/model/model_relationship_to_permission_data.rs index 33315033b..21a37e41d 100644 --- a/src/datadogV2/model/model_relationship_to_permission_data.rs +++ b/src/datadogV2/model/model_relationship_to_permission_data.rs @@ -23,6 +23,16 @@ impl RelationshipToPermissionData { type_: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::PermissionsType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for RelationshipToPermissionData { fn default() -> Self { diff --git a/src/datadogV2/model/model_relationship_to_permissions.rs b/src/datadogV2/model/model_relationship_to_permissions.rs index 85c2fbd11..5e796af5a 100644 --- a/src/datadogV2/model/model_relationship_to_permissions.rs +++ b/src/datadogV2/model/model_relationship_to_permissions.rs @@ -17,6 +17,14 @@ impl RelationshipToPermissions { pub fn new() -> RelationshipToPermissions { RelationshipToPermissions { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for RelationshipToPermissions { fn default() -> Self { diff --git a/src/datadogV2/model/model_relationship_to_role.rs b/src/datadogV2/model/model_relationship_to_role.rs index a175eabe0..e3a622bf7 100644 --- a/src/datadogV2/model/model_relationship_to_role.rs +++ b/src/datadogV2/model/model_relationship_to_role.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct RelationshipToRole { /// Relationship to role object. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl RelationshipToRole { pub fn new() -> RelationshipToRole { RelationshipToRole { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::RelationshipToRoleData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for RelationshipToRole { fn default() -> Self { diff --git a/src/datadogV2/model/model_relationship_to_role_data.rs b/src/datadogV2/model/model_relationship_to_role_data.rs index 55d8b6d3b..c3134c5e6 100644 --- a/src/datadogV2/model/model_relationship_to_role_data.rs +++ b/src/datadogV2/model/model_relationship_to_role_data.rs @@ -23,6 +23,16 @@ impl RelationshipToRoleData { type_: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::RolesType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for RelationshipToRoleData { fn default() -> Self { diff --git a/src/datadogV2/model/model_relationship_to_roles.rs b/src/datadogV2/model/model_relationship_to_roles.rs index cd9262fc5..f1222bb33 100644 --- a/src/datadogV2/model/model_relationship_to_roles.rs +++ b/src/datadogV2/model/model_relationship_to_roles.rs @@ -17,6 +17,14 @@ impl RelationshipToRoles { pub fn new() -> RelationshipToRoles { RelationshipToRoles { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for RelationshipToRoles { fn default() -> Self { diff --git a/src/datadogV2/model/model_relationship_to_rule.rs b/src/datadogV2/model/model_relationship_to_rule.rs index 09a42079e..1ce93786e 100644 --- a/src/datadogV2/model/model_relationship_to_rule.rs +++ b/src/datadogV2/model/model_relationship_to_rule.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct RelationshipToRule { /// Relationship data for a rule. #[serde(rename = "scorecard")] - pub scorecard: Option>, + pub scorecard: Option, } impl RelationshipToRule { pub fn new() -> RelationshipToRule { RelationshipToRule { scorecard: None } } + + pub fn with_scorecard( + &mut self, + value: crate::datadogV2::model::RelationshipToRuleData, + ) -> &mut Self { + self.scorecard = Some(value); + self + } } impl Default for RelationshipToRule { fn default() -> Self { diff --git a/src/datadogV2/model/model_relationship_to_rule_data.rs b/src/datadogV2/model/model_relationship_to_rule_data.rs index 43acd780a..532cdc29f 100644 --- a/src/datadogV2/model/model_relationship_to_rule_data.rs +++ b/src/datadogV2/model/model_relationship_to_rule_data.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct RelationshipToRuleData { /// Rule relationship data. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl RelationshipToRuleData { pub fn new() -> RelationshipToRuleData { RelationshipToRuleData { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::RelationshipToRuleDataObject, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for RelationshipToRuleData { fn default() -> Self { diff --git a/src/datadogV2/model/model_relationship_to_rule_data_object.rs b/src/datadogV2/model/model_relationship_to_rule_data_object.rs index 3fcbaa53b..bf0fb49c3 100644 --- a/src/datadogV2/model/model_relationship_to_rule_data_object.rs +++ b/src/datadogV2/model/model_relationship_to_rule_data_object.rs @@ -23,6 +23,16 @@ impl RelationshipToRuleDataObject { type_: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::ScorecardType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for RelationshipToRuleDataObject { fn default() -> Self { diff --git a/src/datadogV2/model/model_relationship_to_saml_assertion_attribute.rs b/src/datadogV2/model/model_relationship_to_saml_assertion_attribute.rs index 8538ad043..e0cd8c85e 100644 --- a/src/datadogV2/model/model_relationship_to_saml_assertion_attribute.rs +++ b/src/datadogV2/model/model_relationship_to_saml_assertion_attribute.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct RelationshipToSAMLAssertionAttribute { /// Data of AuthN Mapping relationship to SAML Assertion Attribute. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::RelationshipToSAMLAssertionAttributeData, } impl RelationshipToSAMLAssertionAttribute { pub fn new( - data: Box, + data: crate::datadogV2::model::RelationshipToSAMLAssertionAttributeData, ) -> RelationshipToSAMLAssertionAttribute { RelationshipToSAMLAssertionAttribute { data } } diff --git a/src/datadogV2/model/model_relationship_to_team_links.rs b/src/datadogV2/model/model_relationship_to_team_links.rs index c2f7684ff..e7397bb26 100644 --- a/src/datadogV2/model/model_relationship_to_team_links.rs +++ b/src/datadogV2/model/model_relationship_to_team_links.rs @@ -13,7 +13,7 @@ pub struct RelationshipToTeamLinks { pub data: Option>, /// Links attributes. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, } impl RelationshipToTeamLinks { @@ -23,6 +23,22 @@ impl RelationshipToTeamLinks { links: None, } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links( + &mut self, + value: crate::datadogV2::model::TeamRelationshipsLinks, + ) -> &mut Self { + self.links = Some(value); + self + } } impl Default for RelationshipToTeamLinks { fn default() -> Self { diff --git a/src/datadogV2/model/model_relationship_to_user.rs b/src/datadogV2/model/model_relationship_to_user.rs index 3e8cc3999..18b3b9306 100644 --- a/src/datadogV2/model/model_relationship_to_user.rs +++ b/src/datadogV2/model/model_relationship_to_user.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct RelationshipToUser { /// Relationship to user object. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::RelationshipToUserData, } impl RelationshipToUser { - pub fn new(data: Box) -> RelationshipToUser { + pub fn new(data: crate::datadogV2::model::RelationshipToUserData) -> RelationshipToUser { RelationshipToUser { data } } } diff --git a/src/datadogV2/model/model_relationship_to_user_team_permission.rs b/src/datadogV2/model/model_relationship_to_user_team_permission.rs index 2316cd8fc..e36051e40 100644 --- a/src/datadogV2/model/model_relationship_to_user_team_permission.rs +++ b/src/datadogV2/model/model_relationship_to_user_team_permission.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct RelationshipToUserTeamPermission { /// Related user team permission data #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// Links attributes. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, } impl RelationshipToUserTeamPermission { @@ -23,6 +23,22 @@ impl RelationshipToUserTeamPermission { links: None, } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::RelationshipToUserTeamPermissionData, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links( + &mut self, + value: crate::datadogV2::model::TeamRelationshipsLinks, + ) -> &mut Self { + self.links = Some(value); + self + } } impl Default for RelationshipToUserTeamPermission { fn default() -> Self { diff --git a/src/datadogV2/model/model_relationship_to_user_team_team.rs b/src/datadogV2/model/model_relationship_to_user_team_team.rs index 9afa45c4e..15a26ef33 100644 --- a/src/datadogV2/model/model_relationship_to_user_team_team.rs +++ b/src/datadogV2/model/model_relationship_to_user_team_team.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct RelationshipToUserTeamTeam { /// The team associated with the membership #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::RelationshipToUserTeamTeamData, } impl RelationshipToUserTeamTeam { pub fn new( - data: Box, + data: crate::datadogV2::model::RelationshipToUserTeamTeamData, ) -> RelationshipToUserTeamTeam { RelationshipToUserTeamTeam { data } } diff --git a/src/datadogV2/model/model_relationship_to_user_team_user.rs b/src/datadogV2/model/model_relationship_to_user_team_user.rs index 986dfcb21..669ee13e4 100644 --- a/src/datadogV2/model/model_relationship_to_user_team_user.rs +++ b/src/datadogV2/model/model_relationship_to_user_team_user.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct RelationshipToUserTeamUser { /// A user's relationship with a team #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::RelationshipToUserTeamUserData, } impl RelationshipToUserTeamUser { pub fn new( - data: Box, + data: crate::datadogV2::model::RelationshipToUserTeamUserData, ) -> RelationshipToUserTeamUser { RelationshipToUserTeamUser { data } } diff --git a/src/datadogV2/model/model_response_meta_attributes.rs b/src/datadogV2/model/model_response_meta_attributes.rs index 505e9ae8b..0b8c77827 100644 --- a/src/datadogV2/model/model_response_meta_attributes.rs +++ b/src/datadogV2/model/model_response_meta_attributes.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct ResponseMetaAttributes { /// Pagination object. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, } impl ResponseMetaAttributes { pub fn new() -> ResponseMetaAttributes { ResponseMetaAttributes { page: None } } + + pub fn with_page(&mut self, value: crate::datadogV2::model::Pagination) -> &mut Self { + self.page = Some(value); + self + } } impl Default for ResponseMetaAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_restriction_policy.rs b/src/datadogV2/model/model_restriction_policy.rs index cabfac8b6..3457cea0d 100644 --- a/src/datadogV2/model/model_restriction_policy.rs +++ b/src/datadogV2/model/model_restriction_policy.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct RestrictionPolicy { /// Restriction policy attributes. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::RestrictionPolicyAttributes, /// The identifier, always equivalent to the value specified in the `resource_id` path parameter. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct RestrictionPolicy { impl RestrictionPolicy { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::RestrictionPolicyAttributes, id: String, type_: crate::datadogV2::model::RestrictionPolicyType, ) -> RestrictionPolicy { diff --git a/src/datadogV2/model/model_restriction_policy_response.rs b/src/datadogV2/model/model_restriction_policy_response.rs index 05334bb4d..5e7471dd8 100644 --- a/src/datadogV2/model/model_restriction_policy_response.rs +++ b/src/datadogV2/model/model_restriction_policy_response.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct RestrictionPolicyResponse { /// Restriction policy object. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::RestrictionPolicy, } impl RestrictionPolicyResponse { - pub fn new(data: Box) -> RestrictionPolicyResponse { + pub fn new(data: crate::datadogV2::model::RestrictionPolicy) -> RestrictionPolicyResponse { RestrictionPolicyResponse { data } } } diff --git a/src/datadogV2/model/model_restriction_policy_update_request.rs b/src/datadogV2/model/model_restriction_policy_update_request.rs index 94988d043..b7a739f7a 100644 --- a/src/datadogV2/model/model_restriction_policy_update_request.rs +++ b/src/datadogV2/model/model_restriction_policy_update_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct RestrictionPolicyUpdateRequest { /// Restriction policy object. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::RestrictionPolicy, } impl RestrictionPolicyUpdateRequest { - pub fn new( - data: Box, - ) -> RestrictionPolicyUpdateRequest { + pub fn new(data: crate::datadogV2::model::RestrictionPolicy) -> RestrictionPolicyUpdateRequest { RestrictionPolicyUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_retention_filter.rs b/src/datadogV2/model/model_retention_filter.rs index b37813a98..887ae88b2 100644 --- a/src/datadogV2/model/model_retention_filter.rs +++ b/src/datadogV2/model/model_retention_filter.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct RetentionFilter { /// The attributes of the retention filter. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::RetentionFilterAttributes, /// The ID of the retention filter. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct RetentionFilter { impl RetentionFilter { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::RetentionFilterAttributes, id: String, type_: crate::datadogV2::model::ApmRetentionFilterType, ) -> RetentionFilter { diff --git a/src/datadogV2/model/model_retention_filter_all.rs b/src/datadogV2/model/model_retention_filter_all.rs index 2a7dc7f07..18a9d0fc2 100644 --- a/src/datadogV2/model/model_retention_filter_all.rs +++ b/src/datadogV2/model/model_retention_filter_all.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct RetentionFilterAll { /// The attributes of the retention filter. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::RetentionFilterAllAttributes, /// The ID of the retention filter. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct RetentionFilterAll { impl RetentionFilterAll { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::RetentionFilterAllAttributes, id: String, type_: crate::datadogV2::model::ApmRetentionFilterType, ) -> RetentionFilterAll { diff --git a/src/datadogV2/model/model_retention_filter_all_attributes.rs b/src/datadogV2/model/model_retention_filter_all_attributes.rs index 76d648f70..be06262bc 100644 --- a/src/datadogV2/model/model_retention_filter_all_attributes.rs +++ b/src/datadogV2/model/model_retention_filter_all_attributes.rs @@ -25,7 +25,7 @@ pub struct RetentionFilterAllAttributes { pub execution_order: Option, /// The spans filter used to index spans. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// The type of retention filter. #[serde(rename = "filter_type")] pub filter_type: Option, @@ -60,6 +60,64 @@ impl RetentionFilterAllAttributes { rate: None, } } + + pub fn with_created_at(&mut self, value: i64) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_created_by(&mut self, value: String) -> &mut Self { + self.created_by = Some(value); + self + } + + pub fn with_editable(&mut self, value: bool) -> &mut Self { + self.editable = Some(value); + self + } + + pub fn with_enabled(&mut self, value: bool) -> &mut Self { + self.enabled = Some(value); + self + } + + pub fn with_execution_order(&mut self, value: i64) -> &mut Self { + self.execution_order = Some(value); + self + } + + pub fn with_filter(&mut self, value: crate::datadogV2::model::SpansFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_filter_type( + &mut self, + value: crate::datadogV2::model::RetentionFilterAllType, + ) -> &mut Self { + self.filter_type = Some(value); + self + } + + pub fn with_modified_at(&mut self, value: i64) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn with_modified_by(&mut self, value: String) -> &mut Self { + self.modified_by = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_rate(&mut self, value: f64) -> &mut Self { + self.rate = Some(value); + self + } } impl Default for RetentionFilterAllAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_retention_filter_attributes.rs b/src/datadogV2/model/model_retention_filter_attributes.rs index 399893f34..ec771595b 100644 --- a/src/datadogV2/model/model_retention_filter_attributes.rs +++ b/src/datadogV2/model/model_retention_filter_attributes.rs @@ -25,7 +25,7 @@ pub struct RetentionFilterAttributes { pub execution_order: Option, /// The spans filter used to index spans. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// The type of retention filter. The value should always be spans-sampling-processor. #[serde(rename = "filter_type")] pub filter_type: Option, @@ -60,6 +60,64 @@ impl RetentionFilterAttributes { rate: None, } } + + pub fn with_created_at(&mut self, value: i64) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_created_by(&mut self, value: String) -> &mut Self { + self.created_by = Some(value); + self + } + + pub fn with_editable(&mut self, value: bool) -> &mut Self { + self.editable = Some(value); + self + } + + pub fn with_enabled(&mut self, value: bool) -> &mut Self { + self.enabled = Some(value); + self + } + + pub fn with_execution_order(&mut self, value: i64) -> &mut Self { + self.execution_order = Some(value); + self + } + + pub fn with_filter(&mut self, value: crate::datadogV2::model::SpansFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_filter_type( + &mut self, + value: crate::datadogV2::model::RetentionFilterType, + ) -> &mut Self { + self.filter_type = Some(value); + self + } + + pub fn with_modified_at(&mut self, value: i64) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn with_modified_by(&mut self, value: String) -> &mut Self { + self.modified_by = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_rate(&mut self, value: f64) -> &mut Self { + self.rate = Some(value); + self + } } impl Default for RetentionFilterAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_retention_filter_create_attributes.rs b/src/datadogV2/model/model_retention_filter_create_attributes.rs index 954431a8f..617ebf428 100644 --- a/src/datadogV2/model/model_retention_filter_create_attributes.rs +++ b/src/datadogV2/model/model_retention_filter_create_attributes.rs @@ -13,7 +13,7 @@ pub struct RetentionFilterCreateAttributes { pub enabled: bool, /// The spans filter. Spans matching this filter will be indexed and stored. #[serde(rename = "filter")] - pub filter: Box, + pub filter: crate::datadogV2::model::SpansFilterCreate, /// The type of retention filter. The value should always be spans-sampling-processor. #[serde(rename = "filter_type")] pub filter_type: crate::datadogV2::model::RetentionFilterType, @@ -29,7 +29,7 @@ pub struct RetentionFilterCreateAttributes { impl RetentionFilterCreateAttributes { pub fn new( enabled: bool, - filter: Box, + filter: crate::datadogV2::model::SpansFilterCreate, filter_type: crate::datadogV2::model::RetentionFilterType, name: String, rate: f64, diff --git a/src/datadogV2/model/model_retention_filter_create_data.rs b/src/datadogV2/model/model_retention_filter_create_data.rs index d6ed36445..004d9e42c 100644 --- a/src/datadogV2/model/model_retention_filter_create_data.rs +++ b/src/datadogV2/model/model_retention_filter_create_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct RetentionFilterCreateData { /// The object describing the configuration of the retention filter to create/update. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::RetentionFilterCreateAttributes, /// The type of the resource. #[serde(rename = "type")] pub type_: crate::datadogV2::model::ApmRetentionFilterType, @@ -18,7 +18,7 @@ pub struct RetentionFilterCreateData { impl RetentionFilterCreateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::RetentionFilterCreateAttributes, type_: crate::datadogV2::model::ApmRetentionFilterType, ) -> RetentionFilterCreateData { RetentionFilterCreateData { attributes, type_ } diff --git a/src/datadogV2/model/model_retention_filter_create_request.rs b/src/datadogV2/model/model_retention_filter_create_request.rs index af5108287..826d77bc1 100644 --- a/src/datadogV2/model/model_retention_filter_create_request.rs +++ b/src/datadogV2/model/model_retention_filter_create_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct RetentionFilterCreateRequest { /// The body of the retention filter to be created. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::RetentionFilterCreateData, } impl RetentionFilterCreateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::RetentionFilterCreateData, ) -> RetentionFilterCreateRequest { RetentionFilterCreateRequest { data } } diff --git a/src/datadogV2/model/model_retention_filter_response.rs b/src/datadogV2/model/model_retention_filter_response.rs index f94093e73..03f44f67e 100644 --- a/src/datadogV2/model/model_retention_filter_response.rs +++ b/src/datadogV2/model/model_retention_filter_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct RetentionFilterResponse { /// The definition of the retention filter. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl RetentionFilterResponse { pub fn new() -> RetentionFilterResponse { RetentionFilterResponse { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::RetentionFilter) -> &mut Self { + self.data = Some(value); + self + } } impl Default for RetentionFilterResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_retention_filter_update_data.rs b/src/datadogV2/model/model_retention_filter_update_data.rs index 4512a8255..c43331bdc 100644 --- a/src/datadogV2/model/model_retention_filter_update_data.rs +++ b/src/datadogV2/model/model_retention_filter_update_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct RetentionFilterUpdateData { /// The object describing the configuration of the retention filter to create/update. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::RetentionFilterCreateAttributes, /// The ID of the retention filter. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct RetentionFilterUpdateData { impl RetentionFilterUpdateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::RetentionFilterCreateAttributes, id: String, type_: crate::datadogV2::model::ApmRetentionFilterType, ) -> RetentionFilterUpdateData { diff --git a/src/datadogV2/model/model_retention_filter_update_request.rs b/src/datadogV2/model/model_retention_filter_update_request.rs index a09e0ffb8..a1b26f499 100644 --- a/src/datadogV2/model/model_retention_filter_update_request.rs +++ b/src/datadogV2/model/model_retention_filter_update_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct RetentionFilterUpdateRequest { /// The body of the retention filter to be updated. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::RetentionFilterUpdateData, } impl RetentionFilterUpdateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::RetentionFilterUpdateData, ) -> RetentionFilterUpdateRequest { RetentionFilterUpdateRequest { data } } diff --git a/src/datadogV2/model/model_role.rs b/src/datadogV2/model/model_role.rs index 3180494fe..b334ad200 100644 --- a/src/datadogV2/model/model_role.rs +++ b/src/datadogV2/model/model_role.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct Role { /// Attributes of the role. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The unique identifier of the role. #[serde(rename = "id")] pub id: Option, /// Relationships of the role object returned by the API. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Roles type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::RolesType, @@ -31,4 +31,22 @@ impl Role { type_, } } + + pub fn with_attributes(&mut self, value: crate::datadogV2::model::RoleAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::RoleResponseRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_role_attributes.rs b/src/datadogV2/model/model_role_attributes.rs index c4e8429f9..79c70aebe 100644 --- a/src/datadogV2/model/model_role_attributes.rs +++ b/src/datadogV2/model/model_role_attributes.rs @@ -31,6 +31,26 @@ impl RoleAttributes { user_count: None, } } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_user_count(&mut self, value: i64) -> &mut Self { + self.user_count = Some(value); + self + } } impl Default for RoleAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_role_clone.rs b/src/datadogV2/model/model_role_clone.rs index 4043cd252..c9a1c02be 100644 --- a/src/datadogV2/model/model_role_clone.rs +++ b/src/datadogV2/model/model_role_clone.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct RoleClone { /// Attributes required to create a new role by cloning an existing one. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::RoleCloneAttributes, /// Roles type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::RolesType, @@ -18,7 +18,7 @@ pub struct RoleClone { impl RoleClone { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::RoleCloneAttributes, type_: crate::datadogV2::model::RolesType, ) -> RoleClone { RoleClone { attributes, type_ } diff --git a/src/datadogV2/model/model_role_clone_request.rs b/src/datadogV2/model/model_role_clone_request.rs index 96898ecc4..f5cad8630 100644 --- a/src/datadogV2/model/model_role_clone_request.rs +++ b/src/datadogV2/model/model_role_clone_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct RoleCloneRequest { /// Data for the clone role request. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::RoleClone, } impl RoleCloneRequest { - pub fn new(data: Box) -> RoleCloneRequest { + pub fn new(data: crate::datadogV2::model::RoleClone) -> RoleCloneRequest { RoleCloneRequest { data } } } diff --git a/src/datadogV2/model/model_role_create_attributes.rs b/src/datadogV2/model/model_role_create_attributes.rs index 0e90428a3..0ecbdee91 100644 --- a/src/datadogV2/model/model_role_create_attributes.rs +++ b/src/datadogV2/model/model_role_create_attributes.rs @@ -27,4 +27,14 @@ impl RoleCreateAttributes { name, } } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } } diff --git a/src/datadogV2/model/model_role_create_data.rs b/src/datadogV2/model/model_role_create_data.rs index 59475842d..e42dfb4d8 100644 --- a/src/datadogV2/model/model_role_create_data.rs +++ b/src/datadogV2/model/model_role_create_data.rs @@ -10,21 +10,34 @@ use serde_with::skip_serializing_none; pub struct RoleCreateData { /// Attributes of the created role. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::RoleCreateAttributes, /// Relationships of the role object. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Roles type. #[serde(rename = "type")] pub type_: Option, } impl RoleCreateData { - pub fn new(attributes: Box) -> RoleCreateData { + pub fn new(attributes: crate::datadogV2::model::RoleCreateAttributes) -> RoleCreateData { RoleCreateData { attributes, relationships: None, type_: None, } } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::RoleRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::RolesType) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV2/model/model_role_create_request.rs b/src/datadogV2/model/model_role_create_request.rs index bdd541a67..62ea26f98 100644 --- a/src/datadogV2/model/model_role_create_request.rs +++ b/src/datadogV2/model/model_role_create_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct RoleCreateRequest { /// Data related to the creation of a role. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::RoleCreateData, } impl RoleCreateRequest { - pub fn new(data: Box) -> RoleCreateRequest { + pub fn new(data: crate::datadogV2::model::RoleCreateData) -> RoleCreateRequest { RoleCreateRequest { data } } } diff --git a/src/datadogV2/model/model_role_create_response.rs b/src/datadogV2/model/model_role_create_response.rs index 0913a303e..11ff3977d 100644 --- a/src/datadogV2/model/model_role_create_response.rs +++ b/src/datadogV2/model/model_role_create_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct RoleCreateResponse { /// Role object returned by the API. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl RoleCreateResponse { pub fn new() -> RoleCreateResponse { RoleCreateResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::RoleCreateResponseData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for RoleCreateResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_role_create_response_data.rs b/src/datadogV2/model/model_role_create_response_data.rs index 570f9b201..410523c79 100644 --- a/src/datadogV2/model/model_role_create_response_data.rs +++ b/src/datadogV2/model/model_role_create_response_data.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct RoleCreateResponseData { /// Attributes of the created role. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The unique identifier of the role. #[serde(rename = "id")] pub id: Option, /// Relationships of the role object returned by the API. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Roles type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::RolesType, @@ -31,4 +31,25 @@ impl RoleCreateResponseData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::RoleCreateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::RoleResponseRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_role_relationships.rs b/src/datadogV2/model/model_role_relationships.rs index b0b964f42..f055b2f63 100644 --- a/src/datadogV2/model/model_role_relationships.rs +++ b/src/datadogV2/model/model_role_relationships.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct RoleRelationships { /// Relationship to multiple permissions objects. #[serde(rename = "permissions")] - pub permissions: Option>, + pub permissions: Option, /// Relationship to users. #[serde(rename = "users")] - pub users: Option>, + pub users: Option, } impl RoleRelationships { @@ -23,6 +23,19 @@ impl RoleRelationships { users: None, } } + + pub fn with_permissions( + &mut self, + value: crate::datadogV2::model::RelationshipToPermissions, + ) -> &mut Self { + self.permissions = Some(value); + self + } + + pub fn with_users(&mut self, value: crate::datadogV2::model::RelationshipToUsers) -> &mut Self { + self.users = Some(value); + self + } } impl Default for RoleRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_role_response.rs b/src/datadogV2/model/model_role_response.rs index 5b3fc9911..26fd44d9c 100644 --- a/src/datadogV2/model/model_role_response.rs +++ b/src/datadogV2/model/model_role_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct RoleResponse { /// Role object returned by the API. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl RoleResponse { pub fn new() -> RoleResponse { RoleResponse { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::Role) -> &mut Self { + self.data = Some(value); + self + } } impl Default for RoleResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_role_response_relationships.rs b/src/datadogV2/model/model_role_response_relationships.rs index 730ac8fe3..174d47023 100644 --- a/src/datadogV2/model/model_role_response_relationships.rs +++ b/src/datadogV2/model/model_role_response_relationships.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct RoleResponseRelationships { /// Relationship to multiple permissions objects. #[serde(rename = "permissions")] - pub permissions: Option>, + pub permissions: Option, } impl RoleResponseRelationships { pub fn new() -> RoleResponseRelationships { RoleResponseRelationships { permissions: None } } + + pub fn with_permissions( + &mut self, + value: crate::datadogV2::model::RelationshipToPermissions, + ) -> &mut Self { + self.permissions = Some(value); + self + } } impl Default for RoleResponseRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_role_update_attributes.rs b/src/datadogV2/model/model_role_update_attributes.rs index 99e1e92b7..8ef0b9e41 100644 --- a/src/datadogV2/model/model_role_update_attributes.rs +++ b/src/datadogV2/model/model_role_update_attributes.rs @@ -27,6 +27,21 @@ impl RoleUpdateAttributes { name: None, } } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } impl Default for RoleUpdateAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_role_update_data.rs b/src/datadogV2/model/model_role_update_data.rs index 73823c007..5a7a8f1ff 100644 --- a/src/datadogV2/model/model_role_update_data.rs +++ b/src/datadogV2/model/model_role_update_data.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct RoleUpdateData { /// Attributes of the role. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::RoleUpdateAttributes, /// The unique identifier of the role. #[serde(rename = "id")] pub id: String, /// Relationships of the role object. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Roles type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::RolesType, @@ -24,7 +24,7 @@ pub struct RoleUpdateData { impl RoleUpdateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::RoleUpdateAttributes, id: String, type_: crate::datadogV2::model::RolesType, ) -> RoleUpdateData { @@ -35,4 +35,12 @@ impl RoleUpdateData { type_, } } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::RoleRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_role_update_request.rs b/src/datadogV2/model/model_role_update_request.rs index b2881f5d1..43fc19f5c 100644 --- a/src/datadogV2/model/model_role_update_request.rs +++ b/src/datadogV2/model/model_role_update_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct RoleUpdateRequest { /// Data related to the update of a role. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::RoleUpdateData, } impl RoleUpdateRequest { - pub fn new(data: Box) -> RoleUpdateRequest { + pub fn new(data: crate::datadogV2::model::RoleUpdateData) -> RoleUpdateRequest { RoleUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_role_update_response.rs b/src/datadogV2/model/model_role_update_response.rs index 2a70fae73..795c1ea80 100644 --- a/src/datadogV2/model/model_role_update_response.rs +++ b/src/datadogV2/model/model_role_update_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct RoleUpdateResponse { /// Role object returned by the API. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl RoleUpdateResponse { pub fn new() -> RoleUpdateResponse { RoleUpdateResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::RoleUpdateResponseData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for RoleUpdateResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_role_update_response_data.rs b/src/datadogV2/model/model_role_update_response_data.rs index ac5728afd..bbdbdb4ff 100644 --- a/src/datadogV2/model/model_role_update_response_data.rs +++ b/src/datadogV2/model/model_role_update_response_data.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct RoleUpdateResponseData { /// Attributes of the role. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The unique identifier of the role. #[serde(rename = "id")] pub id: Option, /// Relationships of the role object returned by the API. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Roles type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::RolesType, @@ -31,4 +31,25 @@ impl RoleUpdateResponseData { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::RoleUpdateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::RoleResponseRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_roles_response.rs b/src/datadogV2/model/model_roles_response.rs index 742339ef8..9b003a223 100644 --- a/src/datadogV2/model/model_roles_response.rs +++ b/src/datadogV2/model/model_roles_response.rs @@ -13,7 +13,7 @@ pub struct RolesResponse { pub data: Option>, /// Object describing meta attributes of response. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl RolesResponse { @@ -23,6 +23,19 @@ impl RolesResponse { meta: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::ResponseMetaAttributes, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for RolesResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_rule_attributes.rs b/src/datadogV2/model/model_rule_attributes.rs index 87dfef588..c15d1963d 100644 --- a/src/datadogV2/model/model_rule_attributes.rs +++ b/src/datadogV2/model/model_rule_attributes.rs @@ -53,6 +53,60 @@ impl RuleAttributes { scorecard_name: None, } } + + #[allow(deprecated)] + pub fn with_category(&mut self, value: String) -> &mut Self { + self.category = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_custom(&mut self, value: bool) -> &mut Self { + self.custom = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_enabled(&mut self, value: bool) -> &mut Self { + self.enabled = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_owner(&mut self, value: String) -> &mut Self { + self.owner = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_scorecard_name(&mut self, value: String) -> &mut Self { + self.scorecard_name = Some(value); + self + } } impl Default for RuleAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_rule_outcome_relationships.rs b/src/datadogV2/model/model_rule_outcome_relationships.rs index 8179c9582..1a4fa2367 100644 --- a/src/datadogV2/model/model_rule_outcome_relationships.rs +++ b/src/datadogV2/model/model_rule_outcome_relationships.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct RuleOutcomeRelationships { /// The JSON:API relationship to a scorecard outcome. #[serde(rename = "rule")] - pub rule: Option>, + pub rule: Option, } impl RuleOutcomeRelationships { pub fn new() -> RuleOutcomeRelationships { RuleOutcomeRelationships { rule: None } } + + pub fn with_rule( + &mut self, + value: crate::datadogV2::model::RelationshipToOutcome, + ) -> &mut Self { + self.rule = Some(value); + self + } } impl Default for RuleOutcomeRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_aggregate_bucket_value_timeseries_point.rs b/src/datadogV2/model/model_rum_aggregate_bucket_value_timeseries_point.rs index a475e14de..5f570dbf2 100644 --- a/src/datadogV2/model/model_rum_aggregate_bucket_value_timeseries_point.rs +++ b/src/datadogV2/model/model_rum_aggregate_bucket_value_timeseries_point.rs @@ -23,6 +23,16 @@ impl RUMAggregateBucketValueTimeseriesPoint { value: None, } } + + pub fn with_time(&mut self, value: String) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_value(&mut self, value: f64) -> &mut Self { + self.value = Some(value); + self + } } impl Default for RUMAggregateBucketValueTimeseriesPoint { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_aggregate_request.rs b/src/datadogV2/model/model_rum_aggregate_request.rs index a33b3300e..d087df5af 100644 --- a/src/datadogV2/model/model_rum_aggregate_request.rs +++ b/src/datadogV2/model/model_rum_aggregate_request.rs @@ -13,17 +13,17 @@ pub struct RUMAggregateRequest { pub compute: Option>, /// The search and filter query settings. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// The rules for the group by. #[serde(rename = "group_by")] pub group_by: Option>, /// Global query options that are used during the query. /// Note: Only supply timezone or time offset, not both. Otherwise, the query fails. #[serde(rename = "options")] - pub options: Option>, + pub options: Option, /// Paging attributes for listing events. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, } impl RUMAggregateRequest { @@ -36,6 +36,31 @@ impl RUMAggregateRequest { page: None, } } + + pub fn with_compute(&mut self, value: Vec) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn with_filter(&mut self, value: crate::datadogV2::model::RUMQueryFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_group_by(&mut self, value: Vec) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn with_options(&mut self, value: crate::datadogV2::model::RUMQueryOptions) -> &mut Self { + self.options = Some(value); + self + } + + pub fn with_page(&mut self, value: crate::datadogV2::model::RUMQueryPageOptions) -> &mut Self { + self.page = Some(value); + self + } } impl Default for RUMAggregateRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_aggregate_sort.rs b/src/datadogV2/model/model_rum_aggregate_sort.rs index a1c9f0a03..ddfa2c409 100644 --- a/src/datadogV2/model/model_rum_aggregate_sort.rs +++ b/src/datadogV2/model/model_rum_aggregate_sort.rs @@ -31,6 +31,32 @@ impl RUMAggregateSort { type_: None, } } + + pub fn with_aggregation( + &mut self, + value: crate::datadogV2::model::RUMAggregationFunction, + ) -> &mut Self { + self.aggregation = Some(value); + self + } + + pub fn with_metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn with_order(&mut self, value: crate::datadogV2::model::RUMSortOrder) -> &mut Self { + self.order = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::RUMAggregateSortType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for RUMAggregateSort { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_aggregation_buckets_response.rs b/src/datadogV2/model/model_rum_aggregation_buckets_response.rs index fcd5d6bbf..2679c925b 100644 --- a/src/datadogV2/model/model_rum_aggregation_buckets_response.rs +++ b/src/datadogV2/model/model_rum_aggregation_buckets_response.rs @@ -17,6 +17,14 @@ impl RUMAggregationBucketsResponse { pub fn new() -> RUMAggregationBucketsResponse { RUMAggregationBucketsResponse { buckets: None } } + + pub fn with_buckets( + &mut self, + value: Vec, + ) -> &mut Self { + self.buckets = Some(value); + self + } } impl Default for RUMAggregationBucketsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_analytics_aggregate_response.rs b/src/datadogV2/model/model_rum_analytics_aggregate_response.rs index 5f71bb132..562c653e8 100644 --- a/src/datadogV2/model/model_rum_analytics_aggregate_response.rs +++ b/src/datadogV2/model/model_rum_analytics_aggregate_response.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct RUMAnalyticsAggregateResponse { /// The query results. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// Links attributes. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, /// The metadata associated with a request. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl RUMAnalyticsAggregateResponse { @@ -27,6 +27,24 @@ impl RUMAnalyticsAggregateResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::RUMAggregationBucketsResponse, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links(&mut self, value: crate::datadogV2::model::RUMResponseLinks) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::RUMResponseMetadata) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for RUMAnalyticsAggregateResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_application.rs b/src/datadogV2/model/model_rum_application.rs index 62df96ebf..9e846e320 100644 --- a/src/datadogV2/model/model_rum_application.rs +++ b/src/datadogV2/model/model_rum_application.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct RUMApplication { /// RUM application attributes. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::RUMApplicationAttributes, /// RUM application ID. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct RUMApplication { impl RUMApplication { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::RUMApplicationAttributes, id: String, type_: crate::datadogV2::model::RUMApplicationType, ) -> RUMApplication { diff --git a/src/datadogV2/model/model_rum_application_attributes.rs b/src/datadogV2/model/model_rum_application_attributes.rs index 42c18e2b4..7c421bb0b 100644 --- a/src/datadogV2/model/model_rum_application_attributes.rs +++ b/src/datadogV2/model/model_rum_application_attributes.rs @@ -69,4 +69,14 @@ impl RUMApplicationAttributes { updated_by_handle, } } + + pub fn with_hash(&mut self, value: String) -> &mut Self { + self.hash = Some(value); + self + } + + pub fn with_is_active(&mut self, value: bool) -> &mut Self { + self.is_active = Some(value); + self + } } diff --git a/src/datadogV2/model/model_rum_application_create.rs b/src/datadogV2/model/model_rum_application_create.rs index cf5f97f07..88811468d 100644 --- a/src/datadogV2/model/model_rum_application_create.rs +++ b/src/datadogV2/model/model_rum_application_create.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct RUMApplicationCreate { /// RUM application creation attributes. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::RUMApplicationCreateAttributes, /// RUM application creation type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::RUMApplicationCreateType, @@ -18,7 +18,7 @@ pub struct RUMApplicationCreate { impl RUMApplicationCreate { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::RUMApplicationCreateAttributes, type_: crate::datadogV2::model::RUMApplicationCreateType, ) -> RUMApplicationCreate { RUMApplicationCreate { attributes, type_ } diff --git a/src/datadogV2/model/model_rum_application_create_attributes.rs b/src/datadogV2/model/model_rum_application_create_attributes.rs index 165a859d2..7478b229c 100644 --- a/src/datadogV2/model/model_rum_application_create_attributes.rs +++ b/src/datadogV2/model/model_rum_application_create_attributes.rs @@ -20,4 +20,9 @@ impl RUMApplicationCreateAttributes { pub fn new(name: String) -> RUMApplicationCreateAttributes { RUMApplicationCreateAttributes { name, type_: None } } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV2/model/model_rum_application_create_request.rs b/src/datadogV2/model/model_rum_application_create_request.rs index 63a992fd5..0e3f507f6 100644 --- a/src/datadogV2/model/model_rum_application_create_request.rs +++ b/src/datadogV2/model/model_rum_application_create_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct RUMApplicationCreateRequest { /// RUM application creation. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::RUMApplicationCreate, } impl RUMApplicationCreateRequest { - pub fn new( - data: Box, - ) -> RUMApplicationCreateRequest { + pub fn new(data: crate::datadogV2::model::RUMApplicationCreate) -> RUMApplicationCreateRequest { RUMApplicationCreateRequest { data } } } diff --git a/src/datadogV2/model/model_rum_application_list.rs b/src/datadogV2/model/model_rum_application_list.rs index 75290485f..db12d12ac 100644 --- a/src/datadogV2/model/model_rum_application_list.rs +++ b/src/datadogV2/model/model_rum_application_list.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct RUMApplicationList { /// RUM application list attributes. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::RUMApplicationListAttributes, /// RUM application ID. #[serde(rename = "id")] pub id: Option, @@ -21,7 +21,7 @@ pub struct RUMApplicationList { impl RUMApplicationList { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::RUMApplicationListAttributes, type_: crate::datadogV2::model::RUMApplicationListType, ) -> RUMApplicationList { RUMApplicationList { @@ -30,4 +30,9 @@ impl RUMApplicationList { type_, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } } diff --git a/src/datadogV2/model/model_rum_application_list_attributes.rs b/src/datadogV2/model/model_rum_application_list_attributes.rs index 176500626..ec56c1d35 100644 --- a/src/datadogV2/model/model_rum_application_list_attributes.rs +++ b/src/datadogV2/model/model_rum_application_list_attributes.rs @@ -64,4 +64,14 @@ impl RUMApplicationListAttributes { updated_by_handle, } } + + pub fn with_hash(&mut self, value: String) -> &mut Self { + self.hash = Some(value); + self + } + + pub fn with_is_active(&mut self, value: bool) -> &mut Self { + self.is_active = Some(value); + self + } } diff --git a/src/datadogV2/model/model_rum_application_response.rs b/src/datadogV2/model/model_rum_application_response.rs index 87b704c79..1a07b0974 100644 --- a/src/datadogV2/model/model_rum_application_response.rs +++ b/src/datadogV2/model/model_rum_application_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct RUMApplicationResponse { /// RUM application. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl RUMApplicationResponse { pub fn new() -> RUMApplicationResponse { RUMApplicationResponse { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::RUMApplication) -> &mut Self { + self.data = Some(value); + self + } } impl Default for RUMApplicationResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_application_update.rs b/src/datadogV2/model/model_rum_application_update.rs index be5da2dbb..252620282 100644 --- a/src/datadogV2/model/model_rum_application_update.rs +++ b/src/datadogV2/model/model_rum_application_update.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct RUMApplicationUpdate { /// RUM application update attributes. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// RUM application ID. #[serde(rename = "id")] pub id: String, @@ -30,4 +30,12 @@ impl RUMApplicationUpdate { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::RUMApplicationUpdateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } } diff --git a/src/datadogV2/model/model_rum_application_update_attributes.rs b/src/datadogV2/model/model_rum_application_update_attributes.rs index 7eabd71c1..5b6b54f32 100644 --- a/src/datadogV2/model/model_rum_application_update_attributes.rs +++ b/src/datadogV2/model/model_rum_application_update_attributes.rs @@ -23,6 +23,16 @@ impl RUMApplicationUpdateAttributes { type_: None, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for RUMApplicationUpdateAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_application_update_request.rs b/src/datadogV2/model/model_rum_application_update_request.rs index 570937246..cf839edd2 100644 --- a/src/datadogV2/model/model_rum_application_update_request.rs +++ b/src/datadogV2/model/model_rum_application_update_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct RUMApplicationUpdateRequest { /// RUM application update. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::RUMApplicationUpdate, } impl RUMApplicationUpdateRequest { - pub fn new( - data: Box, - ) -> RUMApplicationUpdateRequest { + pub fn new(data: crate::datadogV2::model::RUMApplicationUpdate) -> RUMApplicationUpdateRequest { RUMApplicationUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_rum_applications_response.rs b/src/datadogV2/model/model_rum_applications_response.rs index 7aa4d38e9..248f2cb6b 100644 --- a/src/datadogV2/model/model_rum_applications_response.rs +++ b/src/datadogV2/model/model_rum_applications_response.rs @@ -17,6 +17,14 @@ impl RUMApplicationsResponse { pub fn new() -> RUMApplicationsResponse { RUMApplicationsResponse { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for RUMApplicationsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_bucket_response.rs b/src/datadogV2/model/model_rum_bucket_response.rs index 7a938d81b..3a872e790 100644 --- a/src/datadogV2/model/model_rum_bucket_response.rs +++ b/src/datadogV2/model/model_rum_bucket_response.rs @@ -25,6 +25,19 @@ impl RUMBucketResponse { computes: None, } } + + pub fn with_by(&mut self, value: std::collections::BTreeMap) -> &mut Self { + self.by = Some(value); + self + } + + pub fn with_computes( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.computes = Some(value); + self + } } impl Default for RUMBucketResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_compute.rs b/src/datadogV2/model/model_rum_compute.rs index 885b1fa40..ed80fa513 100644 --- a/src/datadogV2/model/model_rum_compute.rs +++ b/src/datadogV2/model/model_rum_compute.rs @@ -32,4 +32,19 @@ impl RUMCompute { type_: None, } } + + pub fn with_interval(&mut self, value: String) -> &mut Self { + self.interval = Some(value); + self + } + + pub fn with_metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::RUMComputeType) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV2/model/model_rum_event.rs b/src/datadogV2/model/model_rum_event.rs index 174df60ca..f151d29b2 100644 --- a/src/datadogV2/model/model_rum_event.rs +++ b/src/datadogV2/model/model_rum_event.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct RUMEvent { /// JSON object containing all event attributes and their associated values. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Unique ID of the event. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl RUMEvent { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::RUMEventAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::RUMEventType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for RUMEvent { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_event_attributes.rs b/src/datadogV2/model/model_rum_event_attributes.rs index a37b4cf4a..6bd06ff1e 100644 --- a/src/datadogV2/model/model_rum_event_attributes.rs +++ b/src/datadogV2/model/model_rum_event_attributes.rs @@ -33,6 +33,29 @@ impl RUMEventAttributes { timestamp: None, } } + + pub fn with_attributes( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_service(&mut self, value: String) -> &mut Self { + self.service = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_timestamp(&mut self, value: String) -> &mut Self { + self.timestamp = Some(value); + self + } } impl Default for RUMEventAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_events_response.rs b/src/datadogV2/model/model_rum_events_response.rs index 66ecb35df..4415d4937 100644 --- a/src/datadogV2/model/model_rum_events_response.rs +++ b/src/datadogV2/model/model_rum_events_response.rs @@ -13,10 +13,10 @@ pub struct RUMEventsResponse { pub data: Option>, /// Links attributes. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, /// The metadata associated with a request. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl RUMEventsResponse { @@ -27,6 +27,21 @@ impl RUMEventsResponse { meta: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links(&mut self, value: crate::datadogV2::model::RUMResponseLinks) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::RUMResponseMetadata) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for RUMEventsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_group_by.rs b/src/datadogV2/model/model_rum_group_by.rs index 6023f0d61..b3e74b829 100644 --- a/src/datadogV2/model/model_rum_group_by.rs +++ b/src/datadogV2/model/model_rum_group_by.rs @@ -14,19 +14,19 @@ pub struct RUMGroupBy { /// Used to perform a histogram computation (only for measure facets). /// Note: At most 100 buckets are allowed, the number of buckets is (max - min)/interval. #[serde(rename = "histogram")] - pub histogram: Option>, + pub histogram: Option, /// The maximum buckets to return for this group-by. #[serde(rename = "limit")] pub limit: Option, /// The value to use for logs that don't have the facet used to group by. #[serde(rename = "missing")] - pub missing: Option>, + pub missing: Option, /// A sort rule. #[serde(rename = "sort")] - pub sort: Option>, + pub sort: Option, /// A resulting object to put the given computes in over all the matching records. #[serde(rename = "total")] - pub total: Option>, + pub total: Option, } impl RUMGroupBy { @@ -40,4 +40,32 @@ impl RUMGroupBy { total: None, } } + + pub fn with_histogram( + &mut self, + value: crate::datadogV2::model::RUMGroupByHistogram, + ) -> &mut Self { + self.histogram = Some(value); + self + } + + pub fn with_limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_missing(&mut self, value: crate::datadogV2::model::RUMGroupByMissing) -> &mut Self { + self.missing = Some(value); + self + } + + pub fn with_sort(&mut self, value: crate::datadogV2::model::RUMAggregateSort) -> &mut Self { + self.sort = Some(value); + self + } + + pub fn with_total(&mut self, value: crate::datadogV2::model::RUMGroupByTotal) -> &mut Self { + self.total = Some(value); + self + } } diff --git a/src/datadogV2/model/model_rum_query_filter.rs b/src/datadogV2/model/model_rum_query_filter.rs index 7c3c80df4..b259a9615 100644 --- a/src/datadogV2/model/model_rum_query_filter.rs +++ b/src/datadogV2/model/model_rum_query_filter.rs @@ -27,6 +27,21 @@ impl RUMQueryFilter { to: None, } } + + pub fn with_from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_to(&mut self, value: String) -> &mut Self { + self.to = Some(value); + self + } } impl Default for RUMQueryFilter { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_query_options.rs b/src/datadogV2/model/model_rum_query_options.rs index 444314639..aa77dc40f 100644 --- a/src/datadogV2/model/model_rum_query_options.rs +++ b/src/datadogV2/model/model_rum_query_options.rs @@ -24,6 +24,16 @@ impl RUMQueryOptions { timezone: None, } } + + pub fn with_time_offset(&mut self, value: i64) -> &mut Self { + self.time_offset = Some(value); + self + } + + pub fn with_timezone(&mut self, value: String) -> &mut Self { + self.timezone = Some(value); + self + } } impl Default for RUMQueryOptions { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_query_page_options.rs b/src/datadogV2/model/model_rum_query_page_options.rs index c8fed96a4..5be3a3675 100644 --- a/src/datadogV2/model/model_rum_query_page_options.rs +++ b/src/datadogV2/model/model_rum_query_page_options.rs @@ -23,6 +23,16 @@ impl RUMQueryPageOptions { limit: None, } } + + pub fn with_cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + self + } + + pub fn with_limit(&mut self, value: i32) -> &mut Self { + self.limit = Some(value); + self + } } impl Default for RUMQueryPageOptions { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_response_links.rs b/src/datadogV2/model/model_rum_response_links.rs index d2ad2ebc1..b53e2ff1b 100644 --- a/src/datadogV2/model/model_rum_response_links.rs +++ b/src/datadogV2/model/model_rum_response_links.rs @@ -18,6 +18,11 @@ impl RUMResponseLinks { pub fn new() -> RUMResponseLinks { RUMResponseLinks { next: None } } + + pub fn with_next(&mut self, value: String) -> &mut Self { + self.next = Some(value); + self + } } impl Default for RUMResponseLinks { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_response_metadata.rs b/src/datadogV2/model/model_rum_response_metadata.rs index 469a2d111..48d0e65b2 100644 --- a/src/datadogV2/model/model_rum_response_metadata.rs +++ b/src/datadogV2/model/model_rum_response_metadata.rs @@ -13,7 +13,7 @@ pub struct RUMResponseMetadata { pub elapsed: Option, /// Paging attributes. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, /// The identifier of the request. #[serde(rename = "request_id")] pub request_id: Option, @@ -36,6 +36,31 @@ impl RUMResponseMetadata { warnings: None, } } + + pub fn with_elapsed(&mut self, value: i64) -> &mut Self { + self.elapsed = Some(value); + self + } + + pub fn with_page(&mut self, value: crate::datadogV2::model::RUMResponsePage) -> &mut Self { + self.page = Some(value); + self + } + + pub fn with_request_id(&mut self, value: String) -> &mut Self { + self.request_id = Some(value); + self + } + + pub fn with_status(&mut self, value: crate::datadogV2::model::RUMResponseStatus) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_warnings(&mut self, value: Vec) -> &mut Self { + self.warnings = Some(value); + self + } } impl Default for RUMResponseMetadata { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_response_page.rs b/src/datadogV2/model/model_rum_response_page.rs index 1b6da731d..7474f3dfa 100644 --- a/src/datadogV2/model/model_rum_response_page.rs +++ b/src/datadogV2/model/model_rum_response_page.rs @@ -17,6 +17,11 @@ impl RUMResponsePage { pub fn new() -> RUMResponsePage { RUMResponsePage { after: None } } + + pub fn with_after(&mut self, value: String) -> &mut Self { + self.after = Some(value); + self + } } impl Default for RUMResponsePage { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_search_events_request.rs b/src/datadogV2/model/model_rum_search_events_request.rs index e825e4303..b34411464 100644 --- a/src/datadogV2/model/model_rum_search_events_request.rs +++ b/src/datadogV2/model/model_rum_search_events_request.rs @@ -10,14 +10,14 @@ use serde_with::skip_serializing_none; pub struct RUMSearchEventsRequest { /// The search and filter query settings. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// Global query options that are used during the query. /// Note: Only supply timezone or time offset, not both. Otherwise, the query fails. #[serde(rename = "options")] - pub options: Option>, + pub options: Option, /// Paging attributes for listing events. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, /// Sort parameters when querying events. #[serde(rename = "sort")] pub sort: Option, @@ -32,6 +32,26 @@ impl RUMSearchEventsRequest { sort: None, } } + + pub fn with_filter(&mut self, value: crate::datadogV2::model::RUMQueryFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_options(&mut self, value: crate::datadogV2::model::RUMQueryOptions) -> &mut Self { + self.options = Some(value); + self + } + + pub fn with_page(&mut self, value: crate::datadogV2::model::RUMQueryPageOptions) -> &mut Self { + self.page = Some(value); + self + } + + pub fn with_sort(&mut self, value: crate::datadogV2::model::RUMSort) -> &mut Self { + self.sort = Some(value); + self + } } impl Default for RUMSearchEventsRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_rum_warning.rs b/src/datadogV2/model/model_rum_warning.rs index 9b1f92132..c15cb6257 100644 --- a/src/datadogV2/model/model_rum_warning.rs +++ b/src/datadogV2/model/model_rum_warning.rs @@ -27,6 +27,21 @@ impl RUMWarning { title: None, } } + + pub fn with_code(&mut self, value: String) -> &mut Self { + self.code = Some(value); + self + } + + pub fn with_detail(&mut self, value: String) -> &mut Self { + self.detail = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } } impl Default for RUMWarning { fn default() -> Self { diff --git a/src/datadogV2/model/model_saml_assertion_attribute.rs b/src/datadogV2/model/model_saml_assertion_attribute.rs index 01c96c017..99dcf9e98 100644 --- a/src/datadogV2/model/model_saml_assertion_attribute.rs +++ b/src/datadogV2/model/model_saml_assertion_attribute.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SAMLAssertionAttribute { /// Key/Value pair of attributes used in SAML assertion attributes. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The ID of the SAML assertion attribute. #[serde(rename = "id")] pub id: String, @@ -30,4 +30,12 @@ impl SAMLAssertionAttribute { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::SAMLAssertionAttributeAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } } diff --git a/src/datadogV2/model/model_saml_assertion_attribute_attributes.rs b/src/datadogV2/model/model_saml_assertion_attribute_attributes.rs index a4bb6250c..04c083b77 100644 --- a/src/datadogV2/model/model_saml_assertion_attribute_attributes.rs +++ b/src/datadogV2/model/model_saml_assertion_attribute_attributes.rs @@ -23,6 +23,16 @@ impl SAMLAssertionAttributeAttributes { attribute_value: None, } } + + pub fn with_attribute_key(&mut self, value: String) -> &mut Self { + self.attribute_key = Some(value); + self + } + + pub fn with_attribute_value(&mut self, value: String) -> &mut Self { + self.attribute_value = Some(value); + self + } } impl Default for SAMLAssertionAttributeAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_scalar_column.rs b/src/datadogV2/model/model_scalar_column.rs index c841a07b6..fa21de9a6 100644 --- a/src/datadogV2/model/model_scalar_column.rs +++ b/src/datadogV2/model/model_scalar_column.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ScalarColumn { - GroupScalarColumn(Box), - DataScalarColumn(Box), + GroupScalarColumn(crate::datadogV2::model::GroupScalarColumn), + DataScalarColumn(crate::datadogV2::model::DataScalarColumn), } diff --git a/src/datadogV2/model/model_scalar_formula_query_request.rs b/src/datadogV2/model/model_scalar_formula_query_request.rs index 98e30d432..a57f25169 100644 --- a/src/datadogV2/model/model_scalar_formula_query_request.rs +++ b/src/datadogV2/model/model_scalar_formula_query_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct ScalarFormulaQueryRequest { /// A single scalar query to be executed. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::ScalarFormulaRequest, } impl ScalarFormulaQueryRequest { - pub fn new( - data: Box, - ) -> ScalarFormulaQueryRequest { + pub fn new(data: crate::datadogV2::model::ScalarFormulaRequest) -> ScalarFormulaQueryRequest { ScalarFormulaQueryRequest { data } } } diff --git a/src/datadogV2/model/model_scalar_formula_query_response.rs b/src/datadogV2/model/model_scalar_formula_query_response.rs index ede9bf0ce..7fc5f5143 100644 --- a/src/datadogV2/model/model_scalar_formula_query_response.rs +++ b/src/datadogV2/model/model_scalar_formula_query_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ScalarFormulaQueryResponse { /// A message containing the response to a scalar query. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// An error generated when processing a request. #[serde(rename = "errors")] pub errors: Option, @@ -23,6 +23,16 @@ impl ScalarFormulaQueryResponse { errors: None, } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::ScalarResponse) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_errors(&mut self, value: String) -> &mut Self { + self.errors = Some(value); + self + } } impl Default for ScalarFormulaQueryResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_scalar_formula_request.rs b/src/datadogV2/model/model_scalar_formula_request.rs index a85fc28b0..286957b6c 100644 --- a/src/datadogV2/model/model_scalar_formula_request.rs +++ b/src/datadogV2/model/model_scalar_formula_request.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ScalarFormulaRequest { /// The object describing a scalar formula request. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::ScalarFormulaRequestAttributes, /// The type of the resource. The value should always be scalar_request. #[serde(rename = "type")] pub type_: crate::datadogV2::model::ScalarFormulaRequestType, @@ -18,7 +18,7 @@ pub struct ScalarFormulaRequest { impl ScalarFormulaRequest { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::ScalarFormulaRequestAttributes, type_: crate::datadogV2::model::ScalarFormulaRequestType, ) -> ScalarFormulaRequest { ScalarFormulaRequest { attributes, type_ } diff --git a/src/datadogV2/model/model_scalar_formula_request_attributes.rs b/src/datadogV2/model/model_scalar_formula_request_attributes.rs index e6591334c..663154a4a 100644 --- a/src/datadogV2/model/model_scalar_formula_request_attributes.rs +++ b/src/datadogV2/model/model_scalar_formula_request_attributes.rs @@ -35,4 +35,12 @@ impl ScalarFormulaRequestAttributes { to, } } + + pub fn with_formulas( + &mut self, + value: Vec, + ) -> &mut Self { + self.formulas = Some(value); + self + } } diff --git a/src/datadogV2/model/model_scalar_formula_response_atrributes.rs b/src/datadogV2/model/model_scalar_formula_response_atrributes.rs index 335df8a57..e5489e646 100644 --- a/src/datadogV2/model/model_scalar_formula_response_atrributes.rs +++ b/src/datadogV2/model/model_scalar_formula_response_atrributes.rs @@ -17,6 +17,11 @@ impl ScalarFormulaResponseAtrributes { pub fn new() -> ScalarFormulaResponseAtrributes { ScalarFormulaResponseAtrributes { columns: None } } + + pub fn with_columns(&mut self, value: Vec) -> &mut Self { + self.columns = Some(value); + self + } } impl Default for ScalarFormulaResponseAtrributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_scalar_meta.rs b/src/datadogV2/model/model_scalar_meta.rs index 1434bb880..004b47c9d 100644 --- a/src/datadogV2/model/model_scalar_meta.rs +++ b/src/datadogV2/model/model_scalar_meta.rs @@ -20,6 +20,14 @@ impl ScalarMeta { pub fn new() -> ScalarMeta { ScalarMeta { unit: None } } + + pub fn with_unit( + &mut self, + value: Option>>, + ) -> &mut Self { + self.unit = Some(value); + self + } } impl Default for ScalarMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_scalar_query.rs b/src/datadogV2/model/model_scalar_query.rs index d79190a48..f295ba00a 100644 --- a/src/datadogV2/model/model_scalar_query.rs +++ b/src/datadogV2/model/model_scalar_query.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ScalarQuery { - MetricsScalarQuery(Box), - EventsScalarQuery(Box), + MetricsScalarQuery(crate::datadogV2::model::MetricsScalarQuery), + EventsScalarQuery(crate::datadogV2::model::EventsScalarQuery), } diff --git a/src/datadogV2/model/model_scalar_response.rs b/src/datadogV2/model/model_scalar_response.rs index 99313c07c..39cebb3cf 100644 --- a/src/datadogV2/model/model_scalar_response.rs +++ b/src/datadogV2/model/model_scalar_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ScalarResponse { /// The object describing a scalar response. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The type of the resource. The value should always be scalar_response. #[serde(rename = "type")] pub type_: Option, @@ -23,6 +23,22 @@ impl ScalarResponse { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::ScalarFormulaResponseAtrributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::ScalarFormulaResponseType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for ScalarResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_filter.rs b/src/datadogV2/model/model_security_filter.rs index 4180c3a4d..81cfa87ed 100644 --- a/src/datadogV2/model/model_security_filter.rs +++ b/src/datadogV2/model/model_security_filter.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SecurityFilter { /// The object describing a security filter. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The ID of the security filter. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl SecurityFilter { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::SecurityFilterAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::SecurityFilterType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SecurityFilter { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_filter_attributes.rs b/src/datadogV2/model/model_security_filter_attributes.rs index 1c0fc27fb..33fb50ea1 100644 --- a/src/datadogV2/model/model_security_filter_attributes.rs +++ b/src/datadogV2/model/model_security_filter_attributes.rs @@ -44,6 +44,47 @@ impl SecurityFilterAttributes { version: None, } } + + pub fn with_exclusion_filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.exclusion_filters = Some(value); + self + } + + pub fn with_filtered_data_type( + &mut self, + value: crate::datadogV2::model::SecurityFilterFilteredDataType, + ) -> &mut Self { + self.filtered_data_type = Some(value); + self + } + + pub fn with_is_builtin(&mut self, value: bool) -> &mut Self { + self.is_builtin = Some(value); + self + } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_version(&mut self, value: i32) -> &mut Self { + self.version = Some(value); + self + } } impl Default for SecurityFilterAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_filter_create_data.rs b/src/datadogV2/model/model_security_filter_create_data.rs index f03a05769..7d313dc6d 100644 --- a/src/datadogV2/model/model_security_filter_create_data.rs +++ b/src/datadogV2/model/model_security_filter_create_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SecurityFilterCreateData { /// Object containing the attributes of the security filter to be created. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::SecurityFilterCreateAttributes, /// The type of the resource. The value should always be `security_filters`. #[serde(rename = "type")] pub type_: crate::datadogV2::model::SecurityFilterType, @@ -18,7 +18,7 @@ pub struct SecurityFilterCreateData { impl SecurityFilterCreateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::SecurityFilterCreateAttributes, type_: crate::datadogV2::model::SecurityFilterType, ) -> SecurityFilterCreateData { SecurityFilterCreateData { attributes, type_ } diff --git a/src/datadogV2/model/model_security_filter_create_request.rs b/src/datadogV2/model/model_security_filter_create_request.rs index a54cd056d..1a58fe13a 100644 --- a/src/datadogV2/model/model_security_filter_create_request.rs +++ b/src/datadogV2/model/model_security_filter_create_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct SecurityFilterCreateRequest { /// Object for a single security filter. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::SecurityFilterCreateData, } impl SecurityFilterCreateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::SecurityFilterCreateData, ) -> SecurityFilterCreateRequest { SecurityFilterCreateRequest { data } } diff --git a/src/datadogV2/model/model_security_filter_exclusion_filter_response.rs b/src/datadogV2/model/model_security_filter_exclusion_filter_response.rs index 4fda789ae..33c99fdba 100644 --- a/src/datadogV2/model/model_security_filter_exclusion_filter_response.rs +++ b/src/datadogV2/model/model_security_filter_exclusion_filter_response.rs @@ -23,6 +23,16 @@ impl SecurityFilterExclusionFilterResponse { query: None, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } } impl Default for SecurityFilterExclusionFilterResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_filter_meta.rs b/src/datadogV2/model/model_security_filter_meta.rs index 3b26e5297..9280edb42 100644 --- a/src/datadogV2/model/model_security_filter_meta.rs +++ b/src/datadogV2/model/model_security_filter_meta.rs @@ -17,6 +17,11 @@ impl SecurityFilterMeta { pub fn new() -> SecurityFilterMeta { SecurityFilterMeta { warning: None } } + + pub fn with_warning(&mut self, value: String) -> &mut Self { + self.warning = Some(value); + self + } } impl Default for SecurityFilterMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_filter_response.rs b/src/datadogV2/model/model_security_filter_response.rs index baaf019f2..e3bc2a4c0 100644 --- a/src/datadogV2/model/model_security_filter_response.rs +++ b/src/datadogV2/model/model_security_filter_response.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct SecurityFilterResponse { /// The security filter's properties. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// Optional metadata associated to the response. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl SecurityFilterResponse { @@ -23,6 +23,16 @@ impl SecurityFilterResponse { meta: None, } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::SecurityFilter) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::SecurityFilterMeta) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for SecurityFilterResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_filter_update_attributes.rs b/src/datadogV2/model/model_security_filter_update_attributes.rs index 369dd97b7..4579d7f85 100644 --- a/src/datadogV2/model/model_security_filter_update_attributes.rs +++ b/src/datadogV2/model/model_security_filter_update_attributes.rs @@ -39,6 +39,42 @@ impl SecurityFilterUpdateAttributes { version: None, } } + + pub fn with_exclusion_filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.exclusion_filters = Some(value); + self + } + + pub fn with_filtered_data_type( + &mut self, + value: crate::datadogV2::model::SecurityFilterFilteredDataType, + ) -> &mut Self { + self.filtered_data_type = Some(value); + self + } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_version(&mut self, value: i32) -> &mut Self { + self.version = Some(value); + self + } } impl Default for SecurityFilterUpdateAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_filter_update_data.rs b/src/datadogV2/model/model_security_filter_update_data.rs index 760c5ed34..a8b847b70 100644 --- a/src/datadogV2/model/model_security_filter_update_data.rs +++ b/src/datadogV2/model/model_security_filter_update_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SecurityFilterUpdateData { /// The security filters properties to be updated. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::SecurityFilterUpdateAttributes, /// The type of the resource. The value should always be `security_filters`. #[serde(rename = "type")] pub type_: crate::datadogV2::model::SecurityFilterType, @@ -18,7 +18,7 @@ pub struct SecurityFilterUpdateData { impl SecurityFilterUpdateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::SecurityFilterUpdateAttributes, type_: crate::datadogV2::model::SecurityFilterType, ) -> SecurityFilterUpdateData { SecurityFilterUpdateData { attributes, type_ } diff --git a/src/datadogV2/model/model_security_filter_update_request.rs b/src/datadogV2/model/model_security_filter_update_request.rs index a2f2ba2ab..8a90dd048 100644 --- a/src/datadogV2/model/model_security_filter_update_request.rs +++ b/src/datadogV2/model/model_security_filter_update_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct SecurityFilterUpdateRequest { /// The new security filter properties. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::SecurityFilterUpdateData, } impl SecurityFilterUpdateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::SecurityFilterUpdateData, ) -> SecurityFilterUpdateRequest { SecurityFilterUpdateRequest { data } } diff --git a/src/datadogV2/model/model_security_filters_response.rs b/src/datadogV2/model/model_security_filters_response.rs index 051b4f086..26f161ada 100644 --- a/src/datadogV2/model/model_security_filters_response.rs +++ b/src/datadogV2/model/model_security_filters_response.rs @@ -13,7 +13,7 @@ pub struct SecurityFiltersResponse { pub data: Option>, /// Optional metadata associated to the response. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl SecurityFiltersResponse { @@ -23,6 +23,16 @@ impl SecurityFiltersResponse { meta: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::SecurityFilterMeta) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for SecurityFiltersResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_filter.rs b/src/datadogV2/model/model_security_monitoring_filter.rs index 1c706189a..59337c15d 100644 --- a/src/datadogV2/model/model_security_monitoring_filter.rs +++ b/src/datadogV2/model/model_security_monitoring_filter.rs @@ -23,6 +23,19 @@ impl SecurityMonitoringFilter { query: None, } } + + pub fn with_action( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringFilterAction, + ) -> &mut Self { + self.action = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } } impl Default for SecurityMonitoringFilter { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_list_rules_response.rs b/src/datadogV2/model/model_security_monitoring_list_rules_response.rs index 60b8df35e..7fafcf00b 100644 --- a/src/datadogV2/model/model_security_monitoring_list_rules_response.rs +++ b/src/datadogV2/model/model_security_monitoring_list_rules_response.rs @@ -13,7 +13,7 @@ pub struct SecurityMonitoringListRulesResponse { pub data: Option>, /// Object describing meta attributes of response. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl SecurityMonitoringListRulesResponse { @@ -23,6 +23,22 @@ impl SecurityMonitoringListRulesResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::ResponseMetaAttributes, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for SecurityMonitoringListRulesResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_rule_case.rs b/src/datadogV2/model/model_security_monitoring_rule_case.rs index 91cc1a0db..15deeed5f 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_case.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_case.rs @@ -32,6 +32,29 @@ impl SecurityMonitoringRuleCase { status: None, } } + + pub fn with_condition(&mut self, value: String) -> &mut Self { + self.condition = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_notifications(&mut self, value: Vec) -> &mut Self { + self.notifications = Some(value); + self + } + + pub fn with_status( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleSeverity, + ) -> &mut Self { + self.status = Some(value); + self + } } impl Default for SecurityMonitoringRuleCase { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_rule_case_create.rs b/src/datadogV2/model/model_security_monitoring_rule_case_create.rs index e1e88f038..30b13ea98 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_case_create.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_case_create.rs @@ -34,4 +34,19 @@ impl SecurityMonitoringRuleCaseCreate { status, } } + + pub fn with_condition(&mut self, value: String) -> &mut Self { + self.condition = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_notifications(&mut self, value: Vec) -> &mut Self { + self.notifications = Some(value); + self + } } diff --git a/src/datadogV2/model/model_security_monitoring_rule_create_payload.rs b/src/datadogV2/model/model_security_monitoring_rule_create_payload.rs index 47d9a883a..26153cdcd 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_create_payload.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_create_payload.rs @@ -8,12 +8,12 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum SecurityMonitoringRuleCreatePayload { SecurityMonitoringStandardRuleCreatePayload( - Box, + crate::datadogV2::model::SecurityMonitoringStandardRuleCreatePayload, ), SecurityMonitoringSignalRuleCreatePayload( - Box, + crate::datadogV2::model::SecurityMonitoringSignalRuleCreatePayload, ), CloudConfigurationRuleCreatePayload( - Box, + crate::datadogV2::model::CloudConfigurationRuleCreatePayload, ), } diff --git a/src/datadogV2/model/model_security_monitoring_rule_impossible_travel_options.rs b/src/datadogV2/model/model_security_monitoring_rule_impossible_travel_options.rs index 2175f6a37..cead6ceba 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_impossible_travel_options.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_impossible_travel_options.rs @@ -20,6 +20,11 @@ impl SecurityMonitoringRuleImpossibleTravelOptions { baseline_user_locations: None, } } + + pub fn with_baseline_user_locations(&mut self, value: bool) -> &mut Self { + self.baseline_user_locations = Some(value); + self + } } impl Default for SecurityMonitoringRuleImpossibleTravelOptions { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_rule_new_value_options.rs b/src/datadogV2/model/model_security_monitoring_rule_new_value_options.rs index 6843849a3..813100820 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_new_value_options.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_new_value_options.rs @@ -36,6 +36,38 @@ impl SecurityMonitoringRuleNewValueOptions { learning_threshold: None, } } + + pub fn with_forget_after( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleNewValueOptionsForgetAfter, + ) -> &mut Self { + self.forget_after = Some(value); + self + } + + pub fn with_learning_duration( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleNewValueOptionsLearningDuration, + ) -> &mut Self { + self.learning_duration = Some(value); + self + } + + pub fn with_learning_method( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleNewValueOptionsLearningMethod, + ) -> &mut Self { + self.learning_method = Some(value); + self + } + + pub fn with_learning_threshold( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleNewValueOptionsLearningThreshold, + ) -> &mut Self { + self.learning_threshold = Some(value); + self + } } impl Default for SecurityMonitoringRuleNewValueOptions { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_rule_options.rs b/src/datadogV2/model/model_security_monitoring_rule_options.rs index 36b79aaef..2f03f64e4 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_options.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_options.rs @@ -13,7 +13,7 @@ pub struct SecurityMonitoringRuleOptions { /// #[serde(rename = "complianceRuleOptions")] pub compliance_rule_options: - Option>, + Option, /// If true, signals in non-production environments have a lower severity than what is defined by the rule case, which can reduce signal noise. /// The severity is decreased by one level: `CRITICAL` in production becomes `HIGH` in non-production, `HIGH` becomes `MEDIUM` and so on. `INFO` remains `INFO`. /// The decrement is applied when the environment tag of the signal starts with `staging`, `test` or `dev`. @@ -33,7 +33,7 @@ pub struct SecurityMonitoringRuleOptions { /// Options on impossible travel rules. #[serde(rename = "impossibleTravelOptions")] pub impossible_travel_options: - Option>, + Option, /// Once a signal is generated, the signal will remain “open” if a case is matched at least once within /// this keep alive window. #[serde(rename = "keepAlive")] @@ -45,12 +45,11 @@ pub struct SecurityMonitoringRuleOptions { Option, /// Options on new value rules. #[serde(rename = "newValueOptions")] - pub new_value_options: - Option>, + pub new_value_options: Option, /// Options on third party rules. #[serde(rename = "thirdPartyRuleOptions")] pub third_party_rule_options: - Option>, + Option, } impl SecurityMonitoringRuleOptions { @@ -68,6 +67,83 @@ impl SecurityMonitoringRuleOptions { third_party_rule_options: None, } } + + pub fn with_compliance_rule_options( + &mut self, + value: crate::datadogV2::model::CloudConfigurationComplianceRuleOptions, + ) -> &mut Self { + self.compliance_rule_options = Some(value); + self + } + + pub fn with_decrease_criticality_based_on_env(&mut self, value: bool) -> &mut Self { + self.decrease_criticality_based_on_env = Some(value); + self + } + + pub fn with_detection_method( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleDetectionMethod, + ) -> &mut Self { + self.detection_method = Some(value); + self + } + + pub fn with_evaluation_window( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleEvaluationWindow, + ) -> &mut Self { + self.evaluation_window = Some(value); + self + } + + pub fn with_hardcoded_evaluator_type( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleHardcodedEvaluatorType, + ) -> &mut Self { + self.hardcoded_evaluator_type = Some(value); + self + } + + pub fn with_impossible_travel_options( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleImpossibleTravelOptions, + ) -> &mut Self { + self.impossible_travel_options = Some(value); + self + } + + pub fn with_keep_alive( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleKeepAlive, + ) -> &mut Self { + self.keep_alive = Some(value); + self + } + + pub fn with_max_signal_duration( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleMaxSignalDuration, + ) -> &mut Self { + self.max_signal_duration = Some(value); + self + } + + pub fn with_new_value_options( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleNewValueOptions, + ) -> &mut Self { + self.new_value_options = Some(value); + self + } + + pub fn with_third_party_rule_options( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleThirdPartyOptions, + ) -> &mut Self { + self.third_party_rule_options = Some(value); + self + } } impl Default for SecurityMonitoringRuleOptions { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_rule_query.rs b/src/datadogV2/model/model_security_monitoring_rule_query.rs index 7de2724ea..7e999684b 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_query.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_query.rs @@ -8,9 +8,7 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum SecurityMonitoringRuleQuery { SecurityMonitoringStandardRuleQuery( - Box, - ), - SecurityMonitoringSignalRuleQuery( - Box, + crate::datadogV2::model::SecurityMonitoringStandardRuleQuery, ), + SecurityMonitoringSignalRuleQuery(crate::datadogV2::model::SecurityMonitoringSignalRuleQuery), } diff --git a/src/datadogV2/model/model_security_monitoring_rule_response.rs b/src/datadogV2/model/model_security_monitoring_rule_response.rs index 1064bb086..6f1ef40a4 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_response.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_response.rs @@ -8,9 +8,9 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum SecurityMonitoringRuleResponse { SecurityMonitoringStandardRuleResponse( - Box, + crate::datadogV2::model::SecurityMonitoringStandardRuleResponse, ), SecurityMonitoringSignalRuleResponse( - Box, + crate::datadogV2::model::SecurityMonitoringSignalRuleResponse, ), } diff --git a/src/datadogV2/model/model_security_monitoring_rule_third_party_options.rs b/src/datadogV2/model/model_security_monitoring_rule_third_party_options.rs index b72bb0e74..17320ef45 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_third_party_options.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_third_party_options.rs @@ -31,6 +31,32 @@ impl SecurityMonitoringRuleThirdPartyOptions { signal_title_template: None, } } + + pub fn with_default_notifications(&mut self, value: Vec) -> &mut Self { + self.default_notifications = Some(value); + self + } + + pub fn with_default_status( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleSeverity, + ) -> &mut Self { + self.default_status = Some(value); + self + } + + pub fn with_root_queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.root_queries = Some(value); + self + } + + pub fn with_signal_title_template(&mut self, value: String) -> &mut Self { + self.signal_title_template = Some(value); + self + } } impl Default for SecurityMonitoringRuleThirdPartyOptions { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_rule_update_payload.rs b/src/datadogV2/model/model_security_monitoring_rule_update_payload.rs index 0eb9e034f..dff3f5a53 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_update_payload.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_update_payload.rs @@ -14,7 +14,7 @@ pub struct SecurityMonitoringRuleUpdatePayload { /// How to generate compliance signals. Useful for cloud_configuration rules only. #[serde(rename = "complianceSignalOptions")] pub compliance_signal_options: - Option>, + Option, /// Additional queries to filter matched events before they are processed. #[serde(rename = "filters")] pub filters: Option>, @@ -32,7 +32,7 @@ pub struct SecurityMonitoringRuleUpdatePayload { pub name: Option, /// Options on rules. #[serde(rename = "options")] - pub options: Option>, + pub options: Option, /// Queries for selecting logs which are part of the rule. #[serde(rename = "queries")] pub queries: Option>, @@ -65,6 +65,84 @@ impl SecurityMonitoringRuleUpdatePayload { version: None, } } + + pub fn with_cases( + &mut self, + value: Vec, + ) -> &mut Self { + self.cases = Some(value); + self + } + + pub fn with_compliance_signal_options( + &mut self, + value: crate::datadogV2::model::CloudConfigurationRuleComplianceSignalOptions, + ) -> &mut Self { + self.compliance_signal_options = Some(value); + self + } + + pub fn with_filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.filters = Some(value); + self + } + + pub fn with_has_extended_title(&mut self, value: bool) -> &mut Self { + self.has_extended_title = Some(value); + self + } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_options( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleOptions, + ) -> &mut Self { + self.options = Some(value); + self + } + + pub fn with_queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_third_party_cases( + &mut self, + value: Vec, + ) -> &mut Self { + self.third_party_cases = Some(value); + self + } + + pub fn with_version(&mut self, value: i32) -> &mut Self { + self.version = Some(value); + self + } } impl Default for SecurityMonitoringRuleUpdatePayload { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_signal.rs b/src/datadogV2/model/model_security_monitoring_signal.rs index 233c986ef..b94832c85 100644 --- a/src/datadogV2/model/model_security_monitoring_signal.rs +++ b/src/datadogV2/model/model_security_monitoring_signal.rs @@ -11,7 +11,7 @@ pub struct SecurityMonitoringSignal { /// The object containing all signal attributes and their /// associated values. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The unique ID of the security signal. #[serde(rename = "id")] pub id: Option, @@ -28,6 +28,27 @@ impl SecurityMonitoringSignal { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SecurityMonitoringSignal { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_signal_assignee_update_attributes.rs b/src/datadogV2/model/model_security_monitoring_signal_assignee_update_attributes.rs index 5f2c5f897..2ae8c9859 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_assignee_update_attributes.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_assignee_update_attributes.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SecurityMonitoringSignalAssigneeUpdateAttributes { /// Object representing a given user entity. #[serde(rename = "assignee")] - pub assignee: Box, + pub assignee: crate::datadogV2::model::SecurityMonitoringTriageUser, /// Version of the updated signal. If server side version is higher, update will be rejected. #[serde(rename = "version")] pub version: Option, @@ -18,11 +18,16 @@ pub struct SecurityMonitoringSignalAssigneeUpdateAttributes { impl SecurityMonitoringSignalAssigneeUpdateAttributes { pub fn new( - assignee: Box, + assignee: crate::datadogV2::model::SecurityMonitoringTriageUser, ) -> SecurityMonitoringSignalAssigneeUpdateAttributes { SecurityMonitoringSignalAssigneeUpdateAttributes { assignee, version: None, } } + + pub fn with_version(&mut self, value: i64) -> &mut Self { + self.version = Some(value); + self + } } diff --git a/src/datadogV2/model/model_security_monitoring_signal_assignee_update_data.rs b/src/datadogV2/model/model_security_monitoring_signal_assignee_update_data.rs index f5f6684e8..12e3cf4d8 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_assignee_update_data.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_assignee_update_data.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct SecurityMonitoringSignalAssigneeUpdateData { /// Attributes describing the new assignee of a security signal. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::SecurityMonitoringSignalAssigneeUpdateAttributes, } impl SecurityMonitoringSignalAssigneeUpdateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::SecurityMonitoringSignalAssigneeUpdateAttributes, ) -> SecurityMonitoringSignalAssigneeUpdateData { SecurityMonitoringSignalAssigneeUpdateData { attributes } } diff --git a/src/datadogV2/model/model_security_monitoring_signal_assignee_update_request.rs b/src/datadogV2/model/model_security_monitoring_signal_assignee_update_request.rs index 7dff2da20..8dadddfbe 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_assignee_update_request.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_assignee_update_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct SecurityMonitoringSignalAssigneeUpdateRequest { /// Data containing the patch for changing the assignee of a signal. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::SecurityMonitoringSignalAssigneeUpdateData, } impl SecurityMonitoringSignalAssigneeUpdateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::SecurityMonitoringSignalAssigneeUpdateData, ) -> SecurityMonitoringSignalAssigneeUpdateRequest { SecurityMonitoringSignalAssigneeUpdateRequest { data } } diff --git a/src/datadogV2/model/model_security_monitoring_signal_attributes.rs b/src/datadogV2/model/model_security_monitoring_signal_attributes.rs index 65583ef15..37bb906ee 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_attributes.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_attributes.rs @@ -35,6 +35,29 @@ impl SecurityMonitoringSignalAttributes { additional_properties: std::collections::BTreeMap::new(), } } + + pub fn with_custom( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.custom = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_timestamp(&mut self, value: String) -> &mut Self { + self.timestamp = Some(value); + self + } } impl Default for SecurityMonitoringSignalAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_signal_incidents_update_attributes.rs b/src/datadogV2/model/model_security_monitoring_signal_incidents_update_attributes.rs index 50d077f70..5ead9bdfb 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_incidents_update_attributes.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_incidents_update_attributes.rs @@ -23,4 +23,9 @@ impl SecurityMonitoringSignalIncidentsUpdateAttributes { version: None, } } + + pub fn with_version(&mut self, value: i64) -> &mut Self { + self.version = Some(value); + self + } } diff --git a/src/datadogV2/model/model_security_monitoring_signal_incidents_update_data.rs b/src/datadogV2/model/model_security_monitoring_signal_incidents_update_data.rs index 929c25161..d00a418ed 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_incidents_update_data.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_incidents_update_data.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct SecurityMonitoringSignalIncidentsUpdateData { /// Attributes describing the new list of related signals for a security signal. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::SecurityMonitoringSignalIncidentsUpdateAttributes, } impl SecurityMonitoringSignalIncidentsUpdateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::SecurityMonitoringSignalIncidentsUpdateAttributes, ) -> SecurityMonitoringSignalIncidentsUpdateData { SecurityMonitoringSignalIncidentsUpdateData { attributes } } diff --git a/src/datadogV2/model/model_security_monitoring_signal_incidents_update_request.rs b/src/datadogV2/model/model_security_monitoring_signal_incidents_update_request.rs index 61d6ebe32..6a94f297a 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_incidents_update_request.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_incidents_update_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct SecurityMonitoringSignalIncidentsUpdateRequest { /// Data containing the patch for changing the related incidents of a signal. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::SecurityMonitoringSignalIncidentsUpdateData, } impl SecurityMonitoringSignalIncidentsUpdateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::SecurityMonitoringSignalIncidentsUpdateData, ) -> SecurityMonitoringSignalIncidentsUpdateRequest { SecurityMonitoringSignalIncidentsUpdateRequest { data } } diff --git a/src/datadogV2/model/model_security_monitoring_signal_list_request.rs b/src/datadogV2/model/model_security_monitoring_signal_list_request.rs index e26f187bb..c0f96b652 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_list_request.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_list_request.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct SecurityMonitoringSignalListRequest { /// Search filters for listing security signals. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// The paging attributes for listing security signals. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, /// The sort parameters used for querying security signals. #[serde(rename = "sort")] pub sort: Option, @@ -27,6 +27,30 @@ impl SecurityMonitoringSignalListRequest { sort: None, } } + + pub fn with_filter( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalListRequestFilter, + ) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_page( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalListRequestPage, + ) -> &mut Self { + self.page = Some(value); + self + } + + pub fn with_sort( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalsSort, + ) -> &mut Self { + self.sort = Some(value); + self + } } impl Default for SecurityMonitoringSignalListRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_signal_list_request_filter.rs b/src/datadogV2/model/model_security_monitoring_signal_list_request_filter.rs index 1f6f17408..ca3f10e2e 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_list_request_filter.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_list_request_filter.rs @@ -27,6 +27,21 @@ impl SecurityMonitoringSignalListRequestFilter { to: None, } } + + pub fn with_from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_to(&mut self, value: String) -> &mut Self { + self.to = Some(value); + self + } } impl Default for SecurityMonitoringSignalListRequestFilter { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_signal_list_request_page.rs b/src/datadogV2/model/model_security_monitoring_signal_list_request_page.rs index 6d4b09ac6..8c2f4fa07 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_list_request_page.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_list_request_page.rs @@ -23,6 +23,16 @@ impl SecurityMonitoringSignalListRequestPage { limit: None, } } + + pub fn with_cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + self + } + + pub fn with_limit(&mut self, value: i32) -> &mut Self { + self.limit = Some(value); + self + } } impl Default for SecurityMonitoringSignalListRequestPage { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_signal_response.rs b/src/datadogV2/model/model_security_monitoring_signal_response.rs index b8a0109e0..d8dd4548f 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_response.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct SecurityMonitoringSignalResponse { /// Object description of a security signal. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl SecurityMonitoringSignalResponse { pub fn new() -> SecurityMonitoringSignalResponse { SecurityMonitoringSignalResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignal, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for SecurityMonitoringSignalResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_signal_rule_create_payload.rs b/src/datadogV2/model/model_security_monitoring_signal_rule_create_payload.rs index 9925f1cf5..5522c7d32 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_rule_create_payload.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_rule_create_payload.rs @@ -28,7 +28,7 @@ pub struct SecurityMonitoringSignalRuleCreatePayload { pub name: String, /// Options on rules. #[serde(rename = "options")] - pub options: Box, + pub options: crate::datadogV2::model::SecurityMonitoringRuleOptions, /// Queries for selecting signals which are part of the rule. #[serde(rename = "queries")] pub queries: Vec, @@ -46,7 +46,7 @@ impl SecurityMonitoringSignalRuleCreatePayload { is_enabled: bool, message: String, name: String, - options: Box, + options: crate::datadogV2::model::SecurityMonitoringRuleOptions, queries: Vec, ) -> SecurityMonitoringSignalRuleCreatePayload { SecurityMonitoringSignalRuleCreatePayload { @@ -62,4 +62,30 @@ impl SecurityMonitoringSignalRuleCreatePayload { type_: None, } } + + pub fn with_filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.filters = Some(value); + self + } + + pub fn with_has_extended_title(&mut self, value: bool) -> &mut Self { + self.has_extended_title = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalRuleType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV2/model/model_security_monitoring_signal_rule_query.rs b/src/datadogV2/model/model_security_monitoring_signal_rule_query.rs index 7d80ed772..e602b7b71 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_rule_query.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_rule_query.rs @@ -39,4 +39,32 @@ impl SecurityMonitoringSignalRuleQuery { rule_id, } } + + pub fn with_aggregation( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleQueryAggregation, + ) -> &mut Self { + self.aggregation = Some(value); + self + } + + pub fn with_correlated_by_fields(&mut self, value: Vec) -> &mut Self { + self.correlated_by_fields = Some(value); + self + } + + pub fn with_correlated_query_index(&mut self, value: i32) -> &mut Self { + self.correlated_query_index = Some(value); + self + } + + pub fn with_metrics(&mut self, value: Vec) -> &mut Self { + self.metrics = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV2/model/model_security_monitoring_signal_rule_response.rs b/src/datadogV2/model/model_security_monitoring_signal_rule_response.rs index de2b76363..5c6d021a7 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_rule_response.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_rule_response.rs @@ -46,7 +46,7 @@ pub struct SecurityMonitoringSignalRuleResponse { pub name: Option, /// Options on rules. #[serde(rename = "options")] - pub options: Option>, + pub options: Option, /// Queries for selecting logs which are part of the rule. #[serde(rename = "queries")] pub queries: Option>, @@ -87,6 +87,111 @@ impl SecurityMonitoringSignalRuleResponse { version: None, } } + + pub fn with_cases( + &mut self, + value: Vec, + ) -> &mut Self { + self.cases = Some(value); + self + } + + pub fn with_created_at(&mut self, value: i64) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_creation_author_id(&mut self, value: i64) -> &mut Self { + self.creation_author_id = Some(value); + self + } + + pub fn with_deprecation_date(&mut self, value: i64) -> &mut Self { + self.deprecation_date = Some(value); + self + } + + pub fn with_filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.filters = Some(value); + self + } + + pub fn with_has_extended_title(&mut self, value: bool) -> &mut Self { + self.has_extended_title = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_is_default(&mut self, value: bool) -> &mut Self { + self.is_default = Some(value); + self + } + + pub fn with_is_deleted(&mut self, value: bool) -> &mut Self { + self.is_deleted = Some(value); + self + } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_options( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleOptions, + ) -> &mut Self { + self.options = Some(value); + self + } + + pub fn with_queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalRuleType, + ) -> &mut Self { + self.type_ = Some(value); + self + } + + pub fn with_update_author_id(&mut self, value: i64) -> &mut Self { + self.update_author_id = Some(value); + self + } + + pub fn with_version(&mut self, value: i64) -> &mut Self { + self.version = Some(value); + self + } } impl Default for SecurityMonitoringSignalRuleResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_signal_rule_response_query.rs b/src/datadogV2/model/model_security_monitoring_signal_rule_response_query.rs index a6bacabc8..1d395a619 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_rule_response_query.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_rule_response_query.rs @@ -51,6 +51,54 @@ impl SecurityMonitoringSignalRuleResponseQuery { rule_id: None, } } + + pub fn with_aggregation( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleQueryAggregation, + ) -> &mut Self { + self.aggregation = Some(value); + self + } + + pub fn with_correlated_by_fields(&mut self, value: Vec) -> &mut Self { + self.correlated_by_fields = Some(value); + self + } + + pub fn with_correlated_query_index(&mut self, value: i32) -> &mut Self { + self.correlated_query_index = Some(value); + self + } + + pub fn with_default_rule_id(&mut self, value: String) -> &mut Self { + self.default_rule_id = Some(value); + self + } + + pub fn with_distinct_fields(&mut self, value: Vec) -> &mut Self { + self.distinct_fields = Some(value); + self + } + + pub fn with_group_by_fields(&mut self, value: Vec) -> &mut Self { + self.group_by_fields = Some(value); + self + } + + pub fn with_metrics(&mut self, value: Vec) -> &mut Self { + self.metrics = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_rule_id(&mut self, value: String) -> &mut Self { + self.rule_id = Some(value); + self + } } impl Default for SecurityMonitoringSignalRuleResponseQuery { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_signal_state_update_attributes.rs b/src/datadogV2/model/model_security_monitoring_signal_state_update_attributes.rs index e81910d66..f92ae62a7 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_state_update_attributes.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_state_update_attributes.rs @@ -33,4 +33,22 @@ impl SecurityMonitoringSignalStateUpdateAttributes { version: None, } } + + pub fn with_archive_comment(&mut self, value: String) -> &mut Self { + self.archive_comment = Some(value); + self + } + + pub fn with_archive_reason( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalArchiveReason, + ) -> &mut Self { + self.archive_reason = Some(value); + self + } + + pub fn with_version(&mut self, value: i64) -> &mut Self { + self.version = Some(value); + self + } } diff --git a/src/datadogV2/model/model_security_monitoring_signal_state_update_data.rs b/src/datadogV2/model/model_security_monitoring_signal_state_update_data.rs index 3ebc2340b..23b3c4efd 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_state_update_data.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_state_update_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SecurityMonitoringSignalStateUpdateData { /// Attributes describing the change of state of a security signal. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::SecurityMonitoringSignalStateUpdateAttributes, /// The unique ID of the security signal. #[serde(rename = "id")] pub id: Option, @@ -21,7 +21,7 @@ pub struct SecurityMonitoringSignalStateUpdateData { impl SecurityMonitoringSignalStateUpdateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::SecurityMonitoringSignalStateUpdateAttributes, ) -> SecurityMonitoringSignalStateUpdateData { SecurityMonitoringSignalStateUpdateData { attributes, @@ -29,4 +29,17 @@ impl SecurityMonitoringSignalStateUpdateData { type_: None, } } + + pub fn with_id(&mut self, value: serde_json::Value) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalMetadataType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV2/model/model_security_monitoring_signal_state_update_request.rs b/src/datadogV2/model/model_security_monitoring_signal_state_update_request.rs index fd2fde31d..2862e8f4e 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_state_update_request.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_state_update_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct SecurityMonitoringSignalStateUpdateRequest { /// Data containing the patch for changing the state of a signal. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::SecurityMonitoringSignalStateUpdateData, } impl SecurityMonitoringSignalStateUpdateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::SecurityMonitoringSignalStateUpdateData, ) -> SecurityMonitoringSignalStateUpdateRequest { SecurityMonitoringSignalStateUpdateRequest { data } } diff --git a/src/datadogV2/model/model_security_monitoring_signal_triage_attributes.rs b/src/datadogV2/model/model_security_monitoring_signal_triage_attributes.rs index 968f25ed0..0d8dbd5de 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_triage_attributes.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_triage_attributes.rs @@ -16,13 +16,13 @@ pub struct SecurityMonitoringSignalTriageAttributes { pub archive_comment_timestamp: Option, /// Object representing a given user entity. #[serde(rename = "archive_comment_user")] - pub archive_comment_user: Option>, + pub archive_comment_user: Option, /// Reason a signal is archived. #[serde(rename = "archive_reason")] pub archive_reason: Option, /// Object representing a given user entity. #[serde(rename = "assignee")] - pub assignee: Box, + pub assignee: crate::datadogV2::model::SecurityMonitoringTriageUser, /// Array of incidents that are associated with this signal. #[serde(rename = "incident_ids")] pub incident_ids: Vec, @@ -34,12 +34,12 @@ pub struct SecurityMonitoringSignalTriageAttributes { pub state_update_timestamp: Option, /// Object representing a given user entity. #[serde(rename = "state_update_user")] - pub state_update_user: Option>, + pub state_update_user: Option, } impl SecurityMonitoringSignalTriageAttributes { pub fn new( - assignee: Box, + assignee: crate::datadogV2::model::SecurityMonitoringTriageUser, incident_ids: Vec, state: crate::datadogV2::model::SecurityMonitoringSignalState, ) -> SecurityMonitoringSignalTriageAttributes { @@ -55,4 +55,43 @@ impl SecurityMonitoringSignalTriageAttributes { state_update_user: None, } } + + pub fn with_archive_comment(&mut self, value: String) -> &mut Self { + self.archive_comment = Some(value); + self + } + + pub fn with_archive_comment_timestamp(&mut self, value: i64) -> &mut Self { + self.archive_comment_timestamp = Some(value); + self + } + + pub fn with_archive_comment_user( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringTriageUser, + ) -> &mut Self { + self.archive_comment_user = Some(value); + self + } + + pub fn with_archive_reason( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalArchiveReason, + ) -> &mut Self { + self.archive_reason = Some(value); + self + } + + pub fn with_state_update_timestamp(&mut self, value: i64) -> &mut Self { + self.state_update_timestamp = Some(value); + self + } + + pub fn with_state_update_user( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringTriageUser, + ) -> &mut Self { + self.state_update_user = Some(value); + self + } } diff --git a/src/datadogV2/model/model_security_monitoring_signal_triage_update_data.rs b/src/datadogV2/model/model_security_monitoring_signal_triage_update_data.rs index 2e0eee3d3..7d47ee584 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_triage_update_data.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_triage_update_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SecurityMonitoringSignalTriageUpdateData { /// Attributes describing a triage state update operation over a security signal. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The unique ID of the security signal. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,27 @@ impl SecurityMonitoringSignalTriageUpdateData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalTriageAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalMetadataType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SecurityMonitoringSignalTriageUpdateData { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_signal_triage_update_response.rs b/src/datadogV2/model/model_security_monitoring_signal_triage_update_response.rs index 2decb268e..b2eefb2a3 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_triage_update_response.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_triage_update_response.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct SecurityMonitoringSignalTriageUpdateResponse { /// Data containing the updated triage attributes of the signal. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::SecurityMonitoringSignalTriageUpdateData, } impl SecurityMonitoringSignalTriageUpdateResponse { pub fn new( - data: Box, + data: crate::datadogV2::model::SecurityMonitoringSignalTriageUpdateData, ) -> SecurityMonitoringSignalTriageUpdateResponse { SecurityMonitoringSignalTriageUpdateResponse { data } } diff --git a/src/datadogV2/model/model_security_monitoring_signals_list_response.rs b/src/datadogV2/model/model_security_monitoring_signals_list_response.rs index 786fa486d..ee5babca9 100644 --- a/src/datadogV2/model/model_security_monitoring_signals_list_response.rs +++ b/src/datadogV2/model/model_security_monitoring_signals_list_response.rs @@ -14,10 +14,10 @@ pub struct SecurityMonitoringSignalsListResponse { pub data: Option>, /// Links attributes. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, /// Meta attributes. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl SecurityMonitoringSignalsListResponse { @@ -28,6 +28,30 @@ impl SecurityMonitoringSignalsListResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalsListResponseLinks, + ) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalsListResponseMeta, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for SecurityMonitoringSignalsListResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_signals_list_response_links.rs b/src/datadogV2/model/model_security_monitoring_signals_list_response_links.rs index 1c23c4e07..f1e5f3d18 100644 --- a/src/datadogV2/model/model_security_monitoring_signals_list_response_links.rs +++ b/src/datadogV2/model/model_security_monitoring_signals_list_response_links.rs @@ -18,6 +18,11 @@ impl SecurityMonitoringSignalsListResponseLinks { pub fn new() -> SecurityMonitoringSignalsListResponseLinks { SecurityMonitoringSignalsListResponseLinks { next: None } } + + pub fn with_next(&mut self, value: String) -> &mut Self { + self.next = Some(value); + self + } } impl Default for SecurityMonitoringSignalsListResponseLinks { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_signals_list_response_meta.rs b/src/datadogV2/model/model_security_monitoring_signals_list_response_meta.rs index 0eaa139bb..147f2e34d 100644 --- a/src/datadogV2/model/model_security_monitoring_signals_list_response_meta.rs +++ b/src/datadogV2/model/model_security_monitoring_signals_list_response_meta.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct SecurityMonitoringSignalsListResponseMeta { /// Paging attributes. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, } impl SecurityMonitoringSignalsListResponseMeta { pub fn new() -> SecurityMonitoringSignalsListResponseMeta { SecurityMonitoringSignalsListResponseMeta { page: None } } + + pub fn with_page( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalsListResponseMetaPage, + ) -> &mut Self { + self.page = Some(value); + self + } } impl Default for SecurityMonitoringSignalsListResponseMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_signals_list_response_meta_page.rs b/src/datadogV2/model/model_security_monitoring_signals_list_response_meta_page.rs index ffc4e7f55..8239845ef 100644 --- a/src/datadogV2/model/model_security_monitoring_signals_list_response_meta_page.rs +++ b/src/datadogV2/model/model_security_monitoring_signals_list_response_meta_page.rs @@ -18,6 +18,11 @@ impl SecurityMonitoringSignalsListResponseMetaPage { pub fn new() -> SecurityMonitoringSignalsListResponseMetaPage { SecurityMonitoringSignalsListResponseMetaPage { after: None } } + + pub fn with_after(&mut self, value: String) -> &mut Self { + self.after = Some(value); + self + } } impl Default for SecurityMonitoringSignalsListResponseMetaPage { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_standard_rule_create_payload.rs b/src/datadogV2/model/model_security_monitoring_standard_rule_create_payload.rs index b722be536..e38a47bb2 100644 --- a/src/datadogV2/model/model_security_monitoring_standard_rule_create_payload.rs +++ b/src/datadogV2/model/model_security_monitoring_standard_rule_create_payload.rs @@ -28,7 +28,7 @@ pub struct SecurityMonitoringStandardRuleCreatePayload { pub name: String, /// Options on rules. #[serde(rename = "options")] - pub options: Box, + pub options: crate::datadogV2::model::SecurityMonitoringRuleOptions, /// Queries for selecting logs which are part of the rule. #[serde(rename = "queries")] pub queries: Vec, @@ -50,7 +50,7 @@ impl SecurityMonitoringStandardRuleCreatePayload { is_enabled: bool, message: String, name: String, - options: Box, + options: crate::datadogV2::model::SecurityMonitoringRuleOptions, queries: Vec, ) -> SecurityMonitoringStandardRuleCreatePayload { SecurityMonitoringStandardRuleCreatePayload { @@ -67,4 +67,38 @@ impl SecurityMonitoringStandardRuleCreatePayload { type_: None, } } + + pub fn with_filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.filters = Some(value); + self + } + + pub fn with_has_extended_title(&mut self, value: bool) -> &mut Self { + self.has_extended_title = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_third_party_cases( + &mut self, + value: Vec, + ) -> &mut Self { + self.third_party_cases = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleTypeCreate, + ) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV2/model/model_security_monitoring_standard_rule_query.rs b/src/datadogV2/model/model_security_monitoring_standard_rule_query.rs index d86f4fcc3..d46d25d7d 100644 --- a/src/datadogV2/model/model_security_monitoring_standard_rule_query.rs +++ b/src/datadogV2/model/model_security_monitoring_standard_rule_query.rs @@ -50,6 +50,57 @@ impl SecurityMonitoringStandardRuleQuery { query: None, } } + + #[allow(deprecated)] + pub fn with_aggregation( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleQueryAggregation, + ) -> &mut Self { + self.aggregation = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_distinct_fields(&mut self, value: Vec) -> &mut Self { + self.distinct_fields = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_group_by_fields(&mut self, value: Vec) -> &mut Self { + self.group_by_fields = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_has_optional_group_by_fields(&mut self, value: bool) -> &mut Self { + self.has_optional_group_by_fields = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_metrics(&mut self, value: Vec) -> &mut Self { + self.metrics = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + #[allow(deprecated)] + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } } impl Default for SecurityMonitoringStandardRuleQuery { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_standard_rule_response.rs b/src/datadogV2/model/model_security_monitoring_standard_rule_response.rs index fee3d269e..6f0ca1170 100644 --- a/src/datadogV2/model/model_security_monitoring_standard_rule_response.rs +++ b/src/datadogV2/model/model_security_monitoring_standard_rule_response.rs @@ -14,7 +14,7 @@ pub struct SecurityMonitoringStandardRuleResponse { /// How to generate compliance signals. Useful for cloud_configuration rules only. #[serde(rename = "complianceSignalOptions")] pub compliance_signal_options: - Option>, + Option, /// When the rule was created, timestamp in milliseconds. #[serde(rename = "createdAt")] pub created_at: Option, @@ -50,7 +50,7 @@ pub struct SecurityMonitoringStandardRuleResponse { pub name: Option, /// Options on rules. #[serde(rename = "options")] - pub options: Option>, + pub options: Option, /// Queries for selecting logs which are part of the rule. #[serde(rename = "queries")] pub queries: Option>, @@ -97,6 +97,127 @@ impl SecurityMonitoringStandardRuleResponse { version: None, } } + + pub fn with_cases( + &mut self, + value: Vec, + ) -> &mut Self { + self.cases = Some(value); + self + } + + pub fn with_compliance_signal_options( + &mut self, + value: crate::datadogV2::model::CloudConfigurationRuleComplianceSignalOptions, + ) -> &mut Self { + self.compliance_signal_options = Some(value); + self + } + + pub fn with_created_at(&mut self, value: i64) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_creation_author_id(&mut self, value: i64) -> &mut Self { + self.creation_author_id = Some(value); + self + } + + pub fn with_deprecation_date(&mut self, value: i64) -> &mut Self { + self.deprecation_date = Some(value); + self + } + + pub fn with_filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.filters = Some(value); + self + } + + pub fn with_has_extended_title(&mut self, value: bool) -> &mut Self { + self.has_extended_title = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_is_default(&mut self, value: bool) -> &mut Self { + self.is_default = Some(value); + self + } + + pub fn with_is_deleted(&mut self, value: bool) -> &mut Self { + self.is_deleted = Some(value); + self + } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_options( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleOptions, + ) -> &mut Self { + self.options = Some(value); + self + } + + pub fn with_queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_third_party_cases( + &mut self, + value: Vec, + ) -> &mut Self { + self.third_party_cases = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleTypeRead, + ) -> &mut Self { + self.type_ = Some(value); + self + } + + pub fn with_update_author_id(&mut self, value: i64) -> &mut Self { + self.update_author_id = Some(value); + self + } + + pub fn with_version(&mut self, value: i64) -> &mut Self { + self.version = Some(value); + self + } } impl Default for SecurityMonitoringStandardRuleResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_third_party_root_query.rs b/src/datadogV2/model/model_security_monitoring_third_party_root_query.rs index af716ae44..b28480c76 100644 --- a/src/datadogV2/model/model_security_monitoring_third_party_root_query.rs +++ b/src/datadogV2/model/model_security_monitoring_third_party_root_query.rs @@ -23,6 +23,16 @@ impl SecurityMonitoringThirdPartyRootQuery { query: None, } } + + pub fn with_group_by_fields(&mut self, value: Vec) -> &mut Self { + self.group_by_fields = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } } impl Default for SecurityMonitoringThirdPartyRootQuery { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_third_party_rule_case.rs b/src/datadogV2/model/model_security_monitoring_third_party_rule_case.rs index 115d56912..d3e1bfe91 100644 --- a/src/datadogV2/model/model_security_monitoring_third_party_rule_case.rs +++ b/src/datadogV2/model/model_security_monitoring_third_party_rule_case.rs @@ -31,6 +31,29 @@ impl SecurityMonitoringThirdPartyRuleCase { status: None, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_notifications(&mut self, value: Vec) -> &mut Self { + self.notifications = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_status( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleSeverity, + ) -> &mut Self { + self.status = Some(value); + self + } } impl Default for SecurityMonitoringThirdPartyRuleCase { fn default() -> Self { diff --git a/src/datadogV2/model/model_security_monitoring_third_party_rule_case_create.rs b/src/datadogV2/model/model_security_monitoring_third_party_rule_case_create.rs index f1614d102..136b117e3 100644 --- a/src/datadogV2/model/model_security_monitoring_third_party_rule_case_create.rs +++ b/src/datadogV2/model/model_security_monitoring_third_party_rule_case_create.rs @@ -33,4 +33,19 @@ impl SecurityMonitoringThirdPartyRuleCaseCreate { status, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_notifications(&mut self, value: Vec) -> &mut Self { + self.notifications = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } } diff --git a/src/datadogV2/model/model_security_monitoring_triage_user.rs b/src/datadogV2/model/model_security_monitoring_triage_user.rs index e5700cb31..3d24424b1 100644 --- a/src/datadogV2/model/model_security_monitoring_triage_user.rs +++ b/src/datadogV2/model/model_security_monitoring_triage_user.rs @@ -35,4 +35,24 @@ impl SecurityMonitoringTriageUser { uuid, } } + + pub fn with_handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + self + } + + pub fn with_icon(&mut self, value: String) -> &mut Self { + self.icon = Some(value); + self + } + + pub fn with_id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_name(&mut self, value: Option) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV2/model/model_sensitive_data_scanner_config_request.rs b/src/datadogV2/model/model_sensitive_data_scanner_config_request.rs index 470364052..48d85991e 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_config_request.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_config_request.rs @@ -10,16 +10,16 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerConfigRequest { /// Data related to the reordering of scanning groups. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::SensitiveDataScannerReorderConfig, /// Meta payload containing information about the API. #[serde(rename = "meta")] - pub meta: Box, + pub meta: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, } impl SensitiveDataScannerConfigRequest { pub fn new( - data: Box, - meta: Box, + data: crate::datadogV2::model::SensitiveDataScannerReorderConfig, + meta: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, ) -> SensitiveDataScannerConfigRequest { SensitiveDataScannerConfigRequest { data, meta } } diff --git a/src/datadogV2/model/model_sensitive_data_scanner_configuration.rs b/src/datadogV2/model/model_sensitive_data_scanner_configuration.rs index fdb589e6b..500a2a59b 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_configuration.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_configuration.rs @@ -23,6 +23,19 @@ impl SensitiveDataScannerConfiguration { type_: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerConfigurationType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SensitiveDataScannerConfiguration { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_configuration_data.rs b/src/datadogV2/model/model_sensitive_data_scanner_configuration_data.rs index 1ba29354c..e5fe639bc 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_configuration_data.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_configuration_data.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerConfigurationData { /// A Sensitive Data Scanner configuration. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl SensitiveDataScannerConfigurationData { pub fn new() -> SensitiveDataScannerConfigurationData { SensitiveDataScannerConfigurationData { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerConfiguration, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for SensitiveDataScannerConfigurationData { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_configuration_relationships.rs b/src/datadogV2/model/model_sensitive_data_scanner_configuration_relationships.rs index 0bfc62ae6..21f8c4329 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_configuration_relationships.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_configuration_relationships.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerConfigurationRelationships { /// List of groups, ordered. #[serde(rename = "groups")] - pub groups: Option>, + pub groups: Option, } impl SensitiveDataScannerConfigurationRelationships { pub fn new() -> SensitiveDataScannerConfigurationRelationships { SensitiveDataScannerConfigurationRelationships { groups: None } } + + pub fn with_groups( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupList, + ) -> &mut Self { + self.groups = Some(value); + self + } } impl Default for SensitiveDataScannerConfigurationRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_create_group_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_create_group_response.rs index 21765aeed..5257eae64 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_create_group_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_create_group_response.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerCreateGroupResponse { /// Response data related to the creation of a group. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// Meta payload containing information about the API. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl SensitiveDataScannerCreateGroupResponse { @@ -23,6 +23,22 @@ impl SensitiveDataScannerCreateGroupResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupResponse, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for SensitiveDataScannerCreateGroupResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_create_rule_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_create_rule_response.rs index 509577d20..743891f78 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_create_rule_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_create_rule_response.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerCreateRuleResponse { /// Response data related to the creation of a rule. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// Meta payload containing information about the API. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl SensitiveDataScannerCreateRuleResponse { @@ -23,6 +23,22 @@ impl SensitiveDataScannerCreateRuleResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleResponse, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for SensitiveDataScannerCreateRuleResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_filter.rs b/src/datadogV2/model/model_sensitive_data_scanner_filter.rs index 710522a37..752ff100c 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_filter.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_filter.rs @@ -17,6 +17,11 @@ impl SensitiveDataScannerFilter { pub fn new() -> SensitiveDataScannerFilter { SensitiveDataScannerFilter { query: None } } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } } impl Default for SensitiveDataScannerFilter { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_get_config_included_item.rs b/src/datadogV2/model/model_sensitive_data_scanner_get_config_included_item.rs index 0f02c538b..4e94f7ff4 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_get_config_included_item.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_get_config_included_item.rs @@ -8,9 +8,9 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum SensitiveDataScannerGetConfigIncludedItem { SensitiveDataScannerRuleIncludedItem( - Box, + crate::datadogV2::model::SensitiveDataScannerRuleIncludedItem, ), SensitiveDataScannerGroupIncludedItem( - Box, + crate::datadogV2::model::SensitiveDataScannerGroupIncludedItem, ), } diff --git a/src/datadogV2/model/model_sensitive_data_scanner_get_config_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_get_config_response.rs index 0e80e6cb1..ab9af0ce4 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_get_config_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_get_config_response.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerGetConfigResponse { /// Response data related to the scanning groups. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// Included objects from relationships. #[serde(rename = "included")] pub included: Option>, /// Meta response containing information about the API. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl SensitiveDataScannerGetConfigResponse { @@ -27,6 +27,30 @@ impl SensitiveDataScannerGetConfigResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGetConfigResponseData, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerMeta, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for SensitiveDataScannerGetConfigResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_get_config_response_data.rs b/src/datadogV2/model/model_sensitive_data_scanner_get_config_response_data.rs index 8727a3afd..db52ec043 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_get_config_response_data.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_get_config_response_data.rs @@ -17,7 +17,7 @@ pub struct SensitiveDataScannerGetConfigResponseData { /// Relationships of the configuration. #[serde(rename = "relationships")] pub relationships: - Option>, + Option, /// Sensitive Data Scanner configuration type. #[serde(rename = "type")] pub type_: Option, @@ -32,6 +32,35 @@ impl SensitiveDataScannerGetConfigResponseData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerConfigurationRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerConfigurationType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SensitiveDataScannerGetConfigResponseData { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group.rs b/src/datadogV2/model/model_sensitive_data_scanner_group.rs index a278d5161..8bac8764b 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group.rs @@ -23,6 +23,19 @@ impl SensitiveDataScannerGroup { type_: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SensitiveDataScannerGroup { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_attributes.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_attributes.rs index 6652e5fa9..7182dadf0 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_attributes.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_attributes.rs @@ -13,7 +13,7 @@ pub struct SensitiveDataScannerGroupAttributes { pub description: Option, /// Filter for the Scanning Group. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// Whether or not the group is enabled. #[serde(rename = "is_enabled")] pub is_enabled: Option, @@ -35,6 +35,37 @@ impl SensitiveDataScannerGroupAttributes { product_list: None, } } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_filter( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerFilter, + ) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_product_list( + &mut self, + value: Vec, + ) -> &mut Self { + self.product_list = Some(value); + self + } } impl Default for SensitiveDataScannerGroupAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_create.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_create.rs index 453253fa4..de39e07e8 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_create.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_create.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerGroupCreate { /// Attributes of the Sensitive Data Scanner group. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::SensitiveDataScannerGroupAttributes, /// Relationships of the group. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Sensitive Data Scanner group type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::SensitiveDataScannerGroupType, @@ -21,7 +21,7 @@ pub struct SensitiveDataScannerGroupCreate { impl SensitiveDataScannerGroupCreate { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::SensitiveDataScannerGroupAttributes, type_: crate::datadogV2::model::SensitiveDataScannerGroupType, ) -> SensitiveDataScannerGroupCreate { SensitiveDataScannerGroupCreate { @@ -30,4 +30,12 @@ impl SensitiveDataScannerGroupCreate { type_, } } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_create_request.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_create_request.rs index bf2e6fab7..160325799 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_create_request.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_create_request.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerGroupCreateRequest { /// Data related to the creation of a group. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// Meta payload containing information about the API. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl SensitiveDataScannerGroupCreateRequest { @@ -23,6 +23,22 @@ impl SensitiveDataScannerGroupCreateRequest { meta: None, } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupCreate, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for SensitiveDataScannerGroupCreateRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_data.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_data.rs index 8a44dd018..04b7a7d84 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_data.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_data.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerGroupData { /// A scanning group. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl SensitiveDataScannerGroupData { pub fn new() -> SensitiveDataScannerGroupData { SensitiveDataScannerGroupData { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroup, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for SensitiveDataScannerGroupData { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_delete_request.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_delete_request.rs index f308626db..bf133c2b3 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_delete_request.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_delete_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerGroupDeleteRequest { /// Meta payload containing information about the API. #[serde(rename = "meta")] - pub meta: Box, + pub meta: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, } impl SensitiveDataScannerGroupDeleteRequest { pub fn new( - meta: Box, + meta: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, ) -> SensitiveDataScannerGroupDeleteRequest { SensitiveDataScannerGroupDeleteRequest { meta } } diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_delete_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_delete_response.rs index af5d478ca..4620032ab 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_delete_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_delete_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerGroupDeleteResponse { /// Meta payload containing information about the API. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl SensitiveDataScannerGroupDeleteResponse { pub fn new() -> SensitiveDataScannerGroupDeleteResponse { SensitiveDataScannerGroupDeleteResponse { meta: None } } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for SensitiveDataScannerGroupDeleteResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_included_item.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_included_item.rs index 1b55326e8..d6ab523ec 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_included_item.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_included_item.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerGroupIncludedItem { /// Attributes of the Sensitive Data Scanner group. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of the group. #[serde(rename = "id")] pub id: Option, /// Relationships of the group. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Sensitive Data Scanner group type. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,35 @@ impl SensitiveDataScannerGroupIncludedItem { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SensitiveDataScannerGroupIncludedItem { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_item.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_item.rs index 19249212e..54afb5d49 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_item.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_item.rs @@ -23,6 +23,19 @@ impl SensitiveDataScannerGroupItem { type_: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SensitiveDataScannerGroupItem { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_list.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_list.rs index 6da65a891..c3917d17f 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_list.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_list.rs @@ -17,6 +17,14 @@ impl SensitiveDataScannerGroupList { pub fn new() -> SensitiveDataScannerGroupList { SensitiveDataScannerGroupList { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for SensitiveDataScannerGroupList { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_relationships.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_relationships.rs index 17dde6c2c..567611f2f 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_relationships.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_relationships.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerGroupRelationships { /// A Sensitive Data Scanner configuration data. #[serde(rename = "configuration")] - pub configuration: Option>, + pub configuration: Option, /// Rules included in the group. #[serde(rename = "rules")] - pub rules: Option>, + pub rules: Option, } impl SensitiveDataScannerGroupRelationships { @@ -23,6 +23,22 @@ impl SensitiveDataScannerGroupRelationships { rules: None, } } + + pub fn with_configuration( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerConfigurationData, + ) -> &mut Self { + self.configuration = Some(value); + self + } + + pub fn with_rules( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleData, + ) -> &mut Self { + self.rules = Some(value); + self + } } impl Default for SensitiveDataScannerGroupRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_response.rs index bbe09f092..5b54aba4f 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_response.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerGroupResponse { /// Attributes of the Sensitive Data Scanner group. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of the group. #[serde(rename = "id")] pub id: Option, /// Relationships of the group. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Sensitive Data Scanner group type. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,35 @@ impl SensitiveDataScannerGroupResponse { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SensitiveDataScannerGroupResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_update.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_update.rs index ea938624a..32db6472d 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_update.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_update.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerGroupUpdate { /// Attributes of the Sensitive Data Scanner group. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of the group. #[serde(rename = "id")] pub id: Option, /// Relationships of the group. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Sensitive Data Scanner group type. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,35 @@ impl SensitiveDataScannerGroupUpdate { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SensitiveDataScannerGroupUpdate { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_update_request.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_update_request.rs index ca7cdc83b..8da3769e4 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_update_request.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_update_request.rs @@ -10,16 +10,16 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerGroupUpdateRequest { /// Data related to the update of a group. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::SensitiveDataScannerGroupUpdate, /// Meta payload containing information about the API. #[serde(rename = "meta")] - pub meta: Box, + pub meta: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, } impl SensitiveDataScannerGroupUpdateRequest { pub fn new( - data: Box, - meta: Box, + data: crate::datadogV2::model::SensitiveDataScannerGroupUpdate, + meta: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, ) -> SensitiveDataScannerGroupUpdateRequest { SensitiveDataScannerGroupUpdateRequest { data, meta } } diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_update_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_update_response.rs index 5a08c61ce..f1509f4ed 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_update_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_update_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerGroupUpdateResponse { /// Meta payload containing information about the API. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl SensitiveDataScannerGroupUpdateResponse { pub fn new() -> SensitiveDataScannerGroupUpdateResponse { SensitiveDataScannerGroupUpdateResponse { meta: None } } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for SensitiveDataScannerGroupUpdateResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_meta.rs b/src/datadogV2/model/model_sensitive_data_scanner_meta.rs index 862eb5e3c..8a84f9696 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_meta.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_meta.rs @@ -39,6 +39,36 @@ impl SensitiveDataScannerMeta { version: None, } } + + pub fn with_count_limit(&mut self, value: i64) -> &mut Self { + self.count_limit = Some(value); + self + } + + pub fn with_group_count_limit(&mut self, value: i64) -> &mut Self { + self.group_count_limit = Some(value); + self + } + + pub fn with_has_highlight_enabled(&mut self, value: bool) -> &mut Self { + self.has_highlight_enabled = Some(value); + self + } + + pub fn with_has_multi_pass_enabled(&mut self, value: bool) -> &mut Self { + self.has_multi_pass_enabled = Some(value); + self + } + + pub fn with_is_pci_compliant(&mut self, value: bool) -> &mut Self { + self.is_pci_compliant = Some(value); + self + } + + pub fn with_version(&mut self, value: i64) -> &mut Self { + self.version = Some(value); + self + } } impl Default for SensitiveDataScannerMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_meta_version_only.rs b/src/datadogV2/model/model_sensitive_data_scanner_meta_version_only.rs index f28f484e7..bbd8ac4c0 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_meta_version_only.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_meta_version_only.rs @@ -17,6 +17,11 @@ impl SensitiveDataScannerMetaVersionOnly { pub fn new() -> SensitiveDataScannerMetaVersionOnly { SensitiveDataScannerMetaVersionOnly { version: None } } + + pub fn with_version(&mut self, value: i64) -> &mut Self { + self.version = Some(value); + self + } } impl Default for SensitiveDataScannerMetaVersionOnly { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_reorder_config.rs b/src/datadogV2/model/model_sensitive_data_scanner_reorder_config.rs index 081c0a69c..8e2c5167e 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_reorder_config.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_reorder_config.rs @@ -14,7 +14,7 @@ pub struct SensitiveDataScannerReorderConfig { /// Relationships of the configuration. #[serde(rename = "relationships")] pub relationships: - Option>, + Option, /// Sensitive Data Scanner configuration type. #[serde(rename = "type")] pub type_: Option, @@ -28,6 +28,27 @@ impl SensitiveDataScannerReorderConfig { type_: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerConfigurationRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerConfigurationType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SensitiveDataScannerReorderConfig { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_reorder_groups_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_reorder_groups_response.rs index e01404003..e901ddce5 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_reorder_groups_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_reorder_groups_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerReorderGroupsResponse { /// Meta response containing information about the API. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl SensitiveDataScannerReorderGroupsResponse { pub fn new() -> SensitiveDataScannerReorderGroupsResponse { SensitiveDataScannerReorderGroupsResponse { meta: None } } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerMeta, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for SensitiveDataScannerReorderGroupsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule.rs index efa22e435..292f5b200 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule.rs @@ -23,6 +23,19 @@ impl SensitiveDataScannerRule { type_: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SensitiveDataScannerRule { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_attributes.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_attributes.rs index fbefcf70d..490bee3df 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_attributes.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_attributes.rs @@ -35,7 +35,7 @@ pub struct SensitiveDataScannerRuleAttributes { pub tags: Option>, /// Object describing how the scanned event will be replaced. #[serde(rename = "text_replacement")] - pub text_replacement: Option>, + pub text_replacement: Option, } impl SensitiveDataScannerRuleAttributes { @@ -52,6 +52,54 @@ impl SensitiveDataScannerRuleAttributes { text_replacement: None, } } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_excluded_namespaces(&mut self, value: Vec) -> &mut Self { + self.excluded_namespaces = Some(value); + self + } + + pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_namespaces(&mut self, value: Vec) -> &mut Self { + self.namespaces = Some(value); + self + } + + pub fn with_pattern(&mut self, value: String) -> &mut Self { + self.pattern = Some(value); + self + } + + pub fn with_priority(&mut self, value: i64) -> &mut Self { + self.priority = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_text_replacement( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerTextReplacement, + ) -> &mut Self { + self.text_replacement = Some(value); + self + } } impl Default for SensitiveDataScannerRuleAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_create.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_create.rs index e9289ae06..a9b42184a 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_create.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_create.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerRuleCreate { /// Attributes of the Sensitive Data Scanner rule. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::SensitiveDataScannerRuleAttributes, /// Relationships of a scanning rule. #[serde(rename = "relationships")] - pub relationships: Box, + pub relationships: crate::datadogV2::model::SensitiveDataScannerRuleRelationships, /// Sensitive Data Scanner rule type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::SensitiveDataScannerRuleType, @@ -21,8 +21,8 @@ pub struct SensitiveDataScannerRuleCreate { impl SensitiveDataScannerRuleCreate { pub fn new( - attributes: Box, - relationships: Box, + attributes: crate::datadogV2::model::SensitiveDataScannerRuleAttributes, + relationships: crate::datadogV2::model::SensitiveDataScannerRuleRelationships, type_: crate::datadogV2::model::SensitiveDataScannerRuleType, ) -> SensitiveDataScannerRuleCreate { SensitiveDataScannerRuleCreate { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_create_request.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_create_request.rs index b789d0d3a..b39b833fb 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_create_request.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_create_request.rs @@ -10,16 +10,16 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerRuleCreateRequest { /// Data related to the creation of a rule. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::SensitiveDataScannerRuleCreate, /// Meta payload containing information about the API. #[serde(rename = "meta")] - pub meta: Box, + pub meta: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, } impl SensitiveDataScannerRuleCreateRequest { pub fn new( - data: Box, - meta: Box, + data: crate::datadogV2::model::SensitiveDataScannerRuleCreate, + meta: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, ) -> SensitiveDataScannerRuleCreateRequest { SensitiveDataScannerRuleCreateRequest { data, meta } } diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_data.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_data.rs index f2e321876..023e495e9 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_data.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_data.rs @@ -17,6 +17,14 @@ impl SensitiveDataScannerRuleData { pub fn new() -> SensitiveDataScannerRuleData { SensitiveDataScannerRuleData { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for SensitiveDataScannerRuleData { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_delete_request.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_delete_request.rs index cca5b5238..a5486729f 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_delete_request.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_delete_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerRuleDeleteRequest { /// Meta payload containing information about the API. #[serde(rename = "meta")] - pub meta: Box, + pub meta: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, } impl SensitiveDataScannerRuleDeleteRequest { pub fn new( - meta: Box, + meta: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, ) -> SensitiveDataScannerRuleDeleteRequest { SensitiveDataScannerRuleDeleteRequest { meta } } diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_delete_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_delete_response.rs index 14adfc2b9..24d03e567 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_delete_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_delete_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerRuleDeleteResponse { /// Meta payload containing information about the API. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl SensitiveDataScannerRuleDeleteResponse { pub fn new() -> SensitiveDataScannerRuleDeleteResponse { SensitiveDataScannerRuleDeleteResponse { meta: None } } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for SensitiveDataScannerRuleDeleteResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_included_item.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_included_item.rs index b2c048576..1ec0e6802 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_included_item.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_included_item.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerRuleIncludedItem { /// Attributes of the Sensitive Data Scanner rule. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of the rule. #[serde(rename = "id")] pub id: Option, /// Relationships of a scanning rule. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Sensitive Data Scanner rule type. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,35 @@ impl SensitiveDataScannerRuleIncludedItem { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SensitiveDataScannerRuleIncludedItem { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_relationships.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_relationships.rs index cb9ea4290..f722697b7 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_relationships.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_relationships.rs @@ -10,11 +10,10 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerRuleRelationships { /// A scanning group data. #[serde(rename = "group")] - pub group: Option>, + pub group: Option, /// A standard pattern. #[serde(rename = "standard_pattern")] - pub standard_pattern: - Option>, + pub standard_pattern: Option, } impl SensitiveDataScannerRuleRelationships { @@ -24,6 +23,22 @@ impl SensitiveDataScannerRuleRelationships { standard_pattern: None, } } + + pub fn with_group( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupData, + ) -> &mut Self { + self.group = Some(value); + self + } + + pub fn with_standard_pattern( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerStandardPatternData, + ) -> &mut Self { + self.standard_pattern = Some(value); + self + } } impl Default for SensitiveDataScannerRuleRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_response.rs index 62e3620bf..0be5aca30 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_response.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerRuleResponse { /// Attributes of the Sensitive Data Scanner rule. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of the rule. #[serde(rename = "id")] pub id: Option, /// Relationships of a scanning rule. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Sensitive Data Scanner rule type. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,35 @@ impl SensitiveDataScannerRuleResponse { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SensitiveDataScannerRuleResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_update.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_update.rs index 387d63c12..97037e3cf 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_update.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_update.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerRuleUpdate { /// Attributes of the Sensitive Data Scanner rule. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of the rule. #[serde(rename = "id")] pub id: Option, /// Relationships of a scanning rule. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Sensitive Data Scanner rule type. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,35 @@ impl SensitiveDataScannerRuleUpdate { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SensitiveDataScannerRuleUpdate { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_update_request.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_update_request.rs index 7a41f74ed..77ce597a6 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_update_request.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_update_request.rs @@ -10,16 +10,16 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerRuleUpdateRequest { /// Data related to the update of a rule. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::SensitiveDataScannerRuleUpdate, /// Meta payload containing information about the API. #[serde(rename = "meta")] - pub meta: Box, + pub meta: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, } impl SensitiveDataScannerRuleUpdateRequest { pub fn new( - data: Box, - meta: Box, + data: crate::datadogV2::model::SensitiveDataScannerRuleUpdate, + meta: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, ) -> SensitiveDataScannerRuleUpdateRequest { SensitiveDataScannerRuleUpdateRequest { data, meta } } diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_update_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_update_response.rs index 46a8a548a..8500ea409 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_update_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_update_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerRuleUpdateResponse { /// Meta payload containing information about the API. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl SensitiveDataScannerRuleUpdateResponse { pub fn new() -> SensitiveDataScannerRuleUpdateResponse { SensitiveDataScannerRuleUpdateResponse { meta: None } } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for SensitiveDataScannerRuleUpdateResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern.rs b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern.rs index c373cd2c5..0de31bc90 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern.rs @@ -23,6 +23,19 @@ impl SensitiveDataScannerStandardPattern { type_: None, } } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerStandardPatternType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SensitiveDataScannerStandardPattern { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_attributes.rs b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_attributes.rs index 7d7ca7652..9a0783797 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_attributes.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_attributes.rs @@ -39,6 +39,36 @@ impl SensitiveDataScannerStandardPatternAttributes { tags: None, } } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_included_keywords(&mut self, value: Vec) -> &mut Self { + self.included_keywords = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_pattern(&mut self, value: String) -> &mut Self { + self.pattern = Some(value); + self + } + + pub fn with_priority(&mut self, value: i64) -> &mut Self { + self.priority = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } impl Default for SensitiveDataScannerStandardPatternAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_data.rs b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_data.rs index 10887ec16..43ffd4957 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_data.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_data.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerStandardPatternData { /// Data containing the standard pattern id. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl SensitiveDataScannerStandardPatternData { pub fn new() -> SensitiveDataScannerStandardPatternData { SensitiveDataScannerStandardPatternData { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerStandardPattern, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for SensitiveDataScannerStandardPatternData { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_data.rs b/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_data.rs index 45f80ef86..6a4b929f7 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_data.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_data.rs @@ -18,6 +18,14 @@ impl SensitiveDataScannerStandardPatternsResponseData { pub fn new() -> SensitiveDataScannerStandardPatternsResponseData { SensitiveDataScannerStandardPatternsResponseData { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for SensitiveDataScannerStandardPatternsResponseData { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_item.rs b/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_item.rs index b75f6448b..34ecdaae5 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_item.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_item.rs @@ -10,8 +10,7 @@ use serde_with::skip_serializing_none; pub struct SensitiveDataScannerStandardPatternsResponseItem { /// Attributes of the Sensitive Data Scanner standard pattern. #[serde(rename = "attributes")] - pub attributes: - Option>, + pub attributes: Option, /// ID of the standard pattern. #[serde(rename = "id")] pub id: Option, @@ -28,6 +27,27 @@ impl SensitiveDataScannerStandardPatternsResponseItem { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerStandardPatternAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerStandardPatternType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SensitiveDataScannerStandardPatternsResponseItem { fn default() -> Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_text_replacement.rs b/src/datadogV2/model/model_sensitive_data_scanner_text_replacement.rs index 63ed45e34..f50b2b354 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_text_replacement.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_text_replacement.rs @@ -33,6 +33,24 @@ impl SensitiveDataScannerTextReplacement { type_: None, } } + + pub fn with_number_of_chars(&mut self, value: i64) -> &mut Self { + self.number_of_chars = Some(value); + self + } + + pub fn with_replacement_string(&mut self, value: String) -> &mut Self { + self.replacement_string = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerTextReplacementType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SensitiveDataScannerTextReplacement { fn default() -> Self { diff --git a/src/datadogV2/model/model_service_account_create_attributes.rs b/src/datadogV2/model/model_service_account_create_attributes.rs index 3f7943c0c..56c5308c0 100644 --- a/src/datadogV2/model/model_service_account_create_attributes.rs +++ b/src/datadogV2/model/model_service_account_create_attributes.rs @@ -31,4 +31,14 @@ impl ServiceAccountCreateAttributes { title: None, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_account_create_data.rs b/src/datadogV2/model/model_service_account_create_data.rs index 276690dbe..64d86781f 100644 --- a/src/datadogV2/model/model_service_account_create_data.rs +++ b/src/datadogV2/model/model_service_account_create_data.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct ServiceAccountCreateData { /// Attributes of the created user. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::ServiceAccountCreateAttributes, /// Relationships of the user object. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Users resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::UsersType, @@ -21,7 +21,7 @@ pub struct ServiceAccountCreateData { impl ServiceAccountCreateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::ServiceAccountCreateAttributes, type_: crate::datadogV2::model::UsersType, ) -> ServiceAccountCreateData { ServiceAccountCreateData { @@ -30,4 +30,12 @@ impl ServiceAccountCreateData { type_, } } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::UserRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_account_create_request.rs b/src/datadogV2/model/model_service_account_create_request.rs index f3c31c4f7..133a0d3dd 100644 --- a/src/datadogV2/model/model_service_account_create_request.rs +++ b/src/datadogV2/model/model_service_account_create_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct ServiceAccountCreateRequest { /// Object to create a service account User. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::ServiceAccountCreateData, } impl ServiceAccountCreateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::ServiceAccountCreateData, ) -> ServiceAccountCreateRequest { ServiceAccountCreateRequest { data } } diff --git a/src/datadogV2/model/model_service_definition_create_response.rs b/src/datadogV2/model/model_service_definition_create_response.rs index 66742526a..d12d9687e 100644 --- a/src/datadogV2/model/model_service_definition_create_response.rs +++ b/src/datadogV2/model/model_service_definition_create_response.rs @@ -17,6 +17,14 @@ impl ServiceDefinitionCreateResponse { pub fn new() -> ServiceDefinitionCreateResponse { ServiceDefinitionCreateResponse { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for ServiceDefinitionCreateResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_service_definition_data.rs b/src/datadogV2/model/model_service_definition_data.rs index 40bfdf64e..cb20fe9cc 100644 --- a/src/datadogV2/model/model_service_definition_data.rs +++ b/src/datadogV2/model/model_service_definition_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ServiceDefinitionData { /// Service definition attributes. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Service definition id. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl ServiceDefinitionData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionDataAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for ServiceDefinitionData { fn default() -> Self { diff --git a/src/datadogV2/model/model_service_definition_data_attributes.rs b/src/datadogV2/model/model_service_definition_data_attributes.rs index 6a006ed99..d2cdb1ccd 100644 --- a/src/datadogV2/model/model_service_definition_data_attributes.rs +++ b/src/datadogV2/model/model_service_definition_data_attributes.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct ServiceDefinitionDataAttributes { /// Metadata about a service definition. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, /// Service definition schema. #[serde(rename = "schema")] - pub schema: Option>, + pub schema: Option, } impl ServiceDefinitionDataAttributes { @@ -23,6 +23,22 @@ impl ServiceDefinitionDataAttributes { schema: None, } } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionMeta, + ) -> &mut Self { + self.meta = Some(value); + self + } + + pub fn with_schema( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionSchema, + ) -> &mut Self { + self.schema = Some(value); + self + } } impl Default for ServiceDefinitionDataAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_service_definition_get_response.rs b/src/datadogV2/model/model_service_definition_get_response.rs index 973b961a6..6101235eb 100644 --- a/src/datadogV2/model/model_service_definition_get_response.rs +++ b/src/datadogV2/model/model_service_definition_get_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct ServiceDefinitionGetResponse { /// Service definition data. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl ServiceDefinitionGetResponse { pub fn new() -> ServiceDefinitionGetResponse { ServiceDefinitionGetResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for ServiceDefinitionGetResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_service_definition_meta.rs b/src/datadogV2/model/model_service_definition_meta.rs index 34dd52e94..91eb83093 100644 --- a/src/datadogV2/model/model_service_definition_meta.rs +++ b/src/datadogV2/model/model_service_definition_meta.rs @@ -43,6 +43,44 @@ impl ServiceDefinitionMeta { warnings: None, } } + + pub fn with_github_html_url(&mut self, value: String) -> &mut Self { + self.github_html_url = Some(value); + self + } + + pub fn with_ingested_schema_version(&mut self, value: String) -> &mut Self { + self.ingested_schema_version = Some(value); + self + } + + pub fn with_ingestion_source(&mut self, value: String) -> &mut Self { + self.ingestion_source = Some(value); + self + } + + pub fn with_last_modified_time(&mut self, value: String) -> &mut Self { + self.last_modified_time = Some(value); + self + } + + pub fn with_origin(&mut self, value: String) -> &mut Self { + self.origin = Some(value); + self + } + + pub fn with_origin_detail(&mut self, value: String) -> &mut Self { + self.origin_detail = Some(value); + self + } + + pub fn with_warnings( + &mut self, + value: Vec, + ) -> &mut Self { + self.warnings = Some(value); + self + } } impl Default for ServiceDefinitionMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_service_definition_meta_warnings.rs b/src/datadogV2/model/model_service_definition_meta_warnings.rs index e1d504b3e..cdf60e22d 100644 --- a/src/datadogV2/model/model_service_definition_meta_warnings.rs +++ b/src/datadogV2/model/model_service_definition_meta_warnings.rs @@ -27,6 +27,21 @@ impl ServiceDefinitionMetaWarnings { message: None, } } + + pub fn with_instance_location(&mut self, value: String) -> &mut Self { + self.instance_location = Some(value); + self + } + + pub fn with_keyword_location(&mut self, value: String) -> &mut Self { + self.keyword_location = Some(value); + self + } + + pub fn with_message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } } impl Default for ServiceDefinitionMetaWarnings { fn default() -> Self { diff --git a/src/datadogV2/model/model_service_definition_schema.rs b/src/datadogV2/model/model_service_definition_schema.rs index 7f53271ea..0889497e9 100644 --- a/src/datadogV2/model/model_service_definition_schema.rs +++ b/src/datadogV2/model/model_service_definition_schema.rs @@ -7,8 +7,8 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ServiceDefinitionSchema { - ServiceDefinitionV1(Box), - ServiceDefinitionV2(Box), - ServiceDefinitionV2Dot1(Box), - ServiceDefinitionV2Dot2(Box), + ServiceDefinitionV1(crate::datadogV2::model::ServiceDefinitionV1), + ServiceDefinitionV2(crate::datadogV2::model::ServiceDefinitionV2), + ServiceDefinitionV2Dot1(crate::datadogV2::model::ServiceDefinitionV2Dot1), + ServiceDefinitionV2Dot2(crate::datadogV2::model::ServiceDefinitionV2Dot2), } diff --git a/src/datadogV2/model/model_service_definition_v1.rs b/src/datadogV2/model/model_service_definition_v1.rs index 238896059..e10668ca4 100644 --- a/src/datadogV2/model/model_service_definition_v1.rs +++ b/src/datadogV2/model/model_service_definition_v1.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ServiceDefinitionV1 { /// Contact information about the service. #[serde(rename = "contact")] - pub contact: Option>, + pub contact: Option, /// Extensions to V1 schema. #[serde(rename = "extensions")] pub extensions: Option>, @@ -19,13 +19,13 @@ pub struct ServiceDefinitionV1 { pub external_resources: Option>, /// Basic information about a service. #[serde(rename = "info")] - pub info: Box, + pub info: crate::datadogV2::model::ServiceDefinitionV1Info, /// Third party integrations that Datadog supports. #[serde(rename = "integrations")] - pub integrations: Option>, + pub integrations: Option, /// Org related information about the service. #[serde(rename = "org")] - pub org: Option>, + pub org: Option, /// Schema version being used. #[serde(rename = "schema-version")] pub schema_version: crate::datadogV2::model::ServiceDefinitionV1Version, @@ -36,7 +36,7 @@ pub struct ServiceDefinitionV1 { impl ServiceDefinitionV1 { pub fn new( - info: Box, + info: crate::datadogV2::model::ServiceDefinitionV1Info, schema_version: crate::datadogV2::model::ServiceDefinitionV1Version, ) -> ServiceDefinitionV1 { ServiceDefinitionV1 { @@ -50,4 +50,49 @@ impl ServiceDefinitionV1 { tags: None, } } + + pub fn with_contact( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV1Contact, + ) -> &mut Self { + self.contact = Some(value); + self + } + + pub fn with_extensions( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.extensions = Some(value); + self + } + + pub fn with_external_resources( + &mut self, + value: Vec, + ) -> &mut Self { + self.external_resources = Some(value); + self + } + + pub fn with_integrations( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV1Integrations, + ) -> &mut Self { + self.integrations = Some(value); + self + } + + pub fn with_org( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV1Org, + ) -> &mut Self { + self.org = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definition_v1_contact.rs b/src/datadogV2/model/model_service_definition_v1_contact.rs index d6fa78254..ebb1e0c3d 100644 --- a/src/datadogV2/model/model_service_definition_v1_contact.rs +++ b/src/datadogV2/model/model_service_definition_v1_contact.rs @@ -23,6 +23,16 @@ impl ServiceDefinitionV1Contact { slack: None, } } + + pub fn with_email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn with_slack(&mut self, value: String) -> &mut Self { + self.slack = Some(value); + self + } } impl Default for ServiceDefinitionV1Contact { fn default() -> Self { diff --git a/src/datadogV2/model/model_service_definition_v1_info.rs b/src/datadogV2/model/model_service_definition_v1_info.rs index fd192451d..592a70c8f 100644 --- a/src/datadogV2/model/model_service_definition_v1_info.rs +++ b/src/datadogV2/model/model_service_definition_v1_info.rs @@ -31,4 +31,19 @@ impl ServiceDefinitionV1Info { service_tier: None, } } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_display_name(&mut self, value: String) -> &mut Self { + self.display_name = Some(value); + self + } + + pub fn with_service_tier(&mut self, value: String) -> &mut Self { + self.service_tier = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definition_v1_integrations.rs b/src/datadogV2/model/model_service_definition_v1_integrations.rs index d40a117cd..0311f6d1c 100644 --- a/src/datadogV2/model/model_service_definition_v1_integrations.rs +++ b/src/datadogV2/model/model_service_definition_v1_integrations.rs @@ -17,6 +17,11 @@ impl ServiceDefinitionV1Integrations { pub fn new() -> ServiceDefinitionV1Integrations { ServiceDefinitionV1Integrations { pagerduty: None } } + + pub fn with_pagerduty(&mut self, value: String) -> &mut Self { + self.pagerduty = Some(value); + self + } } impl Default for ServiceDefinitionV1Integrations { fn default() -> Self { diff --git a/src/datadogV2/model/model_service_definition_v1_org.rs b/src/datadogV2/model/model_service_definition_v1_org.rs index 48a339dd5..4ba4a8824 100644 --- a/src/datadogV2/model/model_service_definition_v1_org.rs +++ b/src/datadogV2/model/model_service_definition_v1_org.rs @@ -23,6 +23,16 @@ impl ServiceDefinitionV1Org { team: None, } } + + pub fn with_application(&mut self, value: String) -> &mut Self { + self.application = Some(value); + self + } + + pub fn with_team(&mut self, value: String) -> &mut Self { + self.team = Some(value); + self + } } impl Default for ServiceDefinitionV1Org { fn default() -> Self { diff --git a/src/datadogV2/model/model_service_definition_v2.rs b/src/datadogV2/model/model_service_definition_v2.rs index 73ea82b96..4ec9df3b3 100644 --- a/src/datadogV2/model/model_service_definition_v2.rs +++ b/src/datadogV2/model/model_service_definition_v2.rs @@ -25,7 +25,7 @@ pub struct ServiceDefinitionV2 { pub extensions: Option>, /// Third party integrations that Datadog supports. #[serde(rename = "integrations")] - pub integrations: Option>, + pub integrations: Option, /// A list of links related to the services. #[serde(rename = "links")] pub links: Option>, @@ -62,4 +62,67 @@ impl ServiceDefinitionV2 { team: None, } } + + pub fn with_contacts( + &mut self, + value: Vec, + ) -> &mut Self { + self.contacts = Some(value); + self + } + + pub fn with_dd_team(&mut self, value: String) -> &mut Self { + self.dd_team = Some(value); + self + } + + pub fn with_docs( + &mut self, + value: Vec, + ) -> &mut Self { + self.docs = Some(value); + self + } + + pub fn with_extensions( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.extensions = Some(value); + self + } + + pub fn with_integrations( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2Integrations, + ) -> &mut Self { + self.integrations = Some(value); + self + } + + pub fn with_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_repos( + &mut self, + value: Vec, + ) -> &mut Self { + self.repos = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_team(&mut self, value: String) -> &mut Self { + self.team = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definition_v2_contact.rs b/src/datadogV2/model/model_service_definition_v2_contact.rs index 82dfb76f9..69fb71346 100644 --- a/src/datadogV2/model/model_service_definition_v2_contact.rs +++ b/src/datadogV2/model/model_service_definition_v2_contact.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ServiceDefinitionV2Contact { - ServiceDefinitionV2Email(Box), - ServiceDefinitionV2Slack(Box), - ServiceDefinitionV2MSTeams(Box), + ServiceDefinitionV2Email(crate::datadogV2::model::ServiceDefinitionV2Email), + ServiceDefinitionV2Slack(crate::datadogV2::model::ServiceDefinitionV2Slack), + ServiceDefinitionV2MSTeams(crate::datadogV2::model::ServiceDefinitionV2MSTeams), } diff --git a/src/datadogV2/model/model_service_definition_v2_doc.rs b/src/datadogV2/model/model_service_definition_v2_doc.rs index 74a2f5a3b..3d5a83616 100644 --- a/src/datadogV2/model/model_service_definition_v2_doc.rs +++ b/src/datadogV2/model/model_service_definition_v2_doc.rs @@ -27,4 +27,9 @@ impl ServiceDefinitionV2Doc { url, } } + + pub fn with_provider(&mut self, value: String) -> &mut Self { + self.provider = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definition_v2_dot1.rs b/src/datadogV2/model/model_service_definition_v2_dot1.rs index f01a2c627..1f37258ab 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot1.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot1.rs @@ -25,7 +25,7 @@ pub struct ServiceDefinitionV2Dot1 { pub extensions: Option>, /// Third party integrations that Datadog supports. #[serde(rename = "integrations")] - pub integrations: Option>, + pub integrations: Option, /// The current life cycle phase of the service. #[serde(rename = "lifecycle")] pub lifecycle: Option, @@ -66,4 +66,66 @@ impl ServiceDefinitionV2Dot1 { tier: None, } } + + pub fn with_application(&mut self, value: String) -> &mut Self { + self.application = Some(value); + self + } + + pub fn with_contacts( + &mut self, + value: Vec, + ) -> &mut Self { + self.contacts = Some(value); + self + } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_extensions( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.extensions = Some(value); + self + } + + pub fn with_integrations( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2Dot1Integrations, + ) -> &mut Self { + self.integrations = Some(value); + self + } + + pub fn with_lifecycle(&mut self, value: String) -> &mut Self { + self.lifecycle = Some(value); + self + } + + pub fn with_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_team(&mut self, value: String) -> &mut Self { + self.team = Some(value); + self + } + + pub fn with_tier(&mut self, value: String) -> &mut Self { + self.tier = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_contact.rs b/src/datadogV2/model/model_service_definition_v2_dot1_contact.rs index 5dd9ad082..81ed4ed07 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot1_contact.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot1_contact.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ServiceDefinitionV2Dot1Contact { - ServiceDefinitionV2Dot1Email(Box), - ServiceDefinitionV2Dot1Slack(Box), - ServiceDefinitionV2Dot1MSTeams(Box), + ServiceDefinitionV2Dot1Email(crate::datadogV2::model::ServiceDefinitionV2Dot1Email), + ServiceDefinitionV2Dot1Slack(crate::datadogV2::model::ServiceDefinitionV2Dot1Slack), + ServiceDefinitionV2Dot1MSTeams(crate::datadogV2::model::ServiceDefinitionV2Dot1MSTeams), } diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_email.rs b/src/datadogV2/model/model_service_definition_v2_dot1_email.rs index 832b85448..714979d0a 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot1_email.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot1_email.rs @@ -30,4 +30,9 @@ impl ServiceDefinitionV2Dot1Email { type_, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_integrations.rs b/src/datadogV2/model/model_service_definition_v2_dot1_integrations.rs index 5f7128bcc..06d0eccb1 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot1_integrations.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot1_integrations.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct ServiceDefinitionV2Dot1Integrations { /// Opsgenie integration for the service. #[serde(rename = "opsgenie")] - pub opsgenie: Option>, + pub opsgenie: Option, /// PagerDuty integration for the service. #[serde(rename = "pagerduty")] - pub pagerduty: Option>, + pub pagerduty: Option, } impl ServiceDefinitionV2Dot1Integrations { @@ -23,6 +23,22 @@ impl ServiceDefinitionV2Dot1Integrations { pagerduty: None, } } + + pub fn with_opsgenie( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2Dot1Opsgenie, + ) -> &mut Self { + self.opsgenie = Some(value); + self + } + + pub fn with_pagerduty( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2Dot1Pagerduty, + ) -> &mut Self { + self.pagerduty = Some(value); + self + } } impl Default for ServiceDefinitionV2Dot1Integrations { fn default() -> Self { diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_link.rs b/src/datadogV2/model/model_service_definition_v2_dot1_link.rs index 148efd729..3a5954da0 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot1_link.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot1_link.rs @@ -35,4 +35,9 @@ impl ServiceDefinitionV2Dot1Link { url, } } + + pub fn with_provider(&mut self, value: String) -> &mut Self { + self.provider = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_ms_teams.rs b/src/datadogV2/model/model_service_definition_v2_dot1_ms_teams.rs index b9b27d257..ceaa6e2ff 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot1_ms_teams.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot1_ms_teams.rs @@ -30,4 +30,9 @@ impl ServiceDefinitionV2Dot1MSTeams { type_, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_opsgenie.rs b/src/datadogV2/model/model_service_definition_v2_dot1_opsgenie.rs index 5d56866e7..faa2863a0 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot1_opsgenie.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot1_opsgenie.rs @@ -23,4 +23,12 @@ impl ServiceDefinitionV2Dot1Opsgenie { service_url, } } + + pub fn with_region( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2Dot1OpsgenieRegion, + ) -> &mut Self { + self.region = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_pagerduty.rs b/src/datadogV2/model/model_service_definition_v2_dot1_pagerduty.rs index a17f402ca..4b8119c10 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot1_pagerduty.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot1_pagerduty.rs @@ -17,6 +17,11 @@ impl ServiceDefinitionV2Dot1Pagerduty { pub fn new() -> ServiceDefinitionV2Dot1Pagerduty { ServiceDefinitionV2Dot1Pagerduty { service_url: None } } + + pub fn with_service_url(&mut self, value: String) -> &mut Self { + self.service_url = Some(value); + self + } } impl Default for ServiceDefinitionV2Dot1Pagerduty { fn default() -> Self { diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_slack.rs b/src/datadogV2/model/model_service_definition_v2_dot1_slack.rs index 7539fb877..ad00d9e2d 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot1_slack.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot1_slack.rs @@ -30,4 +30,9 @@ impl ServiceDefinitionV2Dot1Slack { type_, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definition_v2_dot2.rs b/src/datadogV2/model/model_service_definition_v2_dot2.rs index cdf055c0e..f1ac864be 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot2.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot2.rs @@ -25,7 +25,7 @@ pub struct ServiceDefinitionV2Dot2 { pub extensions: Option>, /// Third party integrations that Datadog supports. #[serde(rename = "integrations")] - pub integrations: Option>, + pub integrations: Option, /// The service's programming language. Datadog recognizes the following languages: `dotnet`, `go`, `java`, `js`, `php`, `python`, `ruby`, and `c++`. #[serde(rename = "languages")] pub languages: Option>, @@ -74,4 +74,79 @@ impl ServiceDefinitionV2Dot2 { type_: None, } } + + pub fn with_application(&mut self, value: String) -> &mut Self { + self.application = Some(value); + self + } + + pub fn with_contacts( + &mut self, + value: Vec, + ) -> &mut Self { + self.contacts = Some(value); + self + } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_extensions( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.extensions = Some(value); + self + } + + pub fn with_integrations( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2Dot2Integrations, + ) -> &mut Self { + self.integrations = Some(value); + self + } + + pub fn with_languages(&mut self, value: Vec) -> &mut Self { + self.languages = Some(value); + self + } + + pub fn with_lifecycle(&mut self, value: String) -> &mut Self { + self.lifecycle = Some(value); + self + } + + pub fn with_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_team(&mut self, value: String) -> &mut Self { + self.team = Some(value); + self + } + + pub fn with_tier(&mut self, value: String) -> &mut Self { + self.tier = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2Dot2Type, + ) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definition_v2_dot2_contact.rs b/src/datadogV2/model/model_service_definition_v2_dot2_contact.rs index 729927489..90aed82e5 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot2_contact.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot2_contact.rs @@ -27,4 +27,9 @@ impl ServiceDefinitionV2Dot2Contact { type_, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definition_v2_dot2_integrations.rs b/src/datadogV2/model/model_service_definition_v2_dot2_integrations.rs index 809552e00..c68f50792 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot2_integrations.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot2_integrations.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct ServiceDefinitionV2Dot2Integrations { /// Opsgenie integration for the service. #[serde(rename = "opsgenie")] - pub opsgenie: Option>, + pub opsgenie: Option, /// PagerDuty integration for the service. #[serde(rename = "pagerduty")] - pub pagerduty: Option>, + pub pagerduty: Option, } impl ServiceDefinitionV2Dot2Integrations { @@ -23,6 +23,22 @@ impl ServiceDefinitionV2Dot2Integrations { pagerduty: None, } } + + pub fn with_opsgenie( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2Dot2Opsgenie, + ) -> &mut Self { + self.opsgenie = Some(value); + self + } + + pub fn with_pagerduty( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2Dot2Pagerduty, + ) -> &mut Self { + self.pagerduty = Some(value); + self + } } impl Default for ServiceDefinitionV2Dot2Integrations { fn default() -> Self { diff --git a/src/datadogV2/model/model_service_definition_v2_dot2_link.rs b/src/datadogV2/model/model_service_definition_v2_dot2_link.rs index b4260c1e3..ed00eb3d3 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot2_link.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot2_link.rs @@ -31,4 +31,9 @@ impl ServiceDefinitionV2Dot2Link { url, } } + + pub fn with_provider(&mut self, value: String) -> &mut Self { + self.provider = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definition_v2_dot2_opsgenie.rs b/src/datadogV2/model/model_service_definition_v2_dot2_opsgenie.rs index 39788e383..599fa3b18 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot2_opsgenie.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot2_opsgenie.rs @@ -23,4 +23,12 @@ impl ServiceDefinitionV2Dot2Opsgenie { service_url, } } + + pub fn with_region( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2Dot2OpsgenieRegion, + ) -> &mut Self { + self.region = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definition_v2_dot2_pagerduty.rs b/src/datadogV2/model/model_service_definition_v2_dot2_pagerduty.rs index 367add008..d8ed7a8c7 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot2_pagerduty.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot2_pagerduty.rs @@ -17,6 +17,11 @@ impl ServiceDefinitionV2Dot2Pagerduty { pub fn new() -> ServiceDefinitionV2Dot2Pagerduty { ServiceDefinitionV2Dot2Pagerduty { service_url: None } } + + pub fn with_service_url(&mut self, value: String) -> &mut Self { + self.service_url = Some(value); + self + } } impl Default for ServiceDefinitionV2Dot2Pagerduty { fn default() -> Self { diff --git a/src/datadogV2/model/model_service_definition_v2_email.rs b/src/datadogV2/model/model_service_definition_v2_email.rs index d20dad5ec..5c2d18f80 100644 --- a/src/datadogV2/model/model_service_definition_v2_email.rs +++ b/src/datadogV2/model/model_service_definition_v2_email.rs @@ -30,4 +30,9 @@ impl ServiceDefinitionV2Email { type_, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definition_v2_integrations.rs b/src/datadogV2/model/model_service_definition_v2_integrations.rs index 5262eadd6..813b86c41 100644 --- a/src/datadogV2/model/model_service_definition_v2_integrations.rs +++ b/src/datadogV2/model/model_service_definition_v2_integrations.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct ServiceDefinitionV2Integrations { /// Opsgenie integration for the service. #[serde(rename = "opsgenie")] - pub opsgenie: Option>, + pub opsgenie: Option, /// PagerDuty service URL for the service. #[serde(rename = "pagerduty")] pub pagerduty: Option, @@ -23,6 +23,19 @@ impl ServiceDefinitionV2Integrations { pagerduty: None, } } + + pub fn with_opsgenie( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2Opsgenie, + ) -> &mut Self { + self.opsgenie = Some(value); + self + } + + pub fn with_pagerduty(&mut self, value: String) -> &mut Self { + self.pagerduty = Some(value); + self + } } impl Default for ServiceDefinitionV2Integrations { fn default() -> Self { diff --git a/src/datadogV2/model/model_service_definition_v2_ms_teams.rs b/src/datadogV2/model/model_service_definition_v2_ms_teams.rs index ce30f45a1..bd1840844 100644 --- a/src/datadogV2/model/model_service_definition_v2_ms_teams.rs +++ b/src/datadogV2/model/model_service_definition_v2_ms_teams.rs @@ -30,4 +30,9 @@ impl ServiceDefinitionV2MSTeams { type_, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definition_v2_opsgenie.rs b/src/datadogV2/model/model_service_definition_v2_opsgenie.rs index 7805b6b78..35e42859e 100644 --- a/src/datadogV2/model/model_service_definition_v2_opsgenie.rs +++ b/src/datadogV2/model/model_service_definition_v2_opsgenie.rs @@ -23,4 +23,12 @@ impl ServiceDefinitionV2Opsgenie { service_url, } } + + pub fn with_region( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2OpsgenieRegion, + ) -> &mut Self { + self.region = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definition_v2_repo.rs b/src/datadogV2/model/model_service_definition_v2_repo.rs index c8ad9dba2..06b758286 100644 --- a/src/datadogV2/model/model_service_definition_v2_repo.rs +++ b/src/datadogV2/model/model_service_definition_v2_repo.rs @@ -27,4 +27,9 @@ impl ServiceDefinitionV2Repo { url, } } + + pub fn with_provider(&mut self, value: String) -> &mut Self { + self.provider = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definition_v2_slack.rs b/src/datadogV2/model/model_service_definition_v2_slack.rs index b926c4fcf..c79227a31 100644 --- a/src/datadogV2/model/model_service_definition_v2_slack.rs +++ b/src/datadogV2/model/model_service_definition_v2_slack.rs @@ -30,4 +30,9 @@ impl ServiceDefinitionV2Slack { type_, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definitions_create_request.rs b/src/datadogV2/model/model_service_definitions_create_request.rs index 58135a292..2fa4ac614 100644 --- a/src/datadogV2/model/model_service_definitions_create_request.rs +++ b/src/datadogV2/model/model_service_definitions_create_request.rs @@ -7,8 +7,8 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ServiceDefinitionsCreateRequest { - ServiceDefinitionV2Dot2(Box), - ServiceDefinitionV2Dot1(Box), - ServiceDefinitionV2(Box), + ServiceDefinitionV2Dot2(crate::datadogV2::model::ServiceDefinitionV2Dot2), + ServiceDefinitionV2Dot1(crate::datadogV2::model::ServiceDefinitionV2Dot1), + ServiceDefinitionV2(crate::datadogV2::model::ServiceDefinitionV2), ServiceDefinitionRaw(String), } diff --git a/src/datadogV2/model/model_service_definitions_list_response.rs b/src/datadogV2/model/model_service_definitions_list_response.rs index ff027f052..5d1bb1dff 100644 --- a/src/datadogV2/model/model_service_definitions_list_response.rs +++ b/src/datadogV2/model/model_service_definitions_list_response.rs @@ -17,6 +17,14 @@ impl ServiceDefinitionsListResponse { pub fn new() -> ServiceDefinitionsListResponse { ServiceDefinitionsListResponse { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for ServiceDefinitionsListResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_slack_integration_metadata_channel_item.rs b/src/datadogV2/model/model_slack_integration_metadata_channel_item.rs index 119597103..562744a9d 100644 --- a/src/datadogV2/model/model_slack_integration_metadata_channel_item.rs +++ b/src/datadogV2/model/model_slack_integration_metadata_channel_item.rs @@ -35,4 +35,9 @@ impl SlackIntegrationMetadataChannelItem { team_id: None, } } + + pub fn with_team_id(&mut self, value: String) -> &mut Self { + self.team_id = Some(value); + self + } } diff --git a/src/datadogV2/model/model_span.rs b/src/datadogV2/model/model_span.rs index e04ba1833..f37b99310 100644 --- a/src/datadogV2/model/model_span.rs +++ b/src/datadogV2/model/model_span.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct Span { /// JSON object containing all span attributes and their associated values. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Unique ID of the Span. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl Span { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::SpansAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::SpansType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for Span { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_aggregate_bucket.rs b/src/datadogV2/model/model_spans_aggregate_bucket.rs index dcce81600..25d05c099 100644 --- a/src/datadogV2/model/model_spans_aggregate_bucket.rs +++ b/src/datadogV2/model/model_spans_aggregate_bucket.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SpansAggregateBucket { /// A bucket values. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of the spans aggregate. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,27 @@ impl SpansAggregateBucket { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::SpansAggregateBucketAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SpansAggregateBucketType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SpansAggregateBucket { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_aggregate_bucket_attributes.rs b/src/datadogV2/model/model_spans_aggregate_bucket_attributes.rs index fc4638421..4e4cd3209 100644 --- a/src/datadogV2/model/model_spans_aggregate_bucket_attributes.rs +++ b/src/datadogV2/model/model_spans_aggregate_bucket_attributes.rs @@ -29,6 +29,33 @@ impl SpansAggregateBucketAttributes { computes: None, } } + + pub fn with_by( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.by = Some(value); + self + } + + pub fn with_compute( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn with_computes( + &mut self, + value: std::collections::BTreeMap< + String, + crate::datadogV2::model::SpansAggregateBucketValue, + >, + ) -> &mut Self { + self.computes = Some(value); + self + } } impl Default for SpansAggregateBucketAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_aggregate_bucket_value_timeseries_point.rs b/src/datadogV2/model/model_spans_aggregate_bucket_value_timeseries_point.rs index 3da27f132..677993cb0 100644 --- a/src/datadogV2/model/model_spans_aggregate_bucket_value_timeseries_point.rs +++ b/src/datadogV2/model/model_spans_aggregate_bucket_value_timeseries_point.rs @@ -23,6 +23,16 @@ impl SpansAggregateBucketValueTimeseriesPoint { value: None, } } + + pub fn with_time(&mut self, value: String) -> &mut Self { + self.time = Some(value); + self + } + + pub fn with_value(&mut self, value: f64) -> &mut Self { + self.value = Some(value); + self + } } impl Default for SpansAggregateBucketValueTimeseriesPoint { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_aggregate_data.rs b/src/datadogV2/model/model_spans_aggregate_data.rs index 59c56b4c2..64219b0bc 100644 --- a/src/datadogV2/model/model_spans_aggregate_data.rs +++ b/src/datadogV2/model/model_spans_aggregate_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SpansAggregateData { /// The object containing all the query parameters. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The type of resource. The value should always be aggregate_request. #[serde(rename = "type")] pub type_: Option, @@ -23,6 +23,22 @@ impl SpansAggregateData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::SpansAggregateRequestAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SpansAggregateRequestType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SpansAggregateData { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_aggregate_request.rs b/src/datadogV2/model/model_spans_aggregate_request.rs index 2ebec6ba9..1215c5b28 100644 --- a/src/datadogV2/model/model_spans_aggregate_request.rs +++ b/src/datadogV2/model/model_spans_aggregate_request.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct SpansAggregateRequest { /// The object containing the query content. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl SpansAggregateRequest { pub fn new() -> SpansAggregateRequest { SpansAggregateRequest { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::SpansAggregateData) -> &mut Self { + self.data = Some(value); + self + } } impl Default for SpansAggregateRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_aggregate_request_attributes.rs b/src/datadogV2/model/model_spans_aggregate_request_attributes.rs index 029b257b4..c95cdc971 100644 --- a/src/datadogV2/model/model_spans_aggregate_request_attributes.rs +++ b/src/datadogV2/model/model_spans_aggregate_request_attributes.rs @@ -13,14 +13,14 @@ pub struct SpansAggregateRequestAttributes { pub compute: Option>, /// The search and filter query settings. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// The rules for the group by. #[serde(rename = "group_by")] pub group_by: Option>, /// Global query options that are used during the query. /// Note: You should only supply timezone or time offset but not both otherwise the query will fail. #[serde(rename = "options")] - pub options: Option>, + pub options: Option, } impl SpansAggregateRequestAttributes { @@ -32,6 +32,29 @@ impl SpansAggregateRequestAttributes { options: None, } } + + pub fn with_compute(&mut self, value: Vec) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn with_filter(&mut self, value: crate::datadogV2::model::SpansQueryFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn with_options(&mut self, value: crate::datadogV2::model::SpansQueryOptions) -> &mut Self { + self.options = Some(value); + self + } } impl Default for SpansAggregateRequestAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_aggregate_response.rs b/src/datadogV2/model/model_spans_aggregate_response.rs index 195aa46fb..a03eb49e2 100644 --- a/src/datadogV2/model/model_spans_aggregate_response.rs +++ b/src/datadogV2/model/model_spans_aggregate_response.rs @@ -13,7 +13,7 @@ pub struct SpansAggregateResponse { pub data: Option>, /// The metadata associated with a request. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl SpansAggregateResponse { @@ -23,6 +23,22 @@ impl SpansAggregateResponse { meta: None, } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::SpansAggregateResponseMetadata, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for SpansAggregateResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_aggregate_response_metadata.rs b/src/datadogV2/model/model_spans_aggregate_response_metadata.rs index 503660fdc..8dbac4106 100644 --- a/src/datadogV2/model/model_spans_aggregate_response_metadata.rs +++ b/src/datadogV2/model/model_spans_aggregate_response_metadata.rs @@ -32,6 +32,32 @@ impl SpansAggregateResponseMetadata { warnings: None, } } + + pub fn with_elapsed(&mut self, value: i64) -> &mut Self { + self.elapsed = Some(value); + self + } + + pub fn with_request_id(&mut self, value: String) -> &mut Self { + self.request_id = Some(value); + self + } + + pub fn with_status( + &mut self, + value: crate::datadogV2::model::SpansAggregateResponseStatus, + ) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_warnings( + &mut self, + value: Vec, + ) -> &mut Self { + self.warnings = Some(value); + self + } } impl Default for SpansAggregateResponseMetadata { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_aggregate_sort.rs b/src/datadogV2/model/model_spans_aggregate_sort.rs index caee2bdc4..df6da5ac3 100644 --- a/src/datadogV2/model/model_spans_aggregate_sort.rs +++ b/src/datadogV2/model/model_spans_aggregate_sort.rs @@ -31,6 +31,32 @@ impl SpansAggregateSort { type_: None, } } + + pub fn with_aggregation( + &mut self, + value: crate::datadogV2::model::SpansAggregationFunction, + ) -> &mut Self { + self.aggregation = Some(value); + self + } + + pub fn with_metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn with_order(&mut self, value: crate::datadogV2::model::SpansSortOrder) -> &mut Self { + self.order = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SpansAggregateSortType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SpansAggregateSort { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_attributes.rs b/src/datadogV2/model/model_spans_attributes.rs index f518b2aa0..01310e12c 100644 --- a/src/datadogV2/model/model_spans_attributes.rs +++ b/src/datadogV2/model/model_spans_attributes.rs @@ -85,6 +85,97 @@ impl SpansAttributes { type_: None, } } + + pub fn with_attributes( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_custom( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.custom = Some(value); + self + } + + pub fn with_end_timestamp(&mut self, value: String) -> &mut Self { + self.end_timestamp = Some(value); + self + } + + pub fn with_env(&mut self, value: String) -> &mut Self { + self.env = Some(value); + self + } + + pub fn with_host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn with_ingestion_reason(&mut self, value: String) -> &mut Self { + self.ingestion_reason = Some(value); + self + } + + pub fn with_parent_id(&mut self, value: String) -> &mut Self { + self.parent_id = Some(value); + self + } + + pub fn with_resource_hash(&mut self, value: String) -> &mut Self { + self.resource_hash = Some(value); + self + } + + pub fn with_resource_name(&mut self, value: String) -> &mut Self { + self.resource_name = Some(value); + self + } + + pub fn with_retained_by(&mut self, value: String) -> &mut Self { + self.retained_by = Some(value); + self + } + + pub fn with_service(&mut self, value: String) -> &mut Self { + self.service = Some(value); + self + } + + pub fn with_single_span(&mut self, value: bool) -> &mut Self { + self.single_span = Some(value); + self + } + + pub fn with_span_id(&mut self, value: String) -> &mut Self { + self.span_id = Some(value); + self + } + + pub fn with_start_timestamp(&mut self, value: String) -> &mut Self { + self.start_timestamp = Some(value); + self + } + + pub fn with_tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn with_trace_id(&mut self, value: String) -> &mut Self { + self.trace_id = Some(value); + self + } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SpansAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_compute.rs b/src/datadogV2/model/model_spans_compute.rs index 19399a073..e9a5f2302 100644 --- a/src/datadogV2/model/model_spans_compute.rs +++ b/src/datadogV2/model/model_spans_compute.rs @@ -32,4 +32,19 @@ impl SpansCompute { type_: None, } } + + pub fn with_interval(&mut self, value: String) -> &mut Self { + self.interval = Some(value); + self + } + + pub fn with_metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::SpansComputeType) -> &mut Self { + self.type_ = Some(value); + self + } } diff --git a/src/datadogV2/model/model_spans_filter.rs b/src/datadogV2/model/model_spans_filter.rs index 3ae18edfe..4246876d3 100644 --- a/src/datadogV2/model/model_spans_filter.rs +++ b/src/datadogV2/model/model_spans_filter.rs @@ -17,6 +17,11 @@ impl SpansFilter { pub fn new() -> SpansFilter { SpansFilter { query: None } } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } } impl Default for SpansFilter { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_group_by.rs b/src/datadogV2/model/model_spans_group_by.rs index d5d9250c7..ce8e322cc 100644 --- a/src/datadogV2/model/model_spans_group_by.rs +++ b/src/datadogV2/model/model_spans_group_by.rs @@ -14,19 +14,19 @@ pub struct SpansGroupBy { /// Used to perform a histogram computation (only for measure facets). /// Note: At most 100 buckets are allowed, the number of buckets is (max - min)/interval. #[serde(rename = "histogram")] - pub histogram: Option>, + pub histogram: Option, /// The maximum buckets to return for this group by. #[serde(rename = "limit")] pub limit: Option, /// The value to use for spans that don't have the facet used to group by. #[serde(rename = "missing")] - pub missing: Option>, + pub missing: Option, /// A sort rule. #[serde(rename = "sort")] - pub sort: Option>, + pub sort: Option, /// A resulting object to put the given computes in over all the matching records. #[serde(rename = "total")] - pub total: Option>, + pub total: Option, } impl SpansGroupBy { @@ -40,4 +40,35 @@ impl SpansGroupBy { total: None, } } + + pub fn with_histogram( + &mut self, + value: crate::datadogV2::model::SpansGroupByHistogram, + ) -> &mut Self { + self.histogram = Some(value); + self + } + + pub fn with_limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_missing( + &mut self, + value: crate::datadogV2::model::SpansGroupByMissing, + ) -> &mut Self { + self.missing = Some(value); + self + } + + pub fn with_sort(&mut self, value: crate::datadogV2::model::SpansAggregateSort) -> &mut Self { + self.sort = Some(value); + self + } + + pub fn with_total(&mut self, value: crate::datadogV2::model::SpansGroupByTotal) -> &mut Self { + self.total = Some(value); + self + } } diff --git a/src/datadogV2/model/model_spans_list_request.rs b/src/datadogV2/model/model_spans_list_request.rs index 070ee7c95..61552c00b 100644 --- a/src/datadogV2/model/model_spans_list_request.rs +++ b/src/datadogV2/model/model_spans_list_request.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct SpansListRequest { /// The object containing the query content. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl SpansListRequest { pub fn new() -> SpansListRequest { SpansListRequest { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::SpansListRequestData) -> &mut Self { + self.data = Some(value); + self + } } impl Default for SpansListRequest { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_list_request_attributes.rs b/src/datadogV2/model/model_spans_list_request_attributes.rs index fd00272e4..41b4e36b4 100644 --- a/src/datadogV2/model/model_spans_list_request_attributes.rs +++ b/src/datadogV2/model/model_spans_list_request_attributes.rs @@ -10,14 +10,14 @@ use serde_with::skip_serializing_none; pub struct SpansListRequestAttributes { /// The search and filter query settings. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// Global query options that are used during the query. /// Note: You should only supply timezone or time offset but not both otherwise the query will fail. #[serde(rename = "options")] - pub options: Option>, + pub options: Option, /// Paging attributes for listing spans. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, /// Sort parameters when querying spans. #[serde(rename = "sort")] pub sort: Option, @@ -32,6 +32,26 @@ impl SpansListRequestAttributes { sort: None, } } + + pub fn with_filter(&mut self, value: crate::datadogV2::model::SpansQueryFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_options(&mut self, value: crate::datadogV2::model::SpansQueryOptions) -> &mut Self { + self.options = Some(value); + self + } + + pub fn with_page(&mut self, value: crate::datadogV2::model::SpansListRequestPage) -> &mut Self { + self.page = Some(value); + self + } + + pub fn with_sort(&mut self, value: crate::datadogV2::model::SpansSort) -> &mut Self { + self.sort = Some(value); + self + } } impl Default for SpansListRequestAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_list_request_data.rs b/src/datadogV2/model/model_spans_list_request_data.rs index 6b05c7731..22f483737 100644 --- a/src/datadogV2/model/model_spans_list_request_data.rs +++ b/src/datadogV2/model/model_spans_list_request_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SpansListRequestData { /// The object containing all the query parameters. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The type of resource. The value should always be search_request. #[serde(rename = "type")] pub type_: Option, @@ -23,6 +23,22 @@ impl SpansListRequestData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::SpansListRequestAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::SpansListRequestType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SpansListRequestData { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_list_request_page.rs b/src/datadogV2/model/model_spans_list_request_page.rs index 59b8030d4..82abce740 100644 --- a/src/datadogV2/model/model_spans_list_request_page.rs +++ b/src/datadogV2/model/model_spans_list_request_page.rs @@ -23,6 +23,16 @@ impl SpansListRequestPage { limit: None, } } + + pub fn with_cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + self + } + + pub fn with_limit(&mut self, value: i32) -> &mut Self { + self.limit = Some(value); + self + } } impl Default for SpansListRequestPage { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_list_response.rs b/src/datadogV2/model/model_spans_list_response.rs index 41cd7f6d7..0106383f3 100644 --- a/src/datadogV2/model/model_spans_list_response.rs +++ b/src/datadogV2/model/model_spans_list_response.rs @@ -13,10 +13,10 @@ pub struct SpansListResponse { pub data: Option>, /// Links attributes. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, /// The metadata associated with a request. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl SpansListResponse { @@ -27,6 +27,27 @@ impl SpansListResponse { meta: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links( + &mut self, + value: crate::datadogV2::model::SpansListResponseLinks, + ) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::SpansListResponseMetadata, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for SpansListResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_list_response_links.rs b/src/datadogV2/model/model_spans_list_response_links.rs index 499ae54ca..737aa565b 100644 --- a/src/datadogV2/model/model_spans_list_response_links.rs +++ b/src/datadogV2/model/model_spans_list_response_links.rs @@ -18,6 +18,11 @@ impl SpansListResponseLinks { pub fn new() -> SpansListResponseLinks { SpansListResponseLinks { next: None } } + + pub fn with_next(&mut self, value: String) -> &mut Self { + self.next = Some(value); + self + } } impl Default for SpansListResponseLinks { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_list_response_metadata.rs b/src/datadogV2/model/model_spans_list_response_metadata.rs index a964c206d..e9003fde7 100644 --- a/src/datadogV2/model/model_spans_list_response_metadata.rs +++ b/src/datadogV2/model/model_spans_list_response_metadata.rs @@ -13,7 +13,7 @@ pub struct SpansListResponseMetadata { pub elapsed: Option, /// Paging attributes. #[serde(rename = "page")] - pub page: Option>, + pub page: Option, /// The identifier of the request. #[serde(rename = "request_id")] pub request_id: Option, @@ -36,6 +36,40 @@ impl SpansListResponseMetadata { warnings: None, } } + + pub fn with_elapsed(&mut self, value: i64) -> &mut Self { + self.elapsed = Some(value); + self + } + + pub fn with_page( + &mut self, + value: crate::datadogV2::model::SpansResponseMetadataPage, + ) -> &mut Self { + self.page = Some(value); + self + } + + pub fn with_request_id(&mut self, value: String) -> &mut Self { + self.request_id = Some(value); + self + } + + pub fn with_status( + &mut self, + value: crate::datadogV2::model::SpansAggregateResponseStatus, + ) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_warnings( + &mut self, + value: Vec, + ) -> &mut Self { + self.warnings = Some(value); + self + } } impl Default for SpansListResponseMetadata { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_metric_compute.rs b/src/datadogV2/model/model_spans_metric_compute.rs index c7f48a2c5..344f38d78 100644 --- a/src/datadogV2/model/model_spans_metric_compute.rs +++ b/src/datadogV2/model/model_spans_metric_compute.rs @@ -30,4 +30,14 @@ impl SpansMetricCompute { path: None, } } + + pub fn with_include_percentiles(&mut self, value: bool) -> &mut Self { + self.include_percentiles = Some(value); + self + } + + pub fn with_path(&mut self, value: String) -> &mut Self { + self.path = Some(value); + self + } } diff --git a/src/datadogV2/model/model_spans_metric_create_attributes.rs b/src/datadogV2/model/model_spans_metric_create_attributes.rs index 31425d255..97f848879 100644 --- a/src/datadogV2/model/model_spans_metric_create_attributes.rs +++ b/src/datadogV2/model/model_spans_metric_create_attributes.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct SpansMetricCreateAttributes { /// The compute rule to compute the span-based metric. #[serde(rename = "compute")] - pub compute: Box, + pub compute: crate::datadogV2::model::SpansMetricCompute, /// The span-based metric filter. Spans matching this filter will be aggregated in this metric. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// The rules for the group by. #[serde(rename = "group_by")] pub group_by: Option>, @@ -21,7 +21,7 @@ pub struct SpansMetricCreateAttributes { impl SpansMetricCreateAttributes { pub fn new( - compute: Box, + compute: crate::datadogV2::model::SpansMetricCompute, ) -> SpansMetricCreateAttributes { SpansMetricCreateAttributes { compute, @@ -29,4 +29,17 @@ impl SpansMetricCreateAttributes { group_by: None, } } + + pub fn with_filter(&mut self, value: crate::datadogV2::model::SpansMetricFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + self + } } diff --git a/src/datadogV2/model/model_spans_metric_create_data.rs b/src/datadogV2/model/model_spans_metric_create_data.rs index 7ab04106a..49f32cb1e 100644 --- a/src/datadogV2/model/model_spans_metric_create_data.rs +++ b/src/datadogV2/model/model_spans_metric_create_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SpansMetricCreateData { /// The object describing the Datadog span-based metric to create. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::SpansMetricCreateAttributes, /// The name of the span-based metric. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct SpansMetricCreateData { impl SpansMetricCreateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::SpansMetricCreateAttributes, id: String, type_: crate::datadogV2::model::SpansMetricType, ) -> SpansMetricCreateData { diff --git a/src/datadogV2/model/model_spans_metric_create_request.rs b/src/datadogV2/model/model_spans_metric_create_request.rs index 0e96b78b4..d2f8945d0 100644 --- a/src/datadogV2/model/model_spans_metric_create_request.rs +++ b/src/datadogV2/model/model_spans_metric_create_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct SpansMetricCreateRequest { /// The new span-based metric properties. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::SpansMetricCreateData, } impl SpansMetricCreateRequest { - pub fn new( - data: Box, - ) -> SpansMetricCreateRequest { + pub fn new(data: crate::datadogV2::model::SpansMetricCreateData) -> SpansMetricCreateRequest { SpansMetricCreateRequest { data } } } diff --git a/src/datadogV2/model/model_spans_metric_filter.rs b/src/datadogV2/model/model_spans_metric_filter.rs index bade04448..7cbbc4789 100644 --- a/src/datadogV2/model/model_spans_metric_filter.rs +++ b/src/datadogV2/model/model_spans_metric_filter.rs @@ -17,6 +17,11 @@ impl SpansMetricFilter { pub fn new() -> SpansMetricFilter { SpansMetricFilter { query: None } } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } } impl Default for SpansMetricFilter { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_metric_group_by.rs b/src/datadogV2/model/model_spans_metric_group_by.rs index 174d01bf3..8cccc6cbd 100644 --- a/src/datadogV2/model/model_spans_metric_group_by.rs +++ b/src/datadogV2/model/model_spans_metric_group_by.rs @@ -23,4 +23,9 @@ impl SpansMetricGroupBy { tag_name: None, } } + + pub fn with_tag_name(&mut self, value: String) -> &mut Self { + self.tag_name = Some(value); + self + } } diff --git a/src/datadogV2/model/model_spans_metric_response.rs b/src/datadogV2/model/model_spans_metric_response.rs index 56fb02fbf..810bb5bba 100644 --- a/src/datadogV2/model/model_spans_metric_response.rs +++ b/src/datadogV2/model/model_spans_metric_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct SpansMetricResponse { /// The span-based metric properties. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl SpansMetricResponse { pub fn new() -> SpansMetricResponse { SpansMetricResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::SpansMetricResponseData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for SpansMetricResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_metric_response_attributes.rs b/src/datadogV2/model/model_spans_metric_response_attributes.rs index 1717f291d..58d0b55c0 100644 --- a/src/datadogV2/model/model_spans_metric_response_attributes.rs +++ b/src/datadogV2/model/model_spans_metric_response_attributes.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct SpansMetricResponseAttributes { /// The compute rule to compute the span-based metric. #[serde(rename = "compute")] - pub compute: Option>, + pub compute: Option, /// The span-based metric filter. Spans matching this filter will be aggregated in this metric. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// The rules for the group by. #[serde(rename = "group_by")] pub group_by: Option>, @@ -27,6 +27,30 @@ impl SpansMetricResponseAttributes { group_by: None, } } + + pub fn with_compute( + &mut self, + value: crate::datadogV2::model::SpansMetricResponseCompute, + ) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn with_filter( + &mut self, + value: crate::datadogV2::model::SpansMetricResponseFilter, + ) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + self + } } impl Default for SpansMetricResponseAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_metric_response_compute.rs b/src/datadogV2/model/model_spans_metric_response_compute.rs index 46780b443..984f91661 100644 --- a/src/datadogV2/model/model_spans_metric_response_compute.rs +++ b/src/datadogV2/model/model_spans_metric_response_compute.rs @@ -28,6 +28,24 @@ impl SpansMetricResponseCompute { path: None, } } + + pub fn with_aggregation_type( + &mut self, + value: crate::datadogV2::model::SpansMetricComputeAggregationType, + ) -> &mut Self { + self.aggregation_type = Some(value); + self + } + + pub fn with_include_percentiles(&mut self, value: bool) -> &mut Self { + self.include_percentiles = Some(value); + self + } + + pub fn with_path(&mut self, value: String) -> &mut Self { + self.path = Some(value); + self + } } impl Default for SpansMetricResponseCompute { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_metric_response_data.rs b/src/datadogV2/model/model_spans_metric_response_data.rs index f6e6cb9b7..9af56645e 100644 --- a/src/datadogV2/model/model_spans_metric_response_data.rs +++ b/src/datadogV2/model/model_spans_metric_response_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SpansMetricResponseData { /// The object describing a Datadog span-based metric. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The name of the span-based metric. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl SpansMetricResponseData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::SpansMetricResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::SpansMetricType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for SpansMetricResponseData { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_metric_response_filter.rs b/src/datadogV2/model/model_spans_metric_response_filter.rs index 719dfac21..8b13258c9 100644 --- a/src/datadogV2/model/model_spans_metric_response_filter.rs +++ b/src/datadogV2/model/model_spans_metric_response_filter.rs @@ -17,6 +17,11 @@ impl SpansMetricResponseFilter { pub fn new() -> SpansMetricResponseFilter { SpansMetricResponseFilter { query: None } } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } } impl Default for SpansMetricResponseFilter { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_metric_response_group_by.rs b/src/datadogV2/model/model_spans_metric_response_group_by.rs index 521024af5..2d8a95ec6 100644 --- a/src/datadogV2/model/model_spans_metric_response_group_by.rs +++ b/src/datadogV2/model/model_spans_metric_response_group_by.rs @@ -23,6 +23,16 @@ impl SpansMetricResponseGroupBy { tag_name: None, } } + + pub fn with_path(&mut self, value: String) -> &mut Self { + self.path = Some(value); + self + } + + pub fn with_tag_name(&mut self, value: String) -> &mut Self { + self.tag_name = Some(value); + self + } } impl Default for SpansMetricResponseGroupBy { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_metric_update_attributes.rs b/src/datadogV2/model/model_spans_metric_update_attributes.rs index e5e1424b6..09469a001 100644 --- a/src/datadogV2/model/model_spans_metric_update_attributes.rs +++ b/src/datadogV2/model/model_spans_metric_update_attributes.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct SpansMetricUpdateAttributes { /// The compute rule to compute the span-based metric. #[serde(rename = "compute")] - pub compute: Option>, + pub compute: Option, /// The span-based metric filter. Spans matching this filter will be aggregated in this metric. #[serde(rename = "filter")] - pub filter: Option>, + pub filter: Option, /// The rules for the group by. #[serde(rename = "group_by")] pub group_by: Option>, @@ -27,6 +27,27 @@ impl SpansMetricUpdateAttributes { group_by: None, } } + + pub fn with_compute( + &mut self, + value: crate::datadogV2::model::SpansMetricUpdateCompute, + ) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn with_filter(&mut self, value: crate::datadogV2::model::SpansMetricFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn with_group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + self + } } impl Default for SpansMetricUpdateAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_metric_update_compute.rs b/src/datadogV2/model/model_spans_metric_update_compute.rs index e6dfe79c3..d554e0584 100644 --- a/src/datadogV2/model/model_spans_metric_update_compute.rs +++ b/src/datadogV2/model/model_spans_metric_update_compute.rs @@ -20,6 +20,11 @@ impl SpansMetricUpdateCompute { include_percentiles: None, } } + + pub fn with_include_percentiles(&mut self, value: bool) -> &mut Self { + self.include_percentiles = Some(value); + self + } } impl Default for SpansMetricUpdateCompute { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_metric_update_data.rs b/src/datadogV2/model/model_spans_metric_update_data.rs index 2cc039700..dc42fd468 100644 --- a/src/datadogV2/model/model_spans_metric_update_data.rs +++ b/src/datadogV2/model/model_spans_metric_update_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct SpansMetricUpdateData { /// The span-based metric properties that will be updated. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::SpansMetricUpdateAttributes, /// The type of resource. The value should always be spans_metrics. #[serde(rename = "type")] pub type_: crate::datadogV2::model::SpansMetricType, @@ -18,7 +18,7 @@ pub struct SpansMetricUpdateData { impl SpansMetricUpdateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::SpansMetricUpdateAttributes, type_: crate::datadogV2::model::SpansMetricType, ) -> SpansMetricUpdateData { SpansMetricUpdateData { attributes, type_ } diff --git a/src/datadogV2/model/model_spans_metric_update_request.rs b/src/datadogV2/model/model_spans_metric_update_request.rs index 5247b351b..ae16a8005 100644 --- a/src/datadogV2/model/model_spans_metric_update_request.rs +++ b/src/datadogV2/model/model_spans_metric_update_request.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct SpansMetricUpdateRequest { /// The new span-based metric properties. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::SpansMetricUpdateData, } impl SpansMetricUpdateRequest { - pub fn new( - data: Box, - ) -> SpansMetricUpdateRequest { + pub fn new(data: crate::datadogV2::model::SpansMetricUpdateData) -> SpansMetricUpdateRequest { SpansMetricUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_spans_metrics_response.rs b/src/datadogV2/model/model_spans_metrics_response.rs index 00b8850d7..40080c32b 100644 --- a/src/datadogV2/model/model_spans_metrics_response.rs +++ b/src/datadogV2/model/model_spans_metrics_response.rs @@ -17,6 +17,14 @@ impl SpansMetricsResponse { pub fn new() -> SpansMetricsResponse { SpansMetricsResponse { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for SpansMetricsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_query_filter.rs b/src/datadogV2/model/model_spans_query_filter.rs index 9428d0651..c7a30942e 100644 --- a/src/datadogV2/model/model_spans_query_filter.rs +++ b/src/datadogV2/model/model_spans_query_filter.rs @@ -27,6 +27,21 @@ impl SpansQueryFilter { to: None, } } + + pub fn with_from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + self + } + + pub fn with_query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn with_to(&mut self, value: String) -> &mut Self { + self.to = Some(value); + self + } } impl Default for SpansQueryFilter { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_query_options.rs b/src/datadogV2/model/model_spans_query_options.rs index 3535d75ba..3bcf7530d 100644 --- a/src/datadogV2/model/model_spans_query_options.rs +++ b/src/datadogV2/model/model_spans_query_options.rs @@ -24,6 +24,16 @@ impl SpansQueryOptions { timezone: None, } } + + pub fn with_time_offset(&mut self, value: i64) -> &mut Self { + self.time_offset = Some(value); + self + } + + pub fn with_timezone(&mut self, value: String) -> &mut Self { + self.timezone = Some(value); + self + } } impl Default for SpansQueryOptions { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_response_metadata_page.rs b/src/datadogV2/model/model_spans_response_metadata_page.rs index ec979a347..7d58de1ef 100644 --- a/src/datadogV2/model/model_spans_response_metadata_page.rs +++ b/src/datadogV2/model/model_spans_response_metadata_page.rs @@ -18,6 +18,11 @@ impl SpansResponseMetadataPage { pub fn new() -> SpansResponseMetadataPage { SpansResponseMetadataPage { after: None } } + + pub fn with_after(&mut self, value: String) -> &mut Self { + self.after = Some(value); + self + } } impl Default for SpansResponseMetadataPage { fn default() -> Self { diff --git a/src/datadogV2/model/model_spans_warning.rs b/src/datadogV2/model/model_spans_warning.rs index ffbea95db..e3ce23220 100644 --- a/src/datadogV2/model/model_spans_warning.rs +++ b/src/datadogV2/model/model_spans_warning.rs @@ -27,6 +27,21 @@ impl SpansWarning { title: None, } } + + pub fn with_code(&mut self, value: String) -> &mut Self { + self.code = Some(value); + self + } + + pub fn with_detail(&mut self, value: String) -> &mut Self { + self.detail = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } } impl Default for SpansWarning { fn default() -> Self { diff --git a/src/datadogV2/model/model_team.rs b/src/datadogV2/model/model_team.rs index f72622e07..8177ad558 100644 --- a/src/datadogV2/model/model_team.rs +++ b/src/datadogV2/model/model_team.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct Team { /// Team attributes #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::TeamAttributes, /// The team's identifier #[serde(rename = "id")] pub id: String, /// Resources related to a team #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Team type #[serde(rename = "type")] pub type_: crate::datadogV2::model::TeamType, @@ -24,7 +24,7 @@ pub struct Team { impl Team { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::TeamAttributes, id: String, type_: crate::datadogV2::model::TeamType, ) -> Team { @@ -35,4 +35,12 @@ impl Team { type_, } } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::TeamRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_team_attributes.rs b/src/datadogV2/model/model_team_attributes.rs index 6ff9d2e8c..0ddec19b4 100644 --- a/src/datadogV2/model/model_team_attributes.rs +++ b/src/datadogV2/model/model_team_attributes.rs @@ -71,4 +71,54 @@ impl TeamAttributes { visible_modules: None, } } + + pub fn with_avatar(&mut self, value: Option) -> &mut Self { + self.avatar = Some(value); + self + } + + pub fn with_banner(&mut self, value: Option) -> &mut Self { + self.banner = Some(value); + self + } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_description(&mut self, value: Option) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_hidden_modules(&mut self, value: Vec) -> &mut Self { + self.hidden_modules = Some(value); + self + } + + pub fn with_link_count(&mut self, value: i32) -> &mut Self { + self.link_count = Some(value); + self + } + + pub fn with_modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn with_summary(&mut self, value: Option) -> &mut Self { + self.summary = Some(value); + self + } + + pub fn with_user_count(&mut self, value: i32) -> &mut Self { + self.user_count = Some(value); + self + } + + pub fn with_visible_modules(&mut self, value: Vec) -> &mut Self { + self.visible_modules = Some(value); + self + } } diff --git a/src/datadogV2/model/model_team_create.rs b/src/datadogV2/model/model_team_create.rs index 5f0311d0f..6840fcf01 100644 --- a/src/datadogV2/model/model_team_create.rs +++ b/src/datadogV2/model/model_team_create.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct TeamCreate { /// Team creation attributes #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::TeamCreateAttributes, /// Relationships formed with the team on creation #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Team type #[serde(rename = "type")] pub type_: crate::datadogV2::model::TeamType, @@ -21,7 +21,7 @@ pub struct TeamCreate { impl TeamCreate { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::TeamCreateAttributes, type_: crate::datadogV2::model::TeamType, ) -> TeamCreate { TeamCreate { @@ -30,4 +30,12 @@ impl TeamCreate { type_, } } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::TeamCreateRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_team_create_attributes.rs b/src/datadogV2/model/model_team_create_attributes.rs index 55c8e813a..561fa0c31 100644 --- a/src/datadogV2/model/model_team_create_attributes.rs +++ b/src/datadogV2/model/model_team_create_attributes.rs @@ -43,4 +43,29 @@ impl TeamCreateAttributes { visible_modules: None, } } + + pub fn with_avatar(&mut self, value: Option) -> &mut Self { + self.avatar = Some(value); + self + } + + pub fn with_banner(&mut self, value: Option) -> &mut Self { + self.banner = Some(value); + self + } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_hidden_modules(&mut self, value: Vec) -> &mut Self { + self.hidden_modules = Some(value); + self + } + + pub fn with_visible_modules(&mut self, value: Vec) -> &mut Self { + self.visible_modules = Some(value); + self + } } diff --git a/src/datadogV2/model/model_team_create_relationships.rs b/src/datadogV2/model/model_team_create_relationships.rs index b29bf378c..44dc94d0f 100644 --- a/src/datadogV2/model/model_team_create_relationships.rs +++ b/src/datadogV2/model/model_team_create_relationships.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct TeamCreateRelationships { /// Relationship to users. #[serde(rename = "users")] - pub users: Option>, + pub users: Option, } impl TeamCreateRelationships { pub fn new() -> TeamCreateRelationships { TeamCreateRelationships { users: None } } + + pub fn with_users(&mut self, value: crate::datadogV2::model::RelationshipToUsers) -> &mut Self { + self.users = Some(value); + self + } } impl Default for TeamCreateRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_team_create_request.rs b/src/datadogV2/model/model_team_create_request.rs index 130a1f877..4a05c39cd 100644 --- a/src/datadogV2/model/model_team_create_request.rs +++ b/src/datadogV2/model/model_team_create_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct TeamCreateRequest { /// Team create #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::TeamCreate, } impl TeamCreateRequest { - pub fn new(data: Box) -> TeamCreateRequest { + pub fn new(data: crate::datadogV2::model::TeamCreate) -> TeamCreateRequest { TeamCreateRequest { data } } } diff --git a/src/datadogV2/model/model_team_included.rs b/src/datadogV2/model/model_team_included.rs index a39d9c31a..49572b11d 100644 --- a/src/datadogV2/model/model_team_included.rs +++ b/src/datadogV2/model/model_team_included.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum TeamIncluded { - User(Box), - TeamLink(Box), - UserTeamPermission(Box), + User(crate::datadogV2::model::User), + TeamLink(crate::datadogV2::model::TeamLink), + UserTeamPermission(crate::datadogV2::model::UserTeamPermission), } diff --git a/src/datadogV2/model/model_team_link.rs b/src/datadogV2/model/model_team_link.rs index 641067628..c10b39607 100644 --- a/src/datadogV2/model/model_team_link.rs +++ b/src/datadogV2/model/model_team_link.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct TeamLink { /// Team link attributes #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::TeamLinkAttributes, /// The team link's identifier #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct TeamLink { impl TeamLink { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::TeamLinkAttributes, id: String, type_: crate::datadogV2::model::TeamLinkType, ) -> TeamLink { diff --git a/src/datadogV2/model/model_team_link_attributes.rs b/src/datadogV2/model/model_team_link_attributes.rs index 763affa81..08f53ea92 100644 --- a/src/datadogV2/model/model_team_link_attributes.rs +++ b/src/datadogV2/model/model_team_link_attributes.rs @@ -31,4 +31,14 @@ impl TeamLinkAttributes { url, } } + + pub fn with_position(&mut self, value: i32) -> &mut Self { + self.position = Some(value); + self + } + + pub fn with_team_id(&mut self, value: String) -> &mut Self { + self.team_id = Some(value); + self + } } diff --git a/src/datadogV2/model/model_team_link_create.rs b/src/datadogV2/model/model_team_link_create.rs index 53c2bf13f..bcaa2952e 100644 --- a/src/datadogV2/model/model_team_link_create.rs +++ b/src/datadogV2/model/model_team_link_create.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct TeamLinkCreate { /// Team link attributes #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::TeamLinkAttributes, /// Team link type #[serde(rename = "type")] pub type_: crate::datadogV2::model::TeamLinkType, @@ -18,7 +18,7 @@ pub struct TeamLinkCreate { impl TeamLinkCreate { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::TeamLinkAttributes, type_: crate::datadogV2::model::TeamLinkType, ) -> TeamLinkCreate { TeamLinkCreate { attributes, type_ } diff --git a/src/datadogV2/model/model_team_link_create_request.rs b/src/datadogV2/model/model_team_link_create_request.rs index e101dfbfd..d76ba999b 100644 --- a/src/datadogV2/model/model_team_link_create_request.rs +++ b/src/datadogV2/model/model_team_link_create_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct TeamLinkCreateRequest { /// Team link create #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::TeamLinkCreate, } impl TeamLinkCreateRequest { - pub fn new(data: Box) -> TeamLinkCreateRequest { + pub fn new(data: crate::datadogV2::model::TeamLinkCreate) -> TeamLinkCreateRequest { TeamLinkCreateRequest { data } } } diff --git a/src/datadogV2/model/model_team_link_response.rs b/src/datadogV2/model/model_team_link_response.rs index 8f4cf11df..20a3833d1 100644 --- a/src/datadogV2/model/model_team_link_response.rs +++ b/src/datadogV2/model/model_team_link_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct TeamLinkResponse { /// Team link #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl TeamLinkResponse { pub fn new() -> TeamLinkResponse { TeamLinkResponse { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::TeamLink) -> &mut Self { + self.data = Some(value); + self + } } impl Default for TeamLinkResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_team_links_response.rs b/src/datadogV2/model/model_team_links_response.rs index 98ceb7cc2..85047c351 100644 --- a/src/datadogV2/model/model_team_links_response.rs +++ b/src/datadogV2/model/model_team_links_response.rs @@ -17,6 +17,11 @@ impl TeamLinksResponse { pub fn new() -> TeamLinksResponse { TeamLinksResponse { data: None } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } } impl Default for TeamLinksResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_team_permission_setting.rs b/src/datadogV2/model/model_team_permission_setting.rs index 8042fa7d2..37d0c1cd0 100644 --- a/src/datadogV2/model/model_team_permission_setting.rs +++ b/src/datadogV2/model/model_team_permission_setting.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct TeamPermissionSetting { /// Team permission setting attributes #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The team permission setting's identifier #[serde(rename = "id")] pub id: String, @@ -30,4 +30,12 @@ impl TeamPermissionSetting { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::TeamPermissionSettingAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } } diff --git a/src/datadogV2/model/model_team_permission_setting_attributes.rs b/src/datadogV2/model/model_team_permission_setting_attributes.rs index c3b25c8e2..3c57575ea 100644 --- a/src/datadogV2/model/model_team_permission_setting_attributes.rs +++ b/src/datadogV2/model/model_team_permission_setting_attributes.rs @@ -35,6 +35,40 @@ impl TeamPermissionSettingAttributes { value: None, } } + + pub fn with_action( + &mut self, + value: crate::datadogV2::model::TeamPermissionSettingSerializerAction, + ) -> &mut Self { + self.action = Some(value); + self + } + + pub fn with_editable(&mut self, value: bool) -> &mut Self { + self.editable = Some(value); + self + } + + pub fn with_options( + &mut self, + value: Vec, + ) -> &mut Self { + self.options = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_value( + &mut self, + value: crate::datadogV2::model::TeamPermissionSettingValue, + ) -> &mut Self { + self.value = Some(value); + self + } } impl Default for TeamPermissionSettingAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_team_permission_setting_response.rs b/src/datadogV2/model/model_team_permission_setting_response.rs index 05b790a2b..62543506d 100644 --- a/src/datadogV2/model/model_team_permission_setting_response.rs +++ b/src/datadogV2/model/model_team_permission_setting_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct TeamPermissionSettingResponse { /// Team permission setting #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl TeamPermissionSettingResponse { pub fn new() -> TeamPermissionSettingResponse { TeamPermissionSettingResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::TeamPermissionSetting, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for TeamPermissionSettingResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_team_permission_setting_update.rs b/src/datadogV2/model/model_team_permission_setting_update.rs index 6c38061e1..6ed4fcfd6 100644 --- a/src/datadogV2/model/model_team_permission_setting_update.rs +++ b/src/datadogV2/model/model_team_permission_setting_update.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct TeamPermissionSettingUpdate { /// Team permission setting update attributes #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Team permission setting type #[serde(rename = "type")] pub type_: crate::datadogV2::model::TeamPermissionSettingType, @@ -25,4 +25,12 @@ impl TeamPermissionSettingUpdate { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::TeamPermissionSettingUpdateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } } diff --git a/src/datadogV2/model/model_team_permission_setting_update_attributes.rs b/src/datadogV2/model/model_team_permission_setting_update_attributes.rs index 041bbae32..4117cb7f5 100644 --- a/src/datadogV2/model/model_team_permission_setting_update_attributes.rs +++ b/src/datadogV2/model/model_team_permission_setting_update_attributes.rs @@ -17,6 +17,14 @@ impl TeamPermissionSettingUpdateAttributes { pub fn new() -> TeamPermissionSettingUpdateAttributes { TeamPermissionSettingUpdateAttributes { value: None } } + + pub fn with_value( + &mut self, + value: crate::datadogV2::model::TeamPermissionSettingValue, + ) -> &mut Self { + self.value = Some(value); + self + } } impl Default for TeamPermissionSettingUpdateAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_team_permission_setting_update_request.rs b/src/datadogV2/model/model_team_permission_setting_update_request.rs index e99eece29..6fa8302b4 100644 --- a/src/datadogV2/model/model_team_permission_setting_update_request.rs +++ b/src/datadogV2/model/model_team_permission_setting_update_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct TeamPermissionSettingUpdateRequest { /// Team permission setting update #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::TeamPermissionSettingUpdate, } impl TeamPermissionSettingUpdateRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::TeamPermissionSettingUpdate, ) -> TeamPermissionSettingUpdateRequest { TeamPermissionSettingUpdateRequest { data } } diff --git a/src/datadogV2/model/model_team_permission_settings_response.rs b/src/datadogV2/model/model_team_permission_settings_response.rs index 8797057fd..72902b48f 100644 --- a/src/datadogV2/model/model_team_permission_settings_response.rs +++ b/src/datadogV2/model/model_team_permission_settings_response.rs @@ -17,6 +17,14 @@ impl TeamPermissionSettingsResponse { pub fn new() -> TeamPermissionSettingsResponse { TeamPermissionSettingsResponse { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for TeamPermissionSettingsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_team_relationships.rs b/src/datadogV2/model/model_team_relationships.rs index 1761c5af9..70a7e78da 100644 --- a/src/datadogV2/model/model_team_relationships.rs +++ b/src/datadogV2/model/model_team_relationships.rs @@ -10,11 +10,10 @@ use serde_with::skip_serializing_none; pub struct TeamRelationships { /// Relationship between a team and a team link #[serde(rename = "team_links")] - pub team_links: Option>, + pub team_links: Option, /// Relationship between a user team permission and a team #[serde(rename = "user_team_permissions")] - pub user_team_permissions: - Option>, + pub user_team_permissions: Option, } impl TeamRelationships { @@ -24,6 +23,22 @@ impl TeamRelationships { user_team_permissions: None, } } + + pub fn with_team_links( + &mut self, + value: crate::datadogV2::model::RelationshipToTeamLinks, + ) -> &mut Self { + self.team_links = Some(value); + self + } + + pub fn with_user_team_permissions( + &mut self, + value: crate::datadogV2::model::RelationshipToUserTeamPermission, + ) -> &mut Self { + self.user_team_permissions = Some(value); + self + } } impl Default for TeamRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_team_relationships_links.rs b/src/datadogV2/model/model_team_relationships_links.rs index 2be3a1313..f343360e9 100644 --- a/src/datadogV2/model/model_team_relationships_links.rs +++ b/src/datadogV2/model/model_team_relationships_links.rs @@ -17,6 +17,11 @@ impl TeamRelationshipsLinks { pub fn new() -> TeamRelationshipsLinks { TeamRelationshipsLinks { related: None } } + + pub fn with_related(&mut self, value: String) -> &mut Self { + self.related = Some(value); + self + } } impl Default for TeamRelationshipsLinks { fn default() -> Self { diff --git a/src/datadogV2/model/model_team_response.rs b/src/datadogV2/model/model_team_response.rs index 0f91e9fb1..1c5cf2166 100644 --- a/src/datadogV2/model/model_team_response.rs +++ b/src/datadogV2/model/model_team_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct TeamResponse { /// A team #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl TeamResponse { pub fn new() -> TeamResponse { TeamResponse { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::Team) -> &mut Self { + self.data = Some(value); + self + } } impl Default for TeamResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_team_update.rs b/src/datadogV2/model/model_team_update.rs index 900f59acb..837474955 100644 --- a/src/datadogV2/model/model_team_update.rs +++ b/src/datadogV2/model/model_team_update.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct TeamUpdate { /// Team update attributes #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::TeamUpdateAttributes, /// Team update relationships #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Team type #[serde(rename = "type")] pub type_: crate::datadogV2::model::TeamType, @@ -21,7 +21,7 @@ pub struct TeamUpdate { impl TeamUpdate { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::TeamUpdateAttributes, type_: crate::datadogV2::model::TeamType, ) -> TeamUpdate { TeamUpdate { @@ -30,4 +30,12 @@ impl TeamUpdate { type_, } } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::TeamUpdateRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_team_update_attributes.rs b/src/datadogV2/model/model_team_update_attributes.rs index a52ef1c6a..f987649fc 100644 --- a/src/datadogV2/model/model_team_update_attributes.rs +++ b/src/datadogV2/model/model_team_update_attributes.rs @@ -47,4 +47,34 @@ impl TeamUpdateAttributes { visible_modules: None, } } + + pub fn with_avatar(&mut self, value: Option) -> &mut Self { + self.avatar = Some(value); + self + } + + pub fn with_banner(&mut self, value: Option) -> &mut Self { + self.banner = Some(value); + self + } + + pub fn with_color(&mut self, value: i32) -> &mut Self { + self.color = Some(value); + self + } + + pub fn with_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn with_hidden_modules(&mut self, value: Vec) -> &mut Self { + self.hidden_modules = Some(value); + self + } + + pub fn with_visible_modules(&mut self, value: Vec) -> &mut Self { + self.visible_modules = Some(value); + self + } } diff --git a/src/datadogV2/model/model_team_update_relationships.rs b/src/datadogV2/model/model_team_update_relationships.rs index 0b051b138..79f0ecd07 100644 --- a/src/datadogV2/model/model_team_update_relationships.rs +++ b/src/datadogV2/model/model_team_update_relationships.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct TeamUpdateRelationships { /// Relationship between a team and a team link #[serde(rename = "team_links")] - pub team_links: Option>, + pub team_links: Option, } impl TeamUpdateRelationships { pub fn new() -> TeamUpdateRelationships { TeamUpdateRelationships { team_links: None } } + + pub fn with_team_links( + &mut self, + value: crate::datadogV2::model::RelationshipToTeamLinks, + ) -> &mut Self { + self.team_links = Some(value); + self + } } impl Default for TeamUpdateRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_team_update_request.rs b/src/datadogV2/model/model_team_update_request.rs index c9953617c..7982f4037 100644 --- a/src/datadogV2/model/model_team_update_request.rs +++ b/src/datadogV2/model/model_team_update_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct TeamUpdateRequest { /// Team update request #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::TeamUpdate, } impl TeamUpdateRequest { - pub fn new(data: Box) -> TeamUpdateRequest { + pub fn new(data: crate::datadogV2::model::TeamUpdate) -> TeamUpdateRequest { TeamUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_teams_response.rs b/src/datadogV2/model/model_teams_response.rs index 25fc87521..3d572d595 100644 --- a/src/datadogV2/model/model_teams_response.rs +++ b/src/datadogV2/model/model_teams_response.rs @@ -16,10 +16,10 @@ pub struct TeamsResponse { pub included: Option>, /// Teams response links. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, /// Teams response metadata. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl TeamsResponse { @@ -31,6 +31,29 @@ impl TeamsResponse { meta: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } + + pub fn with_links(&mut self, value: crate::datadogV2::model::TeamsResponseLinks) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::TeamsResponseMeta) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for TeamsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_teams_response_links.rs b/src/datadogV2/model/model_teams_response_links.rs index c381adaf1..3cabbb69b 100644 --- a/src/datadogV2/model/model_teams_response_links.rs +++ b/src/datadogV2/model/model_teams_response_links.rs @@ -35,6 +35,31 @@ impl TeamsResponseLinks { self_: None, } } + + pub fn with_first(&mut self, value: String) -> &mut Self { + self.first = Some(value); + self + } + + pub fn with_last(&mut self, value: Option) -> &mut Self { + self.last = Some(value); + self + } + + pub fn with_next(&mut self, value: String) -> &mut Self { + self.next = Some(value); + self + } + + pub fn with_prev(&mut self, value: Option) -> &mut Self { + self.prev = Some(value); + self + } + + pub fn with_self_(&mut self, value: String) -> &mut Self { + self.self_ = Some(value); + self + } } impl Default for TeamsResponseLinks { fn default() -> Self { diff --git a/src/datadogV2/model/model_teams_response_meta.rs b/src/datadogV2/model/model_teams_response_meta.rs index ea5d50ac8..f34fd09b4 100644 --- a/src/datadogV2/model/model_teams_response_meta.rs +++ b/src/datadogV2/model/model_teams_response_meta.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct TeamsResponseMeta { /// Teams response metadata. #[serde(rename = "pagination")] - pub pagination: Option>, + pub pagination: Option, } impl TeamsResponseMeta { pub fn new() -> TeamsResponseMeta { TeamsResponseMeta { pagination: None } } + + pub fn with_pagination( + &mut self, + value: crate::datadogV2::model::TeamsResponseMetaPagination, + ) -> &mut Self { + self.pagination = Some(value); + self + } } impl Default for TeamsResponseMeta { fn default() -> Self { diff --git a/src/datadogV2/model/model_teams_response_meta_pagination.rs b/src/datadogV2/model/model_teams_response_meta_pagination.rs index 193ad50f4..a31a6226b 100644 --- a/src/datadogV2/model/model_teams_response_meta_pagination.rs +++ b/src/datadogV2/model/model_teams_response_meta_pagination.rs @@ -47,6 +47,46 @@ impl TeamsResponseMetaPagination { type_: None, } } + + pub fn with_first_offset(&mut self, value: i64) -> &mut Self { + self.first_offset = Some(value); + self + } + + pub fn with_last_offset(&mut self, value: i64) -> &mut Self { + self.last_offset = Some(value); + self + } + + pub fn with_limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn with_next_offset(&mut self, value: i64) -> &mut Self { + self.next_offset = Some(value); + self + } + + pub fn with_offset(&mut self, value: i64) -> &mut Self { + self.offset = Some(value); + self + } + + pub fn with_prev_offset(&mut self, value: i64) -> &mut Self { + self.prev_offset = Some(value); + self + } + + pub fn with_total(&mut self, value: i64) -> &mut Self { + self.total = Some(value); + self + } + + pub fn with_type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for TeamsResponseMetaPagination { fn default() -> Self { diff --git a/src/datadogV2/model/model_timeseries_formula_query_request.rs b/src/datadogV2/model/model_timeseries_formula_query_request.rs index 18efc49d5..a476e67b2 100644 --- a/src/datadogV2/model/model_timeseries_formula_query_request.rs +++ b/src/datadogV2/model/model_timeseries_formula_query_request.rs @@ -10,12 +10,12 @@ use serde_with::skip_serializing_none; pub struct TimeseriesFormulaQueryRequest { /// A single timeseries query to be executed. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::TimeseriesFormulaRequest, } impl TimeseriesFormulaQueryRequest { pub fn new( - data: Box, + data: crate::datadogV2::model::TimeseriesFormulaRequest, ) -> TimeseriesFormulaQueryRequest { TimeseriesFormulaQueryRequest { data } } diff --git a/src/datadogV2/model/model_timeseries_formula_query_response.rs b/src/datadogV2/model/model_timeseries_formula_query_response.rs index fc198fcd7..eab5f7cb0 100644 --- a/src/datadogV2/model/model_timeseries_formula_query_response.rs +++ b/src/datadogV2/model/model_timeseries_formula_query_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct TimeseriesFormulaQueryResponse { /// A message containing the response to a timeseries query. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// The error generated by the request. #[serde(rename = "errors")] pub errors: Option, @@ -23,6 +23,16 @@ impl TimeseriesFormulaQueryResponse { errors: None, } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::TimeseriesResponse) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_errors(&mut self, value: String) -> &mut Self { + self.errors = Some(value); + self + } } impl Default for TimeseriesFormulaQueryResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_timeseries_formula_request.rs b/src/datadogV2/model/model_timeseries_formula_request.rs index d82a7a550..73ca4f139 100644 --- a/src/datadogV2/model/model_timeseries_formula_request.rs +++ b/src/datadogV2/model/model_timeseries_formula_request.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct TimeseriesFormulaRequest { /// The object describing a timeseries formula request. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::TimeseriesFormulaRequestAttributes, /// The type of the resource. The value should always be timeseries_request. #[serde(rename = "type")] pub type_: crate::datadogV2::model::TimeseriesFormulaRequestType, @@ -18,7 +18,7 @@ pub struct TimeseriesFormulaRequest { impl TimeseriesFormulaRequest { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::TimeseriesFormulaRequestAttributes, type_: crate::datadogV2::model::TimeseriesFormulaRequestType, ) -> TimeseriesFormulaRequest { TimeseriesFormulaRequest { attributes, type_ } diff --git a/src/datadogV2/model/model_timeseries_formula_request_attributes.rs b/src/datadogV2/model/model_timeseries_formula_request_attributes.rs index 2bd90ef78..7c3e4b56b 100644 --- a/src/datadogV2/model/model_timeseries_formula_request_attributes.rs +++ b/src/datadogV2/model/model_timeseries_formula_request_attributes.rs @@ -42,4 +42,17 @@ impl TimeseriesFormulaRequestAttributes { to, } } + + pub fn with_formulas( + &mut self, + value: Vec, + ) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn with_interval(&mut self, value: i64) -> &mut Self { + self.interval = Some(value); + self + } } diff --git a/src/datadogV2/model/model_timeseries_query.rs b/src/datadogV2/model/model_timeseries_query.rs index 02c434941..98358c8d2 100644 --- a/src/datadogV2/model/model_timeseries_query.rs +++ b/src/datadogV2/model/model_timeseries_query.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum TimeseriesQuery { - MetricsTimeseriesQuery(Box), - EventsTimeseriesQuery(Box), + MetricsTimeseriesQuery(crate::datadogV2::model::MetricsTimeseriesQuery), + EventsTimeseriesQuery(crate::datadogV2::model::EventsTimeseriesQuery), } diff --git a/src/datadogV2/model/model_timeseries_response.rs b/src/datadogV2/model/model_timeseries_response.rs index f14e8548d..d09bef4f9 100644 --- a/src/datadogV2/model/model_timeseries_response.rs +++ b/src/datadogV2/model/model_timeseries_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct TimeseriesResponse { /// The object describing a timeseries response. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The type of the resource. The value should always be timeseries_response. #[serde(rename = "type")] pub type_: Option, @@ -23,6 +23,22 @@ impl TimeseriesResponse { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::TimeseriesResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_type_( + &mut self, + value: crate::datadogV2::model::TimeseriesFormulaResponseType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for TimeseriesResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_timeseries_response_attributes.rs b/src/datadogV2/model/model_timeseries_response_attributes.rs index 0a94a78a7..9023fadad 100644 --- a/src/datadogV2/model/model_timeseries_response_attributes.rs +++ b/src/datadogV2/model/model_timeseries_response_attributes.rs @@ -27,6 +27,24 @@ impl TimeseriesResponseAttributes { values: None, } } + + pub fn with_series( + &mut self, + value: Vec, + ) -> &mut Self { + self.series = Some(value); + self + } + + pub fn with_times(&mut self, value: Vec) -> &mut Self { + self.times = Some(value); + self + } + + pub fn with_values(&mut self, value: Vec>>) -> &mut Self { + self.values = Some(value); + self + } } impl Default for TimeseriesResponseAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_timeseries_response_series.rs b/src/datadogV2/model/model_timeseries_response_series.rs index 489fb6321..3bff9a21d 100644 --- a/src/datadogV2/model/model_timeseries_response_series.rs +++ b/src/datadogV2/model/model_timeseries_response_series.rs @@ -30,6 +30,21 @@ impl TimeseriesResponseSeries { unit: None, } } + + pub fn with_group_tags(&mut self, value: Vec) -> &mut Self { + self.group_tags = Some(value); + self + } + + pub fn with_query_index(&mut self, value: i32) -> &mut Self { + self.query_index = Some(value); + self + } + + pub fn with_unit(&mut self, value: Vec>) -> &mut Self { + self.unit = Some(value); + self + } } impl Default for TimeseriesResponseSeries { fn default() -> Self { diff --git a/src/datadogV2/model/model_unit.rs b/src/datadogV2/model/model_unit.rs index ff863fbe5..965e9bc10 100644 --- a/src/datadogV2/model/model_unit.rs +++ b/src/datadogV2/model/model_unit.rs @@ -35,6 +35,31 @@ impl Unit { short_name: None, } } + + pub fn with_family(&mut self, value: String) -> &mut Self { + self.family = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_plural(&mut self, value: String) -> &mut Self { + self.plural = Some(value); + self + } + + pub fn with_scale_factor(&mut self, value: f64) -> &mut Self { + self.scale_factor = Some(value); + self + } + + pub fn with_short_name(&mut self, value: String) -> &mut Self { + self.short_name = Some(value); + self + } } impl Default for Unit { fn default() -> Self { diff --git a/src/datadogV2/model/model_usage_application_security_monitoring_response.rs b/src/datadogV2/model/model_usage_application_security_monitoring_response.rs index 1837beff8..fad7bfa47 100644 --- a/src/datadogV2/model/model_usage_application_security_monitoring_response.rs +++ b/src/datadogV2/model/model_usage_application_security_monitoring_response.rs @@ -17,6 +17,11 @@ impl UsageApplicationSecurityMonitoringResponse { pub fn new() -> UsageApplicationSecurityMonitoringResponse { UsageApplicationSecurityMonitoringResponse { data: None } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } } impl Default for UsageApplicationSecurityMonitoringResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_usage_attributes_object.rs b/src/datadogV2/model/model_usage_attributes_object.rs index c868ac5cc..01eae651c 100644 --- a/src/datadogV2/model/model_usage_attributes_object.rs +++ b/src/datadogV2/model/model_usage_attributes_object.rs @@ -39,6 +39,42 @@ impl UsageAttributesObject { usage_type: None, } } + + pub fn with_org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn with_product_family(&mut self, value: String) -> &mut Self { + self.product_family = Some(value); + self + } + + pub fn with_public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn with_region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } + + pub fn with_timeseries( + &mut self, + value: Vec, + ) -> &mut Self { + self.timeseries = Some(value); + self + } + + pub fn with_usage_type( + &mut self, + value: crate::datadogV2::model::HourlyUsageType, + ) -> &mut Self { + self.usage_type = Some(value); + self + } } impl Default for UsageAttributesObject { fn default() -> Self { diff --git a/src/datadogV2/model/model_usage_data_object.rs b/src/datadogV2/model/model_usage_data_object.rs index 29e062d73..58ab784a0 100644 --- a/src/datadogV2/model/model_usage_data_object.rs +++ b/src/datadogV2/model/model_usage_data_object.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct UsageDataObject { /// Usage attributes data. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Unique ID of the response. #[serde(rename = "id")] pub id: Option, @@ -27,6 +27,24 @@ impl UsageDataObject { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::UsageAttributesObject, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::UsageTimeSeriesType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for UsageDataObject { fn default() -> Self { diff --git a/src/datadogV2/model/model_usage_lambda_traced_invocations_response.rs b/src/datadogV2/model/model_usage_lambda_traced_invocations_response.rs index 79f9be6ac..571660b8c 100644 --- a/src/datadogV2/model/model_usage_lambda_traced_invocations_response.rs +++ b/src/datadogV2/model/model_usage_lambda_traced_invocations_response.rs @@ -17,6 +17,11 @@ impl UsageLambdaTracedInvocationsResponse { pub fn new() -> UsageLambdaTracedInvocationsResponse { UsageLambdaTracedInvocationsResponse { data: None } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } } impl Default for UsageLambdaTracedInvocationsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_usage_observability_pipelines_response.rs b/src/datadogV2/model/model_usage_observability_pipelines_response.rs index d48ab15db..f28ab4ea2 100644 --- a/src/datadogV2/model/model_usage_observability_pipelines_response.rs +++ b/src/datadogV2/model/model_usage_observability_pipelines_response.rs @@ -17,6 +17,11 @@ impl UsageObservabilityPipelinesResponse { pub fn new() -> UsageObservabilityPipelinesResponse { UsageObservabilityPipelinesResponse { data: None } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } } impl Default for UsageObservabilityPipelinesResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_usage_time_series_object.rs b/src/datadogV2/model/model_usage_time_series_object.rs index 7200fe545..a87b4f708 100644 --- a/src/datadogV2/model/model_usage_time_series_object.rs +++ b/src/datadogV2/model/model_usage_time_series_object.rs @@ -23,6 +23,16 @@ impl UsageTimeSeriesObject { value: None, } } + + pub fn with_timestamp(&mut self, value: String) -> &mut Self { + self.timestamp = Some(value); + self + } + + pub fn with_value(&mut self, value: Option) -> &mut Self { + self.value = Some(value); + self + } } impl Default for UsageTimeSeriesObject { fn default() -> Self { diff --git a/src/datadogV2/model/model_user.rs b/src/datadogV2/model/model_user.rs index 05a77b93d..5a3c1d918 100644 --- a/src/datadogV2/model/model_user.rs +++ b/src/datadogV2/model/model_user.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct User { /// Attributes of user object returned by the API. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of the user. #[serde(rename = "id")] pub id: Option, /// Relationships of the user object returned by the API. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Users resource type. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,29 @@ impl User { type_: None, } } + + pub fn with_attributes(&mut self, value: crate::datadogV2::model::UserAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::UserResponseRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::UsersType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for User { fn default() -> Self { diff --git a/src/datadogV2/model/model_user_attributes.rs b/src/datadogV2/model/model_user_attributes.rs index 6893cc39c..e733c665e 100644 --- a/src/datadogV2/model/model_user_attributes.rs +++ b/src/datadogV2/model/model_user_attributes.rs @@ -59,6 +59,61 @@ impl UserAttributes { verified: None, } } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_disabled(&mut self, value: bool) -> &mut Self { + self.disabled = Some(value); + self + } + + pub fn with_email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn with_handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + self + } + + pub fn with_icon(&mut self, value: String) -> &mut Self { + self.icon = Some(value); + self + } + + pub fn with_modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn with_name(&mut self, value: Option) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_service_account(&mut self, value: bool) -> &mut Self { + self.service_account = Some(value); + self + } + + pub fn with_status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + self + } + + pub fn with_title(&mut self, value: Option) -> &mut Self { + self.title = Some(value); + self + } + + pub fn with_verified(&mut self, value: bool) -> &mut Self { + self.verified = Some(value); + self + } } impl Default for UserAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_user_create_attributes.rs b/src/datadogV2/model/model_user_create_attributes.rs index 07e1d06be..e90213405 100644 --- a/src/datadogV2/model/model_user_create_attributes.rs +++ b/src/datadogV2/model/model_user_create_attributes.rs @@ -27,4 +27,14 @@ impl UserCreateAttributes { title: None, } } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn with_title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } } diff --git a/src/datadogV2/model/model_user_create_data.rs b/src/datadogV2/model/model_user_create_data.rs index f8028b3df..33100c525 100644 --- a/src/datadogV2/model/model_user_create_data.rs +++ b/src/datadogV2/model/model_user_create_data.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct UserCreateData { /// Attributes of the created user. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::UserCreateAttributes, /// Relationships of the user object. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Users resource type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::UsersType, @@ -21,7 +21,7 @@ pub struct UserCreateData { impl UserCreateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::UserCreateAttributes, type_: crate::datadogV2::model::UsersType, ) -> UserCreateData { UserCreateData { @@ -30,4 +30,12 @@ impl UserCreateData { type_, } } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::UserRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_user_create_request.rs b/src/datadogV2/model/model_user_create_request.rs index 5e685e6b2..7e18fca0d 100644 --- a/src/datadogV2/model/model_user_create_request.rs +++ b/src/datadogV2/model/model_user_create_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct UserCreateRequest { /// Object to create a user. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::UserCreateData, } impl UserCreateRequest { - pub fn new(data: Box) -> UserCreateRequest { + pub fn new(data: crate::datadogV2::model::UserCreateData) -> UserCreateRequest { UserCreateRequest { data } } } diff --git a/src/datadogV2/model/model_user_invitation_data.rs b/src/datadogV2/model/model_user_invitation_data.rs index 9e5461fd4..a8c709b6d 100644 --- a/src/datadogV2/model/model_user_invitation_data.rs +++ b/src/datadogV2/model/model_user_invitation_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct UserInvitationData { /// Relationships data for user invitation. #[serde(rename = "relationships")] - pub relationships: Box, + pub relationships: crate::datadogV2::model::UserInvitationRelationships, /// User invitations type. #[serde(rename = "type")] pub type_: crate::datadogV2::model::UserInvitationsType, @@ -18,7 +18,7 @@ pub struct UserInvitationData { impl UserInvitationData { pub fn new( - relationships: Box, + relationships: crate::datadogV2::model::UserInvitationRelationships, type_: crate::datadogV2::model::UserInvitationsType, ) -> UserInvitationData { UserInvitationData { diff --git a/src/datadogV2/model/model_user_invitation_data_attributes.rs b/src/datadogV2/model/model_user_invitation_data_attributes.rs index 02916f9b8..39948cf9c 100644 --- a/src/datadogV2/model/model_user_invitation_data_attributes.rs +++ b/src/datadogV2/model/model_user_invitation_data_attributes.rs @@ -31,6 +31,26 @@ impl UserInvitationDataAttributes { uuid: None, } } + + pub fn with_created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn with_expires_at(&mut self, value: String) -> &mut Self { + self.expires_at = Some(value); + self + } + + pub fn with_invite_type(&mut self, value: String) -> &mut Self { + self.invite_type = Some(value); + self + } + + pub fn with_uuid(&mut self, value: String) -> &mut Self { + self.uuid = Some(value); + self + } } impl Default for UserInvitationDataAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_user_invitation_relationships.rs b/src/datadogV2/model/model_user_invitation_relationships.rs index 89882c195..f0332adb3 100644 --- a/src/datadogV2/model/model_user_invitation_relationships.rs +++ b/src/datadogV2/model/model_user_invitation_relationships.rs @@ -10,13 +10,11 @@ use serde_with::skip_serializing_none; pub struct UserInvitationRelationships { /// Relationship to user. #[serde(rename = "user")] - pub user: Box, + pub user: crate::datadogV2::model::RelationshipToUser, } impl UserInvitationRelationships { - pub fn new( - user: Box, - ) -> UserInvitationRelationships { + pub fn new(user: crate::datadogV2::model::RelationshipToUser) -> UserInvitationRelationships { UserInvitationRelationships { user } } } diff --git a/src/datadogV2/model/model_user_invitation_response.rs b/src/datadogV2/model/model_user_invitation_response.rs index 7b749d3e2..70d8e9b51 100644 --- a/src/datadogV2/model/model_user_invitation_response.rs +++ b/src/datadogV2/model/model_user_invitation_response.rs @@ -10,13 +10,21 @@ use serde_with::skip_serializing_none; pub struct UserInvitationResponse { /// Object of a user invitation returned by the API. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl UserInvitationResponse { pub fn new() -> UserInvitationResponse { UserInvitationResponse { data: None } } + + pub fn with_data( + &mut self, + value: crate::datadogV2::model::UserInvitationResponseData, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for UserInvitationResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_user_invitation_response_data.rs b/src/datadogV2/model/model_user_invitation_response_data.rs index dd432a9b8..80ab331a3 100644 --- a/src/datadogV2/model/model_user_invitation_response_data.rs +++ b/src/datadogV2/model/model_user_invitation_response_data.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct UserInvitationResponseData { /// Attributes of a user invitation. #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// ID of the user invitation. #[serde(rename = "id")] pub id: Option, /// Relationships data for user invitation. #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// User invitations type. #[serde(rename = "type")] pub type_: Option, @@ -31,6 +31,32 @@ impl UserInvitationResponseData { type_: None, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::UserInvitationDataAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::UserInvitationRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn with_type_(&mut self, value: crate::datadogV2::model::UserInvitationsType) -> &mut Self { + self.type_ = Some(value); + self + } } impl Default for UserInvitationResponseData { fn default() -> Self { diff --git a/src/datadogV2/model/model_user_invitations_response.rs b/src/datadogV2/model/model_user_invitations_response.rs index b384d6b70..32bcdfd0c 100644 --- a/src/datadogV2/model/model_user_invitations_response.rs +++ b/src/datadogV2/model/model_user_invitations_response.rs @@ -17,6 +17,14 @@ impl UserInvitationsResponse { pub fn new() -> UserInvitationsResponse { UserInvitationsResponse { data: None } } + + pub fn with_data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } impl Default for UserInvitationsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_user_relationships.rs b/src/datadogV2/model/model_user_relationships.rs index 23c9f40e7..eac5fcbf3 100644 --- a/src/datadogV2/model/model_user_relationships.rs +++ b/src/datadogV2/model/model_user_relationships.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct UserRelationships { /// Relationship to roles. #[serde(rename = "roles")] - pub roles: Option>, + pub roles: Option, } impl UserRelationships { pub fn new() -> UserRelationships { UserRelationships { roles: None } } + + pub fn with_roles(&mut self, value: crate::datadogV2::model::RelationshipToRoles) -> &mut Self { + self.roles = Some(value); + self + } } impl Default for UserRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_user_response.rs b/src/datadogV2/model/model_user_response.rs index 6da9ab481..2ea3106b8 100644 --- a/src/datadogV2/model/model_user_response.rs +++ b/src/datadogV2/model/model_user_response.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct UserResponse { /// User object returned by the API. #[serde(rename = "data")] - pub data: Option>, + pub data: Option, /// Array of objects related to the user. #[serde(rename = "included")] pub included: Option>, @@ -23,6 +23,19 @@ impl UserResponse { included: None, } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::User) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } } impl Default for UserResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_user_response_included_item.rs b/src/datadogV2/model/model_user_response_included_item.rs index 7255d2c22..98f1787a6 100644 --- a/src/datadogV2/model/model_user_response_included_item.rs +++ b/src/datadogV2/model/model_user_response_included_item.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum UserResponseIncludedItem { - Organization(Box), - Permission(Box), - Role(Box), + Organization(crate::datadogV2::model::Organization), + Permission(crate::datadogV2::model::Permission), + Role(crate::datadogV2::model::Role), } diff --git a/src/datadogV2/model/model_user_response_relationships.rs b/src/datadogV2/model/model_user_response_relationships.rs index a42db219e..c38591bc5 100644 --- a/src/datadogV2/model/model_user_response_relationships.rs +++ b/src/datadogV2/model/model_user_response_relationships.rs @@ -10,16 +10,16 @@ use serde_with::skip_serializing_none; pub struct UserResponseRelationships { /// Relationship to an organization. #[serde(rename = "org")] - pub org: Option>, + pub org: Option, /// Relationship to organizations. #[serde(rename = "other_orgs")] - pub other_orgs: Option>, + pub other_orgs: Option, /// Relationship to users. #[serde(rename = "other_users")] - pub other_users: Option>, + pub other_users: Option, /// Relationship to roles. #[serde(rename = "roles")] - pub roles: Option>, + pub roles: Option, } impl UserResponseRelationships { @@ -31,6 +31,35 @@ impl UserResponseRelationships { roles: None, } } + + pub fn with_org( + &mut self, + value: crate::datadogV2::model::RelationshipToOrganization, + ) -> &mut Self { + self.org = Some(value); + self + } + + pub fn with_other_orgs( + &mut self, + value: crate::datadogV2::model::RelationshipToOrganizations, + ) -> &mut Self { + self.other_orgs = Some(value); + self + } + + pub fn with_other_users( + &mut self, + value: crate::datadogV2::model::RelationshipToUsers, + ) -> &mut Self { + self.other_users = Some(value); + self + } + + pub fn with_roles(&mut self, value: crate::datadogV2::model::RelationshipToRoles) -> &mut Self { + self.roles = Some(value); + self + } } impl Default for UserResponseRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_user_team.rs b/src/datadogV2/model/model_user_team.rs index 3f233d71e..d476af4d2 100644 --- a/src/datadogV2/model/model_user_team.rs +++ b/src/datadogV2/model/model_user_team.rs @@ -10,13 +10,13 @@ use serde_with::skip_serializing_none; pub struct UserTeam { /// Team membership attributes #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The ID of a user's relationship with a team #[serde(rename = "id")] pub id: String, /// Relationship between membership and a user #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Team membership type #[serde(rename = "type")] pub type_: crate::datadogV2::model::UserTeamType, @@ -31,4 +31,20 @@ impl UserTeam { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::UserTeamAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::UserTeamRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_user_team_attributes.rs b/src/datadogV2/model/model_user_team_attributes.rs index 14529aff0..71b96dc66 100644 --- a/src/datadogV2/model/model_user_team_attributes.rs +++ b/src/datadogV2/model/model_user_team_attributes.rs @@ -36,6 +36,21 @@ impl UserTeamAttributes { role: None, } } + + pub fn with_provisioned_by(&mut self, value: Option) -> &mut Self { + self.provisioned_by = Some(value); + self + } + + pub fn with_provisioned_by_id(&mut self, value: Option) -> &mut Self { + self.provisioned_by_id = Some(value); + self + } + + pub fn with_role(&mut self, value: Option) -> &mut Self { + self.role = Some(value); + self + } } impl Default for UserTeamAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_user_team_create.rs b/src/datadogV2/model/model_user_team_create.rs index edf13d5a5..399f3bd28 100644 --- a/src/datadogV2/model/model_user_team_create.rs +++ b/src/datadogV2/model/model_user_team_create.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct UserTeamCreate { /// Team membership attributes #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Relationship between membership and a user #[serde(rename = "relationships")] - pub relationships: Option>, + pub relationships: Option, /// Team membership type #[serde(rename = "type")] pub type_: crate::datadogV2::model::UserTeamType, @@ -27,4 +27,20 @@ impl UserTeamCreate { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::UserTeamAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn with_relationships( + &mut self, + value: crate::datadogV2::model::UserTeamRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_user_team_permission.rs b/src/datadogV2/model/model_user_team_permission.rs index 5ae0ae9ee..0fefa236f 100644 --- a/src/datadogV2/model/model_user_team_permission.rs +++ b/src/datadogV2/model/model_user_team_permission.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct UserTeamPermission { /// User team permission attributes #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// The user team permission's identifier #[serde(rename = "id")] pub id: String, @@ -30,4 +30,12 @@ impl UserTeamPermission { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::UserTeamPermissionAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } } diff --git a/src/datadogV2/model/model_user_team_permission_attributes.rs b/src/datadogV2/model/model_user_team_permission_attributes.rs index 6e4289b75..75da4943a 100644 --- a/src/datadogV2/model/model_user_team_permission_attributes.rs +++ b/src/datadogV2/model/model_user_team_permission_attributes.rs @@ -17,6 +17,14 @@ impl UserTeamPermissionAttributes { pub fn new() -> UserTeamPermissionAttributes { UserTeamPermissionAttributes { permissions: None } } + + pub fn with_permissions( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.permissions = Some(value); + self + } } impl Default for UserTeamPermissionAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_user_team_relationships.rs b/src/datadogV2/model/model_user_team_relationships.rs index 062791528..eeb609417 100644 --- a/src/datadogV2/model/model_user_team_relationships.rs +++ b/src/datadogV2/model/model_user_team_relationships.rs @@ -10,10 +10,10 @@ use serde_with::skip_serializing_none; pub struct UserTeamRelationships { /// Relationship between team membership and team #[serde(rename = "team")] - pub team: Option>, + pub team: Option, /// Relationship between team membership and user #[serde(rename = "user")] - pub user: Option>, + pub user: Option, } impl UserTeamRelationships { @@ -23,6 +23,22 @@ impl UserTeamRelationships { user: None, } } + + pub fn with_team( + &mut self, + value: crate::datadogV2::model::RelationshipToUserTeamTeam, + ) -> &mut Self { + self.team = Some(value); + self + } + + pub fn with_user( + &mut self, + value: crate::datadogV2::model::RelationshipToUserTeamUser, + ) -> &mut Self { + self.user = Some(value); + self + } } impl Default for UserTeamRelationships { fn default() -> Self { diff --git a/src/datadogV2/model/model_user_team_request.rs b/src/datadogV2/model/model_user_team_request.rs index ab83ec52e..235d5c2b7 100644 --- a/src/datadogV2/model/model_user_team_request.rs +++ b/src/datadogV2/model/model_user_team_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct UserTeamRequest { /// A user's relationship with a team #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::UserTeamCreate, } impl UserTeamRequest { - pub fn new(data: Box) -> UserTeamRequest { + pub fn new(data: crate::datadogV2::model::UserTeamCreate) -> UserTeamRequest { UserTeamRequest { data } } } diff --git a/src/datadogV2/model/model_user_team_response.rs b/src/datadogV2/model/model_user_team_response.rs index aefb5bd78..8f6de0004 100644 --- a/src/datadogV2/model/model_user_team_response.rs +++ b/src/datadogV2/model/model_user_team_response.rs @@ -10,13 +10,18 @@ use serde_with::skip_serializing_none; pub struct UserTeamResponse { /// A user's relationship with a team #[serde(rename = "data")] - pub data: Option>, + pub data: Option, } impl UserTeamResponse { pub fn new() -> UserTeamResponse { UserTeamResponse { data: None } } + + pub fn with_data(&mut self, value: crate::datadogV2::model::UserTeam) -> &mut Self { + self.data = Some(value); + self + } } impl Default for UserTeamResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_user_team_update.rs b/src/datadogV2/model/model_user_team_update.rs index 2d57218e1..e9ee986cd 100644 --- a/src/datadogV2/model/model_user_team_update.rs +++ b/src/datadogV2/model/model_user_team_update.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct UserTeamUpdate { /// Team membership attributes #[serde(rename = "attributes")] - pub attributes: Option>, + pub attributes: Option, /// Team membership type #[serde(rename = "type")] pub type_: crate::datadogV2::model::UserTeamType, @@ -23,4 +23,12 @@ impl UserTeamUpdate { type_, } } + + pub fn with_attributes( + &mut self, + value: crate::datadogV2::model::UserTeamAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } } diff --git a/src/datadogV2/model/model_user_team_update_request.rs b/src/datadogV2/model/model_user_team_update_request.rs index 797f8a1d2..b1a23d158 100644 --- a/src/datadogV2/model/model_user_team_update_request.rs +++ b/src/datadogV2/model/model_user_team_update_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct UserTeamUpdateRequest { /// A user's relationship with a team #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::UserTeamUpdate, } impl UserTeamUpdateRequest { - pub fn new(data: Box) -> UserTeamUpdateRequest { + pub fn new(data: crate::datadogV2::model::UserTeamUpdate) -> UserTeamUpdateRequest { UserTeamUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_user_teams_response.rs b/src/datadogV2/model/model_user_teams_response.rs index f3e5bb609..46eaeff2d 100644 --- a/src/datadogV2/model/model_user_teams_response.rs +++ b/src/datadogV2/model/model_user_teams_response.rs @@ -13,10 +13,10 @@ pub struct UserTeamsResponse { pub data: Option>, /// Teams response links. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, /// Teams response metadata. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl UserTeamsResponse { @@ -27,6 +27,21 @@ impl UserTeamsResponse { meta: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_links(&mut self, value: crate::datadogV2::model::TeamsResponseLinks) -> &mut Self { + self.links = Some(value); + self + } + + pub fn with_meta(&mut self, value: crate::datadogV2::model::TeamsResponseMeta) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for UserTeamsResponse { fn default() -> Self { diff --git a/src/datadogV2/model/model_user_update_attributes.rs b/src/datadogV2/model/model_user_update_attributes.rs index 8b7cb5d3d..86032f4ea 100644 --- a/src/datadogV2/model/model_user_update_attributes.rs +++ b/src/datadogV2/model/model_user_update_attributes.rs @@ -27,6 +27,21 @@ impl UserUpdateAttributes { name: None, } } + + pub fn with_disabled(&mut self, value: bool) -> &mut Self { + self.disabled = Some(value); + self + } + + pub fn with_email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn with_name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } impl Default for UserUpdateAttributes { fn default() -> Self { diff --git a/src/datadogV2/model/model_user_update_data.rs b/src/datadogV2/model/model_user_update_data.rs index 8f2d44a8f..256577b49 100644 --- a/src/datadogV2/model/model_user_update_data.rs +++ b/src/datadogV2/model/model_user_update_data.rs @@ -10,7 +10,7 @@ use serde_with::skip_serializing_none; pub struct UserUpdateData { /// Attributes of the edited user. #[serde(rename = "attributes")] - pub attributes: Box, + pub attributes: crate::datadogV2::model::UserUpdateAttributes, /// ID of the user. #[serde(rename = "id")] pub id: String, @@ -21,7 +21,7 @@ pub struct UserUpdateData { impl UserUpdateData { pub fn new( - attributes: Box, + attributes: crate::datadogV2::model::UserUpdateAttributes, id: String, type_: crate::datadogV2::model::UsersType, ) -> UserUpdateData { diff --git a/src/datadogV2/model/model_user_update_request.rs b/src/datadogV2/model/model_user_update_request.rs index 28f5922e0..25429eb30 100644 --- a/src/datadogV2/model/model_user_update_request.rs +++ b/src/datadogV2/model/model_user_update_request.rs @@ -10,11 +10,11 @@ use serde_with::skip_serializing_none; pub struct UserUpdateRequest { /// Object to update a user. #[serde(rename = "data")] - pub data: Box, + pub data: crate::datadogV2::model::UserUpdateData, } impl UserUpdateRequest { - pub fn new(data: Box) -> UserUpdateRequest { + pub fn new(data: crate::datadogV2::model::UserUpdateData) -> UserUpdateRequest { UserUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_users_response.rs b/src/datadogV2/model/model_users_response.rs index 1c9ffdfb8..2be93225c 100644 --- a/src/datadogV2/model/model_users_response.rs +++ b/src/datadogV2/model/model_users_response.rs @@ -16,7 +16,7 @@ pub struct UsersResponse { pub included: Option>, /// Object describing meta attributes of response. #[serde(rename = "meta")] - pub meta: Option>, + pub meta: Option, } impl UsersResponse { @@ -27,6 +27,27 @@ impl UsersResponse { meta: None, } } + + pub fn with_data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn with_included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } + + pub fn with_meta( + &mut self, + value: crate::datadogV2::model::ResponseMetaAttributes, + ) -> &mut Self { + self.meta = Some(value); + self + } } impl Default for UsersResponse { fn default() -> Self { From 7a1f178e6e30fe9f13cc116f9ef983ec80868613 Mon Sep 17 00:00:00 2001 From: Kevin Zou Date: Thu, 1 Feb 2024 14:00:49 -0500 Subject: [PATCH 2/5] re-add boxes for oneOfs, and add builder helpers for optional parameters --- .generator/src/generator/openapi.py | 10 +- .generator/src/generator/templates/api.j2 | 28 +- .../src/generator/templates/model_oneof.j2 | 6 +- .../src/generator/templates/model_simple.j2 | 14 +- src/datadogV1/api/api_aws_integration.rs | 42 +- src/datadogV1/api/api_dashboards.rs | 42 +- src/datadogV1/api/api_downtimes.rs | 15 +- src/datadogV1/api/api_events.rs | 39 +- src/datadogV1/api/api_hosts.rs | 55 +- src/datadogV1/api/api_logs.rs | 18 +- src/datadogV1/api/api_metrics.rs | 43 +- src/datadogV1/api/api_monitors.rs | 145 ++++- src/datadogV1/api/api_notebooks.rs | 55 +- ...api_service_level_objective_corrections.rs | 15 +- .../api/api_service_level_objectives.rs | 98 +++- src/datadogV1/api/api_snapshots.rs | 37 +- src/datadogV1/api/api_synthetics.rs | 55 +- src/datadogV1/api/api_tags.rs | 53 +- src/datadogV1/api/api_usage_metering.rs | 519 ++++++++++++++++-- .../model_add_signal_to_incident_request.rs | 4 +- .../model_alert_graph_widget_definition.rs | 11 +- .../model_alert_value_widget_definition.rs | 18 +- src/datadogV1/model/model_api_key.rs | 9 +- .../model/model_api_key_list_response.rs | 3 +- src/datadogV1/model/model_api_key_response.rs | 3 +- .../model_apm_stats_query_column_type.rs | 6 +- .../model/model_apm_stats_query_definition.rs | 4 +- src/datadogV1/model/model_application_key.rs | 7 +- .../model_application_key_list_response.rs | 3 +- .../model/model_application_key_response.rs | 6 +- ...odel_authentication_validation_response.rs | 3 +- src/datadogV1/model/model_aws_account.rs | 23 +- .../model_aws_account_create_response.rs | 3 +- .../model/model_aws_account_delete_request.rs | 7 +- .../model/model_aws_account_list_response.rs | 3 +- ..._aws_event_bridge_account_configuration.rs | 7 +- .../model_aws_event_bridge_create_request.rs | 9 +- .../model_aws_event_bridge_create_response.rs | 9 +- .../model_aws_event_bridge_delete_request.rs | 7 +- .../model_aws_event_bridge_delete_response.rs | 3 +- .../model_aws_event_bridge_list_response.rs | 5 +- .../model/model_aws_event_bridge_source.rs | 5 +- .../model/model_aws_logs_async_error.rs | 5 +- .../model/model_aws_logs_async_response.rs | 8 +- src/datadogV1/model/model_aws_logs_lambda.rs | 3 +- .../model/model_aws_logs_list_response.rs | 10 +- .../model_aws_logs_list_services_response.rs | 5 +- src/datadogV1/model/model_aws_tag_filter.rs | 5 +- .../model_aws_tag_filter_create_request.rs | 7 +- .../model_aws_tag_filter_delete_request.rs | 5 +- .../model_aws_tag_filter_list_response.rs | 3 +- src/datadogV1/model/model_azure_account.rs | 27 +- .../model/model_canceled_downtimes_ids.rs | 3 +- .../model/model_change_widget_definition.rs | 13 +- .../model/model_change_widget_request.rs | 58 +- ...model_check_can_delete_monitor_response.rs | 2 +- ..._check_can_delete_monitor_response_data.rs | 3 +- .../model_check_can_delete_slo_response.rs | 5 +- ...odel_check_can_delete_slo_response_data.rs | 3 +- .../model_check_status_widget_definition.rs | 17 +- src/datadogV1/model/model_creator.rs | 7 +- src/datadogV1/model/model_dashboard.rs | 28 +- .../model/model_dashboard_delete_response.rs | 3 +- .../model/model_dashboard_global_time.rs | 3 +- src/datadogV1/model/model_dashboard_list.rs | 14 +- .../model_dashboard_list_delete_response.rs | 3 +- .../model_dashboard_list_list_response.rs | 3 +- .../model/model_dashboard_summary.rs | 3 +- .../model_dashboard_summary_definition.rs | 19 +- .../model_dashboard_template_variable.rs | 8 +- ...odel_dashboard_template_variable_preset.rs | 5 +- ...ashboard_template_variable_preset_value.rs | 7 +- .../model_delete_shared_dashboard_response.rs | 3 +- src/datadogV1/model/model_deleted_monitor.rs | 3 +- .../model/model_distribution_points_series.rs | 9 +- .../model_distribution_widget_definition.rs | 29 +- ...ribution_widget_histogram_request_query.rs | 6 +- .../model_distribution_widget_request.rs | 39 +- .../model/model_distribution_widget_x_axis.rs | 9 +- .../model/model_distribution_widget_y_axis.rs | 11 +- src/datadogV1/model/model_downtime.rs | 41 +- src/datadogV1/model/model_downtime_child.rs | 39 +- .../model/model_downtime_recurrence.rs | 13 +- src/datadogV1/model/model_event.rs | 30 +- .../model/model_event_create_request.rs | 21 +- .../model/model_event_create_response.rs | 5 +- .../model/model_event_list_response.rs | 5 +- src/datadogV1/model/model_event_response.rs | 5 +- .../model_event_stream_widget_definition.rs | 18 +- .../model_event_timeline_widget_definition.rs | 13 +- ...n_apm_dependency_stats_query_definition.rs | 6 +- ...ion_apm_resource_stats_query_definition.rs | 10 +- ...nd_function_cloud_cost_query_definition.rs | 5 +- ...ula_and_function_event_query_definition.rs | 8 +- ...function_event_query_definition_compute.rs | 4 +- ...rmula_and_function_event_query_group_by.rs | 4 +- ..._and_function_event_query_group_by_sort.rs | 4 +- ...la_and_function_metric_query_definition.rs | 2 +- ...a_and_function_process_query_definition.rs | 12 +- ...l_formula_and_function_query_definition.rs | 14 +- ...rmula_and_function_slo_query_definition.rs | 8 +- .../model_free_text_widget_definition.rs | 9 +- .../model/model_funnel_widget_definition.rs | 11 +- src/datadogV1/model/model_gcp_account.rs | 33 +- .../model/model_geomap_widget_definition.rs | 13 +- .../model/model_geomap_widget_request.rs | 31 +- src/datadogV1/model/model_graph_snapshot.rs | 7 +- .../model/model_group_widget_definition.rs | 13 +- .../model/model_heat_map_widget_definition.rs | 21 +- .../model/model_heat_map_widget_request.rs | 39 +- src/datadogV1/model/model_host.rs | 29 +- .../model/model_host_list_response.rs | 7 +- src/datadogV1/model/model_host_map_request.rs | 31 +- .../model/model_host_map_widget_definition.rs | 25 +- ...del_host_map_widget_definition_requests.rs | 5 +- .../model_host_map_widget_definition_style.rs | 9 +- src/datadogV1/model/model_host_meta.rs | 31 +- .../model/model_host_meta_install_method.rs | 7 +- src/datadogV1/model/model_host_metrics.rs | 7 +- .../model/model_host_mute_response.rs | 9 +- .../model/model_host_mute_settings.rs | 7 +- src/datadogV1/model/model_host_tags.rs | 5 +- src/datadogV1/model/model_host_totals.rs | 5 +- .../model_hourly_usage_attribution_body.rs | 19 +- ...model_hourly_usage_attribution_metadata.rs | 3 +- ...del_hourly_usage_attribution_pagination.rs | 3 +- ...model_hourly_usage_attribution_response.rs | 5 +- src/datadogV1/model/model_http_log_item.rs | 8 +- .../model/model_image_widget_definition.rs | 14 +- .../model/model_intake_payload_accepted.rs | 3 +- .../model/model_ip_prefixes_agents.rs | 5 +- src/datadogV1/model/model_ip_prefixes_api.rs | 5 +- src/datadogV1/model/model_ip_prefixes_apm.rs | 5 +- .../model/model_ip_prefixes_global.rs | 5 +- src/datadogV1/model/model_ip_prefixes_logs.rs | 5 +- .../model/model_ip_prefixes_orchestrator.rs | 5 +- .../model/model_ip_prefixes_process.rs | 5 +- .../model_ip_prefixes_remote_configuration.rs | 5 +- .../model/model_ip_prefixes_synthetics.rs | 9 +- ...p_prefixes_synthetics_private_locations.rs | 5 +- .../model/model_ip_prefixes_webhooks.rs | 5 +- src/datadogV1/model/model_ip_ranges.rs | 30 +- .../model/model_list_stream_compute_items.rs | 2 +- .../model/model_list_stream_query.rs | 15 +- .../model_list_stream_widget_definition.rs | 15 +- src/datadogV1/model/model_log.rs | 5 +- src/datadogV1/model/model_log_content.rs | 13 +- .../model/model_log_query_definition.rs | 11 +- .../model_log_query_definition_group_by.rs | 4 +- ...odel_log_query_definition_group_by_sort.rs | 2 +- .../model_log_stream_widget_definition.rs | 27 +- src/datadogV1/model/model_logs_api_error.rs | 7 +- .../model/model_logs_api_error_response.rs | 3 +- .../model/model_logs_arithmetic_processor.rs | 6 +- .../model/model_logs_attribute_remapper.rs | 17 +- .../model/model_logs_by_retention.rs | 7 +- .../model_logs_by_retention_monthly_usage.rs | 5 +- .../model_logs_by_retention_org_usage.rs | 3 +- .../model/model_logs_by_retention_orgs.rs | 3 +- .../model/model_logs_category_processor.rs | 4 +- .../model_logs_category_processor_category.rs | 5 +- .../model/model_logs_date_remapper.rs | 4 +- src/datadogV1/model/model_logs_exclusion.rs | 7 +- .../model/model_logs_exclusion_filter.rs | 2 +- src/datadogV1/model/model_logs_filter.rs | 3 +- .../model/model_logs_geo_ip_parser.rs | 4 +- src/datadogV1/model/model_logs_grok_parser.rs | 6 +- .../model/model_logs_grok_parser_rules.rs | 2 +- src/datadogV1/model/model_logs_index.rs | 8 +- .../model/model_logs_index_list_response.rs | 3 +- .../model/model_logs_index_update_request.rs | 8 +- .../model/model_logs_list_request.rs | 10 +- .../model/model_logs_list_request_time.rs | 2 +- .../model/model_logs_list_response.rs | 7 +- .../model/model_logs_lookup_processor.rs | 6 +- .../model/model_logs_message_remapper.rs | 4 +- src/datadogV1/model/model_logs_pipeline.rs | 15 +- .../model/model_logs_pipeline_processor.rs | 11 +- src/datadogV1/model/model_logs_processor.rs | 34 +- .../model/model_logs_query_compute.rs | 4 +- .../model_logs_retention_agg_sum_usage.rs | 9 +- .../model/model_logs_retention_sum_usage.rs | 9 +- .../model/model_logs_service_remapper.rs | 4 +- .../model/model_logs_status_remapper.rs | 4 +- .../model_logs_string_builder_processor.rs | 6 +- .../model/model_logs_trace_remapper.rs | 6 +- src/datadogV1/model/model_logs_url_parser.rs | 6 +- .../model/model_logs_user_agent_parser.rs | 6 +- .../model/model_matching_downtime.rs | 6 +- src/datadogV1/model/model_metric_metadata.rs | 15 +- .../model/model_metric_search_response.rs | 3 +- .../model_metric_search_response_results.rs | 3 +- .../model/model_metrics_list_response.rs | 5 +- .../model/model_metrics_query_metadata.rs | 27 +- .../model/model_metrics_query_response.rs | 19 +- .../model/model_metrics_query_unit.rs | 11 +- src/datadogV1/model/model_monitor.rs | 30 +- ...ula_and_function_event_query_definition.rs | 6 +- ...function_event_query_definition_compute.rs | 4 +- ...rmula_and_function_event_query_group_by.rs | 4 +- ..._and_function_event_query_group_by_sort.rs | 4 +- ...r_formula_and_function_query_definition.rs | 2 +- .../model_monitor_group_search_response.rs | 7 +- ...el_monitor_group_search_response_counts.rs | 5 +- .../model_monitor_group_search_result.rs | 18 +- src/datadogV1/model/model_monitor_options.rs | 66 ++- .../model_monitor_options_aggregation.rs | 7 +- .../model_monitor_options_custom_schedule.rs | 3 +- ...itor_options_custom_schedule_recurrence.rs | 7 +- ...odel_monitor_options_scheduling_options.rs | 5 +- ...ns_scheduling_options_evaluation_window.rs | 7 +- .../model/model_monitor_search_count_item.rs | 5 +- .../model/model_monitor_search_response.rs | 7 +- .../model_monitor_search_response_counts.rs | 9 +- .../model_monitor_search_response_metadata.rs | 9 +- .../model/model_monitor_search_result.rs | 30 +- ...odel_monitor_search_result_notification.rs | 5 +- src/datadogV1/model/model_monitor_state.rs | 3 +- .../model/model_monitor_state_group.rs | 16 +- ...model_monitor_summary_widget_definition.rs | 33 +- .../model_monitor_threshold_window_options.rs | 5 +- .../model/model_monitor_thresholds.rs | 13 +- .../model/model_monitor_update_request.rs | 33 +- .../model_monthly_usage_attribution_body.rs | 17 +- ...odel_monthly_usage_attribution_metadata.rs | 5 +- ...el_monthly_usage_attribution_pagination.rs | 3 +- ...odel_monthly_usage_attribution_response.rs | 5 +- .../model_monthly_usage_attribution_values.rs | 241 ++++---- .../model/model_note_widget_definition.rs | 19 +- .../model/model_notebook_absolute_time.rs | 2 +- src/datadogV1/model/model_notebook_author.rs | 19 +- ...notebook_cell_create_request_attributes.rs | 16 +- ...model_notebook_cell_response_attributes.rs | 16 +- .../model/model_notebook_cell_time.rs | 4 +- ...notebook_cell_update_request_attributes.rs | 16 +- .../model_notebook_create_data_attributes.rs | 4 +- ...l_notebook_distribution_cell_attributes.rs | 12 +- .../model/model_notebook_global_time.rs | 4 +- ...model_notebook_heat_map_cell_attributes.rs | 12 +- ...del_notebook_log_stream_cell_attributes.rs | 10 +- .../model/model_notebook_metadata.rs | 7 +- .../model/model_notebook_response.rs | 3 +- ...model_notebook_response_data_attributes.rs | 10 +- ...del_notebook_timeseries_cell_attributes.rs | 12 +- .../model_notebook_toplist_cell_attributes.rs | 12 +- .../model/model_notebook_update_cell.rs | 4 +- .../model_notebook_update_data_attributes.rs | 4 +- .../model/model_notebooks_response.rs | 8 +- ...odel_notebooks_response_data_attributes.rs | 14 +- .../model/model_notebooks_response_meta.rs | 6 +- .../model/model_notebooks_response_page.rs | 5 +- .../model/model_org_downgraded_response.rs | 3 +- src/datadogV1/model/model_organization.rs | 23 +- .../model/model_organization_billing.rs | 3 +- .../model/model_organization_create_body.rs | 7 +- .../model_organization_create_response.rs | 12 +- .../model/model_organization_list_response.rs | 3 +- .../model/model_organization_response.rs | 3 +- .../model/model_organization_settings.rs | 24 +- .../model/model_organization_settings_saml.rs | 3 +- ..._settings_saml_autocreate_users_domains.rs | 5 +- ...ation_settings_saml_idp_initiated_login.rs | 3 +- ..._organization_settings_saml_strict_mode.rs | 3 +- .../model/model_organization_subscription.rs | 3 +- src/datadogV1/model/model_pagination.rs | 5 +- ...el_powerpack_template_variable_contents.rs | 2 +- .../model_powerpack_template_variables.rs | 5 +- .../model_powerpack_widget_definition.rs | 10 +- .../model/model_process_query_definition.rs | 6 +- .../model_query_value_widget_definition.rs | 26 +- .../model/model_query_value_widget_request.rs | 52 +- ...l_reference_table_logs_lookup_processor.rs | 4 +- .../model/model_response_meta_attributes.rs | 3 +- .../model_run_workflow_widget_definition.rs | 15 +- .../model/model_scatter_plot_request.rs | 33 +- .../model_scatter_plot_widget_definition.rs | 19 +- ...scatter_plot_widget_definition_requests.rs | 10 +- .../model/model_scatterplot_table_request.rs | 7 +- .../model/model_scatterplot_widget_formula.rs | 2 +- .../model_search_service_level_objective.rs | 3 +- ...arch_service_level_objective_attributes.rs | 39 +- ...del_search_service_level_objective_data.rs | 7 +- src/datadogV1/model/model_search_slo_query.rs | 7 +- .../model/model_search_slo_response.rs | 16 +- .../model/model_search_slo_response_data.rs | 5 +- ...del_search_slo_response_data_attributes.rs | 5 +- ...rch_slo_response_data_attributes_facets.rs | 17 +- ...ponse_data_attributes_facets_object_int.rs | 5 +- ...se_data_attributes_facets_object_string.rs | 5 +- .../model/model_search_slo_response_links.rs | 11 +- .../model/model_search_slo_response_meta.rs | 3 +- .../model_search_slo_response_meta_page.rs | 17 +- .../model/model_search_slo_threshold.rs | 6 +- ...odel_selectable_template_variable_items.rs | 9 +- src/datadogV1/model/model_series.rs | 8 +- src/datadogV1/model/model_service_check.rs | 4 +- .../model/model_service_level_objective.rs | 26 +- .../model_service_level_objective_request.rs | 16 +- .../model_service_map_widget_definition.rs | 11 +- ...model_service_summary_widget_definition.rs | 30 +- src/datadogV1/model/model_shared_dashboard.rs | 21 +- .../model/model_shared_dashboard_author.rs | 5 +- .../model/model_shared_dashboard_invites.rs | 2 +- .../model_shared_dashboard_invites_data.rs | 4 +- ...ashboard_invites_data_object_attributes.rs | 13 +- .../model_shared_dashboard_invites_meta.rs | 3 +- ...odel_shared_dashboard_invites_meta_page.rs | 3 +- .../model_shared_dashboard_update_request.rs | 8 +- ...ed_dashboard_update_request_global_time.rs | 3 +- .../model_signal_assignee_update_request.rs | 2 +- .../model_signal_state_update_request.rs | 6 +- .../model/model_slack_integration_channel.rs | 5 +- ...model_slack_integration_channel_display.rs | 9 +- .../model/model_slo_bulk_delete_response.rs | 11 +- .../model_slo_bulk_delete_response_data.rs | 5 +- src/datadogV1/model/model_slo_correction.rs | 7 +- .../model/model_slo_correction_create_data.rs | 2 +- .../model_slo_correction_create_request.rs | 6 +- ...lo_correction_create_request_attributes.rs | 10 +- .../model_slo_correction_list_response.rs | 8 +- .../model/model_slo_correction_response.rs | 3 +- ...odel_slo_correction_response_attributes.rs | 28 +- ...correction_response_attributes_modifier.rs | 7 +- .../model/model_slo_correction_update_data.rs | 5 +- .../model_slo_correction_update_request.rs | 6 +- ...lo_correction_update_request_attributes.rs | 18 +- src/datadogV1/model/model_slo_creator.rs | 7 +- .../model/model_slo_delete_response.rs | 5 +- .../model/model_slo_history_metrics.rs | 2 +- .../model/model_slo_history_metrics_series.rs | 2 +- ...del_slo_history_metrics_series_metadata.rs | 13 +- ...lo_history_metrics_series_metadata_unit.rs | 13 +- .../model/model_slo_history_monitor.rs | 25 +- .../model/model_slo_history_response.rs | 8 +- .../model/model_slo_history_response_data.rs | 24 +- .../model/model_slo_history_response_error.rs | 3 +- .../model/model_slo_history_sli_data.rs | 25 +- .../model/model_slo_list_response.rs | 7 +- .../model/model_slo_list_response_metadata.rs | 3 +- .../model_slo_list_response_metadata_page.rs | 5 +- .../model/model_slo_list_widget_definition.rs | 9 +- .../model/model_slo_list_widget_query.rs | 4 +- .../model/model_slo_overall_statuses.rs | 19 +- .../model_slo_raw_error_budget_remaining.rs | 5 +- src/datadogV1/model/model_slo_response.rs | 5 +- .../model/model_slo_response_data.rs | 38 +- src/datadogV1/model/model_slo_status.rs | 15 +- src/datadogV1/model/model_slo_threshold.rs | 6 +- .../model/model_slo_widget_definition.rs | 21 +- src/datadogV1/model/model_split_config.rs | 2 +- ...el_split_graph_source_widget_definition.rs | 18 +- .../model_split_graph_widget_definition.rs | 6 +- src/datadogV1/model/model_split_sort.rs | 5 +- ...model_successful_signal_update_response.rs | 3 +- .../model/model_sunburst_widget_definition.rs | 20 +- .../model/model_sunburst_widget_legend.rs | 4 +- ...sunburst_widget_legend_inline_automatic.rs | 4 +- .../model/model_sunburst_widget_request.rs | 47 +- .../model/model_synthetics_api_step.rs | 8 +- .../model/model_synthetics_api_test.rs | 10 +- .../model/model_synthetics_api_test_config.rs | 15 +- .../model_synthetics_api_test_result_data.rs | 22 +- ...odel_synthetics_api_test_result_failure.rs | 5 +- .../model_synthetics_api_test_result_full.rs | 15 +- .../model_synthetics_api_test_result_short.rs | 11 +- ...synthetics_api_test_result_short_result.rs | 5 +- .../model/model_synthetics_assertion.rs | 8 +- ...l_synthetics_assertion_json_path_target.rs | 4 +- ...etics_assertion_json_path_target_target.rs | 7 +- .../model_synthetics_assertion_target.rs | 4 +- ...odel_synthetics_assertion_x_path_target.rs | 4 +- ...nthetics_assertion_x_path_target_target.rs | 7 +- .../model/model_synthetics_basic_auth.rs | 12 +- .../model_synthetics_basic_auth_digest.rs | 2 +- .../model/model_synthetics_basic_auth_ntlm.rs | 8 +- ...odel_synthetics_basic_auth_oauth_client.rs | 8 +- .../model_synthetics_basic_auth_oauth_rop.rs | 12 +- .../model_synthetics_basic_auth_sigv4.rs | 6 +- .../model/model_synthetics_basic_auth_web.rs | 2 +- .../model/model_synthetics_batch_details.rs | 3 +- .../model_synthetics_batch_details_data.rs | 7 +- .../model/model_synthetics_batch_result.rs | 21 +- .../model/model_synthetics_browser_error.rs | 2 +- .../model/model_synthetics_browser_test.rs | 10 +- .../model_synthetics_browser_test_config.rs | 6 +- ...del_synthetics_browser_test_result_data.rs | 25 +- ..._synthetics_browser_test_result_failure.rs | 5 +- ...del_synthetics_browser_test_result_full.rs | 15 +- ...el_synthetics_browser_test_result_short.rs | 11 +- ...hetics_browser_test_result_short_result.rs | 11 +- ...el_synthetics_browser_test_rum_settings.rs | 4 +- .../model_synthetics_browser_variable.rs | 8 +- .../model_synthetics_ci_batch_metadata.rs | 8 +- .../model_synthetics_ci_batch_metadata_ci.rs | 5 +- .../model_synthetics_ci_batch_metadata_git.rs | 5 +- ...l_synthetics_ci_batch_metadata_pipeline.rs | 3 +- ...l_synthetics_ci_batch_metadata_provider.rs | 3 +- .../model/model_synthetics_ci_test.rs | 32 +- .../model/model_synthetics_ci_test_body.rs | 6 +- .../model/model_synthetics_config_variable.rs | 8 +- .../model/model_synthetics_core_web_vitals.rs | 7 +- .../model_synthetics_delete_tests_payload.rs | 3 +- .../model_synthetics_delete_tests_response.rs | 3 +- .../model/model_synthetics_deleted_test.rs | 5 +- .../model/model_synthetics_device.rs | 2 +- ...cs_get_api_test_latest_results_response.rs | 5 +- ...et_browser_test_latest_results_response.rs | 5 +- .../model/model_synthetics_global_variable.rs | 8 +- ...l_synthetics_global_variable_attributes.rs | 3 +- ...odel_synthetics_global_variable_options.rs | 3 +- ...tics_global_variable_parse_test_options.rs | 6 +- ...thetics_global_variable_totp_parameters.rs | 5 +- .../model_synthetics_global_variable_value.rs | 7 +- ...nthetics_list_global_variables_response.rs | 3 +- .../model_synthetics_list_tests_response.rs | 3 +- .../model/model_synthetics_location.rs | 5 +- .../model/model_synthetics_locations.rs | 3 +- .../model/model_synthetics_parsing_options.rs | 11 +- .../model/model_synthetics_patch_test_body.rs | 3 +- .../model_synthetics_patch_test_operation.rs | 7 +- .../model_synthetics_private_location.rs | 6 +- ...tics_private_location_creation_response.rs | 7 +- ...ion_creation_response_result_encryption.rs | 5 +- ...el_synthetics_private_location_metadata.rs | 3 +- ...del_synthetics_private_location_secrets.rs | 5 +- ...private_location_secrets_authentication.rs | 5 +- ...vate_location_secrets_config_decryption.rs | 3 +- .../model/model_synthetics_ssl_certificate.rs | 25 +- ...model_synthetics_ssl_certificate_issuer.rs | 13 +- ...odel_synthetics_ssl_certificate_subject.rs | 15 +- src/datadogV1/model/model_synthetics_step.rs | 15 +- .../model/model_synthetics_step_detail.rs | 38 +- .../model/model_synthetics_test_ci_options.rs | 3 +- .../model/model_synthetics_test_config.rs | 12 +- .../model/model_synthetics_test_details.rs | 33 +- .../model/model_synthetics_test_options.rs | 48 +- ...synthetics_test_options_monitor_options.rs | 3 +- .../model_synthetics_test_options_retry.rs | 5 +- ...odel_synthetics_test_options_scheduling.rs | 5 +- ...etics_test_options_scheduling_timeframe.rs | 7 +- .../model/model_synthetics_test_request.rs | 61 +- ...del_synthetics_test_request_certificate.rs | 5 +- ...ynthetics_test_request_certificate_item.rs | 7 +- .../model_synthetics_test_request_proxy.rs | 2 +- .../model/model_synthetics_timing.rs | 19 +- ...del_synthetics_trigger_ci_test_location.rs | 5 +- ...l_synthetics_trigger_ci_test_run_result.rs | 9 +- ...el_synthetics_trigger_ci_tests_response.rs | 9 +- .../model/model_synthetics_trigger_test.rs | 2 +- ...hetics_update_test_pause_status_payload.rs | 3 +- .../model/model_synthetics_variable_parser.rs | 2 +- .../model/model_table_widget_definition.rs | 15 +- .../model/model_table_widget_request.rs | 57 +- src/datadogV1/model/model_tag_to_hosts.rs | 6 +- .../model/model_timeseries_background.rs | 2 +- .../model_timeseries_widget_definition.rs | 29 +- ...odel_timeseries_widget_expression_alias.rs | 2 +- .../model/model_timeseries_widget_request.rs | 56 +- .../model/model_toplist_widget_definition.rs | 15 +- .../model/model_toplist_widget_display.rs | 4 +- .../model/model_toplist_widget_request.rs | 49 +- .../model/model_toplist_widget_style.rs | 11 +- .../model_topology_map_widget_definition.rs | 11 +- src/datadogV1/model/model_topology_query.rs | 7 +- src/datadogV1/model/model_topology_request.rs | 5 +- .../model/model_tree_map_widget_definition.rs | 12 +- .../model/model_tree_map_widget_request.rs | 12 +- .../model/model_usage_analyzed_logs_hour.rs | 9 +- .../model_usage_analyzed_logs_response.rs | 3 +- ...model_usage_attribution_aggregates_body.rs | 7 +- .../model/model_usage_attribution_body.rs | 18 +- .../model/model_usage_attribution_metadata.rs | 5 +- .../model_usage_attribution_pagination.rs | 11 +- .../model/model_usage_attribution_response.rs | 5 +- .../model/model_usage_attribution_values.rs | 105 ++-- .../model/model_usage_audit_logs_hour.rs | 9 +- .../model/model_usage_audit_logs_response.rs | 6 +- .../model_usage_billable_summary_body.rs | 15 +- .../model_usage_billable_summary_hour.rs | 22 +- .../model_usage_billable_summary_keys.rs | 177 +++--- .../model_usage_billable_summary_response.rs | 3 +- .../model/model_usage_ci_visibility_hour.rs | 15 +- .../model_usage_ci_visibility_response.rs | 3 +- ..._cloud_security_posture_management_hour.rs | 21 +- ...ud_security_posture_management_response.rs | 3 +- .../model_usage_custom_reports_attributes.rs | 11 +- .../model/model_usage_custom_reports_data.rs | 7 +- .../model/model_usage_custom_reports_meta.rs | 6 +- .../model/model_usage_custom_reports_page.rs | 3 +- .../model_usage_custom_reports_response.rs | 8 +- src/datadogV1/model/model_usage_cws_hour.rs | 11 +- .../model/model_usage_cws_response.rs | 3 +- src/datadogV1/model/model_usage_dbm_hour.rs | 11 +- .../model/model_usage_dbm_response.rs | 3 +- .../model/model_usage_fargate_hour.rs | 15 +- .../model/model_usage_fargate_response.rs | 6 +- src/datadogV1/model/model_usage_host_hour.rs | 35 +- .../model/model_usage_hosts_response.rs | 3 +- .../model_usage_incident_management_hour.rs | 9 +- ...odel_usage_incident_management_response.rs | 3 +- .../model/model_usage_indexed_spans_hour.rs | 9 +- .../model_usage_indexed_spans_response.rs | 3 +- .../model/model_usage_ingested_spans_hour.rs | 9 +- .../model_usage_ingested_spans_response.rs | 3 +- src/datadogV1/model/model_usage_io_t_hour.rs | 9 +- .../model/model_usage_io_t_response.rs | 3 +- .../model/model_usage_lambda_hour.rs | 11 +- .../model/model_usage_lambda_response.rs | 6 +- .../model/model_usage_logs_by_index_hour.rs | 15 +- .../model_usage_logs_by_index_response.rs | 3 +- .../model_usage_logs_by_retention_hour.rs | 13 +- .../model_usage_logs_by_retention_response.rs | 3 +- src/datadogV1/model/model_usage_logs_hour.rs | 23 +- .../model/model_usage_logs_response.rs | 3 +- .../model/model_usage_network_flows_hour.rs | 9 +- .../model_usage_network_flows_response.rs | 3 +- .../model/model_usage_network_hosts_hour.rs | 9 +- .../model_usage_network_hosts_response.rs | 3 +- .../model/model_usage_online_archive_hour.rs | 9 +- .../model_usage_online_archive_response.rs | 3 +- .../model/model_usage_profiling_hour.rs | 13 +- .../model/model_usage_profiling_response.rs | 6 +- .../model/model_usage_rum_sessions_hour.rs | 19 +- .../model_usage_rum_sessions_response.rs | 3 +- .../model/model_usage_rum_units_hour.rs | 11 +- .../model/model_usage_rum_units_response.rs | 6 +- src/datadogV1/model/model_usage_sds_hour.rs | 17 +- .../model/model_usage_sds_response.rs | 3 +- src/datadogV1/model/model_usage_snmp_hour.rs | 9 +- .../model/model_usage_snmp_response.rs | 3 +- ...age_specified_custom_reports_attributes.rs | 13 +- ...del_usage_specified_custom_reports_data.rs | 7 +- ...del_usage_specified_custom_reports_meta.rs | 3 +- ...del_usage_specified_custom_reports_page.rs | 3 +- ...usage_specified_custom_reports_response.rs | 5 +- .../model/model_usage_summary_date.rs | 211 ++++--- .../model/model_usage_summary_date_org.rs | 216 ++++---- .../model/model_usage_summary_response.rs | 245 ++++----- .../model/model_usage_synthetics_api_hour.rs | 9 +- .../model_usage_synthetics_api_response.rs | 3 +- .../model_usage_synthetics_browser_hour.rs | 9 +- ...model_usage_synthetics_browser_response.rs | 3 +- .../model/model_usage_synthetics_hour.rs | 9 +- .../model/model_usage_synthetics_response.rs | 6 +- .../model/model_usage_timeseries_hour.rs | 13 +- .../model/model_usage_timeseries_response.rs | 6 +- .../model/model_usage_top_avg_metrics_hour.rs | 9 +- .../model_usage_top_avg_metrics_metadata.rs | 7 +- .../model_usage_top_avg_metrics_pagination.rs | 7 +- .../model_usage_top_avg_metrics_response.rs | 5 +- src/datadogV1/model/model_user.rs | 18 +- .../model/model_user_disable_response.rs | 3 +- .../model/model_user_list_response.rs | 3 +- src/datadogV1/model/model_user_response.rs | 3 +- .../model/model_webhooks_integration.rs | 6 +- ...ks_integration_custom_variable_response.rs | 2 +- ...egration_custom_variable_update_request.rs | 7 +- ...del_webhooks_integration_update_request.rs | 11 +- src/datadogV1/model/model_widget.rs | 4 +- src/datadogV1/model/model_widget_axis.rs | 11 +- .../model/model_widget_conditional_format.rs | 12 +- .../model/model_widget_custom_link.rs | 9 +- .../model/model_widget_definition.rs | 68 +-- src/datadogV1/model/model_widget_event.rs | 2 +- src/datadogV1/model/model_widget_formula.rs | 10 +- .../model/model_widget_formula_limit.rs | 5 +- .../model/model_widget_formula_style.rs | 5 +- src/datadogV1/model/model_widget_layout.rs | 2 +- src/datadogV1/model/model_widget_marker.rs | 6 +- .../model/model_widget_request_style.rs | 10 +- src/datadogV1/model/model_widget_style.rs | 3 +- src/datadogV1/model/model_widget_time.rs | 3 +- src/datadogV2/api/api_audit.rs | 47 +- src/datadogV2/api/api_auth_n_mappings.rs | 25 +- .../api/api_ci_visibility_pipelines.rs | 47 +- src/datadogV2/api/api_ci_visibility_tests.rs | 44 +- src/datadogV2/api/api_container_images.rs | 31 +- src/datadogV2/api/api_containers.rs | 31 +- src/datadogV2/api/api_downtimes.rs | 52 +- src/datadogV2/api/api_events.rs | 44 +- src/datadogV2/api/api_gcp_integration.rs | 13 +- src/datadogV2/api/api_incident_services.rs | 35 +- src/datadogV2/api/api_incident_teams.rs | 35 +- src/datadogV2/api/api_incidents.rs | 108 +++- src/datadogV2/api/api_key_management.rs | 166 +++++- src/datadogV2/api/api_logs.rs | 76 ++- src/datadogV2/api/api_metrics.rs | 101 +++- src/datadogV2/api/api_organizations.rs | 10 +- src/datadogV2/api/api_powerpack.rs | 15 +- src/datadogV2/api/api_processes.rs | 40 +- src/datadogV2/api/api_roles.rs | 59 +- src/datadogV2/api/api_rum.rs | 35 +- src/datadogV2/api/api_security_monitoring.rs | 143 ++++- src/datadogV2/api/api_service_accounts.rs | 37 +- src/datadogV2/api/api_service_definition.rs | 36 +- src/datadogV2/api/api_service_scorecards.rs | 110 +++- src/datadogV2/api/api_spans.rs | 35 +- src/datadogV2/api/api_teams.rs | 65 ++- src/datadogV2/api/api_usage_metering.rs | 166 +++++- src/datadogV2/api/api_users.rs | 40 +- ...el_active_billing_dimensions_attributes.rs | 5 +- .../model_active_billing_dimensions_body.rs | 7 +- ...odel_active_billing_dimensions_response.rs | 3 +- .../model/model_api_key_relationships.rs | 11 +- src/datadogV2/model/model_api_key_response.rs | 5 +- .../model_api_key_response_included_item.rs | 2 +- .../model/model_api_keys_response.rs | 7 +- .../model/model_api_keys_response_meta.rs | 8 +- .../model_api_keys_response_meta_page.rs | 3 +- ...model_application_key_create_attributes.rs | 2 +- .../model_application_key_relationships.rs | 6 +- .../model/model_application_key_response.rs | 5 +- ..._application_key_response_included_item.rs | 4 +- .../model_application_key_response_meta.rs | 5 +- ...odel_application_key_response_meta_page.rs | 3 +- ...model_application_key_update_attributes.rs | 5 +- src/datadogV2/model/model_audit_logs_event.rs | 7 +- .../model_audit_logs_event_attributes.rs | 11 +- .../model/model_audit_logs_events_response.rs | 13 +- .../model/model_audit_logs_query_filter.rs | 7 +- .../model/model_audit_logs_query_options.rs | 5 +- .../model_audit_logs_query_page_options.rs | 5 +- .../model/model_audit_logs_response_links.rs | 3 +- .../model_audit_logs_response_metadata.rs | 20 +- .../model/model_audit_logs_response_page.rs | 3 +- .../model_audit_logs_search_events_request.rs | 18 +- .../model/model_audit_logs_warning.rs | 7 +- src/datadogV2/model/model_auth_n_mapping.rs | 4 +- .../model/model_auth_n_mapping_attributes.rs | 11 +- .../model_auth_n_mapping_create_attributes.rs | 5 +- .../model/model_auth_n_mapping_create_data.rs | 4 +- ...del_auth_n_mapping_create_relationships.rs | 3 +- .../model/model_auth_n_mapping_included.rs | 4 +- .../model_auth_n_mapping_relationships.rs | 5 +- .../model/model_auth_n_mapping_response.rs | 5 +- .../model_auth_n_mapping_update_attributes.rs | 5 +- .../model/model_auth_n_mapping_update_data.rs | 4 +- ...del_auth_n_mapping_update_relationships.rs | 3 +- .../model/model_auth_n_mappings_response.rs | 10 +- src/datadogV2/model/model_aws_cur_config.rs | 2 +- .../model/model_aws_cur_config_attributes.rs | 10 +- ..._aws_cur_config_post_request_attributes.rs | 6 +- .../model/model_aws_cur_config_response.rs | 3 +- .../model/model_aws_cur_configs_response.rs | 3 +- .../model/model_aws_related_account.rs | 2 +- .../model_aws_related_account_attributes.rs | 5 +- .../model_aws_related_accounts_response.rs | 6 +- src/datadogV2/model/model_azure_uc_config.rs | 12 +- .../model/model_azure_uc_config_pair.rs | 2 +- .../model_azure_uc_config_pair_attributes.rs | 2 +- .../model_azure_uc_config_pairs_response.rs | 3 +- ...azure_uc_config_post_request_attributes.rs | 2 +- .../model/model_azure_uc_configs_response.rs | 6 +- .../model_bulk_mute_findings_request_meta.rs | 3 +- ...ulk_mute_findings_request_meta_findings.rs | 3 +- ...l_bulk_mute_findings_request_properties.rs | 4 +- .../model_bulk_mute_findings_response_data.rs | 5 +- .../model/model_chargeback_breakdown.rs | 7 +- ...i_app_aggregate_bucket_value_timeseries.rs | 1 + ...aggregate_bucket_value_timeseries_point.rs | 5 +- .../model/model_ci_app_aggregate_sort.rs | 12 +- src/datadogV2/model/model_ci_app_ci_error.rs | 9 +- src/datadogV2/model/model_ci_app_compute.rs | 6 +- ...el_ci_app_create_pipeline_event_request.rs | 3 +- ...reate_pipeline_event_request_attributes.rs | 4 +- ...eline_event_request_attributes_resource.rs | 8 +- ..._app_create_pipeline_event_request_data.rs | 5 +- .../model/model_ci_app_event_attributes.rs | 7 +- src/datadogV2/model/model_ci_app_git_info.rs | 18 +- src/datadogV2/model/model_ci_app_host_info.rs | 9 +- .../model/model_ci_app_pipeline_event.rs | 7 +- .../model_ci_app_pipeline_event_attributes.rs | 10 +- .../model/model_ci_app_pipeline_event_job.rs | 26 +- ...l_ci_app_pipeline_event_parent_pipeline.rs | 2 +- .../model_ci_app_pipeline_event_pipeline.rs | 30 +- ...ci_app_pipeline_event_previous_pipeline.rs | 2 +- .../model_ci_app_pipeline_event_stage.rs | 22 +- .../model/model_ci_app_pipeline_event_step.rs | 28 +- .../model_ci_app_pipeline_events_request.rs | 12 +- .../model_ci_app_pipeline_events_response.rs | 10 +- ...odel_ci_app_pipelines_aggregate_request.rs | 9 +- ..._pipelines_aggregation_buckets_response.rs | 3 +- ..._pipelines_analytics_aggregate_response.rs | 10 +- .../model_ci_app_pipelines_bucket_response.rs | 5 +- .../model/model_ci_app_pipelines_group_by.rs | 13 +- .../model_ci_app_pipelines_query_filter.rs | 7 +- .../model/model_ci_app_query_options.rs | 5 +- .../model/model_ci_app_query_page_options.rs | 5 +- .../model/model_ci_app_response_links.rs | 3 +- .../model/model_ci_app_response_metadata.rs | 15 +- ...i_app_response_metadata_with_pagination.rs | 17 +- .../model/model_ci_app_response_page.rs | 3 +- .../model/model_ci_app_test_event.rs | 10 +- .../model/model_ci_app_test_events_request.rs | 15 +- .../model_ci_app_test_events_response.rs | 7 +- .../model_ci_app_tests_aggregate_request.rs | 12 +- ..._app_tests_aggregation_buckets_response.rs | 3 +- ..._app_tests_analytics_aggregate_response.rs | 7 +- .../model_ci_app_tests_bucket_response.rs | 5 +- .../model/model_ci_app_tests_group_by.rs | 13 +- .../model/model_ci_app_tests_query_filter.rs | 7 +- src/datadogV2/model/model_ci_app_warning.rs | 7 +- ...d_configuration_compliance_rule_options.rs | 7 +- ...el_cloud_configuration_rule_case_create.rs | 2 +- ...guration_rule_compliance_signal_options.rs | 9 +- ...cloud_configuration_rule_create_payload.rs | 6 +- .../model_cloud_cost_activity_response.rs | 3 +- ...workload_security_agent_rule_attributes.rs | 33 +- ...d_security_agent_rule_create_attributes.rs | 4 +- ..._security_agent_rule_creator_attributes.rs | 5 +- ...cloud_workload_security_agent_rule_data.rs | 7 +- ...d_workload_security_agent_rule_response.rs | 3 +- ...d_security_agent_rule_update_attributes.rs | 7 +- ..._security_agent_rule_updater_attributes.rs | 5 +- ...load_security_agent_rules_list_response.rs | 3 +- ...flare_account_create_request_attributes.rs | 2 +- .../model_cloudflare_account_response.rs | 3 +- ..._cloudflare_account_response_attributes.rs | 2 +- ...flare_account_update_request_attributes.rs | 2 +- ..._cloudflare_account_update_request_data.rs | 8 +- .../model_cloudflare_accounts_response.rs | 3 +- ...luent_account_create_request_attributes.rs | 4 +- ...l_confluent_account_resource_attributes.rs | 6 +- .../model/model_confluent_account_response.rs | 3 +- ...l_confluent_account_response_attributes.rs | 4 +- ...luent_account_update_request_attributes.rs | 2 +- .../model_confluent_accounts_response.rs | 3 +- ...l_confluent_resource_request_attributes.rs | 4 +- .../model_confluent_resource_response.rs | 3 +- ..._confluent_resource_response_attributes.rs | 6 +- .../model_confluent_resources_response.rs | 3 +- src/datadogV2/model/model_container.rs | 10 +- .../model/model_container_attributes.rs | 21 +- src/datadogV2/model/model_container_group.rs | 9 +- .../model/model_container_group_attributes.rs | 5 +- .../model_container_group_relationships.rs | 3 +- ...odel_container_group_relationships_link.rs | 5 +- ...del_container_group_relationships_links.rs | 3 +- src/datadogV2/model/model_container_image.rs | 7 +- .../model/model_container_image_attributes.rs | 35 +- .../model/model_container_image_flavor.rs | 11 +- .../model/model_container_image_group.rs | 12 +- .../model_container_image_group_attributes.rs | 7 +- ...r_image_group_images_relationships_link.rs | 5 +- ...del_container_image_group_relationships.rs | 3 +- ...ntainer_image_group_relationships_links.rs | 3 +- .../model/model_container_image_item.rs | 4 +- .../model/model_container_image_meta.rs | 3 +- .../model/model_container_image_meta_page.rs | 13 +- .../model_container_image_vulnerabilities.rs | 15 +- .../model/model_container_images_response.rs | 10 +- .../model_container_images_response_links.rs | 11 +- src/datadogV2/model/model_container_item.rs | 4 +- src/datadogV2/model/model_container_meta.rs | 6 +- .../model/model_container_meta_page.rs | 16 +- .../model/model_containers_response.rs | 10 +- .../model/model_containers_response_links.rs | 11 +- .../model_cost_attribution_aggregates_body.rs | 7 +- src/datadogV2/model/model_cost_by_org.rs | 10 +- .../model/model_cost_by_org_attributes.rs | 13 +- .../model/model_cost_by_org_response.rs | 3 +- .../model/model_create_rule_request.rs | 6 +- .../model/model_create_rule_request_data.rs | 5 +- .../model/model_create_rule_response.rs | 6 +- .../model/model_create_rule_response_data.rs | 9 +- src/datadogV2/model/model_creator.rs | 7 +- .../model_dashboard_list_add_items_request.rs | 3 +- ...model_dashboard_list_add_items_response.rs | 3 +- ...del_dashboard_list_delete_items_request.rs | 3 +- ...el_dashboard_list_delete_items_response.rs | 3 +- .../model/model_dashboard_list_item.rs | 24 +- .../model/model_dashboard_list_items.rs | 2 +- ...del_dashboard_list_update_items_request.rs | 3 +- ...el_dashboard_list_update_items_response.rs | 3 +- .../model/model_data_scalar_column.rs | 12 +- src/datadogV2/model/model_detailed_finding.rs | 7 +- .../model_detailed_finding_attributes.rs | 26 +- ...odel_dora_deployment_request_attributes.rs | 6 +- .../model_dora_deployment_response_data.rs | 2 +- .../model_dora_incident_request_attributes.rs | 12 +- .../model_dora_incident_response_data.rs | 2 +- ...odel_downtime_create_request_attributes.rs | 12 +- src/datadogV2/model/model_downtime_meta.rs | 3 +- .../model/model_downtime_meta_page.rs | 3 +- .../model_downtime_monitor_identifier.rs | 4 +- ...el_downtime_monitor_included_attributes.rs | 3 +- .../model_downtime_monitor_included_item.rs | 7 +- .../model/model_downtime_relationships.rs | 5 +- ...model_downtime_relationships_created_by.rs | 3 +- ..._downtime_relationships_created_by_data.rs | 5 +- .../model_downtime_relationships_monitor.rs | 3 +- ...del_downtime_relationships_monitor_data.rs | 5 +- .../model/model_downtime_response.rs | 5 +- .../model_downtime_response_attributes.rs | 25 +- .../model/model_downtime_response_data.rs | 12 +- .../model_downtime_response_included_item.rs | 4 +- .../model_downtime_schedule_create_request.rs | 4 +- ...time_schedule_current_downtime_response.rs | 5 +- ...schedule_one_time_create_update_request.rs | 5 +- ...del_downtime_schedule_one_time_response.rs | 2 +- ...hedule_recurrence_create_update_request.rs | 2 +- ...l_downtime_schedule_recurrence_response.rs | 7 +- ...ime_schedule_recurrences_create_request.rs | 2 +- ..._downtime_schedule_recurrences_response.rs | 4 +- ...ime_schedule_recurrences_update_request.rs | 5 +- .../model/model_downtime_schedule_response.rs | 4 +- .../model_downtime_schedule_update_request.rs | 4 +- ...odel_downtime_update_request_attributes.rs | 17 +- src/datadogV2/model/model_event.rs | 9 +- src/datadogV2/model/model_event_attributes.rs | 45 +- src/datadogV2/model/model_event_response.rs | 7 +- .../model/model_event_response_attributes.rs | 12 +- src/datadogV2/model/model_events_compute.rs | 4 +- src/datadogV2/model/model_events_group_by.rs | 4 +- .../model/model_events_group_by_sort.rs | 6 +- .../model/model_events_list_request.rs | 12 +- .../model/model_events_list_response.rs | 13 +- .../model/model_events_list_response_links.rs | 3 +- .../model/model_events_query_filter.rs | 7 +- .../model/model_events_query_options.rs | 5 +- .../model/model_events_request_page.rs | 5 +- .../model/model_events_response_metadata.rs | 14 +- .../model_events_response_metadata_page.rs | 3 +- .../model/model_events_scalar_query.rs | 11 +- src/datadogV2/model/model_events_search.rs | 3 +- .../model/model_events_timeseries_query.rs | 11 +- src/datadogV2/model/model_events_warning.rs | 7 +- ...model_fastly_accoun_response_attributes.rs | 5 +- ...astly_account_create_request_attributes.rs | 5 +- .../model/model_fastly_account_response.rs | 6 +- ...astly_account_update_request_attributes.rs | 3 +- ...odel_fastly_account_update_request_data.rs | 5 +- .../model/model_fastly_accounts_response.rs | 3 +- src/datadogV2/model/model_fastly_service.rs | 2 +- .../model/model_fastly_service_attributes.rs | 3 +- .../model/model_fastly_service_data.rs | 2 +- .../model/model_fastly_service_response.rs | 3 +- .../model/model_fastly_services_response.rs | 3 +- src/datadogV2/model/model_finding.rs | 10 +- .../model/model_finding_attributes.rs | 22 +- src/datadogV2/model/model_finding_mute.rs | 13 +- src/datadogV2/model/model_finding_rule.rs | 5 +- src/datadogV2/model/model_formula_limit.rs | 5 +- src/datadogV2/model/model_full_api_key.rs | 9 +- .../model/model_full_api_key_attributes.rs | 15 +- .../model/model_full_application_key.rs | 9 +- .../model_full_application_key_attributes.rs | 11 +- .../model/model_gcp_service_account_meta.rs | 3 +- .../model/model_gcpsts_delegate_account.rs | 7 +- ...odel_gcpsts_delegate_account_attributes.rs | 3 +- .../model_gcpsts_delegate_account_response.rs | 6 +- .../model/model_gcpsts_service_account.rs | 15 +- ...model_gcpsts_service_account_attributes.rs | 15 +- ...l_gcpsts_service_account_create_request.rs | 6 +- .../model_gcpsts_service_account_data.rs | 8 +- .../model_gcpsts_service_account_response.rs | 3 +- ...l_gcpsts_service_account_update_request.rs | 3 +- ...sts_service_account_update_request_data.rs | 10 +- .../model_gcpsts_service_accounts_response.rs | 6 +- .../model/model_group_scalar_column.rs | 10 +- src/datadogV2/model/model_hourly_usage.rs | 7 +- .../model/model_hourly_usage_attributes.rs | 13 +- .../model/model_hourly_usage_measurement.rs | 5 +- .../model/model_hourly_usage_metadata.rs | 3 +- .../model/model_hourly_usage_pagination.rs | 3 +- .../model/model_hourly_usage_response.rs | 5 +- src/datadogV2/model/model_http_log_error.rs | 7 +- src/datadogV2/model/model_http_log_errors.rs | 3 +- src/datadogV2/model/model_http_log_item.rs | 8 +- src/datadogV2/model/model_httpci_app_error.rs | 7 +- .../model/model_httpci_app_errors.rs | 6 +- .../model/model_id_p_metadata_form_data.rs | 3 +- .../model_incident_attachment_attributes.rs | 6 +- ...del_incident_attachment_link_attributes.rs | 2 +- ...model_incident_attachment_relationships.rs | 3 +- ...l_incident_attachment_update_attributes.rs | 6 +- .../model_incident_attachment_update_data.rs | 4 +- ...del_incident_attachment_update_response.rs | 2 +- .../model_incident_attachments_response.rs | 2 +- ...dent_attachments_response_included_item.rs | 2 +- .../model/model_incident_create_attributes.rs | 8 +- .../model/model_incident_create_data.rs | 2 +- .../model/model_incident_field_attributes.rs | 6 +- ...ncident_field_attributes_multiple_value.rs | 5 +- ..._incident_field_attributes_single_value.rs | 5 +- ...ncident_integration_metadata_attributes.rs | 8 +- ...dent_integration_metadata_list_response.rs | 4 +- ..._incident_integration_metadata_metadata.rs | 4 +- ..._incident_integration_metadata_response.rs | 2 +- ...dent_integration_metadata_response_data.rs | 4 +- ...gration_metadata_response_included_item.rs | 2 +- ...odel_incident_integration_relationships.rs | 5 +- .../model_incident_non_datadog_creator.rs | 5 +- .../model_incident_notification_handle.rs | 5 +- .../model/model_incident_response.rs | 2 +- .../model_incident_response_attributes.rs | 44 +- .../model/model_incident_response_data.rs | 4 +- .../model_incident_response_included_item.rs | 4 +- .../model/model_incident_response_meta.rs | 3 +- ...model_incident_response_meta_pagination.rs | 7 +- .../model_incident_response_relationships.rs | 17 +- .../model/model_incident_search_response.rs | 4 +- .../model_incident_search_response_data.rs | 5 +- ...el_incident_search_response_facets_data.rs | 23 +- ...cident_search_response_field_facet_data.rs | 5 +- .../model_incident_search_response_meta.rs | 3 +- ..._response_numeric_facet_data_aggregates.rs | 5 +- ...arch_response_property_field_facet_data.rs | 2 +- ...ncident_search_response_user_facet_data.rs | 11 +- .../model_incident_service_create_data.rs | 4 +- .../model_incident_service_included_items.rs | 2 +- .../model_incident_service_relationships.rs | 8 +- .../model/model_incident_service_response.rs | 2 +- ...el_incident_service_response_attributes.rs | 7 +- .../model_incident_service_response_data.rs | 4 +- .../model_incident_service_update_data.rs | 6 +- .../model/model_incident_services_response.rs | 4 +- .../model/model_incident_team_create_data.rs | 4 +- .../model_incident_team_included_items.rs | 2 +- .../model_incident_team_relationships.rs | 8 +- .../model/model_incident_team_response.rs | 2 +- ...model_incident_team_response_attributes.rs | 7 +- .../model_incident_team_response_data.rs | 9 +- .../model/model_incident_team_update_data.rs | 6 +- .../model/model_incident_teams_response.rs | 4 +- ...ncident_timeline_cell_create_attributes.rs | 2 +- ...imeline_cell_markdown_create_attributes.rs | 2 +- ...cell_markdown_create_attributes_content.rs | 3 +- .../model/model_incident_todo_assignee.rs | 2 +- .../model/model_incident_todo_attributes.rs | 10 +- .../model_incident_todo_list_response.rs | 4 +- .../model_incident_todo_relationships.rs | 5 +- .../model/model_incident_todo_response.rs | 2 +- .../model_incident_todo_response_data.rs | 4 +- ...el_incident_todo_response_included_item.rs | 2 +- .../model/model_incident_update_attributes.rs | 17 +- .../model/model_incident_update_data.rs | 4 +- .../model_incident_update_relationships.rs | 7 +- .../model/model_incidents_response.rs | 4 +- .../model/model_intake_payload_accepted.rs | 3 +- .../model/model_ip_allowlist_attributes.rs | 8 +- .../model/model_ip_allowlist_data.rs | 4 +- .../model_ip_allowlist_entry_attributes.rs | 9 +- .../model/model_ip_allowlist_entry_data.rs | 4 +- .../model/model_ip_allowlist_response.rs | 3 +- ...l_jira_integration_metadata_issues_item.rs | 6 +- .../model/model_jsonapi_error_item.rs | 7 +- .../model_list_application_keys_response.rs | 7 +- .../model/model_list_downtimes_response.rs | 10 +- .../model/model_list_findings_meta.rs | 5 +- .../model/model_list_findings_page.rs | 5 +- .../model/model_list_powerpacks_response.rs | 15 +- .../model/model_list_rules_response.rs | 8 +- .../model_list_rules_response_data_item.rs | 9 +- .../model/model_list_rules_response_links.rs | 3 +- src/datadogV2/model/model_log.rs | 7 +- src/datadogV2/model/model_log_attributes.rs | 15 +- .../model/model_logs_aggregate_bucket.rs | 5 +- ..._logs_aggregate_bucket_value_timeseries.rs | 1 + ...aggregate_bucket_value_timeseries_point.rs | 5 +- .../model/model_logs_aggregate_request.rs | 14 +- .../model_logs_aggregate_request_page.rs | 3 +- .../model/model_logs_aggregate_response.rs | 8 +- .../model_logs_aggregate_response_data.rs | 3 +- .../model/model_logs_aggregate_sort.rs | 12 +- src/datadogV2/model/model_logs_archive.rs | 6 +- .../model/model_logs_archive_attributes.rs | 8 +- .../model_logs_archive_create_request.rs | 3 +- ..._logs_archive_create_request_attributes.rs | 6 +- ..._logs_archive_create_request_definition.rs | 2 +- ...logs_archive_create_request_destination.rs | 6 +- .../model/model_logs_archive_definition.rs | 4 +- .../model/model_logs_archive_destination.rs | 6 +- .../model_logs_archive_destination_azure.rs | 4 +- .../model_logs_archive_destination_gcs.rs | 2 +- .../model_logs_archive_destination_s3.rs | 2 +- .../model/model_logs_archive_order.rs | 3 +- src/datadogV2/model/model_logs_archives.rs | 3 +- src/datadogV2/model/model_logs_compute.rs | 6 +- src/datadogV2/model/model_logs_group_by.rs | 16 +- .../model/model_logs_list_request.rs | 9 +- .../model/model_logs_list_request_page.rs | 5 +- .../model/model_logs_list_response.rs | 10 +- .../model/model_logs_list_response_links.rs | 3 +- .../model/model_logs_metric_compute.rs | 4 +- .../model_logs_metric_create_attributes.rs | 4 +- .../model/model_logs_metric_filter.rs | 3 +- .../model/model_logs_metric_group_by.rs | 2 +- .../model/model_logs_metric_response.rs | 6 +- .../model_logs_metric_response_attributes.rs | 7 +- .../model_logs_metric_response_compute.rs | 7 +- .../model/model_logs_metric_response_data.rs | 7 +- .../model_logs_metric_response_filter.rs | 3 +- .../model_logs_metric_response_group_by.rs | 5 +- .../model_logs_metric_update_attributes.rs | 7 +- .../model/model_logs_metric_update_compute.rs | 3 +- .../model/model_logs_metrics_response.rs | 3 +- .../model/model_logs_query_filter.rs | 14 +- .../model/model_logs_query_options.rs | 5 +- .../model/model_logs_response_metadata.rs | 14 +- .../model_logs_response_metadata_page.rs | 3 +- src/datadogV2/model/model_logs_warning.rs | 7 +- src/datadogV2/model/model_metric.rs | 5 +- src/datadogV2/model/model_metric_all_tags.rs | 7 +- .../model/model_metric_all_tags_attributes.rs | 3 +- .../model/model_metric_all_tags_response.rs | 3 +- .../model_metric_bulk_tag_config_create.rs | 2 +- ...etric_bulk_tag_config_create_attributes.rs | 7 +- .../model_metric_bulk_tag_config_delete.rs | 2 +- ...etric_bulk_tag_config_delete_attributes.rs | 3 +- .../model_metric_bulk_tag_config_response.rs | 6 +- .../model_metric_bulk_tag_config_status.rs | 2 +- ...etric_bulk_tag_config_status_attributes.rs | 9 +- .../model/model_metric_distinct_volume.rs | 10 +- ...model_metric_distinct_volume_attributes.rs | 3 +- src/datadogV2/model/model_metric_estimate.rs | 7 +- .../model/model_metric_estimate_attributes.rs | 7 +- .../model/model_metric_estimate_response.rs | 3 +- .../model_metric_ingested_indexed_volume.rs | 7 +- ...tric_ingested_indexed_volume_attributes.rs | 5 +- src/datadogV2/model/model_metric_metadata.rs | 3 +- src/datadogV2/model/model_metric_origin.rs | 7 +- src/datadogV2/model/model_metric_point.rs | 5 +- src/datadogV2/model/model_metric_resource.rs | 5 +- src/datadogV2/model/model_metric_series.rs | 17 +- ..._metric_suggested_tags_and_aggregations.rs | 7 +- ...uggested_tags_and_aggregations_response.rs | 3 +- .../model_metric_suggested_tags_attributes.rs | 5 +- .../model/model_metric_tag_configuration.rs | 7 +- ...del_metric_tag_configuration_attributes.rs | 15 +- ...ric_tag_configuration_create_attributes.rs | 6 +- ...el_metric_tag_configuration_create_data.rs | 2 +- ...model_metric_tag_configuration_response.rs | 6 +- ...ric_tag_configuration_update_attributes.rs | 9 +- ...el_metric_tag_configuration_update_data.rs | 2 +- src/datadogV2/model/model_metric_volumes.rs | 4 +- .../model/model_metric_volumes_response.rs | 3 +- ...l_metrics_and_metric_tag_configurations.rs | 4 +- ..._and_metric_tag_configurations_response.rs | 3 +- .../model/model_metrics_scalar_query.rs | 2 +- .../model/model_metrics_timeseries_query.rs | 2 +- ...onitor_config_policy_attribute_response.rs | 5 +- ...del_monitor_config_policy_list_response.rs | 3 +- .../model_monitor_config_policy_policy.rs | 2 +- ...tor_config_policy_policy_create_request.rs | 2 +- .../model_monitor_config_policy_response.rs | 3 +- ...del_monitor_config_policy_response_data.rs | 7 +- .../model_monitor_config_policy_tag_policy.rs | 7 +- .../model_monitor_downtime_match_response.rs | 5 +- ...itor_downtime_match_response_attributes.rs | 9 +- ...el_monitor_downtime_match_response_data.rs | 7 +- src/datadogV2/model/model_monitor_type.rs | 23 +- ...del_monthly_cost_attribution_attributes.rs | 15 +- .../model_monthly_cost_attribution_body.rs | 7 +- .../model_monthly_cost_attribution_meta.rs | 5 +- ...del_monthly_cost_attribution_pagination.rs | 3 +- ...model_monthly_cost_attribution_response.rs | 5 +- src/datadogV2/model/model_okta_account.rs | 2 +- .../model/model_okta_account_attributes.rs | 6 +- .../model/model_okta_account_response.rs | 3 +- ..._okta_account_update_request_attributes.rs | 6 +- .../model_okta_account_update_request_data.rs | 5 +- .../model/model_okta_accounts_response.rs | 3 +- .../model/model_on_demand_concurrency_cap.rs | 5 +- ...el_on_demand_concurrency_cap_attributes.rs | 3 +- ...odel_on_demand_concurrency_cap_response.rs | 6 +- ...odel_opsgenie_service_create_attributes.rs | 2 +- ...el_opsgenie_service_response_attributes.rs | 7 +- ...odel_opsgenie_service_update_attributes.rs | 9 +- src/datadogV2/model/model_organization.rs | 4 +- .../model/model_organization_attributes.rs | 17 +- .../model/model_outcomes_batch_attributes.rs | 3 +- .../model/model_outcomes_batch_request.rs | 6 +- .../model_outcomes_batch_request_data.rs | 5 +- .../model_outcomes_batch_request_item.rs | 2 +- ...odel_outcomes_batch_response_attributes.rs | 11 +- .../model_outcomes_batch_response_meta.rs | 5 +- .../model/model_outcomes_response.rs | 10 +- .../model_outcomes_response_data_item.rs | 9 +- .../model_outcomes_response_included_item.rs | 7 +- ...comes_response_included_rule_attributes.rs | 5 +- .../model/model_outcomes_response_links.rs | 3 +- src/datadogV2/model/model_pagination.rs | 5 +- src/datadogV2/model/model_partial_api_key.rs | 9 +- .../model/model_partial_api_key_attributes.rs | 13 +- .../model/model_partial_application_key.rs | 9 +- ...odel_partial_application_key_attributes.rs | 9 +- .../model_partial_application_key_response.rs | 8 +- src/datadogV2/model/model_permission.rs | 4 +- .../model/model_permission_attributes.rs | 15 +- .../model/model_permissions_response.rs | 3 +- src/datadogV2/model/model_powerpack.rs | 3 +- .../model/model_powerpack_attributes.rs | 6 +- src/datadogV2/model/model_powerpack_data.rs | 12 +- .../model/model_powerpack_group_widget.rs | 4 +- ...model_powerpack_group_widget_definition.rs | 4 +- .../model/model_powerpack_inner_widgets.rs | 2 +- .../model/model_powerpack_relationships.rs | 3 +- .../model/model_powerpack_response.rs | 5 +- .../model/model_powerpack_response_links.rs | 11 +- .../model_powerpack_template_variable.rs | 2 +- .../model/model_powerpacks_response_meta.rs | 3 +- ...del_powerpacks_response_meta_pagination.rs | 17 +- .../model/model_process_summaries_meta.rs | 6 +- .../model_process_summaries_meta_page.rs | 5 +- .../model/model_process_summaries_response.rs | 5 +- src/datadogV2/model/model_process_summary.rs | 7 +- .../model/model_process_summary_attributes.rs | 17 +- src/datadogV2/model/model_projected_cost.rs | 7 +- .../model/model_projected_cost_attributes.rs | 13 +- .../model/model_projected_cost_response.rs | 3 +- src/datadogV2/model/model_query_formula.rs | 2 +- .../model/model_relationship_to_outcome.rs | 6 +- .../model_relationship_to_outcome_data.rs | 5 +- .../model/model_relationship_to_permission.rs | 3 +- .../model_relationship_to_permission_data.rs | 5 +- .../model_relationship_to_permissions.rs | 3 +- .../model/model_relationship_to_role.rs | 6 +- .../model/model_relationship_to_role_data.rs | 5 +- .../model/model_relationship_to_roles.rs | 3 +- .../model/model_relationship_to_rule.rs | 3 +- .../model/model_relationship_to_rule_data.rs | 3 +- .../model_relationship_to_rule_data_object.rs | 5 +- .../model/model_relationship_to_team_links.rs | 8 +- ...el_relationship_to_user_team_permission.rs | 8 +- .../model/model_response_meta_attributes.rs | 3 +- .../model_retention_filter_all_attributes.rs | 23 +- .../model_retention_filter_attributes.rs | 23 +- .../model/model_retention_filter_response.rs | 3 +- src/datadogV2/model/model_role.rs | 6 +- src/datadogV2/model/model_role_attributes.rs | 9 +- .../model/model_role_create_attributes.rs | 4 +- src/datadogV2/model/model_role_create_data.rs | 4 +- .../model/model_role_create_response.rs | 6 +- .../model/model_role_create_response_data.rs | 6 +- .../model/model_role_relationships.rs | 5 +- src/datadogV2/model/model_role_response.rs | 3 +- .../model_role_response_relationships.rs | 3 +- .../model/model_role_update_attributes.rs | 7 +- src/datadogV2/model/model_role_update_data.rs | 2 +- .../model/model_role_update_response.rs | 6 +- .../model/model_role_update_response_data.rs | 6 +- src/datadogV2/model/model_roles_response.rs | 8 +- src/datadogV2/model/model_rule_attributes.rs | 19 +- .../model/model_rule_outcome_relationships.rs | 6 +- ...l_rum_aggregate_bucket_value_timeseries.rs | 1 + ...aggregate_bucket_value_timeseries_point.rs | 5 +- .../model/model_rum_aggregate_request.rs | 11 +- .../model/model_rum_aggregate_sort.rs | 12 +- .../model_rum_aggregation_buckets_response.rs | 6 +- .../model_rum_analytics_aggregate_response.rs | 7 +- .../model/model_rum_application_attributes.rs | 4 +- ...model_rum_application_create_attributes.rs | 2 +- .../model/model_rum_application_list.rs | 2 +- .../model_rum_application_list_attributes.rs | 4 +- .../model/model_rum_application_response.rs | 3 +- .../model/model_rum_application_update.rs | 2 +- ...model_rum_application_update_attributes.rs | 5 +- .../model/model_rum_applications_response.rs | 6 +- .../model/model_rum_bucket_response.rs | 5 +- src/datadogV2/model/model_rum_compute.rs | 6 +- src/datadogV2/model/model_rum_event.rs | 10 +- .../model/model_rum_event_attributes.rs | 9 +- .../model/model_rum_events_response.rs | 7 +- src/datadogV2/model/model_rum_group_by.rs | 13 +- src/datadogV2/model/model_rum_query_filter.rs | 7 +- .../model/model_rum_query_options.rs | 5 +- .../model/model_rum_query_page_options.rs | 5 +- .../model/model_rum_response_links.rs | 3 +- .../model/model_rum_response_metadata.rs | 11 +- .../model/model_rum_response_page.rs | 3 +- .../model/model_rum_search_events_request.rs | 9 +- src/datadogV2/model/model_rum_warning.rs | 7 +- .../model/model_saml_assertion_attribute.rs | 2 +- ...del_saml_assertion_attribute_attributes.rs | 5 +- src/datadogV2/model/model_scalar_column.rs | 4 +- .../model_scalar_formula_query_response.rs | 5 +- ...model_scalar_formula_request_attributes.rs | 5 +- ...odel_scalar_formula_response_atrributes.rs | 3 +- src/datadogV2/model/model_scalar_meta.rs | 6 +- src/datadogV2/model/model_scalar_query.rs | 4 +- src/datadogV2/model/model_scalar_response.rs | 5 +- src/datadogV2/model/model_security_filter.rs | 7 +- .../model/model_security_filter_attributes.rs | 15 +- ...curity_filter_exclusion_filter_response.rs | 5 +- .../model/model_security_filter_meta.rs | 3 +- .../model/model_security_filter_response.rs | 5 +- ...model_security_filter_update_attributes.rs | 13 +- .../model/model_security_filters_response.rs | 5 +- .../model/model_security_monitoring_filter.rs | 5 +- ...security_monitoring_list_rules_response.rs | 8 +- .../model_security_monitoring_rule_case.rs | 9 +- ...el_security_monitoring_rule_case_create.rs | 6 +- ...security_monitoring_rule_create_payload.rs | 6 +- ...nitoring_rule_impossible_travel_options.rs | 3 +- ...urity_monitoring_rule_new_value_options.rs | 9 +- .../model_security_monitoring_rule_options.rs | 21 +- .../model_security_monitoring_rule_query.rs | 6 +- ...model_security_monitoring_rule_response.rs | 4 +- ...ity_monitoring_rule_third_party_options.rs | 9 +- ...security_monitoring_rule_update_payload.rs | 25 +- .../model/model_security_monitoring_signal.rs | 7 +- ...oring_signal_assignee_update_attributes.rs | 2 +- ...l_security_monitoring_signal_attributes.rs | 9 +- ...ring_signal_incidents_update_attributes.rs | 2 +- ...security_monitoring_signal_list_request.rs | 7 +- ...y_monitoring_signal_list_request_filter.rs | 7 +- ...ity_monitoring_signal_list_request_page.rs | 5 +- ...del_security_monitoring_signal_response.rs | 6 +- ...y_monitoring_signal_rule_create_payload.rs | 8 +- ...l_security_monitoring_signal_rule_query.rs | 10 +- ...ecurity_monitoring_signal_rule_response.rs | 37 +- ...y_monitoring_signal_rule_response_query.rs | 19 +- ...nitoring_signal_state_update_attributes.rs | 6 +- ...ity_monitoring_signal_state_update_data.rs | 4 +- ...ity_monitoring_signal_triage_attributes.rs | 12 +- ...ty_monitoring_signal_triage_update_data.rs | 7 +- ...curity_monitoring_signals_list_response.rs | 7 +- ..._monitoring_signals_list_response_links.rs | 3 +- ...y_monitoring_signals_list_response_meta.rs | 3 +- ...itoring_signals_list_response_meta_page.rs | 3 +- ...monitoring_standard_rule_create_payload.rs | 10 +- ...security_monitoring_standard_rule_query.rs | 17 +- ...urity_monitoring_standard_rule_response.rs | 41 +- ...urity_monitoring_third_party_root_query.rs | 5 +- ...curity_monitoring_third_party_rule_case.rs | 9 +- ...monitoring_third_party_rule_case_create.rs | 6 +- .../model_security_monitoring_triage_user.rs | 8 +- ...el_sensitive_data_scanner_configuration.rs | 5 +- ...nsitive_data_scanner_configuration_data.rs | 3 +- ...ata_scanner_configuration_relationships.rs | 3 +- ...tive_data_scanner_create_group_response.rs | 5 +- ...itive_data_scanner_create_rule_response.rs | 5 +- .../model_sensitive_data_scanner_filter.rs | 3 +- ...e_data_scanner_get_config_included_item.rs | 4 +- ...sitive_data_scanner_get_config_response.rs | 10 +- ...e_data_scanner_get_config_response_data.rs | 9 +- .../model_sensitive_data_scanner_group.rs | 5 +- ...sensitive_data_scanner_group_attributes.rs | 11 +- ...del_sensitive_data_scanner_group_create.rs | 2 +- ...itive_data_scanner_group_create_request.rs | 5 +- ...model_sensitive_data_scanner_group_data.rs | 6 +- ...tive_data_scanner_group_delete_response.rs | 3 +- ...sitive_data_scanner_group_included_item.rs | 9 +- ...model_sensitive_data_scanner_group_item.rs | 5 +- ...model_sensitive_data_scanner_group_list.rs | 3 +- ...sitive_data_scanner_group_relationships.rs | 5 +- ...l_sensitive_data_scanner_group_response.rs | 9 +- ...del_sensitive_data_scanner_group_update.rs | 9 +- ...tive_data_scanner_group_update_response.rs | 3 +- .../model_sensitive_data_scanner_meta.rs | 13 +- ...ensitive_data_scanner_meta_version_only.rs | 3 +- ...l_sensitive_data_scanner_reorder_config.rs | 7 +- ...ve_data_scanner_reorder_groups_response.rs | 6 +- .../model_sensitive_data_scanner_rule.rs | 5 +- ..._sensitive_data_scanner_rule_attributes.rs | 19 +- .../model_sensitive_data_scanner_rule_data.rs | 3 +- ...itive_data_scanner_rule_delete_response.rs | 3 +- ...nsitive_data_scanner_rule_included_item.rs | 9 +- ...nsitive_data_scanner_rule_relationships.rs | 5 +- ...el_sensitive_data_scanner_rule_response.rs | 9 +- ...odel_sensitive_data_scanner_rule_update.rs | 9 +- ...itive_data_scanner_rule_update_response.rs | 3 +- ...sensitive_data_scanner_standard_pattern.rs | 5 +- ...ata_scanner_standard_pattern_attributes.rs | 13 +- ...tive_data_scanner_standard_pattern_data.rs | 3 +- ...scanner_standard_patterns_response_data.rs | 3 +- ...scanner_standard_patterns_response_item.rs | 7 +- ...sensitive_data_scanner_text_replacement.rs | 7 +- ...model_service_account_create_attributes.rs | 4 +- .../model_service_account_create_data.rs | 2 +- ...odel_service_definition_create_response.rs | 3 +- .../model/model_service_definition_data.rs | 7 +- ...odel_service_definition_data_attributes.rs | 11 +- .../model_service_definition_get_response.rs | 6 +- .../model/model_service_definition_meta.rs | 15 +- .../model_service_definition_meta_warnings.rs | 7 +- .../model/model_service_definition_schema.rs | 8 +- .../model/model_service_definition_v1.rs | 15 +- .../model_service_definition_v1_contact.rs | 5 +- .../model/model_service_definition_v1_info.rs | 6 +- ...odel_service_definition_v1_integrations.rs | 3 +- .../model/model_service_definition_v1_org.rs | 5 +- .../model/model_service_definition_v2.rs | 18 +- .../model_service_definition_v2_contact.rs | 6 +- .../model/model_service_definition_v2_doc.rs | 2 +- .../model/model_service_definition_v2_dot1.rs | 20 +- ...odel_service_definition_v2_dot1_contact.rs | 6 +- .../model_service_definition_v2_dot1_email.rs | 2 +- ...service_definition_v2_dot1_integrations.rs | 5 +- .../model_service_definition_v2_dot1_link.rs | 2 +- ...del_service_definition_v2_dot1_ms_teams.rs | 2 +- ...del_service_definition_v2_dot1_opsgenie.rs | 2 +- ...el_service_definition_v2_dot1_pagerduty.rs | 3 +- .../model_service_definition_v2_dot1_slack.rs | 2 +- .../model/model_service_definition_v2_dot2.rs | 24 +- ...odel_service_definition_v2_dot2_contact.rs | 2 +- ...service_definition_v2_dot2_integrations.rs | 5 +- .../model_service_definition_v2_dot2_link.rs | 2 +- ...del_service_definition_v2_dot2_opsgenie.rs | 2 +- ...el_service_definition_v2_dot2_pagerduty.rs | 3 +- .../model_service_definition_v2_email.rs | 2 +- ...odel_service_definition_v2_integrations.rs | 5 +- .../model_service_definition_v2_ms_teams.rs | 2 +- .../model_service_definition_v2_opsgenie.rs | 2 +- .../model/model_service_definition_v2_repo.rs | 2 +- .../model_service_definition_v2_slack.rs | 2 +- ...odel_service_definitions_create_request.rs | 6 +- ...model_service_definitions_list_response.rs | 3 +- ...slack_integration_metadata_channel_item.rs | 2 +- src/datadogV2/model/model_span.rs | 10 +- .../model/model_spans_aggregate_bucket.rs | 10 +- ...model_spans_aggregate_bucket_attributes.rs | 7 +- ...spans_aggregate_bucket_value_timeseries.rs | 1 + ...aggregate_bucket_value_timeseries_point.rs | 5 +- .../model/model_spans_aggregate_data.rs | 5 +- .../model/model_spans_aggregate_request.rs | 3 +- ...odel_spans_aggregate_request_attributes.rs | 12 +- .../model/model_spans_aggregate_response.rs | 8 +- ...model_spans_aggregate_response_metadata.rs | 12 +- .../model/model_spans_aggregate_sort.rs | 12 +- src/datadogV2/model/model_spans_attributes.rs | 35 +- src/datadogV2/model/model_spans_compute.rs | 6 +- src/datadogV2/model/model_spans_filter.rs | 3 +- src/datadogV2/model/model_spans_group_by.rs | 13 +- .../model/model_spans_list_request.rs | 3 +- .../model_spans_list_request_attributes.rs | 9 +- .../model/model_spans_list_request_data.rs | 8 +- .../model/model_spans_list_request_page.rs | 5 +- .../model/model_spans_list_response.rs | 13 +- .../model/model_spans_list_response_links.rs | 3 +- .../model_spans_list_response_metadata.rs | 17 +- .../model/model_spans_metric_compute.rs | 4 +- .../model_spans_metric_create_attributes.rs | 4 +- .../model/model_spans_metric_filter.rs | 3 +- .../model/model_spans_metric_group_by.rs | 2 +- .../model/model_spans_metric_response.rs | 6 +- .../model_spans_metric_response_attributes.rs | 7 +- .../model_spans_metric_response_compute.rs | 7 +- .../model/model_spans_metric_response_data.rs | 7 +- .../model_spans_metric_response_filter.rs | 3 +- .../model_spans_metric_response_group_by.rs | 5 +- .../model_spans_metric_update_attributes.rs | 7 +- .../model_spans_metric_update_compute.rs | 3 +- .../model/model_spans_metrics_response.rs | 3 +- .../model/model_spans_query_filter.rs | 7 +- .../model/model_spans_query_options.rs | 5 +- .../model_spans_response_metadata_page.rs | 3 +- src/datadogV2/model/model_spans_warning.rs | 7 +- src/datadogV2/model/model_team.rs | 2 +- src/datadogV2/model/model_team_attributes.rs | 20 +- src/datadogV2/model/model_team_create.rs | 2 +- .../model/model_team_create_attributes.rs | 10 +- .../model/model_team_create_relationships.rs | 3 +- src/datadogV2/model/model_team_included.rs | 6 +- .../model/model_team_link_attributes.rs | 4 +- .../model/model_team_link_response.rs | 3 +- .../model/model_team_links_response.rs | 3 +- .../model/model_team_permission_setting.rs | 2 +- ...odel_team_permission_setting_attributes.rs | 11 +- .../model_team_permission_setting_response.rs | 6 +- .../model_team_permission_setting_update.rs | 2 +- ...am_permission_setting_update_attributes.rs | 3 +- ...model_team_permission_settings_response.rs | 3 +- .../model/model_team_relationships.rs | 5 +- .../model/model_team_relationships_links.rs | 3 +- src/datadogV2/model/model_team_response.rs | 3 +- src/datadogV2/model/model_team_update.rs | 2 +- .../model/model_team_update_attributes.rs | 12 +- .../model/model_team_update_relationships.rs | 3 +- src/datadogV2/model/model_teams_response.rs | 12 +- .../model/model_teams_response_links.rs | 11 +- .../model/model_teams_response_meta.rs | 3 +- .../model_teams_response_meta_pagination.rs | 17 +- ...model_timeseries_formula_query_response.rs | 5 +- ...l_timeseries_formula_request_attributes.rs | 7 +- src/datadogV2/model/model_timeseries_query.rs | 4 +- .../model/model_timeseries_response.rs | 5 +- .../model_timeseries_response_attributes.rs | 7 +- .../model/model_timeseries_response_series.rs | 7 +- src/datadogV2/model/model_unit.rs | 11 +- ...pplication_security_monitoring_response.rs | 3 +- .../model/model_usage_attributes_object.rs | 16 +- .../model/model_usage_data_object.rs | 7 +- ...sage_lambda_traced_invocations_response.rs | 3 +- ..._usage_observability_pipelines_response.rs | 3 +- .../model/model_usage_time_series_object.rs | 5 +- src/datadogV2/model/model_user.rs | 9 +- src/datadogV2/model/model_user_attributes.rs | 23 +- .../model/model_user_create_attributes.rs | 4 +- src/datadogV2/model/model_user_create_data.rs | 2 +- .../model_user_invitation_data_attributes.rs | 9 +- .../model/model_user_invitation_response.rs | 3 +- .../model_user_invitation_response_data.rs | 9 +- .../model/model_user_invitations_response.rs | 3 +- .../model/model_user_relationships.rs | 3 +- src/datadogV2/model/model_user_response.rs | 5 +- .../model_user_response_included_item.rs | 6 +- .../model_user_response_relationships.rs | 12 +- src/datadogV2/model/model_user_team.rs | 7 +- .../model/model_user_team_attributes.rs | 7 +- src/datadogV2/model/model_user_team_create.rs | 7 +- .../model/model_user_team_permission.rs | 2 +- .../model_user_team_permission_attributes.rs | 3 +- .../model/model_user_team_relationships.rs | 5 +- .../model/model_user_team_response.rs | 3 +- src/datadogV2/model/model_user_team_update.rs | 5 +- .../model/model_user_teams_response.rs | 7 +- .../model/model_user_update_attributes.rs | 7 +- src/datadogV2/model/model_users_response.rs | 10 +- 1410 files changed, 8791 insertions(+), 6189 deletions(-) diff --git a/.generator/src/generator/openapi.py b/.generator/src/generator/openapi.py index ef485493c..18aa4fe26 100644 --- a/.generator/src/generator/openapi.py +++ b/.generator/src/generator/openapi.py @@ -90,11 +90,13 @@ def get_type_for_attribute(schema, attribute, current_name=None): return type_to_rust(child_schema, alternative_name=alternative_name) -def get_type_for_parameter(parameter, version=None): +def get_type_for_parameter(parameter, version=None, render_option=None): """Return Rust type name for the parameter.""" - render_option = True - if "required" in parameter: - render_option = not parameter["required"] + if render_option is None: + if "required" in parameter: + render_option = not parameter["required"] + else: + render_option = True if "content" in parameter: assert "in" not in parameter for content in parameter["content"].values(): diff --git a/.generator/src/generator/templates/api.j2 b/.generator/src/generator/templates/api.j2 index 4faca48ed..aebad1036 100644 --- a/.generator/src/generator/templates/api.j2 +++ b/.generator/src/generator/templates/api.j2 @@ -4,16 +4,16 @@ use serde::{Serialize, Deserialize}; use crate::datadog::*; {%- set structName = name.replace(" ", "")+"API" %} -{% for path, method, operation in operations|sort(attribute="2.operationId", case_sensitive=True) %} +{% for path, method, operation in operations|sort(attribute="2.operationId", case_sensitive=true) %} {%- set httpMethod = method.upper() %} {%- set returnType = operation|return_type(version) %} {%- set formParameter = operation|form_parameter %} -{%- set optionalBody = False if "required" in operation.requestBody and operation.requestBody.required else True %} +{%- set optionalBody = false if "required" in operation.requestBody and operation.requestBody.required else true %} {%- for name, parameter in operation|parameters if parameter.required != true %} {%- if loop.first %} /// {{operation.operationId}}OptionalParams is a struct for passing parameters to the method [`{{ structName }}::{{operation.operationId | snake_case}}`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct {{operation.operationId}}OptionalParams { {%- endif %} {%- if parameter.description is defined %} @@ -24,9 +24,27 @@ pub struct {{operation.operationId}}OptionalParams { } {% endif %} {%- endfor %} +{%- for name, parameter in operation|parameters if parameter.required != true %} +{%- if loop.first %} +impl {{operation.operationId}}OptionalParams { +{%- endif %} + {%- if parameter.description is defined %} + {{parameter.description | block_comment}} + {%- endif %} + {%- if get_deprecated(model) %} + #[allow(deprecated)] + {%- endif %} + pub fn {{name|variable_name}}(&mut self, value: {{get_type_for_parameter(parameter, version, render_option=false)}}) -> &mut Self { + self.{{name|variable_name}} = Some(value); + self + } +{%- if loop.last %} +} +{% endif %} +{%- endfor %} {%- endfor %} -{% for path, method, operation in operations|sort(attribute="2.operationId", case_sensitive=True) %} +{% for path, method, operation in operations|sort(attribute="2.operationId", case_sensitive=true) %} {%- set httpMethod = method.upper() %} {%- set returnType = operation|return_type(version) %} {%- set formParameter = operation|form_parameter %} @@ -65,7 +83,7 @@ impl {{ structName }} { Self { config } } - {% for path, method, operation in operations|sort(attribute="2.operationId", case_sensitive=True) %} + {% for path, method, operation in operations|sort(attribute="2.operationId", case_sensitive=true) %} {%- set httpMethod = method.upper() %} {%- set returnType = operation|return_type(version) %} {%- set formParameter = operation|form_parameter %} diff --git a/.generator/src/generator/templates/model_oneof.j2 b/.generator/src/generator/templates/model_oneof.j2 index 15be938fa..d297426a7 100644 --- a/.generator/src/generator/templates/model_oneof.j2 +++ b/.generator/src/generator/templates/model_oneof.j2 @@ -5,8 +5,12 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum {{name}} { {%- for oneOf in model.oneOf %} - {%- set dataType = get_type(oneOf, render_nullable=False, render_option=False, render_box=oneOf|is_primitive or oneOf.type == "array", version=version) %} + {%- set dataType = get_type(oneOf, render_nullable=false, render_option=false, render_box=false, version=version) %} {%- set attributeName = (get_name(oneOf) or dataType)|upperfirst %} + {%- if oneOf | is_primitive or oneOf.type == "array" %} {{attributeName}}({{dataType}}), + {%- else %} + {{attributeName}}(Box<{{dataType}}>), + {%- endif %} {%- endfor%} } diff --git a/.generator/src/generator/templates/model_simple.j2 b/.generator/src/generator/templates/model_simple.j2 index 9f6510011..1b5f3a7d5 100644 --- a/.generator/src/generator/templates/model_simple.j2 +++ b/.generator/src/generator/templates/model_simple.j2 @@ -9,7 +9,7 @@ pub struct {{ name }} { {%- set propertyName = attr|variable_name %} {%- set required = attr in model.required %} {%- set nullable = schema.get("nullable", False)%} -{%- set dataType = get_type(schema, alternative_name=name + propertyName, render_nullable=nullable, render_option=not required, render_box=True, version=version) %} +{%- set dataType = get_type(schema, alternative_name=name + propertyName, render_nullable=nullable, render_option=not required, render_box=false, version=version) %} {%- if schema.description is defined %} {{ schema.description | block_comment }} {%- endif %} @@ -20,14 +20,14 @@ pub struct {{ name }} { pub {{propertyName}}: {{dataType}}, {%- endfor %} {%- if model.additionalProperties is defined and model.additionalProperties != False %} -{%- set dataType = get_type(model.additionalProperties, alternative_name=None, render_nullable=False, render_option=False, render_box=True, version=version) %} +{%- set dataType = get_type(model.additionalProperties, alternative_name=None, render_nullable=False, render_option=False, render_box=false, version=version) %} #[serde(flatten)] pub additional_properties: std::collections::BTreeMap, {%- endif %} } impl {{ name }} { - pub fn new({% for attr, schema in model.get("properties", {}).items() if attr in model.required %}{%- set nullable = schema.get("nullable", False)%}{%- set dataType = get_type(schema, alternative_name=name + attr|variable_name, render_nullable=nullable, render_option=False, render_box=True, version=version) %}{{attr|variable_name}}: {{ dataType }}{%- if not loop.last %}, {% endif %}{% endfor %}) -> {{ name }} { + pub fn new({% for attr, schema in model.get("properties", {}).items() if attr in model.required %}{%- set nullable = schema.get("nullable", False)%}{%- set dataType = get_type(schema, alternative_name=name + attr|variable_name, render_nullable=nullable, render_option=False, render_box=false, version=version) %}{{attr|variable_name}}: {{ dataType }}{%- if not loop.last %}, {% endif %}{% endfor %}) -> {{ name }} { {%- if get_deprecated(model) %} #[allow(deprecated)] {%- endif %} @@ -35,7 +35,7 @@ impl {{ name }} { {%- for attr, schema in model.get("properties", {}).items() %} {%- set required = attr in model.required %} {%- set nullable = schema.get("nullable", False)%} - {%- set dataType = get_type(schema, alternative_name=name + attr|variable_name, render_nullable=nullable, render_option=not required, render_box=True, version=version) %} + {%- set dataType = get_type(schema, alternative_name=name + attr|variable_name, render_nullable=nullable, render_option=not required, render_box=false, version=version) %} {%- if attr in model.get("required", []) %} {{ attr|variable_name }}, {%- else %} @@ -49,18 +49,18 @@ impl {{ name }} { } {% for attr, schema in model.get("properties", {}).items() if attr not in model.required %} {%- set nullable = schema.get("nullable", False)%} - {%- set dataType = get_type(schema, alternative_name=name + attr|variable_name, render_nullable=nullable, render_option=False, render_box=True, version=version) %} + {%- set dataType = get_type(schema, alternative_name=name + attr|variable_name, render_nullable=nullable, render_option=False, render_box=false, version=version) %} {%- if get_deprecated(model) %} #[allow(deprecated)] {%- endif %} - pub fn with_{{attr|variable_name}}(&mut self, value: {{dataType}}) -> &mut Self { + pub fn {{attr|variable_name}}(&mut self, value: {{dataType}}) -> &mut Self { self.{{attr|variable_name}} = Some(value); self } {% endfor %} } -{%- if not model.required %} +{% if not model.required %} impl Default for {{ name }} { fn default() -> Self { Self::new() diff --git a/src/datadogV1/api/api_aws_integration.rs b/src/datadogV1/api/api_aws_integration.rs index 3748a0391..b2b5b33a0 100644 --- a/src/datadogV1/api/api_aws_integration.rs +++ b/src/datadogV1/api/api_aws_integration.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListAWSAccountsOptionalParams is a struct for passing parameters to the method [`AWSIntegrationAPI::list_aws_accounts`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListAWSAccountsOptionalParams { /// Only return AWS accounts that matches this `account_id`. pub account_id: Option, @@ -16,8 +16,26 @@ pub struct ListAWSAccountsOptionalParams { pub access_key_id: Option, } +impl ListAWSAccountsOptionalParams { + /// Only return AWS accounts that matches this `account_id`. + pub fn account_id(&mut self, value: String) -> &mut Self { + self.account_id = Some(value); + self + } + /// Only return AWS accounts that matches this role_name. + pub fn role_name(&mut self, value: String) -> &mut Self { + self.role_name = Some(value); + self + } + /// Only return AWS accounts that matches this `access_key_id`. + pub fn access_key_id(&mut self, value: String) -> &mut Self { + self.access_key_id = Some(value); + self + } +} + /// UpdateAWSAccountOptionalParams is a struct for passing parameters to the method [`AWSIntegrationAPI::update_aws_account`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct UpdateAWSAccountOptionalParams { /// Only return AWS accounts that matches this `account_id`. pub account_id: Option, @@ -29,6 +47,26 @@ pub struct UpdateAWSAccountOptionalParams { pub access_key_id: Option, } +impl UpdateAWSAccountOptionalParams { + /// Only return AWS accounts that matches this `account_id`. + pub fn account_id(&mut self, value: String) -> &mut Self { + self.account_id = Some(value); + self + } + /// Only return AWS accounts that match this `role_name`. + /// Required if `account_id` is specified. + pub fn role_name(&mut self, value: String) -> &mut Self { + self.role_name = Some(value); + self + } + /// Only return AWS accounts that matches this `access_key_id`. + /// Required if none of the other two options are specified. + pub fn access_key_id(&mut self, value: String) -> &mut Self { + self.access_key_id = Some(value); + self + } +} + /// CreateAWSAccountError is a struct for typed errors of method [`AWSIntegrationAPI::create_aws_account`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV1/api/api_dashboards.rs b/src/datadogV1/api/api_dashboards.rs index d595c9971..a513d60e0 100644 --- a/src/datadogV1/api/api_dashboards.rs +++ b/src/datadogV1/api/api_dashboards.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// GetPublicDashboardInvitationsOptionalParams is a struct for passing parameters to the method [`DashboardsAPI::get_public_dashboard_invitations`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetPublicDashboardInvitationsOptionalParams { /// The number of records to return in a single request. pub page_size: Option, @@ -14,8 +14,21 @@ pub struct GetPublicDashboardInvitationsOptionalParams { pub page_number: Option, } +impl GetPublicDashboardInvitationsOptionalParams { + /// The number of records to return in a single request. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// The page to access (base 0). + pub fn page_number(&mut self, value: i64) -> &mut Self { + self.page_number = Some(value); + self + } +} + /// ListDashboardsOptionalParams is a struct for passing parameters to the method [`DashboardsAPI::list_dashboards`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListDashboardsOptionalParams { /// When `true`, this query only returns shared custom created /// or cloned dashboards. @@ -29,6 +42,31 @@ pub struct ListDashboardsOptionalParams { pub start: Option, } +impl ListDashboardsOptionalParams { + /// When `true`, this query only returns shared custom created + /// or cloned dashboards. + pub fn filter_shared(&mut self, value: bool) -> &mut Self { + self.filter_shared = Some(value); + self + } + /// When `true`, this query returns only deleted custom-created + /// or cloned dashboards. This parameter is incompatible with `filter[shared]`. + pub fn filter_deleted(&mut self, value: bool) -> &mut Self { + self.filter_deleted = Some(value); + self + } + /// The maximum number of dashboards returned in the list. + pub fn count(&mut self, value: i64) -> &mut Self { + self.count = Some(value); + self + } + /// The specific offset to use as the beginning of the returned response. + pub fn start(&mut self, value: i64) -> &mut Self { + self.start = Some(value); + self + } +} + /// CreateDashboardError is a struct for typed errors of method [`DashboardsAPI::create_dashboard`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV1/api/api_downtimes.rs b/src/datadogV1/api/api_downtimes.rs index ff1fe24e1..297aa37d3 100644 --- a/src/datadogV1/api/api_downtimes.rs +++ b/src/datadogV1/api/api_downtimes.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListDowntimesOptionalParams is a struct for passing parameters to the method [`DowntimesAPI::list_downtimes`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListDowntimesOptionalParams { /// Only return downtimes that are active when the request is made. pub current_only: Option, @@ -14,6 +14,19 @@ pub struct ListDowntimesOptionalParams { pub with_creator: Option, } +impl ListDowntimesOptionalParams { + /// Only return downtimes that are active when the request is made. + pub fn current_only(&mut self, value: bool) -> &mut Self { + self.current_only = Some(value); + self + } + /// Return creator information. + pub fn with_creator(&mut self, value: bool) -> &mut Self { + self.with_creator = Some(value); + self + } +} + /// CancelDowntimeError is a struct for typed errors of method [`DowntimesAPI::cancel_downtime`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV1/api/api_events.rs b/src/datadogV1/api/api_events.rs index ed47a8c88..3ca9d5466 100644 --- a/src/datadogV1/api/api_events.rs +++ b/src/datadogV1/api/api_events.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListEventsOptionalParams is a struct for passing parameters to the method [`EventsAPI::list_events`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListEventsOptionalParams { /// Priority of your events, either `low` or `normal`. pub priority: Option, @@ -26,6 +26,43 @@ pub struct ListEventsOptionalParams { pub page: Option, } +impl ListEventsOptionalParams { + /// Priority of your events, either `low` or `normal`. + pub fn priority(&mut self, value: crate::datadogV1::model::EventPriority) -> &mut Self { + self.priority = Some(value); + self + } + /// A comma separated string of sources. + pub fn sources(&mut self, value: String) -> &mut Self { + self.sources = Some(value); + self + } + /// A comma separated list indicating what tags, if any, should be used to filter the list of events. + pub fn tags(&mut self, value: String) -> &mut Self { + self.tags = Some(value); + self + } + /// Set unaggregated to `true` to return all events within the specified [`start`,`end`] timeframe. + /// Otherwise if an event is aggregated to a parent event with a timestamp outside of the timeframe, + /// it won't be available in the output. Aggregated events with `is_aggregate=true` in the response will still be returned unless exclude_aggregate is set to `true.` + pub fn unaggregated(&mut self, value: bool) -> &mut Self { + self.unaggregated = Some(value); + self + } + /// Set `exclude_aggregate` to `true` to only return unaggregated events where `is_aggregate=false` in the response. If the `exclude_aggregate` parameter is set to `true`, + /// then the unaggregated parameter is ignored and will be `true` by default. + pub fn exclude_aggregate(&mut self, value: bool) -> &mut Self { + self.exclude_aggregate = Some(value); + self + } + /// By default 1000 results are returned per request. Set page to the number of the page to return with `0` being the first page. The page parameter can only be used + /// when either unaggregated or exclude_aggregate is set to `true.` + pub fn page(&mut self, value: i32) -> &mut Self { + self.page = Some(value); + self + } +} + /// CreateEventError is a struct for typed errors of method [`EventsAPI::create_event`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV1/api/api_hosts.rs b/src/datadogV1/api/api_hosts.rs index cd5e4c84e..812369958 100644 --- a/src/datadogV1/api/api_hosts.rs +++ b/src/datadogV1/api/api_hosts.rs @@ -6,14 +6,22 @@ use reqwest; use serde::{Deserialize, Serialize}; /// GetHostTotalsOptionalParams is a struct for passing parameters to the method [`HostsAPI::get_host_totals`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetHostTotalsOptionalParams { /// Number of seconds from which you want to get total number of active hosts. pub from: Option, } +impl GetHostTotalsOptionalParams { + /// Number of seconds from which you want to get total number of active hosts. + pub fn from(&mut self, value: i64) -> &mut Self { + self.from = Some(value); + self + } +} + /// ListHostsOptionalParams is a struct for passing parameters to the method [`HostsAPI::list_hosts`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListHostsOptionalParams { /// String to filter search results. pub filter: Option, @@ -33,6 +41,49 @@ pub struct ListHostsOptionalParams { pub include_hosts_metadata: Option, } +impl ListHostsOptionalParams { + /// String to filter search results. + pub fn filter(&mut self, value: String) -> &mut Self { + self.filter = Some(value); + self + } + /// Sort hosts by this field. + pub fn sort_field(&mut self, value: String) -> &mut Self { + self.sort_field = Some(value); + self + } + /// Direction of sort. Options include `asc` and `desc`. + pub fn sort_dir(&mut self, value: String) -> &mut Self { + self.sort_dir = Some(value); + self + } + /// Host result to start search from. + pub fn start(&mut self, value: i64) -> &mut Self { + self.start = Some(value); + self + } + /// Number of hosts to return. Max 1000. + pub fn count(&mut self, value: i64) -> &mut Self { + self.count = Some(value); + self + } + /// Number of seconds since UNIX epoch from which you want to search your hosts. + pub fn from(&mut self, value: i64) -> &mut Self { + self.from = Some(value); + self + } + /// Include information on the muted status of hosts and when the mute expires. + pub fn include_muted_hosts_data(&mut self, value: bool) -> &mut Self { + self.include_muted_hosts_data = Some(value); + self + } + /// Include additional metadata about the hosts (agent_version, machine, platform, processor, etc.). + pub fn include_hosts_metadata(&mut self, value: bool) -> &mut Self { + self.include_hosts_metadata = Some(value); + self + } +} + /// GetHostTotalsError is a struct for typed errors of method [`HostsAPI::get_host_totals`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV1/api/api_logs.rs b/src/datadogV1/api/api_logs.rs index 7b721d503..cc85bf80b 100644 --- a/src/datadogV1/api/api_logs.rs +++ b/src/datadogV1/api/api_logs.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// SubmitLogOptionalParams is a struct for passing parameters to the method [`LogsAPI::submit_log`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct SubmitLogOptionalParams { /// HTTP header used to compress the media-type. pub content_encoding: Option, @@ -14,6 +14,22 @@ pub struct SubmitLogOptionalParams { pub ddtags: Option, } +impl SubmitLogOptionalParams { + /// HTTP header used to compress the media-type. + pub fn content_encoding( + &mut self, + value: crate::datadogV1::model::ContentEncoding, + ) -> &mut Self { + self.content_encoding = Some(value); + self + } + /// Log tags can be passed as query parameters with `text/plain` content type. + pub fn ddtags(&mut self, value: String) -> &mut Self { + self.ddtags = Some(value); + self + } +} + /// ListLogsError is a struct for typed errors of method [`LogsAPI::list_logs`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV1/api/api_metrics.rs b/src/datadogV1/api/api_metrics.rs index 052ea8488..c6021fe73 100644 --- a/src/datadogV1/api/api_metrics.rs +++ b/src/datadogV1/api/api_metrics.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListActiveMetricsOptionalParams is a struct for passing parameters to the method [`MetricsAPI::list_active_metrics`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListActiveMetricsOptionalParams { /// Hostname for filtering the list of metrics returned. /// If set, metrics retrieved are those with the corresponding hostname tag. @@ -16,20 +16,57 @@ pub struct ListActiveMetricsOptionalParams { pub tag_filter: Option, } +impl ListActiveMetricsOptionalParams { + /// Hostname for filtering the list of metrics returned. + /// If set, metrics retrieved are those with the corresponding hostname tag. + pub fn host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + /// Filter metrics that have been submitted with the given tags. Supports boolean and wildcard expressions. + /// Cannot be combined with other filters. + pub fn tag_filter(&mut self, value: String) -> &mut Self { + self.tag_filter = Some(value); + self + } +} + /// SubmitDistributionPointsOptionalParams is a struct for passing parameters to the method [`MetricsAPI::submit_distribution_points`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct SubmitDistributionPointsOptionalParams { /// HTTP header used to compress the media-type. pub content_encoding: Option, } +impl SubmitDistributionPointsOptionalParams { + /// HTTP header used to compress the media-type. + pub fn content_encoding( + &mut self, + value: crate::datadogV1::model::DistributionPointsContentEncoding, + ) -> &mut Self { + self.content_encoding = Some(value); + self + } +} + /// SubmitMetricsOptionalParams is a struct for passing parameters to the method [`MetricsAPI::submit_metrics`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct SubmitMetricsOptionalParams { /// HTTP header used to compress the media-type. pub content_encoding: Option, } +impl SubmitMetricsOptionalParams { + /// HTTP header used to compress the media-type. + pub fn content_encoding( + &mut self, + value: crate::datadogV1::model::MetricContentEncoding, + ) -> &mut Self { + self.content_encoding = Some(value); + self + } +} + /// GetMetricMetadataError is a struct for typed errors of method [`MetricsAPI::get_metric_metadata`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV1/api/api_monitors.rs b/src/datadogV1/api/api_monitors.rs index a7c396138..83d02ec94 100644 --- a/src/datadogV1/api/api_monitors.rs +++ b/src/datadogV1/api/api_monitors.rs @@ -6,14 +6,22 @@ use reqwest; use serde::{Deserialize, Serialize}; /// DeleteMonitorOptionalParams is a struct for passing parameters to the method [`MonitorsAPI::delete_monitor`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct DeleteMonitorOptionalParams { /// Delete the monitor even if it's referenced by other resources (for example SLO, composite monitor). pub force: Option, } +impl DeleteMonitorOptionalParams { + /// Delete the monitor even if it's referenced by other resources (for example SLO, composite monitor). + pub fn force(&mut self, value: String) -> &mut Self { + self.force = Some(value); + self + } +} + /// GetMonitorOptionalParams is a struct for passing parameters to the method [`MonitorsAPI::get_monitor`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetMonitorOptionalParams { /// When specified, shows additional information about the group states. Choose one or more from `all`, `alert`, `warn`, and `no data`. pub group_states: Option, @@ -21,8 +29,21 @@ pub struct GetMonitorOptionalParams { pub with_downtimes: Option, } +impl GetMonitorOptionalParams { + /// When specified, shows additional information about the group states. Choose one or more from `all`, `alert`, `warn`, and `no data`. + pub fn group_states(&mut self, value: String) -> &mut Self { + self.group_states = Some(value); + self + } + /// If this argument is set to true, then the returned data includes all current active downtimes for the monitor. + pub fn with_downtimes(&mut self, value: bool) -> &mut Self { + self.with_downtimes = Some(value); + self + } +} + /// ListMonitorsOptionalParams is a struct for passing parameters to the method [`MonitorsAPI::list_monitors`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListMonitorsOptionalParams { /// When specified, shows additional information about the group states. /// Choose one or more from `all`, `alert`, `warn`, and `no data`. @@ -45,8 +66,54 @@ pub struct ListMonitorsOptionalParams { pub page_size: Option, } +impl ListMonitorsOptionalParams { + /// When specified, shows additional information about the group states. + /// Choose one or more from `all`, `alert`, `warn`, and `no data`. + pub fn group_states(&mut self, value: String) -> &mut Self { + self.group_states = Some(value); + self + } + /// A string to filter monitors by name. + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + /// A comma separated list indicating what tags, if any, should be used to filter the list of monitors by scope. + /// For example, `host:host0`. + pub fn tags(&mut self, value: String) -> &mut Self { + self.tags = Some(value); + self + } + /// A comma separated list indicating what service and/or custom tags, if any, should be used to filter the list of monitors. + /// Tags created in the Datadog UI automatically have the service key prepended. For example, `service:my-app`. + pub fn monitor_tags(&mut self, value: String) -> &mut Self { + self.monitor_tags = Some(value); + self + } + /// If this argument is set to true, then the returned data includes all current active downtimes for each monitor. + pub fn with_downtimes(&mut self, value: bool) -> &mut Self { + self.with_downtimes = Some(value); + self + } + /// Use this parameter for paginating through large sets of monitors. Start with a value of zero, make a request, set the value to the last ID of result set, and then repeat until the response is empty. + pub fn id_offset(&mut self, value: i64) -> &mut Self { + self.id_offset = Some(value); + self + } + /// The page to start paginating from. If this argument is not specified, the request returns all monitors without pagination. + pub fn page(&mut self, value: i64) -> &mut Self { + self.page = Some(value); + self + } + /// The number of monitors to return per page. If the page argument is not specified, the default behavior returns all monitors without a `page_size` limit. However, if page is specified and `page_size` is not, the argument defaults to 100. + pub fn page_size(&mut self, value: i32) -> &mut Self { + self.page_size = Some(value); + self + } +} + /// SearchMonitorGroupsOptionalParams is a struct for passing parameters to the method [`MonitorsAPI::search_monitor_groups`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct SearchMonitorGroupsOptionalParams { /// After entering a search query in your [Manage Monitor page][1] use the query parameter value in the /// URL of the page as value for this parameter. Consult the dedicated [manage monitor documentation][2] @@ -69,8 +136,42 @@ pub struct SearchMonitorGroupsOptionalParams { pub sort: Option, } +impl SearchMonitorGroupsOptionalParams { + /// After entering a search query in your [Manage Monitor page][1] use the query parameter value in the + /// URL of the page as value for this parameter. Consult the dedicated [manage monitor documentation][2] + /// page to learn more. + /// + /// The query can contain any number of space-separated monitor attributes, for instance `query="type:metric status:alert"`. + /// + /// [1]: + /// [2]: /monitors/manage/#find-the-monitors + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + /// Page to start paginating from. + pub fn page(&mut self, value: i64) -> &mut Self { + self.page = Some(value); + self + } + /// Number of monitors to return per page. + pub fn per_page(&mut self, value: i64) -> &mut Self { + self.per_page = Some(value); + self + } + /// String for sort order, composed of field and sort order separate by a comma, for example `name,asc`. Supported sort directions: `asc`, `desc`. Supported fields: + /// + /// * `name` + /// * `status` + /// * `tags` + pub fn sort(&mut self, value: String) -> &mut Self { + self.sort = Some(value); + self + } +} + /// SearchMonitorsOptionalParams is a struct for passing parameters to the method [`MonitorsAPI::search_monitors`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct SearchMonitorsOptionalParams { /// After entering a search query in your [Manage Monitor page][1] use the query parameter value in the /// URL of the page as value for this parameter. Consult the dedicated [manage monitor documentation][2] @@ -93,6 +194,40 @@ pub struct SearchMonitorsOptionalParams { pub sort: Option, } +impl SearchMonitorsOptionalParams { + /// After entering a search query in your [Manage Monitor page][1] use the query parameter value in the + /// URL of the page as value for this parameter. Consult the dedicated [manage monitor documentation][2] + /// page to learn more. + /// + /// The query can contain any number of space-separated monitor attributes, for instance `query="type:metric status:alert"`. + /// + /// [1]: + /// [2]: /monitors/manage/#find-the-monitors + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + /// Page to start paginating from. + pub fn page(&mut self, value: i64) -> &mut Self { + self.page = Some(value); + self + } + /// Number of monitors to return per page. + pub fn per_page(&mut self, value: i64) -> &mut Self { + self.per_page = Some(value); + self + } + /// String for sort order, composed of field and sort order separate by a comma, for example `name,asc`. Supported sort directions: `asc`, `desc`. Supported fields: + /// + /// * `name` + /// * `status` + /// * `tags` + pub fn sort(&mut self, value: String) -> &mut Self { + self.sort = Some(value); + self + } +} + /// CheckCanDeleteMonitorError is a struct for typed errors of method [`MonitorsAPI::check_can_delete_monitor`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV1/api/api_notebooks.rs b/src/datadogV1/api/api_notebooks.rs index daddff68b..6c3b8858c 100644 --- a/src/datadogV1/api/api_notebooks.rs +++ b/src/datadogV1/api/api_notebooks.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListNotebooksOptionalParams is a struct for passing parameters to the method [`NotebooksAPI::list_notebooks`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListNotebooksOptionalParams { /// Return notebooks created by the given `author_handle`. pub author_handle: Option, @@ -30,6 +30,59 @@ pub struct ListNotebooksOptionalParams { pub type_: Option, } +impl ListNotebooksOptionalParams { + /// Return notebooks created by the given `author_handle`. + pub fn author_handle(&mut self, value: String) -> &mut Self { + self.author_handle = Some(value); + self + } + /// Return notebooks not created by the given `author_handle`. + pub fn exclude_author_handle(&mut self, value: String) -> &mut Self { + self.exclude_author_handle = Some(value); + self + } + /// The index of the first notebook you want returned. + pub fn start(&mut self, value: i64) -> &mut Self { + self.start = Some(value); + self + } + /// The number of notebooks to be returned. + pub fn count(&mut self, value: i64) -> &mut Self { + self.count = Some(value); + self + } + /// Sort by field `modified`, `name`, or `created`. + pub fn sort_field(&mut self, value: String) -> &mut Self { + self.sort_field = Some(value); + self + } + /// Sort by direction `asc` or `desc`. + pub fn sort_dir(&mut self, value: String) -> &mut Self { + self.sort_dir = Some(value); + self + } + /// Return only notebooks with `query` string in notebook name or author handle. + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + /// Value of `false` excludes the `cells` and global `time` for each notebook. + pub fn include_cells(&mut self, value: bool) -> &mut Self { + self.include_cells = Some(value); + self + } + /// True value returns only template notebooks. Default is false (returns only non-template notebooks). + pub fn is_template(&mut self, value: bool) -> &mut Self { + self.is_template = Some(value); + self + } + /// If type is provided, returns only notebooks with that metadata type. Default does not have type filtering. + pub fn type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } +} + /// CreateNotebookError is a struct for typed errors of method [`NotebooksAPI::create_notebook`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV1/api/api_service_level_objective_corrections.rs b/src/datadogV1/api/api_service_level_objective_corrections.rs index 11937bfd1..289867471 100644 --- a/src/datadogV1/api/api_service_level_objective_corrections.rs +++ b/src/datadogV1/api/api_service_level_objective_corrections.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListSLOCorrectionOptionalParams is a struct for passing parameters to the method [`ServiceLevelObjectiveCorrectionsAPI::list_slo_correction`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListSLOCorrectionOptionalParams { /// The specific offset to use as the beginning of the returned response. pub offset: Option, @@ -14,6 +14,19 @@ pub struct ListSLOCorrectionOptionalParams { pub limit: Option, } +impl ListSLOCorrectionOptionalParams { + /// The specific offset to use as the beginning of the returned response. + pub fn offset(&mut self, value: i64) -> &mut Self { + self.offset = Some(value); + self + } + /// The number of SLO corrections to return in the response. Default is 25. + pub fn limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } +} + /// CreateSLOCorrectionError is a struct for typed errors of method [`ServiceLevelObjectiveCorrectionsAPI::create_slo_correction`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV1/api/api_service_level_objectives.rs b/src/datadogV1/api/api_service_level_objectives.rs index 02c8bf73d..4741de8c5 100644 --- a/src/datadogV1/api/api_service_level_objectives.rs +++ b/src/datadogV1/api/api_service_level_objectives.rs @@ -6,21 +6,37 @@ use reqwest; use serde::{Deserialize, Serialize}; /// DeleteSLOOptionalParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::delete_slo`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct DeleteSLOOptionalParams { /// Delete the monitor even if it's referenced by other resources (for example SLO, composite monitor). pub force: Option, } +impl DeleteSLOOptionalParams { + /// Delete the monitor even if it's referenced by other resources (for example SLO, composite monitor). + pub fn force(&mut self, value: String) -> &mut Self { + self.force = Some(value); + self + } +} + /// GetSLOOptionalParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::get_slo`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetSLOOptionalParams { /// Get the IDs of SLO monitors that reference this SLO. pub with_configured_alert_ids: Option, } +impl GetSLOOptionalParams { + /// Get the IDs of SLO monitors that reference this SLO. + pub fn with_configured_alert_ids(&mut self, value: bool) -> &mut Self { + self.with_configured_alert_ids = Some(value); + self + } +} + /// GetSLOHistoryOptionalParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::get_slo_history`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetSLOHistoryOptionalParams { /// The SLO target. If `target` is passed in, the response will include the remaining error budget and a timeframe value of `custom`. pub target: Option, @@ -29,8 +45,22 @@ pub struct GetSLOHistoryOptionalParams { pub apply_correction: Option, } +impl GetSLOHistoryOptionalParams { + /// The SLO target. If `target` is passed in, the response will include the remaining error budget and a timeframe value of `custom`. + pub fn target(&mut self, value: f64) -> &mut Self { + self.target = Some(value); + self + } + /// Defaults to `true`. If any SLO corrections are applied and this parameter is set to `false`, + /// then the corrections will not be applied and the SLI values will not be affected. + pub fn apply_correction(&mut self, value: bool) -> &mut Self { + self.apply_correction = Some(value); + self + } +} + /// ListSLOsOptionalParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::list_sl_os`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListSLOsOptionalParams { /// A comma separated list of the IDs of the service level objectives objects. pub ids: Option, @@ -46,8 +76,41 @@ pub struct ListSLOsOptionalParams { pub offset: Option, } +impl ListSLOsOptionalParams { + /// A comma separated list of the IDs of the service level objectives objects. + pub fn ids(&mut self, value: String) -> &mut Self { + self.ids = Some(value); + self + } + /// The query string to filter results based on SLO names. + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + /// The query string to filter results based on a single SLO tag. + pub fn tags_query(&mut self, value: String) -> &mut Self { + self.tags_query = Some(value); + self + } + /// The query string to filter results based on SLO numerator and denominator. + pub fn metrics_query(&mut self, value: String) -> &mut Self { + self.metrics_query = Some(value); + self + } + /// The number of SLOs to return in the response. + pub fn limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + /// The specific offset to use as the beginning of the returned response. + pub fn offset(&mut self, value: i64) -> &mut Self { + self.offset = Some(value); + self + } +} + /// SearchSLOOptionalParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::search_slo`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct SearchSLOOptionalParams { /// The query string to filter results based on SLO names. /// Some examples of queries include `service:` @@ -61,6 +124,31 @@ pub struct SearchSLOOptionalParams { pub include_facets: Option, } +impl SearchSLOOptionalParams { + /// The query string to filter results based on SLO names. + /// Some examples of queries include `service:` + /// and ``. + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + /// The number of files to return in the response `[default=10]`. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// The identifier of the first page to return. This parameter is used for the pagination feature `[default=0]`. + pub fn page_number(&mut self, value: i64) -> &mut Self { + self.page_number = Some(value); + self + } + /// Whether or not to return facet information in the response `[default=false]`. + pub fn include_facets(&mut self, value: bool) -> &mut Self { + self.include_facets = Some(value); + self + } +} + /// CheckCanDeleteSLOError is a struct for typed errors of method [`ServiceLevelObjectivesAPI::check_can_delete_slo`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV1/api/api_snapshots.rs b/src/datadogV1/api/api_snapshots.rs index 41809d66b..f906b9c79 100644 --- a/src/datadogV1/api/api_snapshots.rs +++ b/src/datadogV1/api/api_snapshots.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// GetGraphSnapshotOptionalParams is a struct for passing parameters to the method [`SnapshotsAPI::get_graph_snapshot`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetGraphSnapshotOptionalParams { /// The metric query. pub metric_query: Option, @@ -24,6 +24,41 @@ pub struct GetGraphSnapshotOptionalParams { pub width: Option, } +impl GetGraphSnapshotOptionalParams { + /// The metric query. + pub fn metric_query(&mut self, value: String) -> &mut Self { + self.metric_query = Some(value); + self + } + /// A query that adds event bands to the graph. + pub fn event_query(&mut self, value: String) -> &mut Self { + self.event_query = Some(value); + self + } + /// A JSON document defining the graph. `graph_def` can be used instead of `metric_query`. + /// The JSON document uses the [grammar defined here]() + /// and should be formatted to a single line then URL encoded. + pub fn graph_def(&mut self, value: String) -> &mut Self { + self.graph_def = Some(value); + self + } + /// A title for the graph. If no title is specified, the graph does not have a title. + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + /// The height of the graph. If no height is specified, the graph's original height is used. + pub fn height(&mut self, value: i64) -> &mut Self { + self.height = Some(value); + self + } + /// The width of the graph. If no width is specified, the graph's original width is used. + pub fn width(&mut self, value: i64) -> &mut Self { + self.width = Some(value); + self + } +} + /// GetGraphSnapshotError is a struct for typed errors of method [`SnapshotsAPI::get_graph_snapshot`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV1/api/api_synthetics.rs b/src/datadogV1/api/api_synthetics.rs index b03e52435..9515ef045 100644 --- a/src/datadogV1/api/api_synthetics.rs +++ b/src/datadogV1/api/api_synthetics.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// GetAPITestLatestResultsOptionalParams is a struct for passing parameters to the method [`SyntheticsAPI::get_api_test_latest_results`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetAPITestLatestResultsOptionalParams { /// Timestamp in milliseconds from which to start querying results. pub from_ts: Option, @@ -16,8 +16,26 @@ pub struct GetAPITestLatestResultsOptionalParams { pub probe_dc: Option>, } +impl GetAPITestLatestResultsOptionalParams { + /// Timestamp in milliseconds from which to start querying results. + pub fn from_ts(&mut self, value: i64) -> &mut Self { + self.from_ts = Some(value); + self + } + /// Timestamp in milliseconds up to which to query results. + pub fn to_ts(&mut self, value: i64) -> &mut Self { + self.to_ts = Some(value); + self + } + /// Locations for which to query results. + pub fn probe_dc(&mut self, value: Vec) -> &mut Self { + self.probe_dc = Some(value); + self + } +} + /// GetBrowserTestLatestResultsOptionalParams is a struct for passing parameters to the method [`SyntheticsAPI::get_browser_test_latest_results`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetBrowserTestLatestResultsOptionalParams { /// Timestamp in milliseconds from which to start querying results. pub from_ts: Option, @@ -27,8 +45,26 @@ pub struct GetBrowserTestLatestResultsOptionalParams { pub probe_dc: Option>, } +impl GetBrowserTestLatestResultsOptionalParams { + /// Timestamp in milliseconds from which to start querying results. + pub fn from_ts(&mut self, value: i64) -> &mut Self { + self.from_ts = Some(value); + self + } + /// Timestamp in milliseconds up to which to query results. + pub fn to_ts(&mut self, value: i64) -> &mut Self { + self.to_ts = Some(value); + self + } + /// Locations for which to query results. + pub fn probe_dc(&mut self, value: Vec) -> &mut Self { + self.probe_dc = Some(value); + self + } +} + /// ListTestsOptionalParams is a struct for passing parameters to the method [`SyntheticsAPI::list_tests`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListTestsOptionalParams { /// Used for pagination. The number of tests returned in the page. pub page_size: Option, @@ -36,6 +72,19 @@ pub struct ListTestsOptionalParams { pub page_number: Option, } +impl ListTestsOptionalParams { + /// Used for pagination. The number of tests returned in the page. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// Used for pagination. Which page you want to retrieve. Starts at zero. + pub fn page_number(&mut self, value: i64) -> &mut Self { + self.page_number = Some(value); + self + } +} + /// CreateGlobalVariableError is a struct for typed errors of method [`SyntheticsAPI::create_global_variable`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV1/api/api_tags.rs b/src/datadogV1/api/api_tags.rs index 3ace8e465..5dc4361cd 100644 --- a/src/datadogV1/api/api_tags.rs +++ b/src/datadogV1/api/api_tags.rs @@ -6,43 +6,86 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateHostTagsOptionalParams is a struct for passing parameters to the method [`TagsAPI::create_host_tags`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct CreateHostTagsOptionalParams { /// The source of the tags. /// [Complete list of source attribute values](). pub source: Option, } +impl CreateHostTagsOptionalParams { + /// The source of the tags. + /// [Complete list of source attribute values](). + pub fn source(&mut self, value: String) -> &mut Self { + self.source = Some(value); + self + } +} + /// DeleteHostTagsOptionalParams is a struct for passing parameters to the method [`TagsAPI::delete_host_tags`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct DeleteHostTagsOptionalParams { /// The source of the tags (for example chef, puppet). /// [Complete list of source attribute values](). pub source: Option, } +impl DeleteHostTagsOptionalParams { + /// The source of the tags (for example chef, puppet). + /// [Complete list of source attribute values](). + pub fn source(&mut self, value: String) -> &mut Self { + self.source = Some(value); + self + } +} + /// GetHostTagsOptionalParams is a struct for passing parameters to the method [`TagsAPI::get_host_tags`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetHostTagsOptionalParams { /// Source to filter. pub source: Option, } +impl GetHostTagsOptionalParams { + /// Source to filter. + pub fn source(&mut self, value: String) -> &mut Self { + self.source = Some(value); + self + } +} + /// ListHostTagsOptionalParams is a struct for passing parameters to the method [`TagsAPI::list_host_tags`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListHostTagsOptionalParams { /// When specified, filters host list to those tags with the specified source. pub source: Option, } +impl ListHostTagsOptionalParams { + /// When specified, filters host list to those tags with the specified source. + pub fn source(&mut self, value: String) -> &mut Self { + self.source = Some(value); + self + } +} + /// UpdateHostTagsOptionalParams is a struct for passing parameters to the method [`TagsAPI::update_host_tags`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct UpdateHostTagsOptionalParams { /// The source of the tags (for example chef, puppet). /// [Complete list of source attribute values]() pub source: Option, } +impl UpdateHostTagsOptionalParams { + /// The source of the tags (for example chef, puppet). + /// [Complete list of source attribute values]() + pub fn source(&mut self, value: String) -> &mut Self { + self.source = Some(value); + self + } +} + /// CreateHostTagsError is a struct for typed errors of method [`TagsAPI::create_host_tags`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV1/api/api_usage_metering.rs b/src/datadogV1/api/api_usage_metering.rs index fd7c231be..56d795793 100644 --- a/src/datadogV1/api/api_usage_metering.rs +++ b/src/datadogV1/api/api_usage_metering.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// GetDailyCustomReportsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_daily_custom_reports`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetDailyCustomReportsOptionalParams { /// The number of files to return in the response. `[default=60]`. pub page_size: Option, @@ -18,8 +18,31 @@ pub struct GetDailyCustomReportsOptionalParams { pub sort: Option, } +impl GetDailyCustomReportsOptionalParams { + /// The number of files to return in the response. `[default=60]`. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// The identifier of the first page to return. This parameter is used for the pagination feature `[default=0]`. + pub fn page_number(&mut self, value: i64) -> &mut Self { + self.page_number = Some(value); + self + } + /// The direction to sort by: `[desc, asc]`. + pub fn sort_dir(&mut self, value: crate::datadogV1::model::UsageSortDirection) -> &mut Self { + self.sort_dir = Some(value); + self + } + /// The field to sort by: `[computed_on, size, start_date, end_date]`. + pub fn sort(&mut self, value: crate::datadogV1::model::UsageSort) -> &mut Self { + self.sort = Some(value); + self + } +} + /// GetHourlyUsageAttributionOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_hourly_usage_attribution`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetHourlyUsageAttributionOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. @@ -34,24 +57,68 @@ pub struct GetHourlyUsageAttributionOptionalParams { pub include_descendants: Option, } +impl GetHourlyUsageAttributionOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + /// **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } + /// List following results with a next_record_id provided in the previous query. + pub fn next_record_id(&mut self, value: String) -> &mut Self { + self.next_record_id = Some(value); + self + } + /// Comma separated list of tags used to group usage. If no value is provided the usage will not be broken down by tags. + /// + /// To see which tags are available, look for the value of `tag_config_source` in the API response. + pub fn tag_breakdown_keys(&mut self, value: String) -> &mut Self { + self.tag_breakdown_keys = Some(value); + self + } + /// Include child org usage in the response. Defaults to `true`. + pub fn include_descendants(&mut self, value: bool) -> &mut Self { + self.include_descendants = Some(value); + self + } +} + /// GetIncidentManagementOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_incident_management`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetIncidentManagementOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } +impl GetIncidentManagementOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + /// **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetIngestedSpansOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_ingested_spans`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetIngestedSpansOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } +impl GetIngestedSpansOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + /// **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetMonthlyCustomReportsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_monthly_custom_reports`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetMonthlyCustomReportsOptionalParams { /// The number of files to return in the response `[default=60].` pub page_size: Option, @@ -63,8 +130,31 @@ pub struct GetMonthlyCustomReportsOptionalParams { pub sort: Option, } +impl GetMonthlyCustomReportsOptionalParams { + /// The number of files to return in the response `[default=60].` + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// The identifier of the first page to return. This parameter is used for the pagination feature `[default=0]`. + pub fn page_number(&mut self, value: i64) -> &mut Self { + self.page_number = Some(value); + self + } + /// The direction to sort by: `[desc, asc]`. + pub fn sort_dir(&mut self, value: crate::datadogV1::model::UsageSortDirection) -> &mut Self { + self.sort_dir = Some(value); + self + } + /// The field to sort by: `[computed_on, size, start_date, end_date]`. + pub fn sort(&mut self, value: crate::datadogV1::model::UsageSort) -> &mut Self { + self.sort = Some(value); + self + } +} + /// GetMonthlyUsageAttributionOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_monthly_usage_attribution`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetMonthlyUsageAttributionOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month. pub end_month: Option, @@ -82,16 +172,66 @@ pub struct GetMonthlyUsageAttributionOptionalParams { pub include_descendants: Option, } +impl GetMonthlyUsageAttributionOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month. + pub fn end_month(&mut self, value: String) -> &mut Self { + self.end_month = Some(value); + self + } + /// The direction to sort by: `[desc, asc]`. + pub fn sort_direction( + &mut self, + value: crate::datadogV1::model::UsageSortDirection, + ) -> &mut Self { + self.sort_direction = Some(value); + self + } + /// The field to sort by. + pub fn sort_name( + &mut self, + value: crate::datadogV1::model::MonthlyUsageAttributionSupportedMetrics, + ) -> &mut Self { + self.sort_name = Some(value); + self + } + /// Comma separated list of tag keys used to group usage. If no value is provided the usage will not be broken down by tags. + /// + /// To see which tags are available, look for the value of `tag_config_source` in the API response. + pub fn tag_breakdown_keys(&mut self, value: String) -> &mut Self { + self.tag_breakdown_keys = Some(value); + self + } + /// List following results with a next_record_id provided in the previous query. + pub fn next_record_id(&mut self, value: String) -> &mut Self { + self.next_record_id = Some(value); + self + } + /// Include child org usage in the response. Defaults to `true`. + pub fn include_descendants(&mut self, value: bool) -> &mut Self { + self.include_descendants = Some(value); + self + } +} + /// GetUsageAnalyzedLogsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_analyzed_logs`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageAnalyzedLogsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } +impl GetUsageAnalyzedLogsOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + /// **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageAttributionOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_attribution`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageAttributionOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month. pub end_month: Option, @@ -107,98 +247,236 @@ pub struct GetUsageAttributionOptionalParams { pub limit: Option, } +impl GetUsageAttributionOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month. + pub fn end_month(&mut self, value: String) -> &mut Self { + self.end_month = Some(value); + self + } + /// The direction to sort by: `[desc, asc]`. + pub fn sort_direction( + &mut self, + value: crate::datadogV1::model::UsageSortDirection, + ) -> &mut Self { + self.sort_direction = Some(value); + self + } + /// The field to sort by. + pub fn sort_name(&mut self, value: crate::datadogV1::model::UsageAttributionSort) -> &mut Self { + self.sort_name = Some(value); + self + } + /// Include child org usage in the response. Defaults to false. + pub fn include_descendants(&mut self, value: bool) -> &mut Self { + self.include_descendants = Some(value); + self + } + /// Number of records to skip before beginning to return. + pub fn offset(&mut self, value: i64) -> &mut Self { + self.offset = Some(value); + self + } + /// Maximum number of records to be returned. + pub fn limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } +} + /// GetUsageAuditLogsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_audit_logs`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageAuditLogsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } +impl GetUsageAuditLogsOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + /// **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageBillableSummaryOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_billable_summary`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageBillableSummaryOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage starting this month. pub month: Option, } +impl GetUsageBillableSummaryOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage starting this month. + pub fn month(&mut self, value: String) -> &mut Self { + self.month = Some(value); + self + } +} + /// GetUsageCIAppOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_ci_app`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageCIAppOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } +impl GetUsageCIAppOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + /// **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageCWSOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_cws`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageCWSOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } +impl GetUsageCWSOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + /// **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageCloudSecurityPostureManagementOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_cloud_security_posture_management`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageCloudSecurityPostureManagementOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } +impl GetUsageCloudSecurityPostureManagementOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + /// **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageDBMOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_dbm`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageDBMOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } +impl GetUsageDBMOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + /// **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageFargateOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_fargate`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageFargateOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } +impl GetUsageFargateOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageHostsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_hosts`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageHostsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } +impl GetUsageHostsOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageIndexedSpansOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_indexed_spans`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageIndexedSpansOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. pub end_hr: Option, } +impl GetUsageIndexedSpansOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageInternetOfThingsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_internet_of_things`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageInternetOfThingsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } +impl GetUsageInternetOfThingsOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + /// **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageLambdaOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_lambda`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageLambdaOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } +impl GetUsageLambdaOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageLogsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_logs`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageLogsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } +impl GetUsageLogsOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageLogsByIndexOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_logs_by_index`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageLogsByIndexOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, @@ -206,47 +484,104 @@ pub struct GetUsageLogsByIndexOptionalParams { pub index_name: Option>, } +impl GetUsageLogsByIndexOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } + /// Comma-separated list of log index names. + pub fn index_name(&mut self, value: Vec) -> &mut Self { + self.index_name = Some(value); + self + } +} + /// GetUsageLogsByRetentionOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_logs_by_retention`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageLogsByRetentionOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } +impl GetUsageLogsByRetentionOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + /// **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageNetworkFlowsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_network_flows`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageNetworkFlowsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } +impl GetUsageNetworkFlowsOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + /// **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageNetworkHostsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_network_hosts`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageNetworkHostsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } +impl GetUsageNetworkHostsOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageOnlineArchiveOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_online_archive`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageOnlineArchiveOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } +impl GetUsageOnlineArchiveOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + /// **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageProfilingOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_profiling`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageProfilingOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } +impl GetUsageProfilingOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + /// **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageRumSessionsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_rum_sessions`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageRumSessionsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, @@ -254,31 +589,70 @@ pub struct GetUsageRumSessionsOptionalParams { pub type_: Option, } +impl GetUsageRumSessionsOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } + /// RUM type: `[browser, mobile]`. Defaults to `browser`. + pub fn type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } +} + /// GetUsageRumUnitsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_rum_units`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageRumUnitsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } +impl GetUsageRumUnitsOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageSDSOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_sds`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageSDSOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } +impl GetUsageSDSOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + /// **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageSNMPOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_snmp`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageSNMPOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } +impl GetUsageSNMPOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + /// **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageSummaryOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_summary`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageSummaryOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month. pub end_month: Option, @@ -286,36 +660,81 @@ pub struct GetUsageSummaryOptionalParams { pub include_org_details: Option, } +impl GetUsageSummaryOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month. + pub fn end_month(&mut self, value: String) -> &mut Self { + self.end_month = Some(value); + self + } + /// Include usage summaries for each sub-org. + pub fn include_org_details(&mut self, value: bool) -> &mut Self { + self.include_org_details = Some(value); + self + } +} + /// GetUsageSyntheticsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_synthetics`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageSyntheticsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } +impl GetUsageSyntheticsOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageSyntheticsAPIOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_synthetics_api`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageSyntheticsAPIOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } +impl GetUsageSyntheticsAPIOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageSyntheticsBrowserOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_synthetics_browser`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageSyntheticsBrowserOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } +impl GetUsageSyntheticsBrowserOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageTimeseriesOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_timeseries`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageTimeseriesOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub end_hr: Option, } +impl GetUsageTimeseriesOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageTopAvgMetricsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_top_avg_metrics`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageTopAvgMetricsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning at this hour. (Either month or day should be specified, but not both) pub month: Option, @@ -329,6 +748,34 @@ pub struct GetUsageTopAvgMetricsOptionalParams { pub next_record_id: Option, } +impl GetUsageTopAvgMetricsOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning at this hour. (Either month or day should be specified, but not both) + pub fn month(&mut self, value: String) -> &mut Self { + self.month = Some(value); + self + } + /// Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for usage beginning at this hour. (Either month or day should be specified, but not both) + pub fn day(&mut self, value: String) -> &mut Self { + self.day = Some(value); + self + } + /// Comma-separated list of metric names. + pub fn names(&mut self, value: Vec) -> &mut Self { + self.names = Some(value); + self + } + /// Maximum number of results to return (between 1 and 5000) - defaults to 500 results if limit not specified. + pub fn limit(&mut self, value: i32) -> &mut Self { + self.limit = Some(value); + self + } + /// List following results with a next_record_id provided in the previous query. + pub fn next_record_id(&mut self, value: String) -> &mut Self { + self.next_record_id = Some(value); + self + } +} + /// GetDailyCustomReportsError is a struct for typed errors of method [`UsageMeteringAPI::get_daily_custom_reports`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV1/model/model_add_signal_to_incident_request.rs b/src/datadogV1/model/model_add_signal_to_incident_request.rs index b74539b61..4c5699274 100644 --- a/src/datadogV1/model/model_add_signal_to_incident_request.rs +++ b/src/datadogV1/model/model_add_signal_to_incident_request.rs @@ -28,12 +28,12 @@ impl AddSignalToIncidentRequest { } } - pub fn with_add_to_signal_timeline(&mut self, value: bool) -> &mut Self { + pub fn add_to_signal_timeline(&mut self, value: bool) -> &mut Self { self.add_to_signal_timeline = Some(value); self } - pub fn with_version(&mut self, value: i64) -> &mut Self { + pub fn version(&mut self, value: i64) -> &mut Self { self.version = Some(value); self } diff --git a/src/datadogV1/model/model_alert_graph_widget_definition.rs b/src/datadogV1/model/model_alert_graph_widget_definition.rs index 79ff2a93f..749847764 100644 --- a/src/datadogV1/model/model_alert_graph_widget_definition.rs +++ b/src/datadogV1/model/model_alert_graph_widget_definition.rs @@ -48,25 +48,22 @@ impl AlertGraphWidgetDefinition { } } - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_alert_value_widget_definition.rs b/src/datadogV1/model/model_alert_value_widget_definition.rs index bf2e78a2d..b27cabceb 100644 --- a/src/datadogV1/model/model_alert_value_widget_definition.rs +++ b/src/datadogV1/model/model_alert_value_widget_definition.rs @@ -51,38 +51,32 @@ impl AlertValueWidgetDefinition { } } - pub fn with_precision(&mut self, value: i64) -> &mut Self { + pub fn precision(&mut self, value: i64) -> &mut Self { self.precision = Some(value); self } - pub fn with_text_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn text_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.text_align = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } - pub fn with_unit(&mut self, value: String) -> &mut Self { + pub fn unit(&mut self, value: String) -> &mut Self { self.unit = Some(value); self } diff --git a/src/datadogV1/model/model_api_key.rs b/src/datadogV1/model/model_api_key.rs index 6272368d6..765eb709e 100644 --- a/src/datadogV1/model/model_api_key.rs +++ b/src/datadogV1/model/model_api_key.rs @@ -32,26 +32,27 @@ impl ApiKey { } } - pub fn with_created(&mut self, value: String) -> &mut Self { + pub fn created(&mut self, value: String) -> &mut Self { self.created = Some(value); self } - pub fn with_created_by(&mut self, value: String) -> &mut Self { + pub fn created_by(&mut self, value: String) -> &mut Self { self.created_by = Some(value); self } - pub fn with_key(&mut self, value: String) -> &mut Self { + pub fn key(&mut self, value: String) -> &mut Self { self.key = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } } + impl Default for ApiKey { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_api_key_list_response.rs b/src/datadogV1/model/model_api_key_list_response.rs index 17070392f..ec1bf223c 100644 --- a/src/datadogV1/model/model_api_key_list_response.rs +++ b/src/datadogV1/model/model_api_key_list_response.rs @@ -18,11 +18,12 @@ impl ApiKeyListResponse { ApiKeyListResponse { api_keys: None } } - pub fn with_api_keys(&mut self, value: Vec) -> &mut Self { + pub fn api_keys(&mut self, value: Vec) -> &mut Self { self.api_keys = Some(value); self } } + impl Default for ApiKeyListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_api_key_response.rs b/src/datadogV1/model/model_api_key_response.rs index 9e5b5d4e5..500143efb 100644 --- a/src/datadogV1/model/model_api_key_response.rs +++ b/src/datadogV1/model/model_api_key_response.rs @@ -18,11 +18,12 @@ impl ApiKeyResponse { ApiKeyResponse { api_key: None } } - pub fn with_api_key(&mut self, value: crate::datadogV1::model::ApiKey) -> &mut Self { + pub fn api_key(&mut self, value: crate::datadogV1::model::ApiKey) -> &mut Self { self.api_key = Some(value); self } } + impl Default for ApiKeyResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_apm_stats_query_column_type.rs b/src/datadogV1/model/model_apm_stats_query_column_type.rs index e7dabd778..c64d12de7 100644 --- a/src/datadogV1/model/model_apm_stats_query_column_type.rs +++ b/src/datadogV1/model/model_apm_stats_query_column_type.rs @@ -32,12 +32,12 @@ impl ApmStatsQueryColumnType { } } - pub fn with_alias(&mut self, value: String) -> &mut Self { + pub fn alias(&mut self, value: String) -> &mut Self { self.alias = Some(value); self } - pub fn with_cell_display_mode( + pub fn cell_display_mode( &mut self, value: crate::datadogV1::model::TableWidgetCellDisplayMode, ) -> &mut Self { @@ -45,7 +45,7 @@ impl ApmStatsQueryColumnType { self } - pub fn with_order(&mut self, value: crate::datadogV1::model::WidgetSort) -> &mut Self { + pub fn order(&mut self, value: crate::datadogV1::model::WidgetSort) -> &mut Self { self.order = Some(value); self } diff --git a/src/datadogV1/model/model_apm_stats_query_definition.rs b/src/datadogV1/model/model_apm_stats_query_definition.rs index 3c296b4f7..07927d8b6 100644 --- a/src/datadogV1/model/model_apm_stats_query_definition.rs +++ b/src/datadogV1/model/model_apm_stats_query_definition.rs @@ -50,7 +50,7 @@ impl ApmStatsQueryDefinition { } } - pub fn with_columns( + pub fn columns( &mut self, value: Vec, ) -> &mut Self { @@ -58,7 +58,7 @@ impl ApmStatsQueryDefinition { self } - pub fn with_resource(&mut self, value: String) -> &mut Self { + pub fn resource(&mut self, value: String) -> &mut Self { self.resource = Some(value); self } diff --git a/src/datadogV1/model/model_application_key.rs b/src/datadogV1/model/model_application_key.rs index 107d4b31a..e57f041b2 100644 --- a/src/datadogV1/model/model_application_key.rs +++ b/src/datadogV1/model/model_application_key.rs @@ -28,21 +28,22 @@ impl ApplicationKey { } } - pub fn with_hash(&mut self, value: String) -> &mut Self { + pub fn hash(&mut self, value: String) -> &mut Self { self.hash = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_owner(&mut self, value: String) -> &mut Self { + pub fn owner(&mut self, value: String) -> &mut Self { self.owner = Some(value); self } } + impl Default for ApplicationKey { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_application_key_list_response.rs b/src/datadogV1/model/model_application_key_list_response.rs index 5eba71212..4a2ae0ffc 100644 --- a/src/datadogV1/model/model_application_key_list_response.rs +++ b/src/datadogV1/model/model_application_key_list_response.rs @@ -20,7 +20,7 @@ impl ApplicationKeyListResponse { } } - pub fn with_application_keys( + pub fn application_keys( &mut self, value: Vec, ) -> &mut Self { @@ -28,6 +28,7 @@ impl ApplicationKeyListResponse { self } } + impl Default for ApplicationKeyListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_application_key_response.rs b/src/datadogV1/model/model_application_key_response.rs index 88ff5ae76..11fc00c01 100644 --- a/src/datadogV1/model/model_application_key_response.rs +++ b/src/datadogV1/model/model_application_key_response.rs @@ -20,14 +20,12 @@ impl ApplicationKeyResponse { } } - pub fn with_application_key( - &mut self, - value: crate::datadogV1::model::ApplicationKey, - ) -> &mut Self { + pub fn application_key(&mut self, value: crate::datadogV1::model::ApplicationKey) -> &mut Self { self.application_key = Some(value); self } } + impl Default for ApplicationKeyResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_authentication_validation_response.rs b/src/datadogV1/model/model_authentication_validation_response.rs index df063d421..215bc823b 100644 --- a/src/datadogV1/model/model_authentication_validation_response.rs +++ b/src/datadogV1/model/model_authentication_validation_response.rs @@ -18,11 +18,12 @@ impl AuthenticationValidationResponse { AuthenticationValidationResponse { valid: None } } - pub fn with_valid(&mut self, value: bool) -> &mut Self { + pub fn valid(&mut self, value: bool) -> &mut Self { self.valid = Some(value); self } } + impl Default for AuthenticationValidationResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_account.rs b/src/datadogV1/model/model_aws_account.rs index 453c91cf3..07d089228 100644 --- a/src/datadogV1/model/model_aws_account.rs +++ b/src/datadogV1/model/model_aws_account.rs @@ -69,17 +69,17 @@ impl AWSAccount { } } - pub fn with_access_key_id(&mut self, value: String) -> &mut Self { + pub fn access_key_id(&mut self, value: String) -> &mut Self { self.access_key_id = Some(value); self } - pub fn with_account_id(&mut self, value: String) -> &mut Self { + pub fn account_id(&mut self, value: String) -> &mut Self { self.account_id = Some(value); self } - pub fn with_account_specific_namespace_rules( + pub fn account_specific_namespace_rules( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -87,46 +87,47 @@ impl AWSAccount { self } - pub fn with_cspm_resource_collection_enabled(&mut self, value: bool) -> &mut Self { + pub fn cspm_resource_collection_enabled(&mut self, value: bool) -> &mut Self { self.cspm_resource_collection_enabled = Some(value); self } - pub fn with_excluded_regions(&mut self, value: Vec) -> &mut Self { + pub fn excluded_regions(&mut self, value: Vec) -> &mut Self { self.excluded_regions = Some(value); self } - pub fn with_filter_tags(&mut self, value: Vec) -> &mut Self { + pub fn filter_tags(&mut self, value: Vec) -> &mut Self { self.filter_tags = Some(value); self } - pub fn with_host_tags(&mut self, value: Vec) -> &mut Self { + pub fn host_tags(&mut self, value: Vec) -> &mut Self { self.host_tags = Some(value); self } - pub fn with_metrics_collection_enabled(&mut self, value: bool) -> &mut Self { + pub fn metrics_collection_enabled(&mut self, value: bool) -> &mut Self { self.metrics_collection_enabled = Some(value); self } - pub fn with_resource_collection_enabled(&mut self, value: bool) -> &mut Self { + pub fn resource_collection_enabled(&mut self, value: bool) -> &mut Self { self.resource_collection_enabled = Some(value); self } - pub fn with_role_name(&mut self, value: String) -> &mut Self { + pub fn role_name(&mut self, value: String) -> &mut Self { self.role_name = Some(value); self } - pub fn with_secret_access_key(&mut self, value: String) -> &mut Self { + pub fn secret_access_key(&mut self, value: String) -> &mut Self { self.secret_access_key = Some(value); self } } + impl Default for AWSAccount { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_account_create_response.rs b/src/datadogV1/model/model_aws_account_create_response.rs index 64c008158..7a42eebe4 100644 --- a/src/datadogV1/model/model_aws_account_create_response.rs +++ b/src/datadogV1/model/model_aws_account_create_response.rs @@ -18,11 +18,12 @@ impl AWSAccountCreateResponse { AWSAccountCreateResponse { external_id: None } } - pub fn with_external_id(&mut self, value: String) -> &mut Self { + pub fn external_id(&mut self, value: String) -> &mut Self { self.external_id = Some(value); self } } + impl Default for AWSAccountCreateResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_account_delete_request.rs b/src/datadogV1/model/model_aws_account_delete_request.rs index 2729981be..ccbe2ccb0 100644 --- a/src/datadogV1/model/model_aws_account_delete_request.rs +++ b/src/datadogV1/model/model_aws_account_delete_request.rs @@ -28,21 +28,22 @@ impl AWSAccountDeleteRequest { } } - pub fn with_access_key_id(&mut self, value: String) -> &mut Self { + pub fn access_key_id(&mut self, value: String) -> &mut Self { self.access_key_id = Some(value); self } - pub fn with_account_id(&mut self, value: String) -> &mut Self { + pub fn account_id(&mut self, value: String) -> &mut Self { self.account_id = Some(value); self } - pub fn with_role_name(&mut self, value: String) -> &mut Self { + pub fn role_name(&mut self, value: String) -> &mut Self { self.role_name = Some(value); self } } + impl Default for AWSAccountDeleteRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_account_list_response.rs b/src/datadogV1/model/model_aws_account_list_response.rs index e1e7735e1..d507ce34f 100644 --- a/src/datadogV1/model/model_aws_account_list_response.rs +++ b/src/datadogV1/model/model_aws_account_list_response.rs @@ -18,11 +18,12 @@ impl AWSAccountListResponse { AWSAccountListResponse { accounts: None } } - pub fn with_accounts(&mut self, value: Vec) -> &mut Self { + pub fn accounts(&mut self, value: Vec) -> &mut Self { self.accounts = Some(value); self } } + impl Default for AWSAccountListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_event_bridge_account_configuration.rs b/src/datadogV1/model/model_aws_event_bridge_account_configuration.rs index 89ef46083..a34ae0ed6 100644 --- a/src/datadogV1/model/model_aws_event_bridge_account_configuration.rs +++ b/src/datadogV1/model/model_aws_event_bridge_account_configuration.rs @@ -29,12 +29,12 @@ impl AWSEventBridgeAccountConfiguration { } } - pub fn with_account_id(&mut self, value: String) -> &mut Self { + pub fn account_id(&mut self, value: String) -> &mut Self { self.account_id = Some(value); self } - pub fn with_event_hubs( + pub fn event_hubs( &mut self, value: Vec, ) -> &mut Self { @@ -42,11 +42,12 @@ impl AWSEventBridgeAccountConfiguration { self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } } + impl Default for AWSEventBridgeAccountConfiguration { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_event_bridge_create_request.rs b/src/datadogV1/model/model_aws_event_bridge_create_request.rs index a85e6f4ed..8cac48acf 100644 --- a/src/datadogV1/model/model_aws_event_bridge_create_request.rs +++ b/src/datadogV1/model/model_aws_event_bridge_create_request.rs @@ -34,26 +34,27 @@ impl AWSEventBridgeCreateRequest { } } - pub fn with_account_id(&mut self, value: String) -> &mut Self { + pub fn account_id(&mut self, value: String) -> &mut Self { self.account_id = Some(value); self } - pub fn with_create_event_bus(&mut self, value: bool) -> &mut Self { + pub fn create_event_bus(&mut self, value: bool) -> &mut Self { self.create_event_bus = Some(value); self } - pub fn with_event_generator_name(&mut self, value: String) -> &mut Self { + pub fn event_generator_name(&mut self, value: String) -> &mut Self { self.event_generator_name = Some(value); self } - pub fn with_region(&mut self, value: String) -> &mut Self { + pub fn region(&mut self, value: String) -> &mut Self { self.region = Some(value); self } } + impl Default for AWSEventBridgeCreateRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_event_bridge_create_response.rs b/src/datadogV1/model/model_aws_event_bridge_create_response.rs index 53c07120c..c1c699eee 100644 --- a/src/datadogV1/model/model_aws_event_bridge_create_response.rs +++ b/src/datadogV1/model/model_aws_event_bridge_create_response.rs @@ -32,22 +32,22 @@ impl AWSEventBridgeCreateResponse { } } - pub fn with_event_source_name(&mut self, value: String) -> &mut Self { + pub fn event_source_name(&mut self, value: String) -> &mut Self { self.event_source_name = Some(value); self } - pub fn with_has_bus(&mut self, value: bool) -> &mut Self { + pub fn has_bus(&mut self, value: bool) -> &mut Self { self.has_bus = Some(value); self } - pub fn with_region(&mut self, value: String) -> &mut Self { + pub fn region(&mut self, value: String) -> &mut Self { self.region = Some(value); self } - pub fn with_status( + pub fn status( &mut self, value: crate::datadogV1::model::AWSEventBridgeCreateStatus, ) -> &mut Self { @@ -55,6 +55,7 @@ impl AWSEventBridgeCreateResponse { self } } + impl Default for AWSEventBridgeCreateResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_event_bridge_delete_request.rs b/src/datadogV1/model/model_aws_event_bridge_delete_request.rs index 4dc4057f5..ddcc09085 100644 --- a/src/datadogV1/model/model_aws_event_bridge_delete_request.rs +++ b/src/datadogV1/model/model_aws_event_bridge_delete_request.rs @@ -28,21 +28,22 @@ impl AWSEventBridgeDeleteRequest { } } - pub fn with_account_id(&mut self, value: String) -> &mut Self { + pub fn account_id(&mut self, value: String) -> &mut Self { self.account_id = Some(value); self } - pub fn with_event_generator_name(&mut self, value: String) -> &mut Self { + pub fn event_generator_name(&mut self, value: String) -> &mut Self { self.event_generator_name = Some(value); self } - pub fn with_region(&mut self, value: String) -> &mut Self { + pub fn region(&mut self, value: String) -> &mut Self { self.region = Some(value); self } } + impl Default for AWSEventBridgeDeleteRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_event_bridge_delete_response.rs b/src/datadogV1/model/model_aws_event_bridge_delete_response.rs index 436853f18..91ed2848b 100644 --- a/src/datadogV1/model/model_aws_event_bridge_delete_response.rs +++ b/src/datadogV1/model/model_aws_event_bridge_delete_response.rs @@ -18,7 +18,7 @@ impl AWSEventBridgeDeleteResponse { AWSEventBridgeDeleteResponse { status: None } } - pub fn with_status( + pub fn status( &mut self, value: crate::datadogV1::model::AWSEventBridgeDeleteStatus, ) -> &mut Self { @@ -26,6 +26,7 @@ impl AWSEventBridgeDeleteResponse { self } } + impl Default for AWSEventBridgeDeleteResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_event_bridge_list_response.rs b/src/datadogV1/model/model_aws_event_bridge_list_response.rs index f6db520b8..ddf7a5fa8 100644 --- a/src/datadogV1/model/model_aws_event_bridge_list_response.rs +++ b/src/datadogV1/model/model_aws_event_bridge_list_response.rs @@ -24,7 +24,7 @@ impl AWSEventBridgeListResponse { } } - pub fn with_accounts( + pub fn accounts( &mut self, value: Vec, ) -> &mut Self { @@ -32,11 +32,12 @@ impl AWSEventBridgeListResponse { self } - pub fn with_is_installed(&mut self, value: bool) -> &mut Self { + pub fn is_installed(&mut self, value: bool) -> &mut Self { self.is_installed = Some(value); self } } + impl Default for AWSEventBridgeListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_event_bridge_source.rs b/src/datadogV1/model/model_aws_event_bridge_source.rs index cdbd17b33..c35e155a8 100644 --- a/src/datadogV1/model/model_aws_event_bridge_source.rs +++ b/src/datadogV1/model/model_aws_event_bridge_source.rs @@ -24,16 +24,17 @@ impl AWSEventBridgeSource { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_region(&mut self, value: String) -> &mut Self { + pub fn region(&mut self, value: String) -> &mut Self { self.region = Some(value); self } } + impl Default for AWSEventBridgeSource { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_logs_async_error.rs b/src/datadogV1/model/model_aws_logs_async_error.rs index 50da05234..6b44d9800 100644 --- a/src/datadogV1/model/model_aws_logs_async_error.rs +++ b/src/datadogV1/model/model_aws_logs_async_error.rs @@ -24,16 +24,17 @@ impl AWSLogsAsyncError { } } - pub fn with_code(&mut self, value: String) -> &mut Self { + pub fn code(&mut self, value: String) -> &mut Self { self.code = Some(value); self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } } + impl Default for AWSLogsAsyncError { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_logs_async_response.rs b/src/datadogV1/model/model_aws_logs_async_response.rs index 527f89906..cb8137726 100644 --- a/src/datadogV1/model/model_aws_logs_async_response.rs +++ b/src/datadogV1/model/model_aws_logs_async_response.rs @@ -24,19 +24,17 @@ impl AWSLogsAsyncResponse { } } - pub fn with_errors( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn errors(&mut self, value: Vec) -> &mut Self { self.errors = Some(value); self } - pub fn with_status(&mut self, value: String) -> &mut Self { + pub fn status(&mut self, value: String) -> &mut Self { self.status = Some(value); self } } + impl Default for AWSLogsAsyncResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_logs_lambda.rs b/src/datadogV1/model/model_aws_logs_lambda.rs index fe488d4b1..4530a2637 100644 --- a/src/datadogV1/model/model_aws_logs_lambda.rs +++ b/src/datadogV1/model/model_aws_logs_lambda.rs @@ -18,11 +18,12 @@ impl AWSLogsLambda { AWSLogsLambda { arn: None } } - pub fn with_arn(&mut self, value: String) -> &mut Self { + pub fn arn(&mut self, value: String) -> &mut Self { self.arn = Some(value); self } } + impl Default for AWSLogsLambda { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_logs_list_response.rs b/src/datadogV1/model/model_aws_logs_list_response.rs index 7abcef187..e2bd9b52b 100644 --- a/src/datadogV1/model/model_aws_logs_list_response.rs +++ b/src/datadogV1/model/model_aws_logs_list_response.rs @@ -28,24 +28,22 @@ impl AWSLogsListResponse { } } - pub fn with_account_id(&mut self, value: String) -> &mut Self { + pub fn account_id(&mut self, value: String) -> &mut Self { self.account_id = Some(value); self } - pub fn with_lambdas( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn lambdas(&mut self, value: Vec) -> &mut Self { self.lambdas = Some(value); self } - pub fn with_services(&mut self, value: Vec) -> &mut Self { + pub fn services(&mut self, value: Vec) -> &mut Self { self.services = Some(value); self } } + impl Default for AWSLogsListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_logs_list_services_response.rs b/src/datadogV1/model/model_aws_logs_list_services_response.rs index 3fefc06bd..c7c1cf36b 100644 --- a/src/datadogV1/model/model_aws_logs_list_services_response.rs +++ b/src/datadogV1/model/model_aws_logs_list_services_response.rs @@ -24,16 +24,17 @@ impl AWSLogsListServicesResponse { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_label(&mut self, value: String) -> &mut Self { + pub fn label(&mut self, value: String) -> &mut Self { self.label = Some(value); self } } + impl Default for AWSLogsListServicesResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_tag_filter.rs b/src/datadogV1/model/model_aws_tag_filter.rs index c11622955..0f72f32c5 100644 --- a/src/datadogV1/model/model_aws_tag_filter.rs +++ b/src/datadogV1/model/model_aws_tag_filter.rs @@ -24,16 +24,17 @@ impl AWSTagFilter { } } - pub fn with_namespace(&mut self, value: crate::datadogV1::model::AWSNamespace) -> &mut Self { + pub fn namespace(&mut self, value: crate::datadogV1::model::AWSNamespace) -> &mut Self { self.namespace = Some(value); self } - pub fn with_tag_filter_str(&mut self, value: String) -> &mut Self { + pub fn tag_filter_str(&mut self, value: String) -> &mut Self { self.tag_filter_str = Some(value); self } } + impl Default for AWSTagFilter { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_tag_filter_create_request.rs b/src/datadogV1/model/model_aws_tag_filter_create_request.rs index a54d46251..b133816d4 100644 --- a/src/datadogV1/model/model_aws_tag_filter_create_request.rs +++ b/src/datadogV1/model/model_aws_tag_filter_create_request.rs @@ -28,21 +28,22 @@ impl AWSTagFilterCreateRequest { } } - pub fn with_account_id(&mut self, value: String) -> &mut Self { + pub fn account_id(&mut self, value: String) -> &mut Self { self.account_id = Some(value); self } - pub fn with_namespace(&mut self, value: crate::datadogV1::model::AWSNamespace) -> &mut Self { + pub fn namespace(&mut self, value: crate::datadogV1::model::AWSNamespace) -> &mut Self { self.namespace = Some(value); self } - pub fn with_tag_filter_str(&mut self, value: String) -> &mut Self { + pub fn tag_filter_str(&mut self, value: String) -> &mut Self { self.tag_filter_str = Some(value); self } } + impl Default for AWSTagFilterCreateRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_tag_filter_delete_request.rs b/src/datadogV1/model/model_aws_tag_filter_delete_request.rs index 770cf5f92..f1440e109 100644 --- a/src/datadogV1/model/model_aws_tag_filter_delete_request.rs +++ b/src/datadogV1/model/model_aws_tag_filter_delete_request.rs @@ -24,16 +24,17 @@ impl AWSTagFilterDeleteRequest { } } - pub fn with_account_id(&mut self, value: String) -> &mut Self { + pub fn account_id(&mut self, value: String) -> &mut Self { self.account_id = Some(value); self } - pub fn with_namespace(&mut self, value: crate::datadogV1::model::AWSNamespace) -> &mut Self { + pub fn namespace(&mut self, value: crate::datadogV1::model::AWSNamespace) -> &mut Self { self.namespace = Some(value); self } } + impl Default for AWSTagFilterDeleteRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_aws_tag_filter_list_response.rs b/src/datadogV1/model/model_aws_tag_filter_list_response.rs index 7bd5c5107..b0a92e284 100644 --- a/src/datadogV1/model/model_aws_tag_filter_list_response.rs +++ b/src/datadogV1/model/model_aws_tag_filter_list_response.rs @@ -18,11 +18,12 @@ impl AWSTagFilterListResponse { AWSTagFilterListResponse { filters: None } } - pub fn with_filters(&mut self, value: Vec) -> &mut Self { + pub fn filters(&mut self, value: Vec) -> &mut Self { self.filters = Some(value); self } } + impl Default for AWSTagFilterListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_azure_account.rs b/src/datadogV1/model/model_azure_account.rs index ab896dca4..34951ada5 100644 --- a/src/datadogV1/model/model_azure_account.rs +++ b/src/datadogV1/model/model_azure_account.rs @@ -72,71 +72,72 @@ impl AzureAccount { } } - pub fn with_app_service_plan_filters(&mut self, value: String) -> &mut Self { + pub fn app_service_plan_filters(&mut self, value: String) -> &mut Self { self.app_service_plan_filters = Some(value); self } - pub fn with_automute(&mut self, value: bool) -> &mut Self { + pub fn automute(&mut self, value: bool) -> &mut Self { self.automute = Some(value); self } - pub fn with_client_id(&mut self, value: String) -> &mut Self { + pub fn client_id(&mut self, value: String) -> &mut Self { self.client_id = Some(value); self } - pub fn with_client_secret(&mut self, value: String) -> &mut Self { + pub fn client_secret(&mut self, value: String) -> &mut Self { self.client_secret = Some(value); self } - pub fn with_container_app_filters(&mut self, value: String) -> &mut Self { + pub fn container_app_filters(&mut self, value: String) -> &mut Self { self.container_app_filters = Some(value); self } - pub fn with_cspm_enabled(&mut self, value: bool) -> &mut Self { + pub fn cspm_enabled(&mut self, value: bool) -> &mut Self { self.cspm_enabled = Some(value); self } - pub fn with_custom_metrics_enabled(&mut self, value: bool) -> &mut Self { + pub fn custom_metrics_enabled(&mut self, value: bool) -> &mut Self { self.custom_metrics_enabled = Some(value); self } - pub fn with_errors(&mut self, value: Vec) -> &mut Self { + pub fn errors(&mut self, value: Vec) -> &mut Self { self.errors = Some(value); self } - pub fn with_host_filters(&mut self, value: String) -> &mut Self { + pub fn host_filters(&mut self, value: String) -> &mut Self { self.host_filters = Some(value); self } - pub fn with_new_client_id(&mut self, value: String) -> &mut Self { + pub fn new_client_id(&mut self, value: String) -> &mut Self { self.new_client_id = Some(value); self } - pub fn with_new_tenant_name(&mut self, value: String) -> &mut Self { + pub fn new_tenant_name(&mut self, value: String) -> &mut Self { self.new_tenant_name = Some(value); self } - pub fn with_resource_collection_enabled(&mut self, value: bool) -> &mut Self { + pub fn resource_collection_enabled(&mut self, value: bool) -> &mut Self { self.resource_collection_enabled = Some(value); self } - pub fn with_tenant_name(&mut self, value: String) -> &mut Self { + pub fn tenant_name(&mut self, value: String) -> &mut Self { self.tenant_name = Some(value); self } } + impl Default for AzureAccount { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_canceled_downtimes_ids.rs b/src/datadogV1/model/model_canceled_downtimes_ids.rs index 6405c5798..f9aaeefb7 100644 --- a/src/datadogV1/model/model_canceled_downtimes_ids.rs +++ b/src/datadogV1/model/model_canceled_downtimes_ids.rs @@ -20,11 +20,12 @@ impl CanceledDowntimesIds { } } - pub fn with_cancelled_ids(&mut self, value: Vec) -> &mut Self { + pub fn cancelled_ids(&mut self, value: Vec) -> &mut Self { self.cancelled_ids = Some(value); self } } + impl Default for CanceledDowntimesIds { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_change_widget_definition.rs b/src/datadogV1/model/model_change_widget_definition.rs index 3765eb8df..62f93e7d9 100644 --- a/src/datadogV1/model/model_change_widget_definition.rs +++ b/src/datadogV1/model/model_change_widget_definition.rs @@ -50,7 +50,7 @@ impl ChangeWidgetDefinition { } } - pub fn with_custom_links( + pub fn custom_links( &mut self, value: Vec, ) -> &mut Self { @@ -58,25 +58,22 @@ impl ChangeWidgetDefinition { self } - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_change_widget_request.rs b/src/datadogV1/model/model_change_widget_request.rs index c3367057a..244beebf3 100644 --- a/src/datadogV1/model/model_change_widget_request.rs +++ b/src/datadogV1/model/model_change_widget_request.rs @@ -88,60 +88,42 @@ impl ChangeWidgetRequest { } } - pub fn with_apm_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.apm_query = Some(value); self } - pub fn with_change_type( - &mut self, - value: crate::datadogV1::model::WidgetChangeType, - ) -> &mut Self { + pub fn change_type(&mut self, value: crate::datadogV1::model::WidgetChangeType) -> &mut Self { self.change_type = Some(value); self } - pub fn with_compare_to( - &mut self, - value: crate::datadogV1::model::WidgetCompareTo, - ) -> &mut Self { + pub fn compare_to(&mut self, value: crate::datadogV1::model::WidgetCompareTo) -> &mut Self { self.compare_to = Some(value); self } - pub fn with_event_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn event_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.event_query = Some(value); self } - pub fn with_formulas( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn formulas(&mut self, value: Vec) -> &mut Self { self.formulas = Some(value); self } - pub fn with_increase_good(&mut self, value: bool) -> &mut Self { + pub fn increase_good(&mut self, value: bool) -> &mut Self { self.increase_good = Some(value); self } - pub fn with_log_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.log_query = Some(value); self } - pub fn with_network_query( + pub fn network_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -149,17 +131,17 @@ impl ChangeWidgetRequest { self } - pub fn with_order_by(&mut self, value: crate::datadogV1::model::WidgetOrderBy) -> &mut Self { + pub fn order_by(&mut self, value: crate::datadogV1::model::WidgetOrderBy) -> &mut Self { self.order_by = Some(value); self } - pub fn with_order_dir(&mut self, value: crate::datadogV1::model::WidgetSort) -> &mut Self { + pub fn order_dir(&mut self, value: crate::datadogV1::model::WidgetSort) -> &mut Self { self.order_dir = Some(value); self } - pub fn with_process_query( + pub fn process_query( &mut self, value: crate::datadogV1::model::ProcessQueryDefinition, ) -> &mut Self { @@ -167,7 +149,7 @@ impl ChangeWidgetRequest { self } - pub fn with_profile_metrics_query( + pub fn profile_metrics_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -175,12 +157,12 @@ impl ChangeWidgetRequest { self } - pub fn with_q(&mut self, value: String) -> &mut Self { + pub fn q(&mut self, value: String) -> &mut Self { self.q = Some(value); self } - pub fn with_queries( + pub fn queries( &mut self, value: Vec, ) -> &mut Self { @@ -188,7 +170,7 @@ impl ChangeWidgetRequest { self } - pub fn with_response_format( + pub fn response_format( &mut self, value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, ) -> &mut Self { @@ -196,15 +178,12 @@ impl ChangeWidgetRequest { self } - pub fn with_rum_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.rum_query = Some(value); self } - pub fn with_security_query( + pub fn security_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -212,11 +191,12 @@ impl ChangeWidgetRequest { self } - pub fn with_show_present(&mut self, value: bool) -> &mut Self { + pub fn show_present(&mut self, value: bool) -> &mut Self { self.show_present = Some(value); self } } + impl Default for ChangeWidgetRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_check_can_delete_monitor_response.rs b/src/datadogV1/model/model_check_can_delete_monitor_response.rs index 75ddd81a0..53b742c80 100644 --- a/src/datadogV1/model/model_check_can_delete_monitor_response.rs +++ b/src/datadogV1/model/model_check_can_delete_monitor_response.rs @@ -23,7 +23,7 @@ impl CheckCanDeleteMonitorResponse { CheckCanDeleteMonitorResponse { data, errors: None } } - pub fn with_errors( + pub fn errors( &mut self, value: Option>>>, ) -> &mut Self { diff --git a/src/datadogV1/model/model_check_can_delete_monitor_response_data.rs b/src/datadogV1/model/model_check_can_delete_monitor_response_data.rs index 44647d754..366a6290e 100644 --- a/src/datadogV1/model/model_check_can_delete_monitor_response_data.rs +++ b/src/datadogV1/model/model_check_can_delete_monitor_response_data.rs @@ -18,11 +18,12 @@ impl CheckCanDeleteMonitorResponseData { CheckCanDeleteMonitorResponseData { ok: None } } - pub fn with_ok(&mut self, value: Vec) -> &mut Self { + pub fn ok(&mut self, value: Vec) -> &mut Self { self.ok = Some(value); self } } + impl Default for CheckCanDeleteMonitorResponseData { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_check_can_delete_slo_response.rs b/src/datadogV1/model/model_check_can_delete_slo_response.rs index 409f15597..e4c37285b 100644 --- a/src/datadogV1/model/model_check_can_delete_slo_response.rs +++ b/src/datadogV1/model/model_check_can_delete_slo_response.rs @@ -24,7 +24,7 @@ impl CheckCanDeleteSLOResponse { } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV1::model::CheckCanDeleteSLOResponseData, ) -> &mut Self { @@ -32,11 +32,12 @@ impl CheckCanDeleteSLOResponse { self } - pub fn with_errors(&mut self, value: std::collections::BTreeMap) -> &mut Self { + pub fn errors(&mut self, value: std::collections::BTreeMap) -> &mut Self { self.errors = Some(value); self } } + impl Default for CheckCanDeleteSLOResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_check_can_delete_slo_response_data.rs b/src/datadogV1/model/model_check_can_delete_slo_response_data.rs index 2f3313c7b..01fc5c432 100644 --- a/src/datadogV1/model/model_check_can_delete_slo_response_data.rs +++ b/src/datadogV1/model/model_check_can_delete_slo_response_data.rs @@ -18,11 +18,12 @@ impl CheckCanDeleteSLOResponseData { CheckCanDeleteSLOResponseData { ok: None } } - pub fn with_ok(&mut self, value: Vec) -> &mut Self { + pub fn ok(&mut self, value: Vec) -> &mut Self { self.ok = Some(value); self } } + impl Default for CheckCanDeleteSLOResponseData { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_check_status_widget_definition.rs b/src/datadogV1/model/model_check_status_widget_definition.rs index 02679baa4..1427b1d27 100644 --- a/src/datadogV1/model/model_check_status_widget_definition.rs +++ b/src/datadogV1/model/model_check_status_widget_definition.rs @@ -60,40 +60,37 @@ impl CheckStatusWidgetDefinition { } } - pub fn with_group(&mut self, value: String) -> &mut Self { + pub fn group(&mut self, value: String) -> &mut Self { self.group = Some(value); self } - pub fn with_group_by(&mut self, value: Vec) -> &mut Self { + pub fn group_by(&mut self, value: Vec) -> &mut Self { self.group_by = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_creator.rs b/src/datadogV1/model/model_creator.rs index 58436a283..41cdc099a 100644 --- a/src/datadogV1/model/model_creator.rs +++ b/src/datadogV1/model/model_creator.rs @@ -28,21 +28,22 @@ impl Creator { } } - pub fn with_email(&mut self, value: String) -> &mut Self { + pub fn email(&mut self, value: String) -> &mut Self { self.email = Some(value); self } - pub fn with_handle(&mut self, value: String) -> &mut Self { + pub fn handle(&mut self, value: String) -> &mut Self { self.handle = Some(value); self } - pub fn with_name(&mut self, value: Option) -> &mut Self { + pub fn name(&mut self, value: Option) -> &mut Self { self.name = Some(value); self } } + impl Default for Creator { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_dashboard.rs b/src/datadogV1/model/model_dashboard.rs index 05dd92cf3..f57e596b4 100644 --- a/src/datadogV1/model/model_dashboard.rs +++ b/src/datadogV1/model/model_dashboard.rs @@ -115,55 +115,55 @@ impl Dashboard { } #[allow(deprecated)] - pub fn with_author_handle(&mut self, value: String) -> &mut Self { + pub fn author_handle(&mut self, value: String) -> &mut Self { self.author_handle = Some(value); self } #[allow(deprecated)] - pub fn with_author_name(&mut self, value: Option) -> &mut Self { + pub fn author_name(&mut self, value: Option) -> &mut Self { self.author_name = Some(value); self } #[allow(deprecated)] - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } #[allow(deprecated)] - pub fn with_description(&mut self, value: Option) -> &mut Self { + pub fn description(&mut self, value: Option) -> &mut Self { self.description = Some(value); self } #[allow(deprecated)] - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } #[allow(deprecated)] - pub fn with_is_read_only(&mut self, value: bool) -> &mut Self { + pub fn is_read_only(&mut self, value: bool) -> &mut Self { self.is_read_only = Some(value); self } #[allow(deprecated)] - pub fn with_modified_at(&mut self, value: String) -> &mut Self { + pub fn modified_at(&mut self, value: String) -> &mut Self { self.modified_at = Some(value); self } #[allow(deprecated)] - pub fn with_notify_list(&mut self, value: Option>) -> &mut Self { + pub fn notify_list(&mut self, value: Option>) -> &mut Self { self.notify_list = Some(value); self } #[allow(deprecated)] - pub fn with_reflow_type( + pub fn reflow_type( &mut self, value: crate::datadogV1::model::DashboardReflowType, ) -> &mut Self { @@ -172,19 +172,19 @@ impl Dashboard { } #[allow(deprecated)] - pub fn with_restricted_roles(&mut self, value: Vec) -> &mut Self { + pub fn restricted_roles(&mut self, value: Vec) -> &mut Self { self.restricted_roles = Some(value); self } #[allow(deprecated)] - pub fn with_tags(&mut self, value: Option>) -> &mut Self { + pub fn tags(&mut self, value: Option>) -> &mut Self { self.tags = Some(value); self } #[allow(deprecated)] - pub fn with_template_variable_presets( + pub fn template_variable_presets( &mut self, value: Option>, ) -> &mut Self { @@ -193,7 +193,7 @@ impl Dashboard { } #[allow(deprecated)] - pub fn with_template_variables( + pub fn template_variables( &mut self, value: Option>, ) -> &mut Self { @@ -202,7 +202,7 @@ impl Dashboard { } #[allow(deprecated)] - pub fn with_url(&mut self, value: String) -> &mut Self { + pub fn url(&mut self, value: String) -> &mut Self { self.url = Some(value); self } diff --git a/src/datadogV1/model/model_dashboard_delete_response.rs b/src/datadogV1/model/model_dashboard_delete_response.rs index d0d60e3b8..9f2982194 100644 --- a/src/datadogV1/model/model_dashboard_delete_response.rs +++ b/src/datadogV1/model/model_dashboard_delete_response.rs @@ -20,11 +20,12 @@ impl DashboardDeleteResponse { } } - pub fn with_deleted_dashboard_id(&mut self, value: String) -> &mut Self { + pub fn deleted_dashboard_id(&mut self, value: String) -> &mut Self { self.deleted_dashboard_id = Some(value); self } } + impl Default for DashboardDeleteResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_dashboard_global_time.rs b/src/datadogV1/model/model_dashboard_global_time.rs index 350dc91ef..d0a5b7fe3 100644 --- a/src/datadogV1/model/model_dashboard_global_time.rs +++ b/src/datadogV1/model/model_dashboard_global_time.rs @@ -18,7 +18,7 @@ impl DashboardGlobalTime { DashboardGlobalTime { live_span: None } } - pub fn with_live_span( + pub fn live_span( &mut self, value: crate::datadogV1::model::DashboardGlobalTimeLiveSpan, ) -> &mut Self { @@ -26,6 +26,7 @@ impl DashboardGlobalTime { self } } + impl Default for DashboardGlobalTime { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_dashboard_list.rs b/src/datadogV1/model/model_dashboard_list.rs index c063e66ae..31c260ffc 100644 --- a/src/datadogV1/model/model_dashboard_list.rs +++ b/src/datadogV1/model/model_dashboard_list.rs @@ -48,37 +48,37 @@ impl DashboardList { } } - pub fn with_author(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + pub fn author(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { self.author = Some(value); self } - pub fn with_created(&mut self, value: String) -> &mut Self { + pub fn created(&mut self, value: String) -> &mut Self { self.created = Some(value); self } - pub fn with_dashboard_count(&mut self, value: i64) -> &mut Self { + pub fn dashboard_count(&mut self, value: i64) -> &mut Self { self.dashboard_count = Some(value); self } - pub fn with_id(&mut self, value: i64) -> &mut Self { + pub fn id(&mut self, value: i64) -> &mut Self { self.id = Some(value); self } - pub fn with_is_favorite(&mut self, value: bool) -> &mut Self { + pub fn is_favorite(&mut self, value: bool) -> &mut Self { self.is_favorite = Some(value); self } - pub fn with_modified(&mut self, value: String) -> &mut Self { + pub fn modified(&mut self, value: String) -> &mut Self { self.modified = Some(value); self } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } diff --git a/src/datadogV1/model/model_dashboard_list_delete_response.rs b/src/datadogV1/model/model_dashboard_list_delete_response.rs index 0aaeaa906..21e935a12 100644 --- a/src/datadogV1/model/model_dashboard_list_delete_response.rs +++ b/src/datadogV1/model/model_dashboard_list_delete_response.rs @@ -20,11 +20,12 @@ impl DashboardListDeleteResponse { } } - pub fn with_deleted_dashboard_list_id(&mut self, value: i64) -> &mut Self { + pub fn deleted_dashboard_list_id(&mut self, value: i64) -> &mut Self { self.deleted_dashboard_list_id = Some(value); self } } + impl Default for DashboardListDeleteResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_dashboard_list_list_response.rs b/src/datadogV1/model/model_dashboard_list_list_response.rs index 20f21d9fe..1c5439287 100644 --- a/src/datadogV1/model/model_dashboard_list_list_response.rs +++ b/src/datadogV1/model/model_dashboard_list_list_response.rs @@ -20,7 +20,7 @@ impl DashboardListListResponse { } } - pub fn with_dashboard_lists( + pub fn dashboard_lists( &mut self, value: Vec, ) -> &mut Self { @@ -28,6 +28,7 @@ impl DashboardListListResponse { self } } + impl Default for DashboardListListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_dashboard_summary.rs b/src/datadogV1/model/model_dashboard_summary.rs index 7d74c70dc..273369fd1 100644 --- a/src/datadogV1/model/model_dashboard_summary.rs +++ b/src/datadogV1/model/model_dashboard_summary.rs @@ -18,7 +18,7 @@ impl DashboardSummary { DashboardSummary { dashboards: None } } - pub fn with_dashboards( + pub fn dashboards( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl DashboardSummary { self } } + impl Default for DashboardSummary { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_dashboard_summary_definition.rs b/src/datadogV1/model/model_dashboard_summary_definition.rs index a8266f3c1..3a515f1e9 100644 --- a/src/datadogV1/model/model_dashboard_summary_definition.rs +++ b/src/datadogV1/model/model_dashboard_summary_definition.rs @@ -56,32 +56,32 @@ impl DashboardSummaryDefinition { } } - pub fn with_author_handle(&mut self, value: String) -> &mut Self { + pub fn author_handle(&mut self, value: String) -> &mut Self { self.author_handle = Some(value); self } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_description(&mut self, value: Option) -> &mut Self { + pub fn description(&mut self, value: Option) -> &mut Self { self.description = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_is_read_only(&mut self, value: bool) -> &mut Self { + pub fn is_read_only(&mut self, value: bool) -> &mut Self { self.is_read_only = Some(value); self } - pub fn with_layout_type( + pub fn layout_type( &mut self, value: crate::datadogV1::model::DashboardLayoutType, ) -> &mut Self { @@ -89,21 +89,22 @@ impl DashboardSummaryDefinition { self } - pub fn with_modified_at(&mut self, value: String) -> &mut Self { + pub fn modified_at(&mut self, value: String) -> &mut Self { self.modified_at = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_url(&mut self, value: String) -> &mut Self { + pub fn url(&mut self, value: String) -> &mut Self { self.url = Some(value); self } } + impl Default for DashboardSummaryDefinition { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_dashboard_template_variable.rs b/src/datadogV1/model/model_dashboard_template_variable.rs index 9a38de8d0..ca970bd59 100644 --- a/src/datadogV1/model/model_dashboard_template_variable.rs +++ b/src/datadogV1/model/model_dashboard_template_variable.rs @@ -47,25 +47,25 @@ impl DashboardTemplateVariable { } #[allow(deprecated)] - pub fn with_available_values(&mut self, value: Option>) -> &mut Self { + pub fn available_values(&mut self, value: Option>) -> &mut Self { self.available_values = Some(value); self } #[allow(deprecated)] - pub fn with_default(&mut self, value: Option) -> &mut Self { + pub fn default(&mut self, value: Option) -> &mut Self { self.default = Some(value); self } #[allow(deprecated)] - pub fn with_defaults(&mut self, value: Vec) -> &mut Self { + pub fn defaults(&mut self, value: Vec) -> &mut Self { self.defaults = Some(value); self } #[allow(deprecated)] - pub fn with_prefix(&mut self, value: Option) -> &mut Self { + pub fn prefix(&mut self, value: Option) -> &mut Self { self.prefix = Some(value); self } diff --git a/src/datadogV1/model/model_dashboard_template_variable_preset.rs b/src/datadogV1/model/model_dashboard_template_variable_preset.rs index 7d3c21de6..7347dcb30 100644 --- a/src/datadogV1/model/model_dashboard_template_variable_preset.rs +++ b/src/datadogV1/model/model_dashboard_template_variable_preset.rs @@ -25,12 +25,12 @@ impl DashboardTemplateVariablePreset { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_template_variables( + pub fn template_variables( &mut self, value: Vec, ) -> &mut Self { @@ -38,6 +38,7 @@ impl DashboardTemplateVariablePreset { self } } + impl Default for DashboardTemplateVariablePreset { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_dashboard_template_variable_preset_value.rs b/src/datadogV1/model/model_dashboard_template_variable_preset_value.rs index 3a89d88be..c38424925 100644 --- a/src/datadogV1/model/model_dashboard_template_variable_preset_value.rs +++ b/src/datadogV1/model/model_dashboard_template_variable_preset_value.rs @@ -31,23 +31,24 @@ impl DashboardTemplateVariablePresetValue { } #[allow(deprecated)] - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } #[allow(deprecated)] - pub fn with_value(&mut self, value: String) -> &mut Self { + pub fn value(&mut self, value: String) -> &mut Self { self.value = Some(value); self } #[allow(deprecated)] - pub fn with_values(&mut self, value: Vec) -> &mut Self { + pub fn values(&mut self, value: Vec) -> &mut Self { self.values = Some(value); self } } + impl Default for DashboardTemplateVariablePresetValue { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_delete_shared_dashboard_response.rs b/src/datadogV1/model/model_delete_shared_dashboard_response.rs index 330c30aea..f94faba72 100644 --- a/src/datadogV1/model/model_delete_shared_dashboard_response.rs +++ b/src/datadogV1/model/model_delete_shared_dashboard_response.rs @@ -20,11 +20,12 @@ impl DeleteSharedDashboardResponse { } } - pub fn with_deleted_public_dashboard_token(&mut self, value: String) -> &mut Self { + pub fn deleted_public_dashboard_token(&mut self, value: String) -> &mut Self { self.deleted_public_dashboard_token = Some(value); self } } + impl Default for DeleteSharedDashboardResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_deleted_monitor.rs b/src/datadogV1/model/model_deleted_monitor.rs index db013f97f..9bab5a937 100644 --- a/src/datadogV1/model/model_deleted_monitor.rs +++ b/src/datadogV1/model/model_deleted_monitor.rs @@ -20,11 +20,12 @@ impl DeletedMonitor { } } - pub fn with_deleted_monitor_id(&mut self, value: i64) -> &mut Self { + pub fn deleted_monitor_id(&mut self, value: i64) -> &mut Self { self.deleted_monitor_id = Some(value); self } } + impl Default for DeletedMonitor { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_distribution_points_series.rs b/src/datadogV1/model/model_distribution_points_series.rs index 92c352dcd..5c167f3f2 100644 --- a/src/datadogV1/model/model_distribution_points_series.rs +++ b/src/datadogV1/model/model_distribution_points_series.rs @@ -39,20 +39,17 @@ impl DistributionPointsSeries { } } - pub fn with_host(&mut self, value: String) -> &mut Self { + pub fn host(&mut self, value: String) -> &mut Self { self.host = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_type_( - &mut self, - value: crate::datadogV1::model::DistributionPointsType, - ) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV1::model::DistributionPointsType) -> &mut Self { self.type_ = Some(value); self } diff --git a/src/datadogV1/model/model_distribution_widget_definition.rs b/src/datadogV1/model/model_distribution_widget_definition.rs index a460d3a24..73701cc51 100644 --- a/src/datadogV1/model/model_distribution_widget_definition.rs +++ b/src/datadogV1/model/model_distribution_widget_definition.rs @@ -76,7 +76,7 @@ impl DistributionWidgetDefinition { } #[allow(deprecated)] - pub fn with_custom_links( + pub fn custom_links( &mut self, value: Vec, ) -> &mut Self { @@ -85,64 +85,55 @@ impl DistributionWidgetDefinition { } #[allow(deprecated)] - pub fn with_legend_size(&mut self, value: String) -> &mut Self { + pub fn legend_size(&mut self, value: String) -> &mut Self { self.legend_size = Some(value); self } #[allow(deprecated)] - pub fn with_markers(&mut self, value: Vec) -> &mut Self { + pub fn markers(&mut self, value: Vec) -> &mut Self { self.markers = Some(value); self } #[allow(deprecated)] - pub fn with_show_legend(&mut self, value: bool) -> &mut Self { + pub fn show_legend(&mut self, value: bool) -> &mut Self { self.show_legend = Some(value); self } #[allow(deprecated)] - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } #[allow(deprecated)] - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } #[allow(deprecated)] - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } #[allow(deprecated)] - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } #[allow(deprecated)] - pub fn with_xaxis( - &mut self, - value: crate::datadogV1::model::DistributionWidgetXAxis, - ) -> &mut Self { + pub fn xaxis(&mut self, value: crate::datadogV1::model::DistributionWidgetXAxis) -> &mut Self { self.xaxis = Some(value); self } #[allow(deprecated)] - pub fn with_yaxis( - &mut self, - value: crate::datadogV1::model::DistributionWidgetYAxis, - ) -> &mut Self { + pub fn yaxis(&mut self, value: crate::datadogV1::model::DistributionWidgetYAxis) -> &mut Self { self.yaxis = Some(value); self } diff --git a/src/datadogV1/model/model_distribution_widget_histogram_request_query.rs b/src/datadogV1/model/model_distribution_widget_histogram_request_query.rs index b7ea134a4..04ef7e8ee 100644 --- a/src/datadogV1/model/model_distribution_widget_histogram_request_query.rs +++ b/src/datadogV1/model/model_distribution_widget_histogram_request_query.rs @@ -8,12 +8,12 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum DistributionWidgetHistogramRequestQuery { FormulaAndFunctionMetricQueryDefinition( - crate::datadogV1::model::FormulaAndFunctionMetricQueryDefinition, + Box, ), FormulaAndFunctionEventQueryDefinition( - crate::datadogV1::model::FormulaAndFunctionEventQueryDefinition, + Box, ), FormulaAndFunctionApmResourceStatsQueryDefinition( - crate::datadogV1::model::FormulaAndFunctionApmResourceStatsQueryDefinition, + Box, ), } diff --git a/src/datadogV1/model/model_distribution_widget_request.rs b/src/datadogV1/model/model_distribution_widget_request.rs index d8b2abf07..1d969d807 100644 --- a/src/datadogV1/model/model_distribution_widget_request.rs +++ b/src/datadogV1/model/model_distribution_widget_request.rs @@ -68,15 +68,12 @@ impl DistributionWidgetRequest { } } - pub fn with_apm_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.apm_query = Some(value); self } - pub fn with_apm_stats_query( + pub fn apm_stats_query( &mut self, value: crate::datadogV1::model::ApmStatsQueryDefinition, ) -> &mut Self { @@ -84,23 +81,17 @@ impl DistributionWidgetRequest { self } - pub fn with_event_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn event_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.event_query = Some(value); self } - pub fn with_log_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.log_query = Some(value); self } - pub fn with_network_query( + pub fn network_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -108,7 +99,7 @@ impl DistributionWidgetRequest { self } - pub fn with_process_query( + pub fn process_query( &mut self, value: crate::datadogV1::model::ProcessQueryDefinition, ) -> &mut Self { @@ -116,7 +107,7 @@ impl DistributionWidgetRequest { self } - pub fn with_profile_metrics_query( + pub fn profile_metrics_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -124,12 +115,12 @@ impl DistributionWidgetRequest { self } - pub fn with_q(&mut self, value: String) -> &mut Self { + pub fn q(&mut self, value: String) -> &mut Self { self.q = Some(value); self } - pub fn with_query( + pub fn query( &mut self, value: crate::datadogV1::model::DistributionWidgetHistogramRequestQuery, ) -> &mut Self { @@ -137,7 +128,7 @@ impl DistributionWidgetRequest { self } - pub fn with_request_type( + pub fn request_type( &mut self, value: crate::datadogV1::model::DistributionWidgetHistogramRequestType, ) -> &mut Self { @@ -145,15 +136,12 @@ impl DistributionWidgetRequest { self } - pub fn with_rum_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.rum_query = Some(value); self } - pub fn with_security_query( + pub fn security_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -161,11 +149,12 @@ impl DistributionWidgetRequest { self } - pub fn with_style(&mut self, value: crate::datadogV1::model::WidgetStyle) -> &mut Self { + pub fn style(&mut self, value: crate::datadogV1::model::WidgetStyle) -> &mut Self { self.style = Some(value); self } } + impl Default for DistributionWidgetRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_distribution_widget_x_axis.rs b/src/datadogV1/model/model_distribution_widget_x_axis.rs index 0915df028..272006f0c 100644 --- a/src/datadogV1/model/model_distribution_widget_x_axis.rs +++ b/src/datadogV1/model/model_distribution_widget_x_axis.rs @@ -32,26 +32,27 @@ impl DistributionWidgetXAxis { } } - pub fn with_include_zero(&mut self, value: bool) -> &mut Self { + pub fn include_zero(&mut self, value: bool) -> &mut Self { self.include_zero = Some(value); self } - pub fn with_max(&mut self, value: String) -> &mut Self { + pub fn max(&mut self, value: String) -> &mut Self { self.max = Some(value); self } - pub fn with_min(&mut self, value: String) -> &mut Self { + pub fn min(&mut self, value: String) -> &mut Self { self.min = Some(value); self } - pub fn with_scale(&mut self, value: String) -> &mut Self { + pub fn scale(&mut self, value: String) -> &mut Self { self.scale = Some(value); self } } + impl Default for DistributionWidgetXAxis { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_distribution_widget_y_axis.rs b/src/datadogV1/model/model_distribution_widget_y_axis.rs index e7a2ada87..8ec7d251f 100644 --- a/src/datadogV1/model/model_distribution_widget_y_axis.rs +++ b/src/datadogV1/model/model_distribution_widget_y_axis.rs @@ -36,31 +36,32 @@ impl DistributionWidgetYAxis { } } - pub fn with_include_zero(&mut self, value: bool) -> &mut Self { + pub fn include_zero(&mut self, value: bool) -> &mut Self { self.include_zero = Some(value); self } - pub fn with_label(&mut self, value: String) -> &mut Self { + pub fn label(&mut self, value: String) -> &mut Self { self.label = Some(value); self } - pub fn with_max(&mut self, value: String) -> &mut Self { + pub fn max(&mut self, value: String) -> &mut Self { self.max = Some(value); self } - pub fn with_min(&mut self, value: String) -> &mut Self { + pub fn min(&mut self, value: String) -> &mut Self { self.min = Some(value); self } - pub fn with_scale(&mut self, value: String) -> &mut Self { + pub fn scale(&mut self, value: String) -> &mut Self { self.scale = Some(value); self } } + impl Default for DistributionWidgetYAxis { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_downtime.rs b/src/datadogV1/model/model_downtime.rs index dff4fddf4..5d4899672 100644 --- a/src/datadogV1/model/model_downtime.rs +++ b/src/datadogV1/model/model_downtime.rs @@ -142,12 +142,12 @@ impl Downtime { } } - pub fn with_active(&mut self, value: bool) -> &mut Self { + pub fn active(&mut self, value: bool) -> &mut Self { self.active = Some(value); self } - pub fn with_active_child( + pub fn active_child( &mut self, value: Option, ) -> &mut Self { @@ -155,57 +155,57 @@ impl Downtime { self } - pub fn with_canceled(&mut self, value: Option) -> &mut Self { + pub fn canceled(&mut self, value: Option) -> &mut Self { self.canceled = Some(value); self } - pub fn with_creator_id(&mut self, value: i32) -> &mut Self { + pub fn creator_id(&mut self, value: i32) -> &mut Self { self.creator_id = Some(value); self } - pub fn with_disabled(&mut self, value: bool) -> &mut Self { + pub fn disabled(&mut self, value: bool) -> &mut Self { self.disabled = Some(value); self } - pub fn with_downtime_type(&mut self, value: i32) -> &mut Self { + pub fn downtime_type(&mut self, value: i32) -> &mut Self { self.downtime_type = Some(value); self } - pub fn with_end(&mut self, value: Option) -> &mut Self { + pub fn end(&mut self, value: Option) -> &mut Self { self.end = Some(value); self } - pub fn with_id(&mut self, value: i64) -> &mut Self { + pub fn id(&mut self, value: i64) -> &mut Self { self.id = Some(value); self } - pub fn with_message(&mut self, value: Option) -> &mut Self { + pub fn message(&mut self, value: Option) -> &mut Self { self.message = Some(value); self } - pub fn with_monitor_id(&mut self, value: Option) -> &mut Self { + pub fn monitor_id(&mut self, value: Option) -> &mut Self { self.monitor_id = Some(value); self } - pub fn with_monitor_tags(&mut self, value: Vec) -> &mut Self { + pub fn monitor_tags(&mut self, value: Vec) -> &mut Self { self.monitor_tags = Some(value); self } - pub fn with_mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { + pub fn mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { self.mute_first_recovery_notification = Some(value); self } - pub fn with_notify_end_states( + pub fn notify_end_states( &mut self, value: Vec, ) -> &mut Self { @@ -213,7 +213,7 @@ impl Downtime { self } - pub fn with_notify_end_types( + pub fn notify_end_types( &mut self, value: Vec, ) -> &mut Self { @@ -221,12 +221,12 @@ impl Downtime { self } - pub fn with_parent_id(&mut self, value: Option) -> &mut Self { + pub fn parent_id(&mut self, value: Option) -> &mut Self { self.parent_id = Some(value); self } - pub fn with_recurrence( + pub fn recurrence( &mut self, value: Option, ) -> &mut Self { @@ -234,26 +234,27 @@ impl Downtime { self } - pub fn with_scope(&mut self, value: Vec) -> &mut Self { + pub fn scope(&mut self, value: Vec) -> &mut Self { self.scope = Some(value); self } - pub fn with_start(&mut self, value: i64) -> &mut Self { + pub fn start(&mut self, value: i64) -> &mut Self { self.start = Some(value); self } - pub fn with_timezone(&mut self, value: String) -> &mut Self { + pub fn timezone(&mut self, value: String) -> &mut Self { self.timezone = Some(value); self } - pub fn with_updater_id(&mut self, value: Option) -> &mut Self { + pub fn updater_id(&mut self, value: Option) -> &mut Self { self.updater_id = Some(value); self } } + impl Default for Downtime { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_downtime_child.rs b/src/datadogV1/model/model_downtime_child.rs index 2a1b2ef8a..32e62c48d 100644 --- a/src/datadogV1/model/model_downtime_child.rs +++ b/src/datadogV1/model/model_downtime_child.rs @@ -131,62 +131,62 @@ impl DowntimeChild { } } - pub fn with_active(&mut self, value: bool) -> &mut Self { + pub fn active(&mut self, value: bool) -> &mut Self { self.active = Some(value); self } - pub fn with_canceled(&mut self, value: Option) -> &mut Self { + pub fn canceled(&mut self, value: Option) -> &mut Self { self.canceled = Some(value); self } - pub fn with_creator_id(&mut self, value: i32) -> &mut Self { + pub fn creator_id(&mut self, value: i32) -> &mut Self { self.creator_id = Some(value); self } - pub fn with_disabled(&mut self, value: bool) -> &mut Self { + pub fn disabled(&mut self, value: bool) -> &mut Self { self.disabled = Some(value); self } - pub fn with_downtime_type(&mut self, value: i32) -> &mut Self { + pub fn downtime_type(&mut self, value: i32) -> &mut Self { self.downtime_type = Some(value); self } - pub fn with_end(&mut self, value: Option) -> &mut Self { + pub fn end(&mut self, value: Option) -> &mut Self { self.end = Some(value); self } - pub fn with_id(&mut self, value: i64) -> &mut Self { + pub fn id(&mut self, value: i64) -> &mut Self { self.id = Some(value); self } - pub fn with_message(&mut self, value: Option) -> &mut Self { + pub fn message(&mut self, value: Option) -> &mut Self { self.message = Some(value); self } - pub fn with_monitor_id(&mut self, value: Option) -> &mut Self { + pub fn monitor_id(&mut self, value: Option) -> &mut Self { self.monitor_id = Some(value); self } - pub fn with_monitor_tags(&mut self, value: Vec) -> &mut Self { + pub fn monitor_tags(&mut self, value: Vec) -> &mut Self { self.monitor_tags = Some(value); self } - pub fn with_mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { + pub fn mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { self.mute_first_recovery_notification = Some(value); self } - pub fn with_notify_end_states( + pub fn notify_end_states( &mut self, value: Vec, ) -> &mut Self { @@ -194,7 +194,7 @@ impl DowntimeChild { self } - pub fn with_notify_end_types( + pub fn notify_end_types( &mut self, value: Vec, ) -> &mut Self { @@ -202,12 +202,12 @@ impl DowntimeChild { self } - pub fn with_parent_id(&mut self, value: Option) -> &mut Self { + pub fn parent_id(&mut self, value: Option) -> &mut Self { self.parent_id = Some(value); self } - pub fn with_recurrence( + pub fn recurrence( &mut self, value: Option, ) -> &mut Self { @@ -215,26 +215,27 @@ impl DowntimeChild { self } - pub fn with_scope(&mut self, value: Vec) -> &mut Self { + pub fn scope(&mut self, value: Vec) -> &mut Self { self.scope = Some(value); self } - pub fn with_start(&mut self, value: i64) -> &mut Self { + pub fn start(&mut self, value: i64) -> &mut Self { self.start = Some(value); self } - pub fn with_timezone(&mut self, value: String) -> &mut Self { + pub fn timezone(&mut self, value: String) -> &mut Self { self.timezone = Some(value); self } - pub fn with_updater_id(&mut self, value: Option) -> &mut Self { + pub fn updater_id(&mut self, value: Option) -> &mut Self { self.updater_id = Some(value); self } } + impl Default for DowntimeChild { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_downtime_recurrence.rs b/src/datadogV1/model/model_downtime_recurrence.rs index c34a0f061..2fc36ee96 100644 --- a/src/datadogV1/model/model_downtime_recurrence.rs +++ b/src/datadogV1/model/model_downtime_recurrence.rs @@ -61,36 +61,37 @@ impl DowntimeRecurrence { } } - pub fn with_period(&mut self, value: i32) -> &mut Self { + pub fn period(&mut self, value: i32) -> &mut Self { self.period = Some(value); self } - pub fn with_rrule(&mut self, value: String) -> &mut Self { + pub fn rrule(&mut self, value: String) -> &mut Self { self.rrule = Some(value); self } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } - pub fn with_until_date(&mut self, value: Option) -> &mut Self { + pub fn until_date(&mut self, value: Option) -> &mut Self { self.until_date = Some(value); self } - pub fn with_until_occurrences(&mut self, value: Option) -> &mut Self { + pub fn until_occurrences(&mut self, value: Option) -> &mut Self { self.until_occurrences = Some(value); self } - pub fn with_week_days(&mut self, value: Option>) -> &mut Self { + pub fn week_days(&mut self, value: Option>) -> &mut Self { self.week_days = Some(value); self } } + impl Default for DowntimeRecurrence { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_event.rs b/src/datadogV1/model/model_event.rs index facb8472c..8799f3e1b 100644 --- a/src/datadogV1/model/model_event.rs +++ b/src/datadogV1/model/model_event.rs @@ -80,74 +80,72 @@ impl Event { } } - pub fn with_alert_type(&mut self, value: crate::datadogV1::model::EventAlertType) -> &mut Self { + pub fn alert_type(&mut self, value: crate::datadogV1::model::EventAlertType) -> &mut Self { self.alert_type = Some(value); self } - pub fn with_date_happened(&mut self, value: i64) -> &mut Self { + pub fn date_happened(&mut self, value: i64) -> &mut Self { self.date_happened = Some(value); self } - pub fn with_device_name(&mut self, value: String) -> &mut Self { + pub fn device_name(&mut self, value: String) -> &mut Self { self.device_name = Some(value); self } - pub fn with_host(&mut self, value: String) -> &mut Self { + pub fn host(&mut self, value: String) -> &mut Self { self.host = Some(value); self } - pub fn with_id(&mut self, value: i64) -> &mut Self { + pub fn id(&mut self, value: i64) -> &mut Self { self.id = Some(value); self } - pub fn with_id_str(&mut self, value: String) -> &mut Self { + pub fn id_str(&mut self, value: String) -> &mut Self { self.id_str = Some(value); self } - pub fn with_payload(&mut self, value: String) -> &mut Self { + pub fn payload(&mut self, value: String) -> &mut Self { self.payload = Some(value); self } - pub fn with_priority( - &mut self, - value: Option, - ) -> &mut Self { + pub fn priority(&mut self, value: Option) -> &mut Self { self.priority = Some(value); self } - pub fn with_source_type_name(&mut self, value: String) -> &mut Self { + pub fn source_type_name(&mut self, value: String) -> &mut Self { self.source_type_name = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_text(&mut self, value: String) -> &mut Self { + pub fn text(&mut self, value: String) -> &mut Self { self.text = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_url(&mut self, value: String) -> &mut Self { + pub fn url(&mut self, value: String) -> &mut Self { self.url = Some(value); self } } + impl Default for Event { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_event_create_request.rs b/src/datadogV1/model/model_event_create_request.rs index 1bb3ef35c..557c1e600 100644 --- a/src/datadogV1/model/model_event_create_request.rs +++ b/src/datadogV1/model/model_event_create_request.rs @@ -72,50 +72,47 @@ impl EventCreateRequest { } } - pub fn with_aggregation_key(&mut self, value: String) -> &mut Self { + pub fn aggregation_key(&mut self, value: String) -> &mut Self { self.aggregation_key = Some(value); self } - pub fn with_alert_type(&mut self, value: crate::datadogV1::model::EventAlertType) -> &mut Self { + pub fn alert_type(&mut self, value: crate::datadogV1::model::EventAlertType) -> &mut Self { self.alert_type = Some(value); self } - pub fn with_date_happened(&mut self, value: i64) -> &mut Self { + pub fn date_happened(&mut self, value: i64) -> &mut Self { self.date_happened = Some(value); self } - pub fn with_device_name(&mut self, value: String) -> &mut Self { + pub fn device_name(&mut self, value: String) -> &mut Self { self.device_name = Some(value); self } - pub fn with_host(&mut self, value: String) -> &mut Self { + pub fn host(&mut self, value: String) -> &mut Self { self.host = Some(value); self } - pub fn with_priority( - &mut self, - value: Option, - ) -> &mut Self { + pub fn priority(&mut self, value: Option) -> &mut Self { self.priority = Some(value); self } - pub fn with_related_event_id(&mut self, value: i64) -> &mut Self { + pub fn related_event_id(&mut self, value: i64) -> &mut Self { self.related_event_id = Some(value); self } - pub fn with_source_type_name(&mut self, value: String) -> &mut Self { + pub fn source_type_name(&mut self, value: String) -> &mut Self { self.source_type_name = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } diff --git a/src/datadogV1/model/model_event_create_response.rs b/src/datadogV1/model/model_event_create_response.rs index 579ba359a..f56003510 100644 --- a/src/datadogV1/model/model_event_create_response.rs +++ b/src/datadogV1/model/model_event_create_response.rs @@ -24,16 +24,17 @@ impl EventCreateResponse { } } - pub fn with_event(&mut self, value: crate::datadogV1::model::Event) -> &mut Self { + pub fn event(&mut self, value: crate::datadogV1::model::Event) -> &mut Self { self.event = Some(value); self } - pub fn with_status(&mut self, value: String) -> &mut Self { + pub fn status(&mut self, value: String) -> &mut Self { self.status = Some(value); self } } + impl Default for EventCreateResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_event_list_response.rs b/src/datadogV1/model/model_event_list_response.rs index 3c27f9bd3..75e9ef999 100644 --- a/src/datadogV1/model/model_event_list_response.rs +++ b/src/datadogV1/model/model_event_list_response.rs @@ -24,16 +24,17 @@ impl EventListResponse { } } - pub fn with_events(&mut self, value: Vec) -> &mut Self { + pub fn events(&mut self, value: Vec) -> &mut Self { self.events = Some(value); self } - pub fn with_status(&mut self, value: String) -> &mut Self { + pub fn status(&mut self, value: String) -> &mut Self { self.status = Some(value); self } } + impl Default for EventListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_event_response.rs b/src/datadogV1/model/model_event_response.rs index edd4b26c8..d789a8273 100644 --- a/src/datadogV1/model/model_event_response.rs +++ b/src/datadogV1/model/model_event_response.rs @@ -24,16 +24,17 @@ impl EventResponse { } } - pub fn with_event(&mut self, value: crate::datadogV1::model::Event) -> &mut Self { + pub fn event(&mut self, value: crate::datadogV1::model::Event) -> &mut Self { self.event = Some(value); self } - pub fn with_status(&mut self, value: String) -> &mut Self { + pub fn status(&mut self, value: String) -> &mut Self { self.status = Some(value); self } } + impl Default for EventResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_event_stream_widget_definition.rs b/src/datadogV1/model/model_event_stream_widget_definition.rs index 6a39aefef..d402e0d23 100644 --- a/src/datadogV1/model/model_event_stream_widget_definition.rs +++ b/src/datadogV1/model/model_event_stream_widget_definition.rs @@ -52,38 +52,32 @@ impl EventStreamWidgetDefinition { } } - pub fn with_event_size( - &mut self, - value: crate::datadogV1::model::WidgetEventSize, - ) -> &mut Self { + pub fn event_size(&mut self, value: crate::datadogV1::model::WidgetEventSize) -> &mut Self { self.event_size = Some(value); self } - pub fn with_tags_execution(&mut self, value: String) -> &mut Self { + pub fn tags_execution(&mut self, value: String) -> &mut Self { self.tags_execution = Some(value); self } - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_event_timeline_widget_definition.rs b/src/datadogV1/model/model_event_timeline_widget_definition.rs index 3eb2b492c..e624c997c 100644 --- a/src/datadogV1/model/model_event_timeline_widget_definition.rs +++ b/src/datadogV1/model/model_event_timeline_widget_definition.rs @@ -47,30 +47,27 @@ impl EventTimelineWidgetDefinition { } } - pub fn with_tags_execution(&mut self, value: String) -> &mut Self { + pub fn tags_execution(&mut self, value: String) -> &mut Self { self.tags_execution = Some(value); self } - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_formula_and_function_apm_dependency_stats_query_definition.rs b/src/datadogV1/model/model_formula_and_function_apm_dependency_stats_query_definition.rs index 0aff6729b..db3b6371e 100644 --- a/src/datadogV1/model/model_formula_and_function_apm_dependency_stats_query_definition.rs +++ b/src/datadogV1/model/model_formula_and_function_apm_dependency_stats_query_definition.rs @@ -64,17 +64,17 @@ impl FormulaAndFunctionApmDependencyStatsQueryDefinition { } } - pub fn with_is_upstream(&mut self, value: bool) -> &mut Self { + pub fn is_upstream(&mut self, value: bool) -> &mut Self { self.is_upstream = Some(value); self } - pub fn with_primary_tag_name(&mut self, value: String) -> &mut Self { + pub fn primary_tag_name(&mut self, value: String) -> &mut Self { self.primary_tag_name = Some(value); self } - pub fn with_primary_tag_value(&mut self, value: String) -> &mut Self { + pub fn primary_tag_value(&mut self, value: String) -> &mut Self { self.primary_tag_value = Some(value); self } diff --git a/src/datadogV1/model/model_formula_and_function_apm_resource_stats_query_definition.rs b/src/datadogV1/model/model_formula_and_function_apm_resource_stats_query_definition.rs index 62a41087a..9eaa68b19 100644 --- a/src/datadogV1/model/model_formula_and_function_apm_resource_stats_query_definition.rs +++ b/src/datadogV1/model/model_formula_and_function_apm_resource_stats_query_definition.rs @@ -62,27 +62,27 @@ impl FormulaAndFunctionApmResourceStatsQueryDefinition { } } - pub fn with_group_by(&mut self, value: Vec) -> &mut Self { + pub fn group_by(&mut self, value: Vec) -> &mut Self { self.group_by = Some(value); self } - pub fn with_operation_name(&mut self, value: String) -> &mut Self { + pub fn operation_name(&mut self, value: String) -> &mut Self { self.operation_name = Some(value); self } - pub fn with_primary_tag_name(&mut self, value: String) -> &mut Self { + pub fn primary_tag_name(&mut self, value: String) -> &mut Self { self.primary_tag_name = Some(value); self } - pub fn with_primary_tag_value(&mut self, value: String) -> &mut Self { + pub fn primary_tag_value(&mut self, value: String) -> &mut Self { self.primary_tag_value = Some(value); self } - pub fn with_resource_name(&mut self, value: String) -> &mut Self { + pub fn resource_name(&mut self, value: String) -> &mut Self { self.resource_name = Some(value); self } diff --git a/src/datadogV1/model/model_formula_and_function_cloud_cost_query_definition.rs b/src/datadogV1/model/model_formula_and_function_cloud_cost_query_definition.rs index 5f639a83d..5b1bd3853 100644 --- a/src/datadogV1/model/model_formula_and_function_cloud_cost_query_definition.rs +++ b/src/datadogV1/model/model_formula_and_function_cloud_cost_query_definition.rs @@ -36,10 +36,7 @@ impl FormulaAndFunctionCloudCostQueryDefinition { } } - pub fn with_aggregator( - &mut self, - value: crate::datadogV1::model::WidgetAggregator, - ) -> &mut Self { + pub fn aggregator(&mut self, value: crate::datadogV1::model::WidgetAggregator) -> &mut Self { self.aggregator = Some(value); self } diff --git a/src/datadogV1/model/model_formula_and_function_event_query_definition.rs b/src/datadogV1/model/model_formula_and_function_event_query_definition.rs index e3eafdda0..b91de6822 100644 --- a/src/datadogV1/model/model_formula_and_function_event_query_definition.rs +++ b/src/datadogV1/model/model_formula_and_function_event_query_definition.rs @@ -48,7 +48,7 @@ impl FormulaAndFunctionEventQueryDefinition { } } - pub fn with_group_by( + pub fn group_by( &mut self, value: Vec, ) -> &mut Self { @@ -56,12 +56,12 @@ impl FormulaAndFunctionEventQueryDefinition { self } - pub fn with_indexes(&mut self, value: Vec) -> &mut Self { + pub fn indexes(&mut self, value: Vec) -> &mut Self { self.indexes = Some(value); self } - pub fn with_search( + pub fn search( &mut self, value: crate::datadogV1::model::FormulaAndFunctionEventQueryDefinitionSearch, ) -> &mut Self { @@ -69,7 +69,7 @@ impl FormulaAndFunctionEventQueryDefinition { self } - pub fn with_storage(&mut self, value: String) -> &mut Self { + pub fn storage(&mut self, value: String) -> &mut Self { self.storage = Some(value); self } diff --git a/src/datadogV1/model/model_formula_and_function_event_query_definition_compute.rs b/src/datadogV1/model/model_formula_and_function_event_query_definition_compute.rs index d385f857b..52910dd17 100644 --- a/src/datadogV1/model/model_formula_and_function_event_query_definition_compute.rs +++ b/src/datadogV1/model/model_formula_and_function_event_query_definition_compute.rs @@ -30,12 +30,12 @@ impl FormulaAndFunctionEventQueryDefinitionCompute { } } - pub fn with_interval(&mut self, value: i64) -> &mut Self { + pub fn interval(&mut self, value: i64) -> &mut Self { self.interval = Some(value); self } - pub fn with_metric(&mut self, value: String) -> &mut Self { + pub fn metric(&mut self, value: String) -> &mut Self { self.metric = Some(value); self } diff --git a/src/datadogV1/model/model_formula_and_function_event_query_group_by.rs b/src/datadogV1/model/model_formula_and_function_event_query_group_by.rs index f8ca18dea..8194a1ffb 100644 --- a/src/datadogV1/model/model_formula_and_function_event_query_group_by.rs +++ b/src/datadogV1/model/model_formula_and_function_event_query_group_by.rs @@ -28,12 +28,12 @@ impl FormulaAndFunctionEventQueryGroupBy { } } - pub fn with_limit(&mut self, value: i64) -> &mut Self { + pub fn limit(&mut self, value: i64) -> &mut Self { self.limit = Some(value); self } - pub fn with_sort( + pub fn sort( &mut self, value: crate::datadogV1::model::FormulaAndFunctionEventQueryGroupBySort, ) -> &mut Self { diff --git a/src/datadogV1/model/model_formula_and_function_event_query_group_by_sort.rs b/src/datadogV1/model/model_formula_and_function_event_query_group_by_sort.rs index b39bdb81d..696bc797a 100644 --- a/src/datadogV1/model/model_formula_and_function_event_query_group_by_sort.rs +++ b/src/datadogV1/model/model_formula_and_function_event_query_group_by_sort.rs @@ -30,12 +30,12 @@ impl FormulaAndFunctionEventQueryGroupBySort { } } - pub fn with_metric(&mut self, value: String) -> &mut Self { + pub fn metric(&mut self, value: String) -> &mut Self { self.metric = Some(value); self } - pub fn with_order(&mut self, value: crate::datadogV1::model::QuerySortOrder) -> &mut Self { + pub fn order(&mut self, value: crate::datadogV1::model::QuerySortOrder) -> &mut Self { self.order = Some(value); self } diff --git a/src/datadogV1/model/model_formula_and_function_metric_query_definition.rs b/src/datadogV1/model/model_formula_and_function_metric_query_definition.rs index b26d94ca0..1865d8662 100644 --- a/src/datadogV1/model/model_formula_and_function_metric_query_definition.rs +++ b/src/datadogV1/model/model_formula_and_function_metric_query_definition.rs @@ -36,7 +36,7 @@ impl FormulaAndFunctionMetricQueryDefinition { } } - pub fn with_aggregator( + pub fn aggregator( &mut self, value: crate::datadogV1::model::FormulaAndFunctionMetricAggregation, ) -> &mut Self { diff --git a/src/datadogV1/model/model_formula_and_function_process_query_definition.rs b/src/datadogV1/model/model_formula_and_function_process_query_definition.rs index f7605d15a..7ac024027 100644 --- a/src/datadogV1/model/model_formula_and_function_process_query_definition.rs +++ b/src/datadogV1/model/model_formula_and_function_process_query_definition.rs @@ -56,7 +56,7 @@ impl FormulaAndFunctionProcessQueryDefinition { } } - pub fn with_aggregator( + pub fn aggregator( &mut self, value: crate::datadogV1::model::FormulaAndFunctionMetricAggregation, ) -> &mut Self { @@ -64,27 +64,27 @@ impl FormulaAndFunctionProcessQueryDefinition { self } - pub fn with_is_normalized_cpu(&mut self, value: bool) -> &mut Self { + pub fn is_normalized_cpu(&mut self, value: bool) -> &mut Self { self.is_normalized_cpu = Some(value); self } - pub fn with_limit(&mut self, value: i64) -> &mut Self { + pub fn limit(&mut self, value: i64) -> &mut Self { self.limit = Some(value); self } - pub fn with_sort(&mut self, value: crate::datadogV1::model::QuerySortOrder) -> &mut Self { + pub fn sort(&mut self, value: crate::datadogV1::model::QuerySortOrder) -> &mut Self { self.sort = Some(value); self } - pub fn with_tag_filters(&mut self, value: Vec) -> &mut Self { + pub fn tag_filters(&mut self, value: Vec) -> &mut Self { self.tag_filters = Some(value); self } - pub fn with_text_filter(&mut self, value: String) -> &mut Self { + pub fn text_filter(&mut self, value: String) -> &mut Self { self.text_filter = Some(value); self } diff --git a/src/datadogV1/model/model_formula_and_function_query_definition.rs b/src/datadogV1/model/model_formula_and_function_query_definition.rs index bbe33f2f6..9a921427d 100644 --- a/src/datadogV1/model/model_formula_and_function_query_definition.rs +++ b/src/datadogV1/model/model_formula_and_function_query_definition.rs @@ -8,24 +8,24 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum FormulaAndFunctionQueryDefinition { FormulaAndFunctionMetricQueryDefinition( - crate::datadogV1::model::FormulaAndFunctionMetricQueryDefinition, + Box, ), FormulaAndFunctionEventQueryDefinition( - crate::datadogV1::model::FormulaAndFunctionEventQueryDefinition, + Box, ), FormulaAndFunctionProcessQueryDefinition( - crate::datadogV1::model::FormulaAndFunctionProcessQueryDefinition, + Box, ), FormulaAndFunctionApmDependencyStatsQueryDefinition( - crate::datadogV1::model::FormulaAndFunctionApmDependencyStatsQueryDefinition, + Box, ), FormulaAndFunctionApmResourceStatsQueryDefinition( - crate::datadogV1::model::FormulaAndFunctionApmResourceStatsQueryDefinition, + Box, ), FormulaAndFunctionSLOQueryDefinition( - crate::datadogV1::model::FormulaAndFunctionSLOQueryDefinition, + Box, ), FormulaAndFunctionCloudCostQueryDefinition( - crate::datadogV1::model::FormulaAndFunctionCloudCostQueryDefinition, + Box, ), } diff --git a/src/datadogV1/model/model_formula_and_function_slo_query_definition.rs b/src/datadogV1/model/model_formula_and_function_slo_query_definition.rs index 942421a47..463e08a22 100644 --- a/src/datadogV1/model/model_formula_and_function_slo_query_definition.rs +++ b/src/datadogV1/model/model_formula_and_function_slo_query_definition.rs @@ -48,12 +48,12 @@ impl FormulaAndFunctionSLOQueryDefinition { } } - pub fn with_additional_query_filters(&mut self, value: String) -> &mut Self { + pub fn additional_query_filters(&mut self, value: String) -> &mut Self { self.additional_query_filters = Some(value); self } - pub fn with_group_mode( + pub fn group_mode( &mut self, value: crate::datadogV1::model::FormulaAndFunctionSLOGroupMode, ) -> &mut Self { @@ -61,12 +61,12 @@ impl FormulaAndFunctionSLOQueryDefinition { self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_slo_query_type( + pub fn slo_query_type( &mut self, value: crate::datadogV1::model::FormulaAndFunctionSLOQueryType, ) -> &mut Self { diff --git a/src/datadogV1/model/model_free_text_widget_definition.rs b/src/datadogV1/model/model_free_text_widget_definition.rs index c23de4ce5..e5cab0171 100644 --- a/src/datadogV1/model/model_free_text_widget_definition.rs +++ b/src/datadogV1/model/model_free_text_widget_definition.rs @@ -39,20 +39,17 @@ impl FreeTextWidgetDefinition { } } - pub fn with_color(&mut self, value: String) -> &mut Self { + pub fn color(&mut self, value: String) -> &mut Self { self.color = Some(value); self } - pub fn with_font_size(&mut self, value: String) -> &mut Self { + pub fn font_size(&mut self, value: String) -> &mut Self { self.font_size = Some(value); self } - pub fn with_text_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn text_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.text_align = Some(value); self } diff --git a/src/datadogV1/model/model_funnel_widget_definition.rs b/src/datadogV1/model/model_funnel_widget_definition.rs index d3b6f31a7..f43e8d851 100644 --- a/src/datadogV1/model/model_funnel_widget_definition.rs +++ b/src/datadogV1/model/model_funnel_widget_definition.rs @@ -44,25 +44,22 @@ impl FunnelWidgetDefinition { } } - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_gcp_account.rs b/src/datadogV1/model/model_gcp_account.rs index 5668f522a..eaf0ad206 100644 --- a/src/datadogV1/model/model_gcp_account.rs +++ b/src/datadogV1/model/model_gcp_account.rs @@ -82,86 +82,87 @@ impl GCPAccount { } } - pub fn with_auth_provider_x509_cert_url(&mut self, value: String) -> &mut Self { + pub fn auth_provider_x509_cert_url(&mut self, value: String) -> &mut Self { self.auth_provider_x509_cert_url = Some(value); self } - pub fn with_auth_uri(&mut self, value: String) -> &mut Self { + pub fn auth_uri(&mut self, value: String) -> &mut Self { self.auth_uri = Some(value); self } - pub fn with_automute(&mut self, value: bool) -> &mut Self { + pub fn automute(&mut self, value: bool) -> &mut Self { self.automute = Some(value); self } - pub fn with_client_email(&mut self, value: String) -> &mut Self { + pub fn client_email(&mut self, value: String) -> &mut Self { self.client_email = Some(value); self } - pub fn with_client_id(&mut self, value: String) -> &mut Self { + pub fn client_id(&mut self, value: String) -> &mut Self { self.client_id = Some(value); self } - pub fn with_client_x509_cert_url(&mut self, value: String) -> &mut Self { + pub fn client_x509_cert_url(&mut self, value: String) -> &mut Self { self.client_x509_cert_url = Some(value); self } - pub fn with_errors(&mut self, value: Vec) -> &mut Self { + pub fn errors(&mut self, value: Vec) -> &mut Self { self.errors = Some(value); self } - pub fn with_host_filters(&mut self, value: String) -> &mut Self { + pub fn host_filters(&mut self, value: String) -> &mut Self { self.host_filters = Some(value); self } - pub fn with_is_cspm_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_cspm_enabled(&mut self, value: bool) -> &mut Self { self.is_cspm_enabled = Some(value); self } - pub fn with_is_security_command_center_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_security_command_center_enabled(&mut self, value: bool) -> &mut Self { self.is_security_command_center_enabled = Some(value); self } - pub fn with_private_key(&mut self, value: String) -> &mut Self { + pub fn private_key(&mut self, value: String) -> &mut Self { self.private_key = Some(value); self } - pub fn with_private_key_id(&mut self, value: String) -> &mut Self { + pub fn private_key_id(&mut self, value: String) -> &mut Self { self.private_key_id = Some(value); self } - pub fn with_project_id(&mut self, value: String) -> &mut Self { + pub fn project_id(&mut self, value: String) -> &mut Self { self.project_id = Some(value); self } - pub fn with_resource_collection_enabled(&mut self, value: bool) -> &mut Self { + pub fn resource_collection_enabled(&mut self, value: bool) -> &mut Self { self.resource_collection_enabled = Some(value); self } - pub fn with_token_uri(&mut self, value: String) -> &mut Self { + pub fn token_uri(&mut self, value: String) -> &mut Self { self.token_uri = Some(value); self } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } } + impl Default for GCPAccount { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_geomap_widget_definition.rs b/src/datadogV1/model/model_geomap_widget_definition.rs index e169cbd19..dd24d4a94 100644 --- a/src/datadogV1/model/model_geomap_widget_definition.rs +++ b/src/datadogV1/model/model_geomap_widget_definition.rs @@ -60,7 +60,7 @@ impl GeomapWidgetDefinition { } } - pub fn with_custom_links( + pub fn custom_links( &mut self, value: Vec, ) -> &mut Self { @@ -68,25 +68,22 @@ impl GeomapWidgetDefinition { self } - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_geomap_widget_request.rs b/src/datadogV1/model/model_geomap_widget_request.rs index 3fe9d12ec..7d6bdcb7d 100644 --- a/src/datadogV1/model/model_geomap_widget_request.rs +++ b/src/datadogV1/model/model_geomap_widget_request.rs @@ -52,36 +52,27 @@ impl GeomapWidgetRequest { } } - pub fn with_columns( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn columns(&mut self, value: Vec) -> &mut Self { self.columns = Some(value); self } - pub fn with_formulas( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn formulas(&mut self, value: Vec) -> &mut Self { self.formulas = Some(value); self } - pub fn with_log_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.log_query = Some(value); self } - pub fn with_q(&mut self, value: String) -> &mut Self { + pub fn q(&mut self, value: String) -> &mut Self { self.q = Some(value); self } - pub fn with_queries( + pub fn queries( &mut self, value: Vec, ) -> &mut Self { @@ -89,12 +80,12 @@ impl GeomapWidgetRequest { self } - pub fn with_query(&mut self, value: crate::datadogV1::model::ListStreamQuery) -> &mut Self { + pub fn query(&mut self, value: crate::datadogV1::model::ListStreamQuery) -> &mut Self { self.query = Some(value); self } - pub fn with_response_format( + pub fn response_format( &mut self, value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, ) -> &mut Self { @@ -102,15 +93,12 @@ impl GeomapWidgetRequest { self } - pub fn with_rum_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.rum_query = Some(value); self } - pub fn with_security_query( + pub fn security_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -118,6 +106,7 @@ impl GeomapWidgetRequest { self } } + impl Default for GeomapWidgetRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_graph_snapshot.rs b/src/datadogV1/model/model_graph_snapshot.rs index 920e5d445..f82d0defd 100644 --- a/src/datadogV1/model/model_graph_snapshot.rs +++ b/src/datadogV1/model/model_graph_snapshot.rs @@ -30,21 +30,22 @@ impl GraphSnapshot { } } - pub fn with_graph_def(&mut self, value: String) -> &mut Self { + pub fn graph_def(&mut self, value: String) -> &mut Self { self.graph_def = Some(value); self } - pub fn with_metric_query(&mut self, value: String) -> &mut Self { + pub fn metric_query(&mut self, value: String) -> &mut Self { self.metric_query = Some(value); self } - pub fn with_snapshot_url(&mut self, value: String) -> &mut Self { + pub fn snapshot_url(&mut self, value: String) -> &mut Self { self.snapshot_url = Some(value); self } } + impl Default for GraphSnapshot { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_group_widget_definition.rs b/src/datadogV1/model/model_group_widget_definition.rs index 615f70194..169e2761f 100644 --- a/src/datadogV1/model/model_group_widget_definition.rs +++ b/src/datadogV1/model/model_group_widget_definition.rs @@ -52,30 +52,27 @@ impl GroupWidgetDefinition { } } - pub fn with_background_color(&mut self, value: String) -> &mut Self { + pub fn background_color(&mut self, value: String) -> &mut Self { self.background_color = Some(value); self } - pub fn with_banner_img(&mut self, value: String) -> &mut Self { + pub fn banner_img(&mut self, value: String) -> &mut Self { self.banner_img = Some(value); self } - pub fn with_show_title(&mut self, value: bool) -> &mut Self { + pub fn show_title(&mut self, value: bool) -> &mut Self { self.show_title = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } diff --git a/src/datadogV1/model/model_heat_map_widget_definition.rs b/src/datadogV1/model/model_heat_map_widget_definition.rs index 70668c47d..2632a1681 100644 --- a/src/datadogV1/model/model_heat_map_widget_definition.rs +++ b/src/datadogV1/model/model_heat_map_widget_definition.rs @@ -63,7 +63,7 @@ impl HeatMapWidgetDefinition { } } - pub fn with_custom_links( + pub fn custom_links( &mut self, value: Vec, ) -> &mut Self { @@ -71,45 +71,42 @@ impl HeatMapWidgetDefinition { self } - pub fn with_events(&mut self, value: Vec) -> &mut Self { + pub fn events(&mut self, value: Vec) -> &mut Self { self.events = Some(value); self } - pub fn with_legend_size(&mut self, value: String) -> &mut Self { + pub fn legend_size(&mut self, value: String) -> &mut Self { self.legend_size = Some(value); self } - pub fn with_show_legend(&mut self, value: bool) -> &mut Self { + pub fn show_legend(&mut self, value: bool) -> &mut Self { self.show_legend = Some(value); self } - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } - pub fn with_yaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { + pub fn yaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { self.yaxis = Some(value); self } diff --git a/src/datadogV1/model/model_heat_map_widget_request.rs b/src/datadogV1/model/model_heat_map_widget_request.rs index 052bedf96..306cffdae 100644 --- a/src/datadogV1/model/model_heat_map_widget_request.rs +++ b/src/datadogV1/model/model_heat_map_widget_request.rs @@ -68,15 +68,12 @@ impl HeatMapWidgetRequest { } } - pub fn with_apm_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.apm_query = Some(value); self } - pub fn with_event_query( + pub fn event_query( &mut self, value: crate::datadogV1::model::EventQueryDefinition, ) -> &mut Self { @@ -84,23 +81,17 @@ impl HeatMapWidgetRequest { self } - pub fn with_formulas( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn formulas(&mut self, value: Vec) -> &mut Self { self.formulas = Some(value); self } - pub fn with_log_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.log_query = Some(value); self } - pub fn with_network_query( + pub fn network_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -108,7 +99,7 @@ impl HeatMapWidgetRequest { self } - pub fn with_process_query( + pub fn process_query( &mut self, value: crate::datadogV1::model::ProcessQueryDefinition, ) -> &mut Self { @@ -116,7 +107,7 @@ impl HeatMapWidgetRequest { self } - pub fn with_profile_metrics_query( + pub fn profile_metrics_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -124,12 +115,12 @@ impl HeatMapWidgetRequest { self } - pub fn with_q(&mut self, value: String) -> &mut Self { + pub fn q(&mut self, value: String) -> &mut Self { self.q = Some(value); self } - pub fn with_queries( + pub fn queries( &mut self, value: Vec, ) -> &mut Self { @@ -137,7 +128,7 @@ impl HeatMapWidgetRequest { self } - pub fn with_response_format( + pub fn response_format( &mut self, value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, ) -> &mut Self { @@ -145,15 +136,12 @@ impl HeatMapWidgetRequest { self } - pub fn with_rum_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.rum_query = Some(value); self } - pub fn with_security_query( + pub fn security_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -161,11 +149,12 @@ impl HeatMapWidgetRequest { self } - pub fn with_style(&mut self, value: crate::datadogV1::model::WidgetStyle) -> &mut Self { + pub fn style(&mut self, value: crate::datadogV1::model::WidgetStyle) -> &mut Self { self.style = Some(value); self } } + impl Default for HeatMapWidgetRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_host.rs b/src/datadogV1/model/model_host.rs index bc8adcf4f..7c5374750 100644 --- a/src/datadogV1/model/model_host.rs +++ b/src/datadogV1/model/model_host.rs @@ -76,67 +76,67 @@ impl Host { } } - pub fn with_aliases(&mut self, value: Vec) -> &mut Self { + pub fn aliases(&mut self, value: Vec) -> &mut Self { self.aliases = Some(value); self } - pub fn with_apps(&mut self, value: Vec) -> &mut Self { + pub fn apps(&mut self, value: Vec) -> &mut Self { self.apps = Some(value); self } - pub fn with_aws_name(&mut self, value: String) -> &mut Self { + pub fn aws_name(&mut self, value: String) -> &mut Self { self.aws_name = Some(value); self } - pub fn with_host_name(&mut self, value: String) -> &mut Self { + pub fn host_name(&mut self, value: String) -> &mut Self { self.host_name = Some(value); self } - pub fn with_id(&mut self, value: i64) -> &mut Self { + pub fn id(&mut self, value: i64) -> &mut Self { self.id = Some(value); self } - pub fn with_is_muted(&mut self, value: bool) -> &mut Self { + pub fn is_muted(&mut self, value: bool) -> &mut Self { self.is_muted = Some(value); self } - pub fn with_last_reported_time(&mut self, value: i64) -> &mut Self { + pub fn last_reported_time(&mut self, value: i64) -> &mut Self { self.last_reported_time = Some(value); self } - pub fn with_meta(&mut self, value: crate::datadogV1::model::HostMeta) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV1::model::HostMeta) -> &mut Self { self.meta = Some(value); self } - pub fn with_metrics(&mut self, value: crate::datadogV1::model::HostMetrics) -> &mut Self { + pub fn metrics(&mut self, value: crate::datadogV1::model::HostMetrics) -> &mut Self { self.metrics = Some(value); self } - pub fn with_mute_timeout(&mut self, value: Option) -> &mut Self { + pub fn mute_timeout(&mut self, value: Option) -> &mut Self { self.mute_timeout = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_sources(&mut self, value: Vec) -> &mut Self { + pub fn sources(&mut self, value: Vec) -> &mut Self { self.sources = Some(value); self } - pub fn with_tags_by_source( + pub fn tags_by_source( &mut self, value: std::collections::BTreeMap>, ) -> &mut Self { @@ -144,11 +144,12 @@ impl Host { self } - pub fn with_up(&mut self, value: bool) -> &mut Self { + pub fn up(&mut self, value: bool) -> &mut Self { self.up = Some(value); self } } + impl Default for Host { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_host_list_response.rs b/src/datadogV1/model/model_host_list_response.rs index 29083680a..031e6e58f 100644 --- a/src/datadogV1/model/model_host_list_response.rs +++ b/src/datadogV1/model/model_host_list_response.rs @@ -28,21 +28,22 @@ impl HostListResponse { } } - pub fn with_host_list(&mut self, value: Vec) -> &mut Self { + pub fn host_list(&mut self, value: Vec) -> &mut Self { self.host_list = Some(value); self } - pub fn with_total_matching(&mut self, value: i64) -> &mut Self { + pub fn total_matching(&mut self, value: i64) -> &mut Self { self.total_matching = Some(value); self } - pub fn with_total_returned(&mut self, value: i64) -> &mut Self { + pub fn total_returned(&mut self, value: i64) -> &mut Self { self.total_returned = Some(value); self } } + impl Default for HostListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_host_map_request.rs b/src/datadogV1/model/model_host_map_request.rs index 9085a218b..e83cc97ef 100644 --- a/src/datadogV1/model/model_host_map_request.rs +++ b/src/datadogV1/model/model_host_map_request.rs @@ -52,31 +52,22 @@ impl HostMapRequest { } } - pub fn with_apm_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.apm_query = Some(value); self } - pub fn with_event_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn event_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.event_query = Some(value); self } - pub fn with_log_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.log_query = Some(value); self } - pub fn with_network_query( + pub fn network_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -84,7 +75,7 @@ impl HostMapRequest { self } - pub fn with_process_query( + pub fn process_query( &mut self, value: crate::datadogV1::model::ProcessQueryDefinition, ) -> &mut Self { @@ -92,7 +83,7 @@ impl HostMapRequest { self } - pub fn with_profile_metrics_query( + pub fn profile_metrics_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -100,20 +91,17 @@ impl HostMapRequest { self } - pub fn with_q(&mut self, value: String) -> &mut Self { + pub fn q(&mut self, value: String) -> &mut Self { self.q = Some(value); self } - pub fn with_rum_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.rum_query = Some(value); self } - pub fn with_security_query( + pub fn security_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -121,6 +109,7 @@ impl HostMapRequest { self } } + impl Default for HostMapRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_host_map_widget_definition.rs b/src/datadogV1/model/model_host_map_widget_definition.rs index 7bf3c7e49..bcc188af8 100644 --- a/src/datadogV1/model/model_host_map_widget_definition.rs +++ b/src/datadogV1/model/model_host_map_widget_definition.rs @@ -71,7 +71,7 @@ impl HostMapWidgetDefinition { } } - pub fn with_custom_links( + pub fn custom_links( &mut self, value: Vec, ) -> &mut Self { @@ -79,37 +79,37 @@ impl HostMapWidgetDefinition { self } - pub fn with_group(&mut self, value: Vec) -> &mut Self { + pub fn group(&mut self, value: Vec) -> &mut Self { self.group = Some(value); self } - pub fn with_no_group_hosts(&mut self, value: bool) -> &mut Self { + pub fn no_group_hosts(&mut self, value: bool) -> &mut Self { self.no_group_hosts = Some(value); self } - pub fn with_no_metric_hosts(&mut self, value: bool) -> &mut Self { + pub fn no_metric_hosts(&mut self, value: bool) -> &mut Self { self.no_metric_hosts = Some(value); self } - pub fn with_node_type(&mut self, value: crate::datadogV1::model::WidgetNodeType) -> &mut Self { + pub fn node_type(&mut self, value: crate::datadogV1::model::WidgetNodeType) -> &mut Self { self.node_type = Some(value); self } - pub fn with_notes(&mut self, value: String) -> &mut Self { + pub fn notes(&mut self, value: String) -> &mut Self { self.notes = Some(value); self } - pub fn with_scope(&mut self, value: Vec) -> &mut Self { + pub fn scope(&mut self, value: Vec) -> &mut Self { self.scope = Some(value); self } - pub fn with_style( + pub fn style( &mut self, value: crate::datadogV1::model::HostMapWidgetDefinitionStyle, ) -> &mut Self { @@ -117,20 +117,17 @@ impl HostMapWidgetDefinition { self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_host_map_widget_definition_requests.rs b/src/datadogV1/model/model_host_map_widget_definition_requests.rs index 80febd0ae..641dae84f 100644 --- a/src/datadogV1/model/model_host_map_widget_definition_requests.rs +++ b/src/datadogV1/model/model_host_map_widget_definition_requests.rs @@ -24,16 +24,17 @@ impl HostMapWidgetDefinitionRequests { } } - pub fn with_fill(&mut self, value: crate::datadogV1::model::HostMapRequest) -> &mut Self { + pub fn fill(&mut self, value: crate::datadogV1::model::HostMapRequest) -> &mut Self { self.fill = Some(value); self } - pub fn with_size(&mut self, value: crate::datadogV1::model::HostMapRequest) -> &mut Self { + pub fn size(&mut self, value: crate::datadogV1::model::HostMapRequest) -> &mut Self { self.size = Some(value); self } } + impl Default for HostMapWidgetDefinitionRequests { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_host_map_widget_definition_style.rs b/src/datadogV1/model/model_host_map_widget_definition_style.rs index 4a3907395..1d03ea98a 100644 --- a/src/datadogV1/model/model_host_map_widget_definition_style.rs +++ b/src/datadogV1/model/model_host_map_widget_definition_style.rs @@ -32,26 +32,27 @@ impl HostMapWidgetDefinitionStyle { } } - pub fn with_fill_max(&mut self, value: String) -> &mut Self { + pub fn fill_max(&mut self, value: String) -> &mut Self { self.fill_max = Some(value); self } - pub fn with_fill_min(&mut self, value: String) -> &mut Self { + pub fn fill_min(&mut self, value: String) -> &mut Self { self.fill_min = Some(value); self } - pub fn with_palette(&mut self, value: String) -> &mut Self { + pub fn palette(&mut self, value: String) -> &mut Self { self.palette = Some(value); self } - pub fn with_palette_flip(&mut self, value: bool) -> &mut Self { + pub fn palette_flip(&mut self, value: bool) -> &mut Self { self.palette_flip = Some(value); self } } + impl Default for HostMapWidgetDefinitionStyle { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_host_meta.rs b/src/datadogV1/model/model_host_meta.rs index 03c7f630f..8df7fe9cd 100644 --- a/src/datadogV1/model/model_host_meta.rs +++ b/src/datadogV1/model/model_host_meta.rs @@ -76,32 +76,32 @@ impl HostMeta { } } - pub fn with_agent_checks(&mut self, value: Vec>) -> &mut Self { + pub fn agent_checks(&mut self, value: Vec>) -> &mut Self { self.agent_checks = Some(value); self } - pub fn with_agent_version(&mut self, value: String) -> &mut Self { + pub fn agent_version(&mut self, value: String) -> &mut Self { self.agent_version = Some(value); self } - pub fn with_cpu_cores(&mut self, value: i64) -> &mut Self { + pub fn cpu_cores(&mut self, value: i64) -> &mut Self { self.cpu_cores = Some(value); self } - pub fn with_fbsd_v(&mut self, value: Vec) -> &mut Self { + pub fn fbsd_v(&mut self, value: Vec) -> &mut Self { self.fbsd_v = Some(value); self } - pub fn with_gohai(&mut self, value: String) -> &mut Self { + pub fn gohai(&mut self, value: String) -> &mut Self { self.gohai = Some(value); self } - pub fn with_install_method( + pub fn install_method( &mut self, value: crate::datadogV1::model::HostMetaInstallMethod, ) -> &mut Self { @@ -109,51 +109,52 @@ impl HostMeta { self } - pub fn with_mac_v(&mut self, value: Vec) -> &mut Self { + pub fn mac_v(&mut self, value: Vec) -> &mut Self { self.mac_v = Some(value); self } - pub fn with_machine(&mut self, value: String) -> &mut Self { + pub fn machine(&mut self, value: String) -> &mut Self { self.machine = Some(value); self } - pub fn with_nix_v(&mut self, value: Vec) -> &mut Self { + pub fn nix_v(&mut self, value: Vec) -> &mut Self { self.nix_v = Some(value); self } - pub fn with_platform(&mut self, value: String) -> &mut Self { + pub fn platform(&mut self, value: String) -> &mut Self { self.platform = Some(value); self } - pub fn with_processor(&mut self, value: String) -> &mut Self { + pub fn processor(&mut self, value: String) -> &mut Self { self.processor = Some(value); self } - pub fn with_python_v(&mut self, value: String) -> &mut Self { + pub fn python_v(&mut self, value: String) -> &mut Self { self.python_v = Some(value); self } - pub fn with_socket_fqdn(&mut self, value: String) -> &mut Self { + pub fn socket_fqdn(&mut self, value: String) -> &mut Self { self.socket_fqdn = Some(value); self } - pub fn with_socket_hostname(&mut self, value: String) -> &mut Self { + pub fn socket_hostname(&mut self, value: String) -> &mut Self { self.socket_hostname = Some(value); self } - pub fn with_win_v(&mut self, value: Vec) -> &mut Self { + pub fn win_v(&mut self, value: Vec) -> &mut Self { self.win_v = Some(value); self } } + impl Default for HostMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_host_meta_install_method.rs b/src/datadogV1/model/model_host_meta_install_method.rs index 48251ddd9..ec96aa4c7 100644 --- a/src/datadogV1/model/model_host_meta_install_method.rs +++ b/src/datadogV1/model/model_host_meta_install_method.rs @@ -28,21 +28,22 @@ impl HostMetaInstallMethod { } } - pub fn with_installer_version(&mut self, value: String) -> &mut Self { + pub fn installer_version(&mut self, value: String) -> &mut Self { self.installer_version = Some(value); self } - pub fn with_tool(&mut self, value: String) -> &mut Self { + pub fn tool(&mut self, value: String) -> &mut Self { self.tool = Some(value); self } - pub fn with_tool_version(&mut self, value: String) -> &mut Self { + pub fn tool_version(&mut self, value: String) -> &mut Self { self.tool_version = Some(value); self } } + impl Default for HostMetaInstallMethod { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_host_metrics.rs b/src/datadogV1/model/model_host_metrics.rs index 54b9d31a6..c4c735fbb 100644 --- a/src/datadogV1/model/model_host_metrics.rs +++ b/src/datadogV1/model/model_host_metrics.rs @@ -28,21 +28,22 @@ impl HostMetrics { } } - pub fn with_cpu(&mut self, value: f64) -> &mut Self { + pub fn cpu(&mut self, value: f64) -> &mut Self { self.cpu = Some(value); self } - pub fn with_iowait(&mut self, value: f64) -> &mut Self { + pub fn iowait(&mut self, value: f64) -> &mut Self { self.iowait = Some(value); self } - pub fn with_load(&mut self, value: f64) -> &mut Self { + pub fn load(&mut self, value: f64) -> &mut Self { self.load = Some(value); self } } + impl Default for HostMetrics { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_host_mute_response.rs b/src/datadogV1/model/model_host_mute_response.rs index 5a349750b..c08746f4e 100644 --- a/src/datadogV1/model/model_host_mute_response.rs +++ b/src/datadogV1/model/model_host_mute_response.rs @@ -32,26 +32,27 @@ impl HostMuteResponse { } } - pub fn with_action(&mut self, value: String) -> &mut Self { + pub fn action(&mut self, value: String) -> &mut Self { self.action = Some(value); self } - pub fn with_end(&mut self, value: i64) -> &mut Self { + pub fn end(&mut self, value: i64) -> &mut Self { self.end = Some(value); self } - pub fn with_hostname(&mut self, value: String) -> &mut Self { + pub fn hostname(&mut self, value: String) -> &mut Self { self.hostname = Some(value); self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } } + impl Default for HostMuteResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_host_mute_settings.rs b/src/datadogV1/model/model_host_mute_settings.rs index f45b3235d..d90f2089b 100644 --- a/src/datadogV1/model/model_host_mute_settings.rs +++ b/src/datadogV1/model/model_host_mute_settings.rs @@ -28,21 +28,22 @@ impl HostMuteSettings { } } - pub fn with_end(&mut self, value: i64) -> &mut Self { + pub fn end(&mut self, value: i64) -> &mut Self { self.end = Some(value); self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } - pub fn with_override_(&mut self, value: bool) -> &mut Self { + pub fn override_(&mut self, value: bool) -> &mut Self { self.override_ = Some(value); self } } + impl Default for HostMuteSettings { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_host_tags.rs b/src/datadogV1/model/model_host_tags.rs index ccd7b5df5..3783b8ee4 100644 --- a/src/datadogV1/model/model_host_tags.rs +++ b/src/datadogV1/model/model_host_tags.rs @@ -24,16 +24,17 @@ impl HostTags { } } - pub fn with_host(&mut self, value: String) -> &mut Self { + pub fn host(&mut self, value: String) -> &mut Self { self.host = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } } + impl Default for HostTags { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_host_totals.rs b/src/datadogV1/model/model_host_totals.rs index 17841397a..304437d54 100644 --- a/src/datadogV1/model/model_host_totals.rs +++ b/src/datadogV1/model/model_host_totals.rs @@ -24,16 +24,17 @@ impl HostTotals { } } - pub fn with_total_active(&mut self, value: i64) -> &mut Self { + pub fn total_active(&mut self, value: i64) -> &mut Self { self.total_active = Some(value); self } - pub fn with_total_up(&mut self, value: i64) -> &mut Self { + pub fn total_up(&mut self, value: i64) -> &mut Self { self.total_up = Some(value); self } } + impl Default for HostTotals { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_hourly_usage_attribution_body.rs b/src/datadogV1/model/model_hourly_usage_attribution_body.rs index fca8e66d7..079846d1c 100644 --- a/src/datadogV1/model/model_hourly_usage_attribution_body.rs +++ b/src/datadogV1/model/model_hourly_usage_attribution_body.rs @@ -56,32 +56,32 @@ impl HourlyUsageAttributionBody { } } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_region(&mut self, value: String) -> &mut Self { + pub fn region(&mut self, value: String) -> &mut Self { self.region = Some(value); self } - pub fn with_tag_config_source(&mut self, value: String) -> &mut Self { + pub fn tag_config_source(&mut self, value: String) -> &mut Self { self.tag_config_source = Some(value); self } - pub fn with_tags( + pub fn tags( &mut self, value: Option>>>, ) -> &mut Self { @@ -89,17 +89,17 @@ impl HourlyUsageAttributionBody { self } - pub fn with_total_usage_sum(&mut self, value: f64) -> &mut Self { + pub fn total_usage_sum(&mut self, value: f64) -> &mut Self { self.total_usage_sum = Some(value); self } - pub fn with_updated_at(&mut self, value: String) -> &mut Self { + pub fn updated_at(&mut self, value: String) -> &mut Self { self.updated_at = Some(value); self } - pub fn with_usage_type( + pub fn usage_type( &mut self, value: crate::datadogV1::model::HourlyUsageAttributionUsageType, ) -> &mut Self { @@ -107,6 +107,7 @@ impl HourlyUsageAttributionBody { self } } + impl Default for HourlyUsageAttributionBody { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_hourly_usage_attribution_metadata.rs b/src/datadogV1/model/model_hourly_usage_attribution_metadata.rs index 49051709b..939263e66 100644 --- a/src/datadogV1/model/model_hourly_usage_attribution_metadata.rs +++ b/src/datadogV1/model/model_hourly_usage_attribution_metadata.rs @@ -18,7 +18,7 @@ impl HourlyUsageAttributionMetadata { HourlyUsageAttributionMetadata { pagination: None } } - pub fn with_pagination( + pub fn pagination( &mut self, value: crate::datadogV1::model::HourlyUsageAttributionPagination, ) -> &mut Self { @@ -26,6 +26,7 @@ impl HourlyUsageAttributionMetadata { self } } + impl Default for HourlyUsageAttributionMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_hourly_usage_attribution_pagination.rs b/src/datadogV1/model/model_hourly_usage_attribution_pagination.rs index 2c79e00c4..ad1991b80 100644 --- a/src/datadogV1/model/model_hourly_usage_attribution_pagination.rs +++ b/src/datadogV1/model/model_hourly_usage_attribution_pagination.rs @@ -24,11 +24,12 @@ impl HourlyUsageAttributionPagination { } } - pub fn with_next_record_id(&mut self, value: Option) -> &mut Self { + pub fn next_record_id(&mut self, value: Option) -> &mut Self { self.next_record_id = Some(value); self } } + impl Default for HourlyUsageAttributionPagination { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_hourly_usage_attribution_response.rs b/src/datadogV1/model/model_hourly_usage_attribution_response.rs index 82189cf79..b15e9016b 100644 --- a/src/datadogV1/model/model_hourly_usage_attribution_response.rs +++ b/src/datadogV1/model/model_hourly_usage_attribution_response.rs @@ -24,7 +24,7 @@ impl HourlyUsageAttributionResponse { } } - pub fn with_metadata( + pub fn metadata( &mut self, value: crate::datadogV1::model::HourlyUsageAttributionMetadata, ) -> &mut Self { @@ -32,7 +32,7 @@ impl HourlyUsageAttributionResponse { self } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -40,6 +40,7 @@ impl HourlyUsageAttributionResponse { self } } + impl Default for HourlyUsageAttributionResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_http_log_item.rs b/src/datadogV1/model/model_http_log_item.rs index 389f2cfe7..5105039e7 100644 --- a/src/datadogV1/model/model_http_log_item.rs +++ b/src/datadogV1/model/model_http_log_item.rs @@ -45,22 +45,22 @@ impl HTTPLogItem { } } - pub fn with_ddsource(&mut self, value: String) -> &mut Self { + pub fn ddsource(&mut self, value: String) -> &mut Self { self.ddsource = Some(value); self } - pub fn with_ddtags(&mut self, value: String) -> &mut Self { + pub fn ddtags(&mut self, value: String) -> &mut Self { self.ddtags = Some(value); self } - pub fn with_hostname(&mut self, value: String) -> &mut Self { + pub fn hostname(&mut self, value: String) -> &mut Self { self.hostname = Some(value); self } - pub fn with_service(&mut self, value: String) -> &mut Self { + pub fn service(&mut self, value: String) -> &mut Self { self.service = Some(value); self } diff --git a/src/datadogV1/model/model_image_widget_definition.rs b/src/datadogV1/model/model_image_widget_definition.rs index 36ed834ea..69929ff07 100644 --- a/src/datadogV1/model/model_image_widget_definition.rs +++ b/src/datadogV1/model/model_image_widget_definition.rs @@ -57,17 +57,17 @@ impl ImageWidgetDefinition { } } - pub fn with_has_background(&mut self, value: bool) -> &mut Self { + pub fn has_background(&mut self, value: bool) -> &mut Self { self.has_background = Some(value); self } - pub fn with_has_border(&mut self, value: bool) -> &mut Self { + pub fn has_border(&mut self, value: bool) -> &mut Self { self.has_border = Some(value); self } - pub fn with_horizontal_align( + pub fn horizontal_align( &mut self, value: crate::datadogV1::model::WidgetHorizontalAlign, ) -> &mut Self { @@ -75,22 +75,22 @@ impl ImageWidgetDefinition { self } - pub fn with_margin(&mut self, value: crate::datadogV1::model::WidgetMargin) -> &mut Self { + pub fn margin(&mut self, value: crate::datadogV1::model::WidgetMargin) -> &mut Self { self.margin = Some(value); self } - pub fn with_sizing(&mut self, value: crate::datadogV1::model::WidgetImageSizing) -> &mut Self { + pub fn sizing(&mut self, value: crate::datadogV1::model::WidgetImageSizing) -> &mut Self { self.sizing = Some(value); self } - pub fn with_url_dark_theme(&mut self, value: String) -> &mut Self { + pub fn url_dark_theme(&mut self, value: String) -> &mut Self { self.url_dark_theme = Some(value); self } - pub fn with_vertical_align( + pub fn vertical_align( &mut self, value: crate::datadogV1::model::WidgetVerticalAlign, ) -> &mut Self { diff --git a/src/datadogV1/model/model_intake_payload_accepted.rs b/src/datadogV1/model/model_intake_payload_accepted.rs index 617a18d65..08f9373a0 100644 --- a/src/datadogV1/model/model_intake_payload_accepted.rs +++ b/src/datadogV1/model/model_intake_payload_accepted.rs @@ -18,11 +18,12 @@ impl IntakePayloadAccepted { IntakePayloadAccepted { status: None } } - pub fn with_status(&mut self, value: String) -> &mut Self { + pub fn status(&mut self, value: String) -> &mut Self { self.status = Some(value); self } } + impl Default for IntakePayloadAccepted { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_ip_prefixes_agents.rs b/src/datadogV1/model/model_ip_prefixes_agents.rs index 51f4d1445..287e109e6 100644 --- a/src/datadogV1/model/model_ip_prefixes_agents.rs +++ b/src/datadogV1/model/model_ip_prefixes_agents.rs @@ -24,16 +24,17 @@ impl IPPrefixesAgents { } } - pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv4 = Some(value); self } - pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv6(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv6 = Some(value); self } } + impl Default for IPPrefixesAgents { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_ip_prefixes_api.rs b/src/datadogV1/model/model_ip_prefixes_api.rs index 624ab4a4a..4fdbadbbb 100644 --- a/src/datadogV1/model/model_ip_prefixes_api.rs +++ b/src/datadogV1/model/model_ip_prefixes_api.rs @@ -24,16 +24,17 @@ impl IPPrefixesAPI { } } - pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv4 = Some(value); self } - pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv6(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv6 = Some(value); self } } + impl Default for IPPrefixesAPI { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_ip_prefixes_apm.rs b/src/datadogV1/model/model_ip_prefixes_apm.rs index 13b5d3ef9..93ee80049 100644 --- a/src/datadogV1/model/model_ip_prefixes_apm.rs +++ b/src/datadogV1/model/model_ip_prefixes_apm.rs @@ -24,16 +24,17 @@ impl IPPrefixesAPM { } } - pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv4 = Some(value); self } - pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv6(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv6 = Some(value); self } } + impl Default for IPPrefixesAPM { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_ip_prefixes_global.rs b/src/datadogV1/model/model_ip_prefixes_global.rs index c3f7b3ebe..eb7581f50 100644 --- a/src/datadogV1/model/model_ip_prefixes_global.rs +++ b/src/datadogV1/model/model_ip_prefixes_global.rs @@ -24,16 +24,17 @@ impl IPPrefixesGlobal { } } - pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv4 = Some(value); self } - pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv6(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv6 = Some(value); self } } + impl Default for IPPrefixesGlobal { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_ip_prefixes_logs.rs b/src/datadogV1/model/model_ip_prefixes_logs.rs index 9f4e7684a..49f24868f 100644 --- a/src/datadogV1/model/model_ip_prefixes_logs.rs +++ b/src/datadogV1/model/model_ip_prefixes_logs.rs @@ -24,16 +24,17 @@ impl IPPrefixesLogs { } } - pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv4 = Some(value); self } - pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv6(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv6 = Some(value); self } } + impl Default for IPPrefixesLogs { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_ip_prefixes_orchestrator.rs b/src/datadogV1/model/model_ip_prefixes_orchestrator.rs index 71baab1d9..0a95c5bc1 100644 --- a/src/datadogV1/model/model_ip_prefixes_orchestrator.rs +++ b/src/datadogV1/model/model_ip_prefixes_orchestrator.rs @@ -24,16 +24,17 @@ impl IPPrefixesOrchestrator { } } - pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv4 = Some(value); self } - pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv6(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv6 = Some(value); self } } + impl Default for IPPrefixesOrchestrator { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_ip_prefixes_process.rs b/src/datadogV1/model/model_ip_prefixes_process.rs index 1f1e0773b..0b6ce4657 100644 --- a/src/datadogV1/model/model_ip_prefixes_process.rs +++ b/src/datadogV1/model/model_ip_prefixes_process.rs @@ -24,16 +24,17 @@ impl IPPrefixesProcess { } } - pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv4 = Some(value); self } - pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv6(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv6 = Some(value); self } } + impl Default for IPPrefixesProcess { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_ip_prefixes_remote_configuration.rs b/src/datadogV1/model/model_ip_prefixes_remote_configuration.rs index 6015e9bac..e3094f185 100644 --- a/src/datadogV1/model/model_ip_prefixes_remote_configuration.rs +++ b/src/datadogV1/model/model_ip_prefixes_remote_configuration.rs @@ -24,16 +24,17 @@ impl IPPrefixesRemoteConfiguration { } } - pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv4 = Some(value); self } - pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv6(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv6 = Some(value); self } } + impl Default for IPPrefixesRemoteConfiguration { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_ip_prefixes_synthetics.rs b/src/datadogV1/model/model_ip_prefixes_synthetics.rs index 079382770..ce8aee954 100644 --- a/src/datadogV1/model/model_ip_prefixes_synthetics.rs +++ b/src/datadogV1/model/model_ip_prefixes_synthetics.rs @@ -32,12 +32,12 @@ impl IPPrefixesSynthetics { } } - pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv4 = Some(value); self } - pub fn with_prefixes_ipv4_by_location( + pub fn prefixes_ipv4_by_location( &mut self, value: std::collections::BTreeMap>, ) -> &mut Self { @@ -45,12 +45,12 @@ impl IPPrefixesSynthetics { self } - pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv6(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv6 = Some(value); self } - pub fn with_prefixes_ipv6_by_location( + pub fn prefixes_ipv6_by_location( &mut self, value: std::collections::BTreeMap>, ) -> &mut Self { @@ -58,6 +58,7 @@ impl IPPrefixesSynthetics { self } } + impl Default for IPPrefixesSynthetics { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_ip_prefixes_synthetics_private_locations.rs b/src/datadogV1/model/model_ip_prefixes_synthetics_private_locations.rs index b680e8bb6..aecfaf8dc 100644 --- a/src/datadogV1/model/model_ip_prefixes_synthetics_private_locations.rs +++ b/src/datadogV1/model/model_ip_prefixes_synthetics_private_locations.rs @@ -24,16 +24,17 @@ impl IPPrefixesSyntheticsPrivateLocations { } } - pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv4 = Some(value); self } - pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv6(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv6 = Some(value); self } } + impl Default for IPPrefixesSyntheticsPrivateLocations { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_ip_prefixes_webhooks.rs b/src/datadogV1/model/model_ip_prefixes_webhooks.rs index 40c590333..ad15998f7 100644 --- a/src/datadogV1/model/model_ip_prefixes_webhooks.rs +++ b/src/datadogV1/model/model_ip_prefixes_webhooks.rs @@ -24,16 +24,17 @@ impl IPPrefixesWebhooks { } } - pub fn with_prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv4 = Some(value); self } - pub fn with_prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + pub fn prefixes_ipv6(&mut self, value: Vec) -> &mut Self { self.prefixes_ipv6 = Some(value); self } } + impl Default for IPPrefixesWebhooks { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_ip_ranges.rs b/src/datadogV1/model/model_ip_ranges.rs index 520c71f34..5f69c6540 100644 --- a/src/datadogV1/model/model_ip_ranges.rs +++ b/src/datadogV1/model/model_ip_ranges.rs @@ -69,37 +69,37 @@ impl IPRanges { } } - pub fn with_agents(&mut self, value: crate::datadogV1::model::IPPrefixesAgents) -> &mut Self { + pub fn agents(&mut self, value: crate::datadogV1::model::IPPrefixesAgents) -> &mut Self { self.agents = Some(value); self } - pub fn with_api(&mut self, value: crate::datadogV1::model::IPPrefixesAPI) -> &mut Self { + pub fn api(&mut self, value: crate::datadogV1::model::IPPrefixesAPI) -> &mut Self { self.api = Some(value); self } - pub fn with_apm(&mut self, value: crate::datadogV1::model::IPPrefixesAPM) -> &mut Self { + pub fn apm(&mut self, value: crate::datadogV1::model::IPPrefixesAPM) -> &mut Self { self.apm = Some(value); self } - pub fn with_global(&mut self, value: crate::datadogV1::model::IPPrefixesGlobal) -> &mut Self { + pub fn global(&mut self, value: crate::datadogV1::model::IPPrefixesGlobal) -> &mut Self { self.global = Some(value); self } - pub fn with_logs(&mut self, value: crate::datadogV1::model::IPPrefixesLogs) -> &mut Self { + pub fn logs(&mut self, value: crate::datadogV1::model::IPPrefixesLogs) -> &mut Self { self.logs = Some(value); self } - pub fn with_modified(&mut self, value: String) -> &mut Self { + pub fn modified(&mut self, value: String) -> &mut Self { self.modified = Some(value); self } - pub fn with_orchestrator( + pub fn orchestrator( &mut self, value: crate::datadogV1::model::IPPrefixesOrchestrator, ) -> &mut Self { @@ -107,12 +107,12 @@ impl IPRanges { self } - pub fn with_process(&mut self, value: crate::datadogV1::model::IPPrefixesProcess) -> &mut Self { + pub fn process(&mut self, value: crate::datadogV1::model::IPPrefixesProcess) -> &mut Self { self.process = Some(value); self } - pub fn with_remote_configuration( + pub fn remote_configuration( &mut self, value: crate::datadogV1::model::IPPrefixesRemoteConfiguration, ) -> &mut Self { @@ -120,7 +120,7 @@ impl IPRanges { self } - pub fn with_synthetics( + pub fn synthetics( &mut self, value: crate::datadogV1::model::IPPrefixesSynthetics, ) -> &mut Self { @@ -128,7 +128,7 @@ impl IPRanges { self } - pub fn with_synthetics_private_locations( + pub fn synthetics_private_locations( &mut self, value: crate::datadogV1::model::IPPrefixesSyntheticsPrivateLocations, ) -> &mut Self { @@ -136,19 +136,17 @@ impl IPRanges { self } - pub fn with_version(&mut self, value: i64) -> &mut Self { + pub fn version(&mut self, value: i64) -> &mut Self { self.version = Some(value); self } - pub fn with_webhooks( - &mut self, - value: crate::datadogV1::model::IPPrefixesWebhooks, - ) -> &mut Self { + pub fn webhooks(&mut self, value: crate::datadogV1::model::IPPrefixesWebhooks) -> &mut Self { self.webhooks = Some(value); self } } + impl Default for IPRanges { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_list_stream_compute_items.rs b/src/datadogV1/model/model_list_stream_compute_items.rs index b91fc1467..938a8341f 100644 --- a/src/datadogV1/model/model_list_stream_compute_items.rs +++ b/src/datadogV1/model/model_list_stream_compute_items.rs @@ -26,7 +26,7 @@ impl ListStreamComputeItems { } } - pub fn with_facet(&mut self, value: String) -> &mut Self { + pub fn facet(&mut self, value: String) -> &mut Self { self.facet = Some(value); self } diff --git a/src/datadogV1/model/model_list_stream_query.rs b/src/datadogV1/model/model_list_stream_query.rs index f58ee3765..3fd040f12 100644 --- a/src/datadogV1/model/model_list_stream_query.rs +++ b/src/datadogV1/model/model_list_stream_query.rs @@ -51,7 +51,7 @@ impl ListStreamQuery { } } - pub fn with_compute( + pub fn compute( &mut self, value: Vec, ) -> &mut Self { @@ -59,15 +59,12 @@ impl ListStreamQuery { self } - pub fn with_event_size( - &mut self, - value: crate::datadogV1::model::WidgetEventSize, - ) -> &mut Self { + pub fn event_size(&mut self, value: crate::datadogV1::model::WidgetEventSize) -> &mut Self { self.event_size = Some(value); self } - pub fn with_group_by( + pub fn group_by( &mut self, value: Vec, ) -> &mut Self { @@ -75,17 +72,17 @@ impl ListStreamQuery { self } - pub fn with_indexes(&mut self, value: Vec) -> &mut Self { + pub fn indexes(&mut self, value: Vec) -> &mut Self { self.indexes = Some(value); self } - pub fn with_sort(&mut self, value: crate::datadogV1::model::WidgetFieldSort) -> &mut Self { + pub fn sort(&mut self, value: crate::datadogV1::model::WidgetFieldSort) -> &mut Self { self.sort = Some(value); self } - pub fn with_storage(&mut self, value: String) -> &mut Self { + pub fn storage(&mut self, value: String) -> &mut Self { self.storage = Some(value); self } diff --git a/src/datadogV1/model/model_list_stream_widget_definition.rs b/src/datadogV1/model/model_list_stream_widget_definition.rs index b9a7eb753..3942d36df 100644 --- a/src/datadogV1/model/model_list_stream_widget_definition.rs +++ b/src/datadogV1/model/model_list_stream_widget_definition.rs @@ -53,35 +53,32 @@ impl ListStreamWidgetDefinition { } } - pub fn with_legend_size(&mut self, value: String) -> &mut Self { + pub fn legend_size(&mut self, value: String) -> &mut Self { self.legend_size = Some(value); self } - pub fn with_show_legend(&mut self, value: bool) -> &mut Self { + pub fn show_legend(&mut self, value: bool) -> &mut Self { self.show_legend = Some(value); self } - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_log.rs b/src/datadogV1/model/model_log.rs index 088928805..1c19d585c 100644 --- a/src/datadogV1/model/model_log.rs +++ b/src/datadogV1/model/model_log.rs @@ -24,16 +24,17 @@ impl Log { } } - pub fn with_content(&mut self, value: crate::datadogV1::model::LogContent) -> &mut Self { + pub fn content(&mut self, value: crate::datadogV1::model::LogContent) -> &mut Self { self.content = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } } + impl Default for Log { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_log_content.rs b/src/datadogV1/model/model_log_content.rs index a707948b1..f9c7b5c6a 100644 --- a/src/datadogV1/model/model_log_content.rs +++ b/src/datadogV1/model/model_log_content.rs @@ -44,7 +44,7 @@ impl LogContent { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -52,31 +52,32 @@ impl LogContent { self } - pub fn with_host(&mut self, value: String) -> &mut Self { + pub fn host(&mut self, value: String) -> &mut Self { self.host = Some(value); self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } - pub fn with_service(&mut self, value: String) -> &mut Self { + pub fn service(&mut self, value: String) -> &mut Self { self.service = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_timestamp(&mut self, value: String) -> &mut Self { + pub fn timestamp(&mut self, value: String) -> &mut Self { self.timestamp = Some(value); self } } + impl Default for LogContent { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_log_query_definition.rs b/src/datadogV1/model/model_log_query_definition.rs index 53a46c20c..bf8aa6b7a 100644 --- a/src/datadogV1/model/model_log_query_definition.rs +++ b/src/datadogV1/model/model_log_query_definition.rs @@ -36,12 +36,12 @@ impl LogQueryDefinition { } } - pub fn with_compute(&mut self, value: crate::datadogV1::model::LogsQueryCompute) -> &mut Self { + pub fn compute(&mut self, value: crate::datadogV1::model::LogsQueryCompute) -> &mut Self { self.compute = Some(value); self } - pub fn with_group_by( + pub fn group_by( &mut self, value: Vec, ) -> &mut Self { @@ -49,12 +49,12 @@ impl LogQueryDefinition { self } - pub fn with_index(&mut self, value: String) -> &mut Self { + pub fn index(&mut self, value: String) -> &mut Self { self.index = Some(value); self } - pub fn with_multi_compute( + pub fn multi_compute( &mut self, value: Vec, ) -> &mut Self { @@ -62,7 +62,7 @@ impl LogQueryDefinition { self } - pub fn with_search( + pub fn search( &mut self, value: crate::datadogV1::model::LogQueryDefinitionSearch, ) -> &mut Self { @@ -70,6 +70,7 @@ impl LogQueryDefinition { self } } + impl Default for LogQueryDefinition { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_log_query_definition_group_by.rs b/src/datadogV1/model/model_log_query_definition_group_by.rs index feb0a2a66..dd72947c0 100644 --- a/src/datadogV1/model/model_log_query_definition_group_by.rs +++ b/src/datadogV1/model/model_log_query_definition_group_by.rs @@ -28,12 +28,12 @@ impl LogQueryDefinitionGroupBy { } } - pub fn with_limit(&mut self, value: i64) -> &mut Self { + pub fn limit(&mut self, value: i64) -> &mut Self { self.limit = Some(value); self } - pub fn with_sort( + pub fn sort( &mut self, value: crate::datadogV1::model::LogQueryDefinitionGroupBySort, ) -> &mut Self { diff --git a/src/datadogV1/model/model_log_query_definition_group_by_sort.rs b/src/datadogV1/model/model_log_query_definition_group_by_sort.rs index 99e2b5541..57bec1f5d 100644 --- a/src/datadogV1/model/model_log_query_definition_group_by_sort.rs +++ b/src/datadogV1/model/model_log_query_definition_group_by_sort.rs @@ -31,7 +31,7 @@ impl LogQueryDefinitionGroupBySort { } } - pub fn with_facet(&mut self, value: String) -> &mut Self { + pub fn facet(&mut self, value: String) -> &mut Self { self.facet = Some(value); self } diff --git a/src/datadogV1/model/model_log_stream_widget_definition.rs b/src/datadogV1/model/model_log_stream_widget_definition.rs index cd10d48c4..c2a3b3283 100644 --- a/src/datadogV1/model/model_log_stream_widget_definition.rs +++ b/src/datadogV1/model/model_log_stream_widget_definition.rs @@ -73,25 +73,25 @@ impl LogStreamWidgetDefinition { } #[allow(deprecated)] - pub fn with_columns(&mut self, value: Vec) -> &mut Self { + pub fn columns(&mut self, value: Vec) -> &mut Self { self.columns = Some(value); self } #[allow(deprecated)] - pub fn with_indexes(&mut self, value: Vec) -> &mut Self { + pub fn indexes(&mut self, value: Vec) -> &mut Self { self.indexes = Some(value); self } #[allow(deprecated)] - pub fn with_logset(&mut self, value: String) -> &mut Self { + pub fn logset(&mut self, value: String) -> &mut Self { self.logset = Some(value); self } #[allow(deprecated)] - pub fn with_message_display( + pub fn message_display( &mut self, value: crate::datadogV1::model::WidgetMessageDisplay, ) -> &mut Self { @@ -100,52 +100,49 @@ impl LogStreamWidgetDefinition { } #[allow(deprecated)] - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } #[allow(deprecated)] - pub fn with_show_date_column(&mut self, value: bool) -> &mut Self { + pub fn show_date_column(&mut self, value: bool) -> &mut Self { self.show_date_column = Some(value); self } #[allow(deprecated)] - pub fn with_show_message_column(&mut self, value: bool) -> &mut Self { + pub fn show_message_column(&mut self, value: bool) -> &mut Self { self.show_message_column = Some(value); self } #[allow(deprecated)] - pub fn with_sort(&mut self, value: crate::datadogV1::model::WidgetFieldSort) -> &mut Self { + pub fn sort(&mut self, value: crate::datadogV1::model::WidgetFieldSort) -> &mut Self { self.sort = Some(value); self } #[allow(deprecated)] - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } #[allow(deprecated)] - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } #[allow(deprecated)] - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } #[allow(deprecated)] - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_logs_api_error.rs b/src/datadogV1/model/model_logs_api_error.rs index 77d0f9d83..241f56003 100644 --- a/src/datadogV1/model/model_logs_api_error.rs +++ b/src/datadogV1/model/model_logs_api_error.rs @@ -28,21 +28,22 @@ impl LogsAPIError { } } - pub fn with_code(&mut self, value: String) -> &mut Self { + pub fn code(&mut self, value: String) -> &mut Self { self.code = Some(value); self } - pub fn with_details(&mut self, value: Vec) -> &mut Self { + pub fn details(&mut self, value: Vec) -> &mut Self { self.details = Some(value); self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } } + impl Default for LogsAPIError { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_logs_api_error_response.rs b/src/datadogV1/model/model_logs_api_error_response.rs index 9a63e3b79..884d2a558 100644 --- a/src/datadogV1/model/model_logs_api_error_response.rs +++ b/src/datadogV1/model/model_logs_api_error_response.rs @@ -18,11 +18,12 @@ impl LogsAPIErrorResponse { LogsAPIErrorResponse { error: None } } - pub fn with_error(&mut self, value: crate::datadogV1::model::LogsAPIError) -> &mut Self { + pub fn error(&mut self, value: crate::datadogV1::model::LogsAPIError) -> &mut Self { self.error = Some(value); self } } + impl Default for LogsAPIErrorResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_logs_arithmetic_processor.rs b/src/datadogV1/model/model_logs_arithmetic_processor.rs index 074620256..eec07a63c 100644 --- a/src/datadogV1/model/model_logs_arithmetic_processor.rs +++ b/src/datadogV1/model/model_logs_arithmetic_processor.rs @@ -65,17 +65,17 @@ impl LogsArithmeticProcessor { } } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_is_replace_missing(&mut self, value: bool) -> &mut Self { + pub fn is_replace_missing(&mut self, value: bool) -> &mut Self { self.is_replace_missing = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV1/model/model_logs_attribute_remapper.rs b/src/datadogV1/model/model_logs_attribute_remapper.rs index bd66606c2..f88c10397 100644 --- a/src/datadogV1/model/model_logs_attribute_remapper.rs +++ b/src/datadogV1/model/model_logs_attribute_remapper.rs @@ -64,40 +64,37 @@ impl LogsAttributeRemapper { } } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_override_on_conflict(&mut self, value: bool) -> &mut Self { + pub fn override_on_conflict(&mut self, value: bool) -> &mut Self { self.override_on_conflict = Some(value); self } - pub fn with_preserve_source(&mut self, value: bool) -> &mut Self { + pub fn preserve_source(&mut self, value: bool) -> &mut Self { self.preserve_source = Some(value); self } - pub fn with_source_type(&mut self, value: String) -> &mut Self { + pub fn source_type(&mut self, value: String) -> &mut Self { self.source_type = Some(value); self } - pub fn with_target_format( - &mut self, - value: crate::datadogV1::model::TargetFormatType, - ) -> &mut Self { + pub fn target_format(&mut self, value: crate::datadogV1::model::TargetFormatType) -> &mut Self { self.target_format = Some(value); self } - pub fn with_target_type(&mut self, value: String) -> &mut Self { + pub fn target_type(&mut self, value: String) -> &mut Self { self.target_type = Some(value); self } diff --git a/src/datadogV1/model/model_logs_by_retention.rs b/src/datadogV1/model/model_logs_by_retention.rs index 472cbe0e3..6ce211039 100644 --- a/src/datadogV1/model/model_logs_by_retention.rs +++ b/src/datadogV1/model/model_logs_by_retention.rs @@ -28,12 +28,12 @@ impl LogsByRetention { } } - pub fn with_orgs(&mut self, value: crate::datadogV1::model::LogsByRetentionOrgs) -> &mut Self { + pub fn orgs(&mut self, value: crate::datadogV1::model::LogsByRetentionOrgs) -> &mut Self { self.orgs = Some(value); self } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -41,7 +41,7 @@ impl LogsByRetention { self } - pub fn with_usage_by_month( + pub fn usage_by_month( &mut self, value: crate::datadogV1::model::LogsByRetentionMonthlyUsage, ) -> &mut Self { @@ -49,6 +49,7 @@ impl LogsByRetention { self } } + impl Default for LogsByRetention { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_logs_by_retention_monthly_usage.rs b/src/datadogV1/model/model_logs_by_retention_monthly_usage.rs index 98c23ab40..70d8d4a5e 100644 --- a/src/datadogV1/model/model_logs_by_retention_monthly_usage.rs +++ b/src/datadogV1/model/model_logs_by_retention_monthly_usage.rs @@ -24,12 +24,12 @@ impl LogsByRetentionMonthlyUsage { } } - pub fn with_date(&mut self, value: String) -> &mut Self { + pub fn date(&mut self, value: String) -> &mut Self { self.date = Some(value); self } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -37,6 +37,7 @@ impl LogsByRetentionMonthlyUsage { self } } + impl Default for LogsByRetentionMonthlyUsage { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_logs_by_retention_org_usage.rs b/src/datadogV1/model/model_logs_by_retention_org_usage.rs index 5610cb472..277a14ad2 100644 --- a/src/datadogV1/model/model_logs_by_retention_org_usage.rs +++ b/src/datadogV1/model/model_logs_by_retention_org_usage.rs @@ -18,7 +18,7 @@ impl LogsByRetentionOrgUsage { LogsByRetentionOrgUsage { usage: None } } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl LogsByRetentionOrgUsage { self } } + impl Default for LogsByRetentionOrgUsage { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_logs_by_retention_orgs.rs b/src/datadogV1/model/model_logs_by_retention_orgs.rs index 5c282034a..184d42593 100644 --- a/src/datadogV1/model/model_logs_by_retention_orgs.rs +++ b/src/datadogV1/model/model_logs_by_retention_orgs.rs @@ -18,7 +18,7 @@ impl LogsByRetentionOrgs { LogsByRetentionOrgs { usage: None } } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl LogsByRetentionOrgs { self } } + impl Default for LogsByRetentionOrgs { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_logs_category_processor.rs b/src/datadogV1/model/model_logs_category_processor.rs index f8c5393d8..b2191a8c9 100644 --- a/src/datadogV1/model/model_logs_category_processor.rs +++ b/src/datadogV1/model/model_logs_category_processor.rs @@ -53,12 +53,12 @@ impl LogsCategoryProcessor { } } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV1/model/model_logs_category_processor_category.rs b/src/datadogV1/model/model_logs_category_processor_category.rs index 08b400e72..faad4051d 100644 --- a/src/datadogV1/model/model_logs_category_processor_category.rs +++ b/src/datadogV1/model/model_logs_category_processor_category.rs @@ -24,16 +24,17 @@ impl LogsCategoryProcessorCategory { } } - pub fn with_filter(&mut self, value: crate::datadogV1::model::LogsFilter) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV1::model::LogsFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } } + impl Default for LogsCategoryProcessorCategory { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_logs_date_remapper.rs b/src/datadogV1/model/model_logs_date_remapper.rs index 0a00acdde..af7a87c46 100644 --- a/src/datadogV1/model/model_logs_date_remapper.rs +++ b/src/datadogV1/model/model_logs_date_remapper.rs @@ -53,12 +53,12 @@ impl LogsDateRemapper { } } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV1/model/model_logs_exclusion.rs b/src/datadogV1/model/model_logs_exclusion.rs index dad196010..c8a8e4988 100644 --- a/src/datadogV1/model/model_logs_exclusion.rs +++ b/src/datadogV1/model/model_logs_exclusion.rs @@ -28,15 +28,12 @@ impl LogsExclusion { } } - pub fn with_filter( - &mut self, - value: crate::datadogV1::model::LogsExclusionFilter, - ) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV1::model::LogsExclusionFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } diff --git a/src/datadogV1/model/model_logs_exclusion_filter.rs b/src/datadogV1/model/model_logs_exclusion_filter.rs index 4a5997761..904a29395 100644 --- a/src/datadogV1/model/model_logs_exclusion_filter.rs +++ b/src/datadogV1/model/model_logs_exclusion_filter.rs @@ -26,7 +26,7 @@ impl LogsExclusionFilter { } } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } diff --git a/src/datadogV1/model/model_logs_filter.rs b/src/datadogV1/model/model_logs_filter.rs index cc4a2be26..aa7fc56f2 100644 --- a/src/datadogV1/model/model_logs_filter.rs +++ b/src/datadogV1/model/model_logs_filter.rs @@ -18,11 +18,12 @@ impl LogsFilter { LogsFilter { query: None } } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } } + impl Default for LogsFilter { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_logs_geo_ip_parser.rs b/src/datadogV1/model/model_logs_geo_ip_parser.rs index 420d56707..7a23ec1df 100644 --- a/src/datadogV1/model/model_logs_geo_ip_parser.rs +++ b/src/datadogV1/model/model_logs_geo_ip_parser.rs @@ -41,12 +41,12 @@ impl LogsGeoIPParser { } } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV1/model/model_logs_grok_parser.rs b/src/datadogV1/model/model_logs_grok_parser.rs index b80176d8e..fc61bd2ed 100644 --- a/src/datadogV1/model/model_logs_grok_parser.rs +++ b/src/datadogV1/model/model_logs_grok_parser.rs @@ -45,17 +45,17 @@ impl LogsGrokParser { } } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_samples(&mut self, value: Vec) -> &mut Self { + pub fn samples(&mut self, value: Vec) -> &mut Self { self.samples = Some(value); self } diff --git a/src/datadogV1/model/model_logs_grok_parser_rules.rs b/src/datadogV1/model/model_logs_grok_parser_rules.rs index 8af543c1a..933cf95cb 100644 --- a/src/datadogV1/model/model_logs_grok_parser_rules.rs +++ b/src/datadogV1/model/model_logs_grok_parser_rules.rs @@ -24,7 +24,7 @@ impl LogsGrokParserRules { } } - pub fn with_support_rules(&mut self, value: String) -> &mut Self { + pub fn support_rules(&mut self, value: String) -> &mut Self { self.support_rules = Some(value); self } diff --git a/src/datadogV1/model/model_logs_index.rs b/src/datadogV1/model/model_logs_index.rs index daa45be3f..e8af61f1f 100644 --- a/src/datadogV1/model/model_logs_index.rs +++ b/src/datadogV1/model/model_logs_index.rs @@ -44,12 +44,12 @@ impl LogsIndex { } } - pub fn with_daily_limit(&mut self, value: i64) -> &mut Self { + pub fn daily_limit(&mut self, value: i64) -> &mut Self { self.daily_limit = Some(value); self } - pub fn with_exclusion_filters( + pub fn exclusion_filters( &mut self, value: Vec, ) -> &mut Self { @@ -57,12 +57,12 @@ impl LogsIndex { self } - pub fn with_is_rate_limited(&mut self, value: bool) -> &mut Self { + pub fn is_rate_limited(&mut self, value: bool) -> &mut Self { self.is_rate_limited = Some(value); self } - pub fn with_num_retention_days(&mut self, value: i64) -> &mut Self { + pub fn num_retention_days(&mut self, value: i64) -> &mut Self { self.num_retention_days = Some(value); self } diff --git a/src/datadogV1/model/model_logs_index_list_response.rs b/src/datadogV1/model/model_logs_index_list_response.rs index 1bf4a0e65..7d430f79a 100644 --- a/src/datadogV1/model/model_logs_index_list_response.rs +++ b/src/datadogV1/model/model_logs_index_list_response.rs @@ -18,11 +18,12 @@ impl LogsIndexListResponse { LogsIndexListResponse { indexes: None } } - pub fn with_indexes(&mut self, value: Vec) -> &mut Self { + pub fn indexes(&mut self, value: Vec) -> &mut Self { self.indexes = Some(value); self } } + impl Default for LogsIndexListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_logs_index_update_request.rs b/src/datadogV1/model/model_logs_index_update_request.rs index 8ef12db03..a95124e7c 100644 --- a/src/datadogV1/model/model_logs_index_update_request.rs +++ b/src/datadogV1/model/model_logs_index_update_request.rs @@ -44,17 +44,17 @@ impl LogsIndexUpdateRequest { } } - pub fn with_daily_limit(&mut self, value: i64) -> &mut Self { + pub fn daily_limit(&mut self, value: i64) -> &mut Self { self.daily_limit = Some(value); self } - pub fn with_disable_daily_limit(&mut self, value: bool) -> &mut Self { + pub fn disable_daily_limit(&mut self, value: bool) -> &mut Self { self.disable_daily_limit = Some(value); self } - pub fn with_exclusion_filters( + pub fn exclusion_filters( &mut self, value: Vec, ) -> &mut Self { @@ -62,7 +62,7 @@ impl LogsIndexUpdateRequest { self } - pub fn with_num_retention_days(&mut self, value: i64) -> &mut Self { + pub fn num_retention_days(&mut self, value: i64) -> &mut Self { self.num_retention_days = Some(value); self } diff --git a/src/datadogV1/model/model_logs_list_request.rs b/src/datadogV1/model/model_logs_list_request.rs index 31e7af8fa..00e2892e2 100644 --- a/src/datadogV1/model/model_logs_list_request.rs +++ b/src/datadogV1/model/model_logs_list_request.rs @@ -45,27 +45,27 @@ impl LogsListRequest { } } - pub fn with_index(&mut self, value: String) -> &mut Self { + pub fn index(&mut self, value: String) -> &mut Self { self.index = Some(value); self } - pub fn with_limit(&mut self, value: i32) -> &mut Self { + pub fn limit(&mut self, value: i32) -> &mut Self { self.limit = Some(value); self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } - pub fn with_sort(&mut self, value: crate::datadogV1::model::LogsSort) -> &mut Self { + pub fn sort(&mut self, value: crate::datadogV1::model::LogsSort) -> &mut Self { self.sort = Some(value); self } - pub fn with_start_at(&mut self, value: String) -> &mut Self { + pub fn start_at(&mut self, value: String) -> &mut Self { self.start_at = Some(value); self } diff --git a/src/datadogV1/model/model_logs_list_request_time.rs b/src/datadogV1/model/model_logs_list_request_time.rs index 66c6485d6..86c65cfb7 100644 --- a/src/datadogV1/model/model_logs_list_request_time.rs +++ b/src/datadogV1/model/model_logs_list_request_time.rs @@ -29,7 +29,7 @@ impl LogsListRequestTime { } } - pub fn with_timezone(&mut self, value: String) -> &mut Self { + pub fn timezone(&mut self, value: String) -> &mut Self { self.timezone = Some(value); self } diff --git a/src/datadogV1/model/model_logs_list_response.rs b/src/datadogV1/model/model_logs_list_response.rs index 11215354c..09e783adc 100644 --- a/src/datadogV1/model/model_logs_list_response.rs +++ b/src/datadogV1/model/model_logs_list_response.rs @@ -33,21 +33,22 @@ impl LogsListResponse { } } - pub fn with_logs(&mut self, value: Vec) -> &mut Self { + pub fn logs(&mut self, value: Vec) -> &mut Self { self.logs = Some(value); self } - pub fn with_next_log_id(&mut self, value: Option) -> &mut Self { + pub fn next_log_id(&mut self, value: Option) -> &mut Self { self.next_log_id = Some(value); self } - pub fn with_status(&mut self, value: String) -> &mut Self { + pub fn status(&mut self, value: String) -> &mut Self { self.status = Some(value); self } } + impl Default for LogsListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_logs_lookup_processor.rs b/src/datadogV1/model/model_logs_lookup_processor.rs index 1215662a1..245427005 100644 --- a/src/datadogV1/model/model_logs_lookup_processor.rs +++ b/src/datadogV1/model/model_logs_lookup_processor.rs @@ -56,17 +56,17 @@ impl LogsLookupProcessor { } } - pub fn with_default_lookup(&mut self, value: String) -> &mut Self { + pub fn default_lookup(&mut self, value: String) -> &mut Self { self.default_lookup = Some(value); self } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV1/model/model_logs_message_remapper.rs b/src/datadogV1/model/model_logs_message_remapper.rs index a9bf3d8f7..f7166c6d0 100644 --- a/src/datadogV1/model/model_logs_message_remapper.rs +++ b/src/datadogV1/model/model_logs_message_remapper.rs @@ -40,12 +40,12 @@ impl LogsMessageRemapper { } } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV1/model/model_logs_pipeline.rs b/src/datadogV1/model/model_logs_pipeline.rs index 8c2d6e9b3..b5a757fee 100644 --- a/src/datadogV1/model/model_logs_pipeline.rs +++ b/src/datadogV1/model/model_logs_pipeline.rs @@ -48,35 +48,32 @@ impl LogsPipeline { } } - pub fn with_filter(&mut self, value: crate::datadogV1::model::LogsFilter) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV1::model::LogsFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_is_read_only(&mut self, value: bool) -> &mut Self { + pub fn is_read_only(&mut self, value: bool) -> &mut Self { self.is_read_only = Some(value); self } - pub fn with_processors( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn processors(&mut self, value: Vec) -> &mut Self { self.processors = Some(value); self } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } diff --git a/src/datadogV1/model/model_logs_pipeline_processor.rs b/src/datadogV1/model/model_logs_pipeline_processor.rs index dfd439905..b8fe13e76 100644 --- a/src/datadogV1/model/model_logs_pipeline_processor.rs +++ b/src/datadogV1/model/model_logs_pipeline_processor.rs @@ -40,25 +40,22 @@ impl LogsPipelineProcessor { } } - pub fn with_filter(&mut self, value: crate::datadogV1::model::LogsFilter) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV1::model::LogsFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_processors( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn processors(&mut self, value: Vec) -> &mut Self { self.processors = Some(value); self } diff --git a/src/datadogV1/model/model_logs_processor.rs b/src/datadogV1/model/model_logs_processor.rs index 73ed6a525..d68e13a7f 100644 --- a/src/datadogV1/model/model_logs_processor.rs +++ b/src/datadogV1/model/model_logs_processor.rs @@ -7,20 +7,22 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum LogsProcessor { - LogsGrokParser(crate::datadogV1::model::LogsGrokParser), - LogsDateRemapper(crate::datadogV1::model::LogsDateRemapper), - LogsStatusRemapper(crate::datadogV1::model::LogsStatusRemapper), - LogsServiceRemapper(crate::datadogV1::model::LogsServiceRemapper), - LogsMessageRemapper(crate::datadogV1::model::LogsMessageRemapper), - LogsAttributeRemapper(crate::datadogV1::model::LogsAttributeRemapper), - LogsURLParser(crate::datadogV1::model::LogsURLParser), - LogsUserAgentParser(crate::datadogV1::model::LogsUserAgentParser), - LogsCategoryProcessor(crate::datadogV1::model::LogsCategoryProcessor), - LogsArithmeticProcessor(crate::datadogV1::model::LogsArithmeticProcessor), - LogsStringBuilderProcessor(crate::datadogV1::model::LogsStringBuilderProcessor), - LogsPipelineProcessor(crate::datadogV1::model::LogsPipelineProcessor), - LogsGeoIPParser(crate::datadogV1::model::LogsGeoIPParser), - LogsLookupProcessor(crate::datadogV1::model::LogsLookupProcessor), - ReferenceTableLogsLookupProcessor(crate::datadogV1::model::ReferenceTableLogsLookupProcessor), - LogsTraceRemapper(crate::datadogV1::model::LogsTraceRemapper), + LogsGrokParser(Box), + LogsDateRemapper(Box), + LogsStatusRemapper(Box), + LogsServiceRemapper(Box), + LogsMessageRemapper(Box), + LogsAttributeRemapper(Box), + LogsURLParser(Box), + LogsUserAgentParser(Box), + LogsCategoryProcessor(Box), + LogsArithmeticProcessor(Box), + LogsStringBuilderProcessor(Box), + LogsPipelineProcessor(Box), + LogsGeoIPParser(Box), + LogsLookupProcessor(Box), + ReferenceTableLogsLookupProcessor( + Box, + ), + LogsTraceRemapper(Box), } diff --git a/src/datadogV1/model/model_logs_query_compute.rs b/src/datadogV1/model/model_logs_query_compute.rs index 953d9cd4e..41a3046e8 100644 --- a/src/datadogV1/model/model_logs_query_compute.rs +++ b/src/datadogV1/model/model_logs_query_compute.rs @@ -28,12 +28,12 @@ impl LogsQueryCompute { } } - pub fn with_facet(&mut self, value: String) -> &mut Self { + pub fn facet(&mut self, value: String) -> &mut Self { self.facet = Some(value); self } - pub fn with_interval(&mut self, value: i64) -> &mut Self { + pub fn interval(&mut self, value: i64) -> &mut Self { self.interval = Some(value); self } diff --git a/src/datadogV1/model/model_logs_retention_agg_sum_usage.rs b/src/datadogV1/model/model_logs_retention_agg_sum_usage.rs index a65d16dc7..a1eb9c5c4 100644 --- a/src/datadogV1/model/model_logs_retention_agg_sum_usage.rs +++ b/src/datadogV1/model/model_logs_retention_agg_sum_usage.rs @@ -32,26 +32,27 @@ impl LogsRetentionAggSumUsage { } } - pub fn with_logs_indexed_logs_usage_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn logs_indexed_logs_usage_agg_sum(&mut self, value: i64) -> &mut Self { self.logs_indexed_logs_usage_agg_sum = Some(value); self } - pub fn with_logs_live_indexed_logs_usage_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn logs_live_indexed_logs_usage_agg_sum(&mut self, value: i64) -> &mut Self { self.logs_live_indexed_logs_usage_agg_sum = Some(value); self } - pub fn with_logs_rehydrated_indexed_logs_usage_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn logs_rehydrated_indexed_logs_usage_agg_sum(&mut self, value: i64) -> &mut Self { self.logs_rehydrated_indexed_logs_usage_agg_sum = Some(value); self } - pub fn with_retention(&mut self, value: String) -> &mut Self { + pub fn retention(&mut self, value: String) -> &mut Self { self.retention = Some(value); self } } + impl Default for LogsRetentionAggSumUsage { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_logs_retention_sum_usage.rs b/src/datadogV1/model/model_logs_retention_sum_usage.rs index 64e13a10b..16531764f 100644 --- a/src/datadogV1/model/model_logs_retention_sum_usage.rs +++ b/src/datadogV1/model/model_logs_retention_sum_usage.rs @@ -32,26 +32,27 @@ impl LogsRetentionSumUsage { } } - pub fn with_logs_indexed_logs_usage_sum(&mut self, value: i64) -> &mut Self { + pub fn logs_indexed_logs_usage_sum(&mut self, value: i64) -> &mut Self { self.logs_indexed_logs_usage_sum = Some(value); self } - pub fn with_logs_live_indexed_logs_usage_sum(&mut self, value: i64) -> &mut Self { + pub fn logs_live_indexed_logs_usage_sum(&mut self, value: i64) -> &mut Self { self.logs_live_indexed_logs_usage_sum = Some(value); self } - pub fn with_logs_rehydrated_indexed_logs_usage_sum(&mut self, value: i64) -> &mut Self { + pub fn logs_rehydrated_indexed_logs_usage_sum(&mut self, value: i64) -> &mut Self { self.logs_rehydrated_indexed_logs_usage_sum = Some(value); self } - pub fn with_retention(&mut self, value: String) -> &mut Self { + pub fn retention(&mut self, value: String) -> &mut Self { self.retention = Some(value); self } } + impl Default for LogsRetentionSumUsage { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_logs_service_remapper.rs b/src/datadogV1/model/model_logs_service_remapper.rs index 430fa63d0..13039cae9 100644 --- a/src/datadogV1/model/model_logs_service_remapper.rs +++ b/src/datadogV1/model/model_logs_service_remapper.rs @@ -38,12 +38,12 @@ impl LogsServiceRemapper { } } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV1/model/model_logs_status_remapper.rs b/src/datadogV1/model/model_logs_status_remapper.rs index 5966acf36..edf62e256 100644 --- a/src/datadogV1/model/model_logs_status_remapper.rs +++ b/src/datadogV1/model/model_logs_status_remapper.rs @@ -52,12 +52,12 @@ impl LogsStatusRemapper { } } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV1/model/model_logs_string_builder_processor.rs b/src/datadogV1/model/model_logs_string_builder_processor.rs index e58b718a3..28e1ae6ff 100644 --- a/src/datadogV1/model/model_logs_string_builder_processor.rs +++ b/src/datadogV1/model/model_logs_string_builder_processor.rs @@ -57,17 +57,17 @@ impl LogsStringBuilderProcessor { } } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_is_replace_missing(&mut self, value: bool) -> &mut Self { + pub fn is_replace_missing(&mut self, value: bool) -> &mut Self { self.is_replace_missing = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV1/model/model_logs_trace_remapper.rs b/src/datadogV1/model/model_logs_trace_remapper.rs index e1cef9b8b..61d437e85 100644 --- a/src/datadogV1/model/model_logs_trace_remapper.rs +++ b/src/datadogV1/model/model_logs_trace_remapper.rs @@ -37,17 +37,17 @@ impl LogsTraceRemapper { } } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_sources(&mut self, value: Vec) -> &mut Self { + pub fn sources(&mut self, value: Vec) -> &mut Self { self.sources = Some(value); self } diff --git a/src/datadogV1/model/model_logs_url_parser.rs b/src/datadogV1/model/model_logs_url_parser.rs index 5b5ac5d34..1ae208e6f 100644 --- a/src/datadogV1/model/model_logs_url_parser.rs +++ b/src/datadogV1/model/model_logs_url_parser.rs @@ -48,17 +48,17 @@ impl LogsURLParser { } } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_normalize_ending_slashes(&mut self, value: Option) -> &mut Self { + pub fn normalize_ending_slashes(&mut self, value: Option) -> &mut Self { self.normalize_ending_slashes = Some(value); self } diff --git a/src/datadogV1/model/model_logs_user_agent_parser.rs b/src/datadogV1/model/model_logs_user_agent_parser.rs index 887d17503..ec7f44599 100644 --- a/src/datadogV1/model/model_logs_user_agent_parser.rs +++ b/src/datadogV1/model/model_logs_user_agent_parser.rs @@ -45,17 +45,17 @@ impl LogsUserAgentParser { } } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_is_encoded(&mut self, value: bool) -> &mut Self { + pub fn is_encoded(&mut self, value: bool) -> &mut Self { self.is_encoded = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV1/model/model_matching_downtime.rs b/src/datadogV1/model/model_matching_downtime.rs index c023ccbba..cd2bb694a 100644 --- a/src/datadogV1/model/model_matching_downtime.rs +++ b/src/datadogV1/model/model_matching_downtime.rs @@ -34,17 +34,17 @@ impl MatchingDowntime { } } - pub fn with_end(&mut self, value: Option) -> &mut Self { + pub fn end(&mut self, value: Option) -> &mut Self { self.end = Some(value); self } - pub fn with_scope(&mut self, value: Vec) -> &mut Self { + pub fn scope(&mut self, value: Vec) -> &mut Self { self.scope = Some(value); self } - pub fn with_start(&mut self, value: i64) -> &mut Self { + pub fn start(&mut self, value: i64) -> &mut Self { self.start = Some(value); self } diff --git a/src/datadogV1/model/model_metric_metadata.rs b/src/datadogV1/model/model_metric_metadata.rs index 5a7a34e93..02500c8b2 100644 --- a/src/datadogV1/model/model_metric_metadata.rs +++ b/src/datadogV1/model/model_metric_metadata.rs @@ -44,41 +44,42 @@ impl MetricMetadata { } } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_integration(&mut self, value: String) -> &mut Self { + pub fn integration(&mut self, value: String) -> &mut Self { self.integration = Some(value); self } - pub fn with_per_unit(&mut self, value: String) -> &mut Self { + pub fn per_unit(&mut self, value: String) -> &mut Self { self.per_unit = Some(value); self } - pub fn with_short_name(&mut self, value: String) -> &mut Self { + pub fn short_name(&mut self, value: String) -> &mut Self { self.short_name = Some(value); self } - pub fn with_statsd_interval(&mut self, value: i64) -> &mut Self { + pub fn statsd_interval(&mut self, value: i64) -> &mut Self { self.statsd_interval = Some(value); self } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } - pub fn with_unit(&mut self, value: String) -> &mut Self { + pub fn unit(&mut self, value: String) -> &mut Self { self.unit = Some(value); self } } + impl Default for MetricMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_metric_search_response.rs b/src/datadogV1/model/model_metric_search_response.rs index b6002aa45..9fa8a559c 100644 --- a/src/datadogV1/model/model_metric_search_response.rs +++ b/src/datadogV1/model/model_metric_search_response.rs @@ -18,7 +18,7 @@ impl MetricSearchResponse { MetricSearchResponse { results: None } } - pub fn with_results( + pub fn results( &mut self, value: crate::datadogV1::model::MetricSearchResponseResults, ) -> &mut Self { @@ -26,6 +26,7 @@ impl MetricSearchResponse { self } } + impl Default for MetricSearchResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_metric_search_response_results.rs b/src/datadogV1/model/model_metric_search_response_results.rs index 4d9ffe4ba..59fbc0f20 100644 --- a/src/datadogV1/model/model_metric_search_response_results.rs +++ b/src/datadogV1/model/model_metric_search_response_results.rs @@ -18,11 +18,12 @@ impl MetricSearchResponseResults { MetricSearchResponseResults { metrics: None } } - pub fn with_metrics(&mut self, value: Vec) -> &mut Self { + pub fn metrics(&mut self, value: Vec) -> &mut Self { self.metrics = Some(value); self } } + impl Default for MetricSearchResponseResults { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_metrics_list_response.rs b/src/datadogV1/model/model_metrics_list_response.rs index d2ba16826..e2c83be9d 100644 --- a/src/datadogV1/model/model_metrics_list_response.rs +++ b/src/datadogV1/model/model_metrics_list_response.rs @@ -24,16 +24,17 @@ impl MetricsListResponse { } } - pub fn with_from(&mut self, value: String) -> &mut Self { + pub fn from(&mut self, value: String) -> &mut Self { self.from = Some(value); self } - pub fn with_metrics(&mut self, value: Vec) -> &mut Self { + pub fn metrics(&mut self, value: Vec) -> &mut Self { self.metrics = Some(value); self } } + impl Default for MetricsListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_metrics_query_metadata.rs b/src/datadogV1/model/model_metrics_query_metadata.rs index ae57a4260..8d659c908 100644 --- a/src/datadogV1/model/model_metrics_query_metadata.rs +++ b/src/datadogV1/model/model_metrics_query_metadata.rs @@ -71,67 +71,67 @@ impl MetricsQueryMetadata { } } - pub fn with_aggr(&mut self, value: Option) -> &mut Self { + pub fn aggr(&mut self, value: Option) -> &mut Self { self.aggr = Some(value); self } - pub fn with_display_name(&mut self, value: String) -> &mut Self { + pub fn display_name(&mut self, value: String) -> &mut Self { self.display_name = Some(value); self } - pub fn with_end(&mut self, value: i64) -> &mut Self { + pub fn end(&mut self, value: i64) -> &mut Self { self.end = Some(value); self } - pub fn with_expression(&mut self, value: String) -> &mut Self { + pub fn expression(&mut self, value: String) -> &mut Self { self.expression = Some(value); self } - pub fn with_interval(&mut self, value: i64) -> &mut Self { + pub fn interval(&mut self, value: i64) -> &mut Self { self.interval = Some(value); self } - pub fn with_length(&mut self, value: i64) -> &mut Self { + pub fn length(&mut self, value: i64) -> &mut Self { self.length = Some(value); self } - pub fn with_metric(&mut self, value: String) -> &mut Self { + pub fn metric(&mut self, value: String) -> &mut Self { self.metric = Some(value); self } - pub fn with_pointlist(&mut self, value: Vec>>) -> &mut Self { + pub fn pointlist(&mut self, value: Vec>>) -> &mut Self { self.pointlist = Some(value); self } - pub fn with_query_index(&mut self, value: i64) -> &mut Self { + pub fn query_index(&mut self, value: i64) -> &mut Self { self.query_index = Some(value); self } - pub fn with_scope(&mut self, value: String) -> &mut Self { + pub fn scope(&mut self, value: String) -> &mut Self { self.scope = Some(value); self } - pub fn with_start(&mut self, value: i64) -> &mut Self { + pub fn start(&mut self, value: i64) -> &mut Self { self.start = Some(value); self } - pub fn with_tag_set(&mut self, value: Vec) -> &mut Self { + pub fn tag_set(&mut self, value: Vec) -> &mut Self { self.tag_set = Some(value); self } - pub fn with_unit( + pub fn unit( &mut self, value: Vec>, ) -> &mut Self { @@ -139,6 +139,7 @@ impl MetricsQueryMetadata { self } } + impl Default for MetricsQueryMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_metrics_query_response.rs b/src/datadogV1/model/model_metrics_query_response.rs index 591c6ab38..9b6ede7ce 100644 --- a/src/datadogV1/model/model_metrics_query_response.rs +++ b/src/datadogV1/model/model_metrics_query_response.rs @@ -52,37 +52,37 @@ impl MetricsQueryResponse { } } - pub fn with_error(&mut self, value: String) -> &mut Self { + pub fn error(&mut self, value: String) -> &mut Self { self.error = Some(value); self } - pub fn with_from_date(&mut self, value: i64) -> &mut Self { + pub fn from_date(&mut self, value: i64) -> &mut Self { self.from_date = Some(value); self } - pub fn with_group_by(&mut self, value: Vec) -> &mut Self { + pub fn group_by(&mut self, value: Vec) -> &mut Self { self.group_by = Some(value); self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } - pub fn with_res_type(&mut self, value: String) -> &mut Self { + pub fn res_type(&mut self, value: String) -> &mut Self { self.res_type = Some(value); self } - pub fn with_series( + pub fn series( &mut self, value: Vec, ) -> &mut Self { @@ -90,16 +90,17 @@ impl MetricsQueryResponse { self } - pub fn with_status(&mut self, value: String) -> &mut Self { + pub fn status(&mut self, value: String) -> &mut Self { self.status = Some(value); self } - pub fn with_to_date(&mut self, value: i64) -> &mut Self { + pub fn to_date(&mut self, value: i64) -> &mut Self { self.to_date = Some(value); self } } + impl Default for MetricsQueryResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_metrics_query_unit.rs b/src/datadogV1/model/model_metrics_query_unit.rs index 313bfd0e3..daee17b9d 100644 --- a/src/datadogV1/model/model_metrics_query_unit.rs +++ b/src/datadogV1/model/model_metrics_query_unit.rs @@ -36,31 +36,32 @@ impl MetricsQueryUnit { } } - pub fn with_family(&mut self, value: String) -> &mut Self { + pub fn family(&mut self, value: String) -> &mut Self { self.family = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_plural(&mut self, value: String) -> &mut Self { + pub fn plural(&mut self, value: String) -> &mut Self { self.plural = Some(value); self } - pub fn with_scale_factor(&mut self, value: f64) -> &mut Self { + pub fn scale_factor(&mut self, value: f64) -> &mut Self { self.scale_factor = Some(value); self } - pub fn with_short_name(&mut self, value: String) -> &mut Self { + pub fn short_name(&mut self, value: String) -> &mut Self { self.short_name = Some(value); self } } + impl Default for MetricsQueryUnit { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor.rs b/src/datadogV1/model/model_monitor.rs index 9531a48ca..77f0d5997 100644 --- a/src/datadogV1/model/model_monitor.rs +++ b/src/datadogV1/model/model_monitor.rs @@ -96,27 +96,27 @@ impl Monitor { } } - pub fn with_created(&mut self, value: String) -> &mut Self { + pub fn created(&mut self, value: String) -> &mut Self { self.created = Some(value); self } - pub fn with_creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + pub fn creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { self.creator = Some(value); self } - pub fn with_deleted(&mut self, value: Option) -> &mut Self { + pub fn deleted(&mut self, value: Option) -> &mut Self { self.deleted = Some(value); self } - pub fn with_id(&mut self, value: i64) -> &mut Self { + pub fn id(&mut self, value: i64) -> &mut Self { self.id = Some(value); self } - pub fn with_matching_downtimes( + pub fn matching_downtimes( &mut self, value: Vec, ) -> &mut Self { @@ -124,32 +124,32 @@ impl Monitor { self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } - pub fn with_modified(&mut self, value: String) -> &mut Self { + pub fn modified(&mut self, value: String) -> &mut Self { self.modified = Some(value); self } - pub fn with_multi(&mut self, value: bool) -> &mut Self { + pub fn multi(&mut self, value: bool) -> &mut Self { self.multi = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_options(&mut self, value: crate::datadogV1::model::MonitorOptions) -> &mut Self { + pub fn options(&mut self, value: crate::datadogV1::model::MonitorOptions) -> &mut Self { self.options = Some(value); self } - pub fn with_overall_state( + pub fn overall_state( &mut self, value: crate::datadogV1::model::MonitorOverallStates, ) -> &mut Self { @@ -157,22 +157,22 @@ impl Monitor { self } - pub fn with_priority(&mut self, value: Option) -> &mut Self { + pub fn priority(&mut self, value: Option) -> &mut Self { self.priority = Some(value); self } - pub fn with_restricted_roles(&mut self, value: Option>) -> &mut Self { + pub fn restricted_roles(&mut self, value: Option>) -> &mut Self { self.restricted_roles = Some(value); self } - pub fn with_state(&mut self, value: crate::datadogV1::model::MonitorState) -> &mut Self { + pub fn state(&mut self, value: crate::datadogV1::model::MonitorState) -> &mut Self { self.state = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } diff --git a/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition.rs b/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition.rs index 5c6a96b69..16d902c94 100644 --- a/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition.rs +++ b/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition.rs @@ -45,7 +45,7 @@ impl MonitorFormulaAndFunctionEventQueryDefinition { } } - pub fn with_group_by( + pub fn group_by( &mut self, value: Vec, ) -> &mut Self { @@ -53,12 +53,12 @@ impl MonitorFormulaAndFunctionEventQueryDefinition { self } - pub fn with_indexes(&mut self, value: Vec) -> &mut Self { + pub fn indexes(&mut self, value: Vec) -> &mut Self { self.indexes = Some(value); self } - pub fn with_search( + pub fn search( &mut self, value: crate::datadogV1::model::MonitorFormulaAndFunctionEventQueryDefinitionSearch, ) -> &mut Self { diff --git a/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition_compute.rs b/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition_compute.rs index 74f6aa0b1..907c4914f 100644 --- a/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition_compute.rs +++ b/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition_compute.rs @@ -30,12 +30,12 @@ impl MonitorFormulaAndFunctionEventQueryDefinitionCompute { } } - pub fn with_interval(&mut self, value: i64) -> &mut Self { + pub fn interval(&mut self, value: i64) -> &mut Self { self.interval = Some(value); self } - pub fn with_metric(&mut self, value: String) -> &mut Self { + pub fn metric(&mut self, value: String) -> &mut Self { self.metric = Some(value); self } diff --git a/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by.rs b/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by.rs index 9d667cfa6..07d3ed0fb 100644 --- a/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by.rs +++ b/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by.rs @@ -28,12 +28,12 @@ impl MonitorFormulaAndFunctionEventQueryGroupBy { } } - pub fn with_limit(&mut self, value: i64) -> &mut Self { + pub fn limit(&mut self, value: i64) -> &mut Self { self.limit = Some(value); self } - pub fn with_sort( + pub fn sort( &mut self, value: crate::datadogV1::model::MonitorFormulaAndFunctionEventQueryGroupBySort, ) -> &mut Self { diff --git a/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by_sort.rs b/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by_sort.rs index b1962cb9e..7a12bec0c 100644 --- a/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by_sort.rs +++ b/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by_sort.rs @@ -30,12 +30,12 @@ impl MonitorFormulaAndFunctionEventQueryGroupBySort { } } - pub fn with_metric(&mut self, value: String) -> &mut Self { + pub fn metric(&mut self, value: String) -> &mut Self { self.metric = Some(value); self } - pub fn with_order(&mut self, value: crate::datadogV1::model::QuerySortOrder) -> &mut Self { + pub fn order(&mut self, value: crate::datadogV1::model::QuerySortOrder) -> &mut Self { self.order = Some(value); self } diff --git a/src/datadogV1/model/model_monitor_formula_and_function_query_definition.rs b/src/datadogV1/model/model_monitor_formula_and_function_query_definition.rs index 6867b9954..6a0f69dc7 100644 --- a/src/datadogV1/model/model_monitor_formula_and_function_query_definition.rs +++ b/src/datadogV1/model/model_monitor_formula_and_function_query_definition.rs @@ -8,6 +8,6 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum MonitorFormulaAndFunctionQueryDefinition { MonitorFormulaAndFunctionEventQueryDefinition( - crate::datadogV1::model::MonitorFormulaAndFunctionEventQueryDefinition, + Box, ), } diff --git a/src/datadogV1/model/model_monitor_group_search_response.rs b/src/datadogV1/model/model_monitor_group_search_response.rs index a6ac6fece..fddb3b63b 100644 --- a/src/datadogV1/model/model_monitor_group_search_response.rs +++ b/src/datadogV1/model/model_monitor_group_search_response.rs @@ -28,7 +28,7 @@ impl MonitorGroupSearchResponse { } } - pub fn with_counts( + pub fn counts( &mut self, value: crate::datadogV1::model::MonitorGroupSearchResponseCounts, ) -> &mut Self { @@ -36,7 +36,7 @@ impl MonitorGroupSearchResponse { self } - pub fn with_groups( + pub fn groups( &mut self, value: Vec, ) -> &mut Self { @@ -44,7 +44,7 @@ impl MonitorGroupSearchResponse { self } - pub fn with_metadata( + pub fn metadata( &mut self, value: crate::datadogV1::model::MonitorSearchResponseMetadata, ) -> &mut Self { @@ -52,6 +52,7 @@ impl MonitorGroupSearchResponse { self } } + impl Default for MonitorGroupSearchResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor_group_search_response_counts.rs b/src/datadogV1/model/model_monitor_group_search_response_counts.rs index 386092aaf..145675230 100644 --- a/src/datadogV1/model/model_monitor_group_search_response_counts.rs +++ b/src/datadogV1/model/model_monitor_group_search_response_counts.rs @@ -24,7 +24,7 @@ impl MonitorGroupSearchResponseCounts { } } - pub fn with_status( + pub fn status( &mut self, value: Vec, ) -> &mut Self { @@ -32,7 +32,7 @@ impl MonitorGroupSearchResponseCounts { self } - pub fn with_type_( + pub fn type_( &mut self, value: Vec, ) -> &mut Self { @@ -40,6 +40,7 @@ impl MonitorGroupSearchResponseCounts { self } } + impl Default for MonitorGroupSearchResponseCounts { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor_group_search_result.rs b/src/datadogV1/model/model_monitor_group_search_result.rs index b97213634..0675bcae5 100644 --- a/src/datadogV1/model/model_monitor_group_search_result.rs +++ b/src/datadogV1/model/model_monitor_group_search_result.rs @@ -48,44 +48,42 @@ impl MonitorGroupSearchResult { } } - pub fn with_group(&mut self, value: String) -> &mut Self { + pub fn group(&mut self, value: String) -> &mut Self { self.group = Some(value); self } - pub fn with_group_tags(&mut self, value: Vec) -> &mut Self { + pub fn group_tags(&mut self, value: Vec) -> &mut Self { self.group_tags = Some(value); self } - pub fn with_last_nodata_ts(&mut self, value: i64) -> &mut Self { + pub fn last_nodata_ts(&mut self, value: i64) -> &mut Self { self.last_nodata_ts = Some(value); self } - pub fn with_last_triggered_ts(&mut self, value: Option) -> &mut Self { + pub fn last_triggered_ts(&mut self, value: Option) -> &mut Self { self.last_triggered_ts = Some(value); self } - pub fn with_monitor_id(&mut self, value: i64) -> &mut Self { + pub fn monitor_id(&mut self, value: i64) -> &mut Self { self.monitor_id = Some(value); self } - pub fn with_monitor_name(&mut self, value: String) -> &mut Self { + pub fn monitor_name(&mut self, value: String) -> &mut Self { self.monitor_name = Some(value); self } - pub fn with_status( - &mut self, - value: crate::datadogV1::model::MonitorOverallStates, - ) -> &mut Self { + pub fn status(&mut self, value: crate::datadogV1::model::MonitorOverallStates) -> &mut Self { self.status = Some(value); self } } + impl Default for MonitorGroupSearchResult { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor_options.rs b/src/datadogV1/model/model_monitor_options.rs index fd2b66e54..309cf2771 100644 --- a/src/datadogV1/model/model_monitor_options.rs +++ b/src/datadogV1/model/model_monitor_options.rs @@ -228,7 +228,7 @@ impl MonitorOptions { } #[allow(deprecated)] - pub fn with_aggregation( + pub fn aggregation( &mut self, value: crate::datadogV1::model::MonitorOptionsAggregation, ) -> &mut Self { @@ -237,7 +237,7 @@ impl MonitorOptions { } #[allow(deprecated)] - pub fn with_device_ids( + pub fn device_ids( &mut self, value: Vec, ) -> &mut Self { @@ -246,85 +246,85 @@ impl MonitorOptions { } #[allow(deprecated)] - pub fn with_enable_logs_sample(&mut self, value: bool) -> &mut Self { + pub fn enable_logs_sample(&mut self, value: bool) -> &mut Self { self.enable_logs_sample = Some(value); self } #[allow(deprecated)] - pub fn with_enable_samples(&mut self, value: bool) -> &mut Self { + pub fn enable_samples(&mut self, value: bool) -> &mut Self { self.enable_samples = Some(value); self } #[allow(deprecated)] - pub fn with_escalation_message(&mut self, value: String) -> &mut Self { + pub fn escalation_message(&mut self, value: String) -> &mut Self { self.escalation_message = Some(value); self } #[allow(deprecated)] - pub fn with_evaluation_delay(&mut self, value: Option) -> &mut Self { + pub fn evaluation_delay(&mut self, value: Option) -> &mut Self { self.evaluation_delay = Some(value); self } #[allow(deprecated)] - pub fn with_group_retention_duration(&mut self, value: String) -> &mut Self { + pub fn group_retention_duration(&mut self, value: String) -> &mut Self { self.group_retention_duration = Some(value); self } #[allow(deprecated)] - pub fn with_groupby_simple_monitor(&mut self, value: bool) -> &mut Self { + pub fn groupby_simple_monitor(&mut self, value: bool) -> &mut Self { self.groupby_simple_monitor = Some(value); self } #[allow(deprecated)] - pub fn with_include_tags(&mut self, value: bool) -> &mut Self { + pub fn include_tags(&mut self, value: bool) -> &mut Self { self.include_tags = Some(value); self } #[allow(deprecated)] - pub fn with_locked(&mut self, value: bool) -> &mut Self { + pub fn locked(&mut self, value: bool) -> &mut Self { self.locked = Some(value); self } #[allow(deprecated)] - pub fn with_min_failure_duration(&mut self, value: Option) -> &mut Self { + pub fn min_failure_duration(&mut self, value: Option) -> &mut Self { self.min_failure_duration = Some(value); self } #[allow(deprecated)] - pub fn with_min_location_failed(&mut self, value: Option) -> &mut Self { + pub fn min_location_failed(&mut self, value: Option) -> &mut Self { self.min_location_failed = Some(value); self } #[allow(deprecated)] - pub fn with_new_group_delay(&mut self, value: Option) -> &mut Self { + pub fn new_group_delay(&mut self, value: Option) -> &mut Self { self.new_group_delay = Some(value); self } #[allow(deprecated)] - pub fn with_new_host_delay(&mut self, value: Option) -> &mut Self { + pub fn new_host_delay(&mut self, value: Option) -> &mut Self { self.new_host_delay = Some(value); self } #[allow(deprecated)] - pub fn with_no_data_timeframe(&mut self, value: Option) -> &mut Self { + pub fn no_data_timeframe(&mut self, value: Option) -> &mut Self { self.no_data_timeframe = Some(value); self } #[allow(deprecated)] - pub fn with_notification_preset_name( + pub fn notification_preset_name( &mut self, value: crate::datadogV1::model::MonitorOptionsNotificationPresets, ) -> &mut Self { @@ -333,25 +333,25 @@ impl MonitorOptions { } #[allow(deprecated)] - pub fn with_notify_audit(&mut self, value: bool) -> &mut Self { + pub fn notify_audit(&mut self, value: bool) -> &mut Self { self.notify_audit = Some(value); self } #[allow(deprecated)] - pub fn with_notify_by(&mut self, value: Vec) -> &mut Self { + pub fn notify_by(&mut self, value: Vec) -> &mut Self { self.notify_by = Some(value); self } #[allow(deprecated)] - pub fn with_notify_no_data(&mut self, value: bool) -> &mut Self { + pub fn notify_no_data(&mut self, value: bool) -> &mut Self { self.notify_no_data = Some(value); self } #[allow(deprecated)] - pub fn with_on_missing_data( + pub fn on_missing_data( &mut self, value: crate::datadogV1::model::OnMissingDataOption, ) -> &mut Self { @@ -360,19 +360,19 @@ impl MonitorOptions { } #[allow(deprecated)] - pub fn with_renotify_interval(&mut self, value: Option) -> &mut Self { + pub fn renotify_interval(&mut self, value: Option) -> &mut Self { self.renotify_interval = Some(value); self } #[allow(deprecated)] - pub fn with_renotify_occurrences(&mut self, value: Option) -> &mut Self { + pub fn renotify_occurrences(&mut self, value: Option) -> &mut Self { self.renotify_occurrences = Some(value); self } #[allow(deprecated)] - pub fn with_renotify_statuses( + pub fn renotify_statuses( &mut self, value: Option>, ) -> &mut Self { @@ -381,13 +381,13 @@ impl MonitorOptions { } #[allow(deprecated)] - pub fn with_require_full_window(&mut self, value: bool) -> &mut Self { + pub fn require_full_window(&mut self, value: bool) -> &mut Self { self.require_full_window = Some(value); self } #[allow(deprecated)] - pub fn with_scheduling_options( + pub fn scheduling_options( &mut self, value: crate::datadogV1::model::MonitorOptionsSchedulingOptions, ) -> &mut Self { @@ -396,19 +396,19 @@ impl MonitorOptions { } #[allow(deprecated)] - pub fn with_silenced(&mut self, value: std::collections::BTreeMap) -> &mut Self { + pub fn silenced(&mut self, value: std::collections::BTreeMap) -> &mut Self { self.silenced = Some(value); self } #[allow(deprecated)] - pub fn with_synthetics_check_id(&mut self, value: Option) -> &mut Self { + pub fn synthetics_check_id(&mut self, value: Option) -> &mut Self { self.synthetics_check_id = Some(value); self } #[allow(deprecated)] - pub fn with_threshold_windows( + pub fn threshold_windows( &mut self, value: crate::datadogV1::model::MonitorThresholdWindowOptions, ) -> &mut Self { @@ -417,22 +417,19 @@ impl MonitorOptions { } #[allow(deprecated)] - pub fn with_thresholds( - &mut self, - value: crate::datadogV1::model::MonitorThresholds, - ) -> &mut Self { + pub fn thresholds(&mut self, value: crate::datadogV1::model::MonitorThresholds) -> &mut Self { self.thresholds = Some(value); self } #[allow(deprecated)] - pub fn with_timeout_h(&mut self, value: Option) -> &mut Self { + pub fn timeout_h(&mut self, value: Option) -> &mut Self { self.timeout_h = Some(value); self } #[allow(deprecated)] - pub fn with_variables( + pub fn variables( &mut self, value: Vec, ) -> &mut Self { @@ -440,6 +437,7 @@ impl MonitorOptions { self } } + impl Default for MonitorOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor_options_aggregation.rs b/src/datadogV1/model/model_monitor_options_aggregation.rs index 2c21b7a24..e99382bd3 100644 --- a/src/datadogV1/model/model_monitor_options_aggregation.rs +++ b/src/datadogV1/model/model_monitor_options_aggregation.rs @@ -28,21 +28,22 @@ impl MonitorOptionsAggregation { } } - pub fn with_group_by(&mut self, value: String) -> &mut Self { + pub fn group_by(&mut self, value: String) -> &mut Self { self.group_by = Some(value); self } - pub fn with_metric(&mut self, value: String) -> &mut Self { + pub fn metric(&mut self, value: String) -> &mut Self { self.metric = Some(value); self } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } } + impl Default for MonitorOptionsAggregation { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor_options_custom_schedule.rs b/src/datadogV1/model/model_monitor_options_custom_schedule.rs index 0ffe224ef..ef1e85d2a 100644 --- a/src/datadogV1/model/model_monitor_options_custom_schedule.rs +++ b/src/datadogV1/model/model_monitor_options_custom_schedule.rs @@ -18,7 +18,7 @@ impl MonitorOptionsCustomSchedule { MonitorOptionsCustomSchedule { recurrences: None } } - pub fn with_recurrences( + pub fn recurrences( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl MonitorOptionsCustomSchedule { self } } + impl Default for MonitorOptionsCustomSchedule { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor_options_custom_schedule_recurrence.rs b/src/datadogV1/model/model_monitor_options_custom_schedule_recurrence.rs index 5fc450f70..8206b325d 100644 --- a/src/datadogV1/model/model_monitor_options_custom_schedule_recurrence.rs +++ b/src/datadogV1/model/model_monitor_options_custom_schedule_recurrence.rs @@ -28,21 +28,22 @@ impl MonitorOptionsCustomScheduleRecurrence { } } - pub fn with_rrule(&mut self, value: String) -> &mut Self { + pub fn rrule(&mut self, value: String) -> &mut Self { self.rrule = Some(value); self } - pub fn with_start(&mut self, value: String) -> &mut Self { + pub fn start(&mut self, value: String) -> &mut Self { self.start = Some(value); self } - pub fn with_timezone(&mut self, value: String) -> &mut Self { + pub fn timezone(&mut self, value: String) -> &mut Self { self.timezone = Some(value); self } } + impl Default for MonitorOptionsCustomScheduleRecurrence { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor_options_scheduling_options.rs b/src/datadogV1/model/model_monitor_options_scheduling_options.rs index 720787cca..b589de0d1 100644 --- a/src/datadogV1/model/model_monitor_options_scheduling_options.rs +++ b/src/datadogV1/model/model_monitor_options_scheduling_options.rs @@ -25,7 +25,7 @@ impl MonitorOptionsSchedulingOptions { } } - pub fn with_custom_schedule( + pub fn custom_schedule( &mut self, value: crate::datadogV1::model::MonitorOptionsCustomSchedule, ) -> &mut Self { @@ -33,7 +33,7 @@ impl MonitorOptionsSchedulingOptions { self } - pub fn with_evaluation_window( + pub fn evaluation_window( &mut self, value: crate::datadogV1::model::MonitorOptionsSchedulingOptionsEvaluationWindow, ) -> &mut Self { @@ -41,6 +41,7 @@ impl MonitorOptionsSchedulingOptions { self } } + impl Default for MonitorOptionsSchedulingOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor_options_scheduling_options_evaluation_window.rs b/src/datadogV1/model/model_monitor_options_scheduling_options_evaluation_window.rs index e52315c2c..daf169907 100644 --- a/src/datadogV1/model/model_monitor_options_scheduling_options_evaluation_window.rs +++ b/src/datadogV1/model/model_monitor_options_scheduling_options_evaluation_window.rs @@ -28,21 +28,22 @@ impl MonitorOptionsSchedulingOptionsEvaluationWindow { } } - pub fn with_day_starts(&mut self, value: String) -> &mut Self { + pub fn day_starts(&mut self, value: String) -> &mut Self { self.day_starts = Some(value); self } - pub fn with_hour_starts(&mut self, value: i32) -> &mut Self { + pub fn hour_starts(&mut self, value: i32) -> &mut Self { self.hour_starts = Some(value); self } - pub fn with_month_starts(&mut self, value: i32) -> &mut Self { + pub fn month_starts(&mut self, value: i32) -> &mut Self { self.month_starts = Some(value); self } } + impl Default for MonitorOptionsSchedulingOptionsEvaluationWindow { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor_search_count_item.rs b/src/datadogV1/model/model_monitor_search_count_item.rs index 1786d6e9d..f3a69c8e6 100644 --- a/src/datadogV1/model/model_monitor_search_count_item.rs +++ b/src/datadogV1/model/model_monitor_search_count_item.rs @@ -24,16 +24,17 @@ impl MonitorSearchCountItem { } } - pub fn with_count(&mut self, value: i64) -> &mut Self { + pub fn count(&mut self, value: i64) -> &mut Self { self.count = Some(value); self } - pub fn with_name(&mut self, value: serde_json::Value) -> &mut Self { + pub fn name(&mut self, value: serde_json::Value) -> &mut Self { self.name = Some(value); self } } + impl Default for MonitorSearchCountItem { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor_search_response.rs b/src/datadogV1/model/model_monitor_search_response.rs index d04b7a0a3..37c4beb42 100644 --- a/src/datadogV1/model/model_monitor_search_response.rs +++ b/src/datadogV1/model/model_monitor_search_response.rs @@ -28,7 +28,7 @@ impl MonitorSearchResponse { } } - pub fn with_counts( + pub fn counts( &mut self, value: crate::datadogV1::model::MonitorSearchResponseCounts, ) -> &mut Self { @@ -36,7 +36,7 @@ impl MonitorSearchResponse { self } - pub fn with_metadata( + pub fn metadata( &mut self, value: crate::datadogV1::model::MonitorSearchResponseMetadata, ) -> &mut Self { @@ -44,7 +44,7 @@ impl MonitorSearchResponse { self } - pub fn with_monitors( + pub fn monitors( &mut self, value: Vec, ) -> &mut Self { @@ -52,6 +52,7 @@ impl MonitorSearchResponse { self } } + impl Default for MonitorSearchResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor_search_response_counts.rs b/src/datadogV1/model/model_monitor_search_response_counts.rs index b8e67cdbf..7a88bcf2e 100644 --- a/src/datadogV1/model/model_monitor_search_response_counts.rs +++ b/src/datadogV1/model/model_monitor_search_response_counts.rs @@ -32,7 +32,7 @@ impl MonitorSearchResponseCounts { } } - pub fn with_muted( + pub fn muted( &mut self, value: Vec, ) -> &mut Self { @@ -40,7 +40,7 @@ impl MonitorSearchResponseCounts { self } - pub fn with_status( + pub fn status( &mut self, value: Vec, ) -> &mut Self { @@ -48,7 +48,7 @@ impl MonitorSearchResponseCounts { self } - pub fn with_tag( + pub fn tag( &mut self, value: Vec, ) -> &mut Self { @@ -56,7 +56,7 @@ impl MonitorSearchResponseCounts { self } - pub fn with_type_( + pub fn type_( &mut self, value: Vec, ) -> &mut Self { @@ -64,6 +64,7 @@ impl MonitorSearchResponseCounts { self } } + impl Default for MonitorSearchResponseCounts { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor_search_response_metadata.rs b/src/datadogV1/model/model_monitor_search_response_metadata.rs index a68338103..b048fc3dd 100644 --- a/src/datadogV1/model/model_monitor_search_response_metadata.rs +++ b/src/datadogV1/model/model_monitor_search_response_metadata.rs @@ -32,26 +32,27 @@ impl MonitorSearchResponseMetadata { } } - pub fn with_page(&mut self, value: i64) -> &mut Self { + pub fn page(&mut self, value: i64) -> &mut Self { self.page = Some(value); self } - pub fn with_page_count(&mut self, value: i64) -> &mut Self { + pub fn page_count(&mut self, value: i64) -> &mut Self { self.page_count = Some(value); self } - pub fn with_per_page(&mut self, value: i64) -> &mut Self { + pub fn per_page(&mut self, value: i64) -> &mut Self { self.per_page = Some(value); self } - pub fn with_total_count(&mut self, value: i64) -> &mut Self { + pub fn total_count(&mut self, value: i64) -> &mut Self { self.total_count = Some(value); self } } + impl Default for MonitorSearchResponseMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor_search_result.rs b/src/datadogV1/model/model_monitor_search_result.rs index 1d8ebde14..aa1b49d4b 100644 --- a/src/datadogV1/model/model_monitor_search_result.rs +++ b/src/datadogV1/model/model_monitor_search_result.rs @@ -75,37 +75,37 @@ impl MonitorSearchResult { } } - pub fn with_classification(&mut self, value: String) -> &mut Self { + pub fn classification(&mut self, value: String) -> &mut Self { self.classification = Some(value); self } - pub fn with_creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + pub fn creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { self.creator = Some(value); self } - pub fn with_id(&mut self, value: i64) -> &mut Self { + pub fn id(&mut self, value: i64) -> &mut Self { self.id = Some(value); self } - pub fn with_last_triggered_ts(&mut self, value: Option) -> &mut Self { + pub fn last_triggered_ts(&mut self, value: Option) -> &mut Self { self.last_triggered_ts = Some(value); self } - pub fn with_metrics(&mut self, value: Vec) -> &mut Self { + pub fn metrics(&mut self, value: Vec) -> &mut Self { self.metrics = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_notifications( + pub fn notifications( &mut self, value: Vec, ) -> &mut Self { @@ -113,39 +113,37 @@ impl MonitorSearchResult { self } - pub fn with_org_id(&mut self, value: i64) -> &mut Self { + pub fn org_id(&mut self, value: i64) -> &mut Self { self.org_id = Some(value); self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } - pub fn with_scopes(&mut self, value: Vec) -> &mut Self { + pub fn scopes(&mut self, value: Vec) -> &mut Self { self.scopes = Some(value); self } - pub fn with_status( - &mut self, - value: crate::datadogV1::model::MonitorOverallStates, - ) -> &mut Self { + pub fn status(&mut self, value: crate::datadogV1::model::MonitorOverallStates) -> &mut Self { self.status = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV1::model::MonitorType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV1::model::MonitorType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for MonitorSearchResult { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor_search_result_notification.rs b/src/datadogV1/model/model_monitor_search_result_notification.rs index dd63a7eff..6ea9e597c 100644 --- a/src/datadogV1/model/model_monitor_search_result_notification.rs +++ b/src/datadogV1/model/model_monitor_search_result_notification.rs @@ -24,16 +24,17 @@ impl MonitorSearchResultNotification { } } - pub fn with_handle(&mut self, value: String) -> &mut Self { + pub fn handle(&mut self, value: String) -> &mut Self { self.handle = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } } + impl Default for MonitorSearchResultNotification { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor_state.rs b/src/datadogV1/model/model_monitor_state.rs index faf116c9b..b210f0985 100644 --- a/src/datadogV1/model/model_monitor_state.rs +++ b/src/datadogV1/model/model_monitor_state.rs @@ -20,7 +20,7 @@ impl MonitorState { MonitorState { groups: None } } - pub fn with_groups( + pub fn groups( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -28,6 +28,7 @@ impl MonitorState { self } } + impl Default for MonitorState { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor_state_group.rs b/src/datadogV1/model/model_monitor_state_group.rs index e50b08422..2d287188f 100644 --- a/src/datadogV1/model/model_monitor_state_group.rs +++ b/src/datadogV1/model/model_monitor_state_group.rs @@ -40,39 +40,37 @@ impl MonitorStateGroup { } } - pub fn with_last_nodata_ts(&mut self, value: i64) -> &mut Self { + pub fn last_nodata_ts(&mut self, value: i64) -> &mut Self { self.last_nodata_ts = Some(value); self } - pub fn with_last_notified_ts(&mut self, value: i64) -> &mut Self { + pub fn last_notified_ts(&mut self, value: i64) -> &mut Self { self.last_notified_ts = Some(value); self } - pub fn with_last_resolved_ts(&mut self, value: i64) -> &mut Self { + pub fn last_resolved_ts(&mut self, value: i64) -> &mut Self { self.last_resolved_ts = Some(value); self } - pub fn with_last_triggered_ts(&mut self, value: i64) -> &mut Self { + pub fn last_triggered_ts(&mut self, value: i64) -> &mut Self { self.last_triggered_ts = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_status( - &mut self, - value: crate::datadogV1::model::MonitorOverallStates, - ) -> &mut Self { + pub fn status(&mut self, value: crate::datadogV1::model::MonitorOverallStates) -> &mut Self { self.status = Some(value); self } } + impl Default for MonitorStateGroup { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor_summary_widget_definition.rs b/src/datadogV1/model/model_monitor_summary_widget_definition.rs index 8bea1d1ab..27c419f18 100644 --- a/src/datadogV1/model/model_monitor_summary_widget_definition.rs +++ b/src/datadogV1/model/model_monitor_summary_widget_definition.rs @@ -79,7 +79,7 @@ impl MonitorSummaryWidgetDefinition { } #[allow(deprecated)] - pub fn with_color_preference( + pub fn color_preference( &mut self, value: crate::datadogV1::model::WidgetColorPreference, ) -> &mut Self { @@ -88,13 +88,13 @@ impl MonitorSummaryWidgetDefinition { } #[allow(deprecated)] - pub fn with_count(&mut self, value: i64) -> &mut Self { + pub fn count(&mut self, value: i64) -> &mut Self { self.count = Some(value); self } #[allow(deprecated)] - pub fn with_display_format( + pub fn display_format( &mut self, value: crate::datadogV1::model::WidgetMonitorSummaryDisplayFormat, ) -> &mut Self { @@ -103,64 +103,55 @@ impl MonitorSummaryWidgetDefinition { } #[allow(deprecated)] - pub fn with_hide_zero_counts(&mut self, value: bool) -> &mut Self { + pub fn hide_zero_counts(&mut self, value: bool) -> &mut Self { self.hide_zero_counts = Some(value); self } #[allow(deprecated)] - pub fn with_show_last_triggered(&mut self, value: bool) -> &mut Self { + pub fn show_last_triggered(&mut self, value: bool) -> &mut Self { self.show_last_triggered = Some(value); self } #[allow(deprecated)] - pub fn with_show_priority(&mut self, value: bool) -> &mut Self { + pub fn show_priority(&mut self, value: bool) -> &mut Self { self.show_priority = Some(value); self } #[allow(deprecated)] - pub fn with_sort( - &mut self, - value: crate::datadogV1::model::WidgetMonitorSummarySort, - ) -> &mut Self { + pub fn sort(&mut self, value: crate::datadogV1::model::WidgetMonitorSummarySort) -> &mut Self { self.sort = Some(value); self } #[allow(deprecated)] - pub fn with_start(&mut self, value: i64) -> &mut Self { + pub fn start(&mut self, value: i64) -> &mut Self { self.start = Some(value); self } #[allow(deprecated)] - pub fn with_summary_type( - &mut self, - value: crate::datadogV1::model::WidgetSummaryType, - ) -> &mut Self { + pub fn summary_type(&mut self, value: crate::datadogV1::model::WidgetSummaryType) -> &mut Self { self.summary_type = Some(value); self } #[allow(deprecated)] - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } #[allow(deprecated)] - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } #[allow(deprecated)] - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_monitor_threshold_window_options.rs b/src/datadogV1/model/model_monitor_threshold_window_options.rs index 04ba2f2fc..57696a9bb 100644 --- a/src/datadogV1/model/model_monitor_threshold_window_options.rs +++ b/src/datadogV1/model/model_monitor_threshold_window_options.rs @@ -32,16 +32,17 @@ impl MonitorThresholdWindowOptions { } } - pub fn with_recovery_window(&mut self, value: Option) -> &mut Self { + pub fn recovery_window(&mut self, value: Option) -> &mut Self { self.recovery_window = Some(value); self } - pub fn with_trigger_window(&mut self, value: Option) -> &mut Self { + pub fn trigger_window(&mut self, value: Option) -> &mut Self { self.trigger_window = Some(value); self } } + impl Default for MonitorThresholdWindowOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor_thresholds.rs b/src/datadogV1/model/model_monitor_thresholds.rs index d6688f284..d2e07a3a5 100644 --- a/src/datadogV1/model/model_monitor_thresholds.rs +++ b/src/datadogV1/model/model_monitor_thresholds.rs @@ -56,36 +56,37 @@ impl MonitorThresholds { } } - pub fn with_critical(&mut self, value: f64) -> &mut Self { + pub fn critical(&mut self, value: f64) -> &mut Self { self.critical = Some(value); self } - pub fn with_critical_recovery(&mut self, value: Option) -> &mut Self { + pub fn critical_recovery(&mut self, value: Option) -> &mut Self { self.critical_recovery = Some(value); self } - pub fn with_ok(&mut self, value: Option) -> &mut Self { + pub fn ok(&mut self, value: Option) -> &mut Self { self.ok = Some(value); self } - pub fn with_unknown(&mut self, value: Option) -> &mut Self { + pub fn unknown(&mut self, value: Option) -> &mut Self { self.unknown = Some(value); self } - pub fn with_warning(&mut self, value: Option) -> &mut Self { + pub fn warning(&mut self, value: Option) -> &mut Self { self.warning = Some(value); self } - pub fn with_warning_recovery(&mut self, value: Option) -> &mut Self { + pub fn warning_recovery(&mut self, value: Option) -> &mut Self { self.warning_recovery = Some(value); self } } + impl Default for MonitorThresholds { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monitor_update_request.rs b/src/datadogV1/model/model_monitor_update_request.rs index 3a5b17c97..2c0637641 100644 --- a/src/datadogV1/model/model_monitor_update_request.rs +++ b/src/datadogV1/model/model_monitor_update_request.rs @@ -88,52 +88,52 @@ impl MonitorUpdateRequest { } } - pub fn with_created(&mut self, value: String) -> &mut Self { + pub fn created(&mut self, value: String) -> &mut Self { self.created = Some(value); self } - pub fn with_creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + pub fn creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { self.creator = Some(value); self } - pub fn with_deleted(&mut self, value: Option) -> &mut Self { + pub fn deleted(&mut self, value: Option) -> &mut Self { self.deleted = Some(value); self } - pub fn with_id(&mut self, value: i64) -> &mut Self { + pub fn id(&mut self, value: i64) -> &mut Self { self.id = Some(value); self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } - pub fn with_modified(&mut self, value: String) -> &mut Self { + pub fn modified(&mut self, value: String) -> &mut Self { self.modified = Some(value); self } - pub fn with_multi(&mut self, value: bool) -> &mut Self { + pub fn multi(&mut self, value: bool) -> &mut Self { self.multi = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_options(&mut self, value: crate::datadogV1::model::MonitorOptions) -> &mut Self { + pub fn options(&mut self, value: crate::datadogV1::model::MonitorOptions) -> &mut Self { self.options = Some(value); self } - pub fn with_overall_state( + pub fn overall_state( &mut self, value: crate::datadogV1::model::MonitorOverallStates, ) -> &mut Self { @@ -141,36 +141,37 @@ impl MonitorUpdateRequest { self } - pub fn with_priority(&mut self, value: i64) -> &mut Self { + pub fn priority(&mut self, value: i64) -> &mut Self { self.priority = Some(value); self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } - pub fn with_restricted_roles(&mut self, value: Option>) -> &mut Self { + pub fn restricted_roles(&mut self, value: Option>) -> &mut Self { self.restricted_roles = Some(value); self } - pub fn with_state(&mut self, value: crate::datadogV1::model::MonitorState) -> &mut Self { + pub fn state(&mut self, value: crate::datadogV1::model::MonitorState) -> &mut Self { self.state = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV1::model::MonitorType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV1::model::MonitorType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for MonitorUpdateRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monthly_usage_attribution_body.rs b/src/datadogV1/model/model_monthly_usage_attribution_body.rs index 2c1386db8..d2d26310d 100644 --- a/src/datadogV1/model/model_monthly_usage_attribution_body.rs +++ b/src/datadogV1/model/model_monthly_usage_attribution_body.rs @@ -52,32 +52,32 @@ impl MonthlyUsageAttributionBody { } } - pub fn with_month(&mut self, value: String) -> &mut Self { + pub fn month(&mut self, value: String) -> &mut Self { self.month = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_region(&mut self, value: String) -> &mut Self { + pub fn region(&mut self, value: String) -> &mut Self { self.region = Some(value); self } - pub fn with_tag_config_source(&mut self, value: String) -> &mut Self { + pub fn tag_config_source(&mut self, value: String) -> &mut Self { self.tag_config_source = Some(value); self } - pub fn with_tags( + pub fn tags( &mut self, value: Option>>>, ) -> &mut Self { @@ -85,12 +85,12 @@ impl MonthlyUsageAttributionBody { self } - pub fn with_updated_at(&mut self, value: String) -> &mut Self { + pub fn updated_at(&mut self, value: String) -> &mut Self { self.updated_at = Some(value); self } - pub fn with_values( + pub fn values( &mut self, value: crate::datadogV1::model::MonthlyUsageAttributionValues, ) -> &mut Self { @@ -98,6 +98,7 @@ impl MonthlyUsageAttributionBody { self } } + impl Default for MonthlyUsageAttributionBody { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monthly_usage_attribution_metadata.rs b/src/datadogV1/model/model_monthly_usage_attribution_metadata.rs index e91c33e51..f69f9e289 100644 --- a/src/datadogV1/model/model_monthly_usage_attribution_metadata.rs +++ b/src/datadogV1/model/model_monthly_usage_attribution_metadata.rs @@ -24,7 +24,7 @@ impl MonthlyUsageAttributionMetadata { } } - pub fn with_aggregates( + pub fn aggregates( &mut self, value: Vec, ) -> &mut Self { @@ -32,7 +32,7 @@ impl MonthlyUsageAttributionMetadata { self } - pub fn with_pagination( + pub fn pagination( &mut self, value: crate::datadogV1::model::MonthlyUsageAttributionPagination, ) -> &mut Self { @@ -40,6 +40,7 @@ impl MonthlyUsageAttributionMetadata { self } } + impl Default for MonthlyUsageAttributionMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monthly_usage_attribution_pagination.rs b/src/datadogV1/model/model_monthly_usage_attribution_pagination.rs index c927f83e9..09fa08430 100644 --- a/src/datadogV1/model/model_monthly_usage_attribution_pagination.rs +++ b/src/datadogV1/model/model_monthly_usage_attribution_pagination.rs @@ -24,11 +24,12 @@ impl MonthlyUsageAttributionPagination { } } - pub fn with_next_record_id(&mut self, value: Option) -> &mut Self { + pub fn next_record_id(&mut self, value: Option) -> &mut Self { self.next_record_id = Some(value); self } } + impl Default for MonthlyUsageAttributionPagination { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monthly_usage_attribution_response.rs b/src/datadogV1/model/model_monthly_usage_attribution_response.rs index e1bf7e14e..42a69c33d 100644 --- a/src/datadogV1/model/model_monthly_usage_attribution_response.rs +++ b/src/datadogV1/model/model_monthly_usage_attribution_response.rs @@ -24,7 +24,7 @@ impl MonthlyUsageAttributionResponse { } } - pub fn with_metadata( + pub fn metadata( &mut self, value: crate::datadogV1::model::MonthlyUsageAttributionMetadata, ) -> &mut Self { @@ -32,7 +32,7 @@ impl MonthlyUsageAttributionResponse { self } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -40,6 +40,7 @@ impl MonthlyUsageAttributionResponse { self } } + impl Default for MonthlyUsageAttributionResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_monthly_usage_attribution_values.rs b/src/datadogV1/model/model_monthly_usage_attribution_values.rs index b6452c6a6..3707e067b 100644 --- a/src/datadogV1/model/model_monthly_usage_attribution_values.rs +++ b/src/datadogV1/model/model_monthly_usage_attribution_values.rs @@ -496,606 +496,607 @@ impl MonthlyUsageAttributionValues { } } - pub fn with_api_percentage(&mut self, value: f64) -> &mut Self { + pub fn api_percentage(&mut self, value: f64) -> &mut Self { self.api_percentage = Some(value); self } - pub fn with_api_usage(&mut self, value: f64) -> &mut Self { + pub fn api_usage(&mut self, value: f64) -> &mut Self { self.api_usage = Some(value); self } - pub fn with_apm_fargate_percentage(&mut self, value: f64) -> &mut Self { + pub fn apm_fargate_percentage(&mut self, value: f64) -> &mut Self { self.apm_fargate_percentage = Some(value); self } - pub fn with_apm_fargate_usage(&mut self, value: f64) -> &mut Self { + pub fn apm_fargate_usage(&mut self, value: f64) -> &mut Self { self.apm_fargate_usage = Some(value); self } - pub fn with_apm_host_percentage(&mut self, value: f64) -> &mut Self { + pub fn apm_host_percentage(&mut self, value: f64) -> &mut Self { self.apm_host_percentage = Some(value); self } - pub fn with_apm_host_usage(&mut self, value: f64) -> &mut Self { + pub fn apm_host_usage(&mut self, value: f64) -> &mut Self { self.apm_host_usage = Some(value); self } - pub fn with_apm_usm_percentage(&mut self, value: f64) -> &mut Self { + pub fn apm_usm_percentage(&mut self, value: f64) -> &mut Self { self.apm_usm_percentage = Some(value); self } - pub fn with_apm_usm_usage(&mut self, value: f64) -> &mut Self { + pub fn apm_usm_usage(&mut self, value: f64) -> &mut Self { self.apm_usm_usage = Some(value); self } - pub fn with_appsec_fargate_percentage(&mut self, value: f64) -> &mut Self { + pub fn appsec_fargate_percentage(&mut self, value: f64) -> &mut Self { self.appsec_fargate_percentage = Some(value); self } - pub fn with_appsec_fargate_usage(&mut self, value: f64) -> &mut Self { + pub fn appsec_fargate_usage(&mut self, value: f64) -> &mut Self { self.appsec_fargate_usage = Some(value); self } - pub fn with_appsec_percentage(&mut self, value: f64) -> &mut Self { + pub fn appsec_percentage(&mut self, value: f64) -> &mut Self { self.appsec_percentage = Some(value); self } - pub fn with_appsec_usage(&mut self, value: f64) -> &mut Self { + pub fn appsec_usage(&mut self, value: f64) -> &mut Self { self.appsec_usage = Some(value); self } - pub fn with_browser_percentage(&mut self, value: f64) -> &mut Self { + pub fn browser_percentage(&mut self, value: f64) -> &mut Self { self.browser_percentage = Some(value); self } - pub fn with_browser_usage(&mut self, value: f64) -> &mut Self { + pub fn browser_usage(&mut self, value: f64) -> &mut Self { self.browser_usage = Some(value); self } - pub fn with_ci_pipeline_indexed_spans_percentage(&mut self, value: f64) -> &mut Self { + pub fn ci_pipeline_indexed_spans_percentage(&mut self, value: f64) -> &mut Self { self.ci_pipeline_indexed_spans_percentage = Some(value); self } - pub fn with_ci_pipeline_indexed_spans_usage(&mut self, value: f64) -> &mut Self { + pub fn ci_pipeline_indexed_spans_usage(&mut self, value: f64) -> &mut Self { self.ci_pipeline_indexed_spans_usage = Some(value); self } - pub fn with_ci_test_indexed_spans_percentage(&mut self, value: f64) -> &mut Self { + pub fn ci_test_indexed_spans_percentage(&mut self, value: f64) -> &mut Self { self.ci_test_indexed_spans_percentage = Some(value); self } - pub fn with_ci_test_indexed_spans_usage(&mut self, value: f64) -> &mut Self { + pub fn ci_test_indexed_spans_usage(&mut self, value: f64) -> &mut Self { self.ci_test_indexed_spans_usage = Some(value); self } - pub fn with_ci_visibility_itr_percentage(&mut self, value: f64) -> &mut Self { + pub fn ci_visibility_itr_percentage(&mut self, value: f64) -> &mut Self { self.ci_visibility_itr_percentage = Some(value); self } - pub fn with_ci_visibility_itr_usage(&mut self, value: f64) -> &mut Self { + pub fn ci_visibility_itr_usage(&mut self, value: f64) -> &mut Self { self.ci_visibility_itr_usage = Some(value); self } - pub fn with_cloud_siem_percentage(&mut self, value: f64) -> &mut Self { + pub fn cloud_siem_percentage(&mut self, value: f64) -> &mut Self { self.cloud_siem_percentage = Some(value); self } - pub fn with_cloud_siem_usage(&mut self, value: f64) -> &mut Self { + pub fn cloud_siem_usage(&mut self, value: f64) -> &mut Self { self.cloud_siem_usage = Some(value); self } - pub fn with_container_excl_agent_percentage(&mut self, value: f64) -> &mut Self { + pub fn container_excl_agent_percentage(&mut self, value: f64) -> &mut Self { self.container_excl_agent_percentage = Some(value); self } - pub fn with_container_excl_agent_usage(&mut self, value: f64) -> &mut Self { + pub fn container_excl_agent_usage(&mut self, value: f64) -> &mut Self { self.container_excl_agent_usage = Some(value); self } - pub fn with_container_percentage(&mut self, value: f64) -> &mut Self { + pub fn container_percentage(&mut self, value: f64) -> &mut Self { self.container_percentage = Some(value); self } - pub fn with_container_usage(&mut self, value: f64) -> &mut Self { + pub fn container_usage(&mut self, value: f64) -> &mut Self { self.container_usage = Some(value); self } - pub fn with_cspm_containers_percentage(&mut self, value: f64) -> &mut Self { + pub fn cspm_containers_percentage(&mut self, value: f64) -> &mut Self { self.cspm_containers_percentage = Some(value); self } - pub fn with_cspm_containers_usage(&mut self, value: f64) -> &mut Self { + pub fn cspm_containers_usage(&mut self, value: f64) -> &mut Self { self.cspm_containers_usage = Some(value); self } - pub fn with_cspm_hosts_percentage(&mut self, value: f64) -> &mut Self { + pub fn cspm_hosts_percentage(&mut self, value: f64) -> &mut Self { self.cspm_hosts_percentage = Some(value); self } - pub fn with_cspm_hosts_usage(&mut self, value: f64) -> &mut Self { + pub fn cspm_hosts_usage(&mut self, value: f64) -> &mut Self { self.cspm_hosts_usage = Some(value); self } - pub fn with_custom_event_percentage(&mut self, value: f64) -> &mut Self { + pub fn custom_event_percentage(&mut self, value: f64) -> &mut Self { self.custom_event_percentage = Some(value); self } - pub fn with_custom_event_usage(&mut self, value: f64) -> &mut Self { + pub fn custom_event_usage(&mut self, value: f64) -> &mut Self { self.custom_event_usage = Some(value); self } - pub fn with_custom_ingested_timeseries_percentage(&mut self, value: f64) -> &mut Self { + pub fn custom_ingested_timeseries_percentage(&mut self, value: f64) -> &mut Self { self.custom_ingested_timeseries_percentage = Some(value); self } - pub fn with_custom_ingested_timeseries_usage(&mut self, value: f64) -> &mut Self { + pub fn custom_ingested_timeseries_usage(&mut self, value: f64) -> &mut Self { self.custom_ingested_timeseries_usage = Some(value); self } - pub fn with_custom_timeseries_percentage(&mut self, value: f64) -> &mut Self { + pub fn custom_timeseries_percentage(&mut self, value: f64) -> &mut Self { self.custom_timeseries_percentage = Some(value); self } - pub fn with_custom_timeseries_usage(&mut self, value: f64) -> &mut Self { + pub fn custom_timeseries_usage(&mut self, value: f64) -> &mut Self { self.custom_timeseries_usage = Some(value); self } - pub fn with_cws_containers_percentage(&mut self, value: f64) -> &mut Self { + pub fn cws_containers_percentage(&mut self, value: f64) -> &mut Self { self.cws_containers_percentage = Some(value); self } - pub fn with_cws_containers_usage(&mut self, value: f64) -> &mut Self { + pub fn cws_containers_usage(&mut self, value: f64) -> &mut Self { self.cws_containers_usage = Some(value); self } - pub fn with_cws_hosts_percentage(&mut self, value: f64) -> &mut Self { + pub fn cws_hosts_percentage(&mut self, value: f64) -> &mut Self { self.cws_hosts_percentage = Some(value); self } - pub fn with_cws_hosts_usage(&mut self, value: f64) -> &mut Self { + pub fn cws_hosts_usage(&mut self, value: f64) -> &mut Self { self.cws_hosts_usage = Some(value); self } - pub fn with_dbm_hosts_percentage(&mut self, value: f64) -> &mut Self { + pub fn dbm_hosts_percentage(&mut self, value: f64) -> &mut Self { self.dbm_hosts_percentage = Some(value); self } - pub fn with_dbm_hosts_usage(&mut self, value: f64) -> &mut Self { + pub fn dbm_hosts_usage(&mut self, value: f64) -> &mut Self { self.dbm_hosts_usage = Some(value); self } - pub fn with_dbm_queries_percentage(&mut self, value: f64) -> &mut Self { + pub fn dbm_queries_percentage(&mut self, value: f64) -> &mut Self { self.dbm_queries_percentage = Some(value); self } - pub fn with_dbm_queries_usage(&mut self, value: f64) -> &mut Self { + pub fn dbm_queries_usage(&mut self, value: f64) -> &mut Self { self.dbm_queries_usage = Some(value); self } - pub fn with_estimated_indexed_logs_percentage(&mut self, value: f64) -> &mut Self { + pub fn estimated_indexed_logs_percentage(&mut self, value: f64) -> &mut Self { self.estimated_indexed_logs_percentage = Some(value); self } - pub fn with_estimated_indexed_logs_usage(&mut self, value: f64) -> &mut Self { + pub fn estimated_indexed_logs_usage(&mut self, value: f64) -> &mut Self { self.estimated_indexed_logs_usage = Some(value); self } - pub fn with_estimated_indexed_spans_percentage(&mut self, value: f64) -> &mut Self { + pub fn estimated_indexed_spans_percentage(&mut self, value: f64) -> &mut Self { self.estimated_indexed_spans_percentage = Some(value); self } - pub fn with_estimated_indexed_spans_usage(&mut self, value: f64) -> &mut Self { + pub fn estimated_indexed_spans_usage(&mut self, value: f64) -> &mut Self { self.estimated_indexed_spans_usage = Some(value); self } - pub fn with_estimated_ingested_logs_percentage(&mut self, value: f64) -> &mut Self { + pub fn estimated_ingested_logs_percentage(&mut self, value: f64) -> &mut Self { self.estimated_ingested_logs_percentage = Some(value); self } - pub fn with_estimated_ingested_logs_usage(&mut self, value: f64) -> &mut Self { + pub fn estimated_ingested_logs_usage(&mut self, value: f64) -> &mut Self { self.estimated_ingested_logs_usage = Some(value); self } - pub fn with_estimated_ingested_spans_percentage(&mut self, value: f64) -> &mut Self { + pub fn estimated_ingested_spans_percentage(&mut self, value: f64) -> &mut Self { self.estimated_ingested_spans_percentage = Some(value); self } - pub fn with_estimated_ingested_spans_usage(&mut self, value: f64) -> &mut Self { + pub fn estimated_ingested_spans_usage(&mut self, value: f64) -> &mut Self { self.estimated_ingested_spans_usage = Some(value); self } - pub fn with_estimated_rum_sessions_percentage(&mut self, value: f64) -> &mut Self { + pub fn estimated_rum_sessions_percentage(&mut self, value: f64) -> &mut Self { self.estimated_rum_sessions_percentage = Some(value); self } - pub fn with_estimated_rum_sessions_usage(&mut self, value: f64) -> &mut Self { + pub fn estimated_rum_sessions_usage(&mut self, value: f64) -> &mut Self { self.estimated_rum_sessions_usage = Some(value); self } - pub fn with_fargate_percentage(&mut self, value: f64) -> &mut Self { + pub fn fargate_percentage(&mut self, value: f64) -> &mut Self { self.fargate_percentage = Some(value); self } - pub fn with_fargate_usage(&mut self, value: f64) -> &mut Self { + pub fn fargate_usage(&mut self, value: f64) -> &mut Self { self.fargate_usage = Some(value); self } - pub fn with_functions_percentage(&mut self, value: f64) -> &mut Self { + pub fn functions_percentage(&mut self, value: f64) -> &mut Self { self.functions_percentage = Some(value); self } - pub fn with_functions_usage(&mut self, value: f64) -> &mut Self { + pub fn functions_usage(&mut self, value: f64) -> &mut Self { self.functions_usage = Some(value); self } - pub fn with_indexed_spans_percentage(&mut self, value: f64) -> &mut Self { + pub fn indexed_spans_percentage(&mut self, value: f64) -> &mut Self { self.indexed_spans_percentage = Some(value); self } - pub fn with_indexed_spans_usage(&mut self, value: f64) -> &mut Self { + pub fn indexed_spans_usage(&mut self, value: f64) -> &mut Self { self.indexed_spans_usage = Some(value); self } - pub fn with_infra_host_percentage(&mut self, value: f64) -> &mut Self { + pub fn infra_host_percentage(&mut self, value: f64) -> &mut Self { self.infra_host_percentage = Some(value); self } - pub fn with_infra_host_usage(&mut self, value: f64) -> &mut Self { + pub fn infra_host_usage(&mut self, value: f64) -> &mut Self { self.infra_host_usage = Some(value); self } - pub fn with_ingested_logs_bytes_percentage(&mut self, value: f64) -> &mut Self { + pub fn ingested_logs_bytes_percentage(&mut self, value: f64) -> &mut Self { self.ingested_logs_bytes_percentage = Some(value); self } - pub fn with_ingested_logs_bytes_usage(&mut self, value: f64) -> &mut Self { + pub fn ingested_logs_bytes_usage(&mut self, value: f64) -> &mut Self { self.ingested_logs_bytes_usage = Some(value); self } - pub fn with_ingested_spans_bytes_percentage(&mut self, value: f64) -> &mut Self { + pub fn ingested_spans_bytes_percentage(&mut self, value: f64) -> &mut Self { self.ingested_spans_bytes_percentage = Some(value); self } - pub fn with_ingested_spans_bytes_usage(&mut self, value: f64) -> &mut Self { + pub fn ingested_spans_bytes_usage(&mut self, value: f64) -> &mut Self { self.ingested_spans_bytes_usage = Some(value); self } - pub fn with_invocations_percentage(&mut self, value: f64) -> &mut Self { + pub fn invocations_percentage(&mut self, value: f64) -> &mut Self { self.invocations_percentage = Some(value); self } - pub fn with_invocations_usage(&mut self, value: f64) -> &mut Self { + pub fn invocations_usage(&mut self, value: f64) -> &mut Self { self.invocations_usage = Some(value); self } - pub fn with_lambda_traced_invocations_percentage(&mut self, value: f64) -> &mut Self { + pub fn lambda_traced_invocations_percentage(&mut self, value: f64) -> &mut Self { self.lambda_traced_invocations_percentage = Some(value); self } - pub fn with_lambda_traced_invocations_usage(&mut self, value: f64) -> &mut Self { + pub fn lambda_traced_invocations_usage(&mut self, value: f64) -> &mut Self { self.lambda_traced_invocations_usage = Some(value); self } - pub fn with_logs_indexed_15day_percentage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_15day_percentage(&mut self, value: f64) -> &mut Self { self.logs_indexed_15day_percentage = Some(value); self } - pub fn with_logs_indexed_15day_usage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_15day_usage(&mut self, value: f64) -> &mut Self { self.logs_indexed_15day_usage = Some(value); self } - pub fn with_logs_indexed_180day_percentage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_180day_percentage(&mut self, value: f64) -> &mut Self { self.logs_indexed_180day_percentage = Some(value); self } - pub fn with_logs_indexed_180day_usage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_180day_usage(&mut self, value: f64) -> &mut Self { self.logs_indexed_180day_usage = Some(value); self } - pub fn with_logs_indexed_30day_percentage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_30day_percentage(&mut self, value: f64) -> &mut Self { self.logs_indexed_30day_percentage = Some(value); self } - pub fn with_logs_indexed_30day_usage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_30day_usage(&mut self, value: f64) -> &mut Self { self.logs_indexed_30day_usage = Some(value); self } - pub fn with_logs_indexed_360day_percentage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_360day_percentage(&mut self, value: f64) -> &mut Self { self.logs_indexed_360day_percentage = Some(value); self } - pub fn with_logs_indexed_360day_usage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_360day_usage(&mut self, value: f64) -> &mut Self { self.logs_indexed_360day_usage = Some(value); self } - pub fn with_logs_indexed_3day_percentage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_3day_percentage(&mut self, value: f64) -> &mut Self { self.logs_indexed_3day_percentage = Some(value); self } - pub fn with_logs_indexed_3day_usage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_3day_usage(&mut self, value: f64) -> &mut Self { self.logs_indexed_3day_usage = Some(value); self } - pub fn with_logs_indexed_45day_percentage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_45day_percentage(&mut self, value: f64) -> &mut Self { self.logs_indexed_45day_percentage = Some(value); self } - pub fn with_logs_indexed_45day_usage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_45day_usage(&mut self, value: f64) -> &mut Self { self.logs_indexed_45day_usage = Some(value); self } - pub fn with_logs_indexed_60day_percentage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_60day_percentage(&mut self, value: f64) -> &mut Self { self.logs_indexed_60day_percentage = Some(value); self } - pub fn with_logs_indexed_60day_usage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_60day_usage(&mut self, value: f64) -> &mut Self { self.logs_indexed_60day_usage = Some(value); self } - pub fn with_logs_indexed_7day_percentage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_7day_percentage(&mut self, value: f64) -> &mut Self { self.logs_indexed_7day_percentage = Some(value); self } - pub fn with_logs_indexed_7day_usage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_7day_usage(&mut self, value: f64) -> &mut Self { self.logs_indexed_7day_usage = Some(value); self } - pub fn with_logs_indexed_90day_percentage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_90day_percentage(&mut self, value: f64) -> &mut Self { self.logs_indexed_90day_percentage = Some(value); self } - pub fn with_logs_indexed_90day_usage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_90day_usage(&mut self, value: f64) -> &mut Self { self.logs_indexed_90day_usage = Some(value); self } - pub fn with_logs_indexed_custom_retention_percentage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_custom_retention_percentage(&mut self, value: f64) -> &mut Self { self.logs_indexed_custom_retention_percentage = Some(value); self } - pub fn with_logs_indexed_custom_retention_usage(&mut self, value: f64) -> &mut Self { + pub fn logs_indexed_custom_retention_usage(&mut self, value: f64) -> &mut Self { self.logs_indexed_custom_retention_usage = Some(value); self } - pub fn with_mobile_app_testing_percentage(&mut self, value: f64) -> &mut Self { + pub fn mobile_app_testing_percentage(&mut self, value: f64) -> &mut Self { self.mobile_app_testing_percentage = Some(value); self } - pub fn with_mobile_app_testing_usage(&mut self, value: f64) -> &mut Self { + pub fn mobile_app_testing_usage(&mut self, value: f64) -> &mut Self { self.mobile_app_testing_usage = Some(value); self } - pub fn with_ndm_netflow_percentage(&mut self, value: f64) -> &mut Self { + pub fn ndm_netflow_percentage(&mut self, value: f64) -> &mut Self { self.ndm_netflow_percentage = Some(value); self } - pub fn with_ndm_netflow_usage(&mut self, value: f64) -> &mut Self { + pub fn ndm_netflow_usage(&mut self, value: f64) -> &mut Self { self.ndm_netflow_usage = Some(value); self } - pub fn with_npm_host_percentage(&mut self, value: f64) -> &mut Self { + pub fn npm_host_percentage(&mut self, value: f64) -> &mut Self { self.npm_host_percentage = Some(value); self } - pub fn with_npm_host_usage(&mut self, value: f64) -> &mut Self { + pub fn npm_host_usage(&mut self, value: f64) -> &mut Self { self.npm_host_usage = Some(value); self } - pub fn with_obs_pipeline_bytes_percentage(&mut self, value: f64) -> &mut Self { + pub fn obs_pipeline_bytes_percentage(&mut self, value: f64) -> &mut Self { self.obs_pipeline_bytes_percentage = Some(value); self } - pub fn with_obs_pipeline_bytes_usage(&mut self, value: f64) -> &mut Self { + pub fn obs_pipeline_bytes_usage(&mut self, value: f64) -> &mut Self { self.obs_pipeline_bytes_usage = Some(value); self } - pub fn with_profiled_container_percentage(&mut self, value: f64) -> &mut Self { + pub fn profiled_container_percentage(&mut self, value: f64) -> &mut Self { self.profiled_container_percentage = Some(value); self } - pub fn with_profiled_container_usage(&mut self, value: f64) -> &mut Self { + pub fn profiled_container_usage(&mut self, value: f64) -> &mut Self { self.profiled_container_usage = Some(value); self } - pub fn with_profiled_fargate_percentage(&mut self, value: f64) -> &mut Self { + pub fn profiled_fargate_percentage(&mut self, value: f64) -> &mut Self { self.profiled_fargate_percentage = Some(value); self } - pub fn with_profiled_fargate_usage(&mut self, value: f64) -> &mut Self { + pub fn profiled_fargate_usage(&mut self, value: f64) -> &mut Self { self.profiled_fargate_usage = Some(value); self } - pub fn with_profiled_host_percentage(&mut self, value: f64) -> &mut Self { + pub fn profiled_host_percentage(&mut self, value: f64) -> &mut Self { self.profiled_host_percentage = Some(value); self } - pub fn with_profiled_host_usage(&mut self, value: f64) -> &mut Self { + pub fn profiled_host_usage(&mut self, value: f64) -> &mut Self { self.profiled_host_usage = Some(value); self } - pub fn with_rum_browser_mobile_sessions_percentage(&mut self, value: f64) -> &mut Self { + pub fn rum_browser_mobile_sessions_percentage(&mut self, value: f64) -> &mut Self { self.rum_browser_mobile_sessions_percentage = Some(value); self } - pub fn with_rum_browser_mobile_sessions_usage(&mut self, value: f64) -> &mut Self { + pub fn rum_browser_mobile_sessions_usage(&mut self, value: f64) -> &mut Self { self.rum_browser_mobile_sessions_usage = Some(value); self } - pub fn with_rum_replay_sessions_percentage(&mut self, value: f64) -> &mut Self { + pub fn rum_replay_sessions_percentage(&mut self, value: f64) -> &mut Self { self.rum_replay_sessions_percentage = Some(value); self } - pub fn with_rum_replay_sessions_usage(&mut self, value: f64) -> &mut Self { + pub fn rum_replay_sessions_usage(&mut self, value: f64) -> &mut Self { self.rum_replay_sessions_usage = Some(value); self } - pub fn with_sds_scanned_bytes_percentage(&mut self, value: f64) -> &mut Self { + pub fn sds_scanned_bytes_percentage(&mut self, value: f64) -> &mut Self { self.sds_scanned_bytes_percentage = Some(value); self } - pub fn with_sds_scanned_bytes_usage(&mut self, value: f64) -> &mut Self { + pub fn sds_scanned_bytes_usage(&mut self, value: f64) -> &mut Self { self.sds_scanned_bytes_usage = Some(value); self } - pub fn with_serverless_apps_percentage(&mut self, value: f64) -> &mut Self { + pub fn serverless_apps_percentage(&mut self, value: f64) -> &mut Self { self.serverless_apps_percentage = Some(value); self } - pub fn with_serverless_apps_usage(&mut self, value: f64) -> &mut Self { + pub fn serverless_apps_usage(&mut self, value: f64) -> &mut Self { self.serverless_apps_usage = Some(value); self } - pub fn with_siem_ingested_bytes_percentage(&mut self, value: f64) -> &mut Self { + pub fn siem_ingested_bytes_percentage(&mut self, value: f64) -> &mut Self { self.siem_ingested_bytes_percentage = Some(value); self } - pub fn with_siem_ingested_bytes_usage(&mut self, value: f64) -> &mut Self { + pub fn siem_ingested_bytes_usage(&mut self, value: f64) -> &mut Self { self.siem_ingested_bytes_usage = Some(value); self } - pub fn with_snmp_percentage(&mut self, value: f64) -> &mut Self { + pub fn snmp_percentage(&mut self, value: f64) -> &mut Self { self.snmp_percentage = Some(value); self } - pub fn with_snmp_usage(&mut self, value: f64) -> &mut Self { + pub fn snmp_usage(&mut self, value: f64) -> &mut Self { self.snmp_usage = Some(value); self } - pub fn with_universal_service_monitoring_percentage(&mut self, value: f64) -> &mut Self { + pub fn universal_service_monitoring_percentage(&mut self, value: f64) -> &mut Self { self.universal_service_monitoring_percentage = Some(value); self } - pub fn with_universal_service_monitoring_usage(&mut self, value: f64) -> &mut Self { + pub fn universal_service_monitoring_usage(&mut self, value: f64) -> &mut Self { self.universal_service_monitoring_usage = Some(value); self } - pub fn with_vuln_management_hosts_percentage(&mut self, value: f64) -> &mut Self { + pub fn vuln_management_hosts_percentage(&mut self, value: f64) -> &mut Self { self.vuln_management_hosts_percentage = Some(value); self } - pub fn with_vuln_management_hosts_usage(&mut self, value: f64) -> &mut Self { + pub fn vuln_management_hosts_usage(&mut self, value: f64) -> &mut Self { self.vuln_management_hosts_usage = Some(value); self } } + impl Default for MonthlyUsageAttributionValues { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_note_widget_definition.rs b/src/datadogV1/model/model_note_widget_definition.rs index 261e46866..c59ecb0cd 100644 --- a/src/datadogV1/model/model_note_widget_definition.rs +++ b/src/datadogV1/model/model_note_widget_definition.rs @@ -59,45 +59,42 @@ impl NoteWidgetDefinition { } } - pub fn with_background_color(&mut self, value: String) -> &mut Self { + pub fn background_color(&mut self, value: String) -> &mut Self { self.background_color = Some(value); self } - pub fn with_font_size(&mut self, value: String) -> &mut Self { + pub fn font_size(&mut self, value: String) -> &mut Self { self.font_size = Some(value); self } - pub fn with_has_padding(&mut self, value: bool) -> &mut Self { + pub fn has_padding(&mut self, value: bool) -> &mut Self { self.has_padding = Some(value); self } - pub fn with_show_tick(&mut self, value: bool) -> &mut Self { + pub fn show_tick(&mut self, value: bool) -> &mut Self { self.show_tick = Some(value); self } - pub fn with_text_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn text_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.text_align = Some(value); self } - pub fn with_tick_edge(&mut self, value: crate::datadogV1::model::WidgetTickEdge) -> &mut Self { + pub fn tick_edge(&mut self, value: crate::datadogV1::model::WidgetTickEdge) -> &mut Self { self.tick_edge = Some(value); self } - pub fn with_tick_pos(&mut self, value: String) -> &mut Self { + pub fn tick_pos(&mut self, value: String) -> &mut Self { self.tick_pos = Some(value); self } - pub fn with_vertical_align( + pub fn vertical_align( &mut self, value: crate::datadogV1::model::WidgetVerticalAlign, ) -> &mut Self { diff --git a/src/datadogV1/model/model_notebook_absolute_time.rs b/src/datadogV1/model/model_notebook_absolute_time.rs index a39e01045..ab3915f00 100644 --- a/src/datadogV1/model/model_notebook_absolute_time.rs +++ b/src/datadogV1/model/model_notebook_absolute_time.rs @@ -28,7 +28,7 @@ impl NotebookAbsoluteTime { } } - pub fn with_live(&mut self, value: bool) -> &mut Self { + pub fn live(&mut self, value: bool) -> &mut Self { self.live = Some(value); self } diff --git a/src/datadogV1/model/model_notebook_author.rs b/src/datadogV1/model/model_notebook_author.rs index 81e076e64..11c0742f0 100644 --- a/src/datadogV1/model/model_notebook_author.rs +++ b/src/datadogV1/model/model_notebook_author.rs @@ -52,51 +52,52 @@ impl NotebookAuthor { } } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_disabled(&mut self, value: bool) -> &mut Self { + pub fn disabled(&mut self, value: bool) -> &mut Self { self.disabled = Some(value); self } - pub fn with_email(&mut self, value: String) -> &mut Self { + pub fn email(&mut self, value: String) -> &mut Self { self.email = Some(value); self } - pub fn with_handle(&mut self, value: String) -> &mut Self { + pub fn handle(&mut self, value: String) -> &mut Self { self.handle = Some(value); self } - pub fn with_icon(&mut self, value: String) -> &mut Self { + pub fn icon(&mut self, value: String) -> &mut Self { self.icon = Some(value); self } - pub fn with_name(&mut self, value: Option) -> &mut Self { + pub fn name(&mut self, value: Option) -> &mut Self { self.name = Some(value); self } - pub fn with_status(&mut self, value: String) -> &mut Self { + pub fn status(&mut self, value: String) -> &mut Self { self.status = Some(value); self } - pub fn with_title(&mut self, value: Option) -> &mut Self { + pub fn title(&mut self, value: Option) -> &mut Self { self.title = Some(value); self } - pub fn with_verified(&mut self, value: bool) -> &mut Self { + pub fn verified(&mut self, value: bool) -> &mut Self { self.verified = Some(value); self } } + impl Default for NotebookAuthor { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_notebook_cell_create_request_attributes.rs b/src/datadogV1/model/model_notebook_cell_create_request_attributes.rs index b9e5e51f4..cd31dbaa3 100644 --- a/src/datadogV1/model/model_notebook_cell_create_request_attributes.rs +++ b/src/datadogV1/model/model_notebook_cell_create_request_attributes.rs @@ -8,10 +8,14 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum NotebookCellCreateRequestAttributes { - NotebookMarkdownCellAttributes(crate::datadogV1::model::NotebookMarkdownCellAttributes), - NotebookTimeseriesCellAttributes(crate::datadogV1::model::NotebookTimeseriesCellAttributes), - NotebookToplistCellAttributes(crate::datadogV1::model::NotebookToplistCellAttributes), - NotebookHeatMapCellAttributes(crate::datadogV1::model::NotebookHeatMapCellAttributes), - NotebookDistributionCellAttributes(crate::datadogV1::model::NotebookDistributionCellAttributes), - NotebookLogStreamCellAttributes(crate::datadogV1::model::NotebookLogStreamCellAttributes), + NotebookMarkdownCellAttributes(Box), + NotebookTimeseriesCellAttributes( + Box, + ), + NotebookToplistCellAttributes(Box), + NotebookHeatMapCellAttributes(Box), + NotebookDistributionCellAttributes( + Box, + ), + NotebookLogStreamCellAttributes(Box), } diff --git a/src/datadogV1/model/model_notebook_cell_response_attributes.rs b/src/datadogV1/model/model_notebook_cell_response_attributes.rs index eed9107a0..039afe89b 100644 --- a/src/datadogV1/model/model_notebook_cell_response_attributes.rs +++ b/src/datadogV1/model/model_notebook_cell_response_attributes.rs @@ -8,10 +8,14 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum NotebookCellResponseAttributes { - NotebookMarkdownCellAttributes(crate::datadogV1::model::NotebookMarkdownCellAttributes), - NotebookTimeseriesCellAttributes(crate::datadogV1::model::NotebookTimeseriesCellAttributes), - NotebookToplistCellAttributes(crate::datadogV1::model::NotebookToplistCellAttributes), - NotebookHeatMapCellAttributes(crate::datadogV1::model::NotebookHeatMapCellAttributes), - NotebookDistributionCellAttributes(crate::datadogV1::model::NotebookDistributionCellAttributes), - NotebookLogStreamCellAttributes(crate::datadogV1::model::NotebookLogStreamCellAttributes), + NotebookMarkdownCellAttributes(Box), + NotebookTimeseriesCellAttributes( + Box, + ), + NotebookToplistCellAttributes(Box), + NotebookHeatMapCellAttributes(Box), + NotebookDistributionCellAttributes( + Box, + ), + NotebookLogStreamCellAttributes(Box), } diff --git a/src/datadogV1/model/model_notebook_cell_time.rs b/src/datadogV1/model/model_notebook_cell_time.rs index 518369a88..28c3db740 100644 --- a/src/datadogV1/model/model_notebook_cell_time.rs +++ b/src/datadogV1/model/model_notebook_cell_time.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum NotebookCellTime { - NotebookRelativeTime(crate::datadogV1::model::NotebookRelativeTime), - NotebookAbsoluteTime(crate::datadogV1::model::NotebookAbsoluteTime), + NotebookRelativeTime(Box), + NotebookAbsoluteTime(Box), } diff --git a/src/datadogV1/model/model_notebook_cell_update_request_attributes.rs b/src/datadogV1/model/model_notebook_cell_update_request_attributes.rs index 715f2dabd..8fea453e3 100644 --- a/src/datadogV1/model/model_notebook_cell_update_request_attributes.rs +++ b/src/datadogV1/model/model_notebook_cell_update_request_attributes.rs @@ -8,10 +8,14 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum NotebookCellUpdateRequestAttributes { - NotebookMarkdownCellAttributes(crate::datadogV1::model::NotebookMarkdownCellAttributes), - NotebookTimeseriesCellAttributes(crate::datadogV1::model::NotebookTimeseriesCellAttributes), - NotebookToplistCellAttributes(crate::datadogV1::model::NotebookToplistCellAttributes), - NotebookHeatMapCellAttributes(crate::datadogV1::model::NotebookHeatMapCellAttributes), - NotebookDistributionCellAttributes(crate::datadogV1::model::NotebookDistributionCellAttributes), - NotebookLogStreamCellAttributes(crate::datadogV1::model::NotebookLogStreamCellAttributes), + NotebookMarkdownCellAttributes(Box), + NotebookTimeseriesCellAttributes( + Box, + ), + NotebookToplistCellAttributes(Box), + NotebookHeatMapCellAttributes(Box), + NotebookDistributionCellAttributes( + Box, + ), + NotebookLogStreamCellAttributes(Box), } diff --git a/src/datadogV1/model/model_notebook_create_data_attributes.rs b/src/datadogV1/model/model_notebook_create_data_attributes.rs index 9bcde18b7..9f2a414b5 100644 --- a/src/datadogV1/model/model_notebook_create_data_attributes.rs +++ b/src/datadogV1/model/model_notebook_create_data_attributes.rs @@ -40,12 +40,12 @@ impl NotebookCreateDataAttributes { } } - pub fn with_metadata(&mut self, value: crate::datadogV1::model::NotebookMetadata) -> &mut Self { + pub fn metadata(&mut self, value: crate::datadogV1::model::NotebookMetadata) -> &mut Self { self.metadata = Some(value); self } - pub fn with_status(&mut self, value: crate::datadogV1::model::NotebookStatus) -> &mut Self { + pub fn status(&mut self, value: crate::datadogV1::model::NotebookStatus) -> &mut Self { self.status = Some(value); self } diff --git a/src/datadogV1/model/model_notebook_distribution_cell_attributes.rs b/src/datadogV1/model/model_notebook_distribution_cell_attributes.rs index 00e8d58df..3c88d3c81 100644 --- a/src/datadogV1/model/model_notebook_distribution_cell_attributes.rs +++ b/src/datadogV1/model/model_notebook_distribution_cell_attributes.rs @@ -36,23 +36,17 @@ impl NotebookDistributionCellAttributes { } } - pub fn with_graph_size( - &mut self, - value: crate::datadogV1::model::NotebookGraphSize, - ) -> &mut Self { + pub fn graph_size(&mut self, value: crate::datadogV1::model::NotebookGraphSize) -> &mut Self { self.graph_size = Some(value); self } - pub fn with_split_by(&mut self, value: crate::datadogV1::model::NotebookSplitBy) -> &mut Self { + pub fn split_by(&mut self, value: crate::datadogV1::model::NotebookSplitBy) -> &mut Self { self.split_by = Some(value); self } - pub fn with_time( - &mut self, - value: Option, - ) -> &mut Self { + pub fn time(&mut self, value: Option) -> &mut Self { self.time = Some(value); self } diff --git a/src/datadogV1/model/model_notebook_global_time.rs b/src/datadogV1/model/model_notebook_global_time.rs index 2fd3194d3..e6cc05696 100644 --- a/src/datadogV1/model/model_notebook_global_time.rs +++ b/src/datadogV1/model/model_notebook_global_time.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum NotebookGlobalTime { - NotebookRelativeTime(crate::datadogV1::model::NotebookRelativeTime), - NotebookAbsoluteTime(crate::datadogV1::model::NotebookAbsoluteTime), + NotebookRelativeTime(Box), + NotebookAbsoluteTime(Box), } diff --git a/src/datadogV1/model/model_notebook_heat_map_cell_attributes.rs b/src/datadogV1/model/model_notebook_heat_map_cell_attributes.rs index 034619566..86650b9f3 100644 --- a/src/datadogV1/model/model_notebook_heat_map_cell_attributes.rs +++ b/src/datadogV1/model/model_notebook_heat_map_cell_attributes.rs @@ -34,23 +34,17 @@ impl NotebookHeatMapCellAttributes { } } - pub fn with_graph_size( - &mut self, - value: crate::datadogV1::model::NotebookGraphSize, - ) -> &mut Self { + pub fn graph_size(&mut self, value: crate::datadogV1::model::NotebookGraphSize) -> &mut Self { self.graph_size = Some(value); self } - pub fn with_split_by(&mut self, value: crate::datadogV1::model::NotebookSplitBy) -> &mut Self { + pub fn split_by(&mut self, value: crate::datadogV1::model::NotebookSplitBy) -> &mut Self { self.split_by = Some(value); self } - pub fn with_time( - &mut self, - value: Option, - ) -> &mut Self { + pub fn time(&mut self, value: Option) -> &mut Self { self.time = Some(value); self } diff --git a/src/datadogV1/model/model_notebook_log_stream_cell_attributes.rs b/src/datadogV1/model/model_notebook_log_stream_cell_attributes.rs index 2d755afd4..e89d96f15 100644 --- a/src/datadogV1/model/model_notebook_log_stream_cell_attributes.rs +++ b/src/datadogV1/model/model_notebook_log_stream_cell_attributes.rs @@ -30,18 +30,12 @@ impl NotebookLogStreamCellAttributes { } } - pub fn with_graph_size( - &mut self, - value: crate::datadogV1::model::NotebookGraphSize, - ) -> &mut Self { + pub fn graph_size(&mut self, value: crate::datadogV1::model::NotebookGraphSize) -> &mut Self { self.graph_size = Some(value); self } - pub fn with_time( - &mut self, - value: Option, - ) -> &mut Self { + pub fn time(&mut self, value: Option) -> &mut Self { self.time = Some(value); self } diff --git a/src/datadogV1/model/model_notebook_metadata.rs b/src/datadogV1/model/model_notebook_metadata.rs index 630f5f378..044617e61 100644 --- a/src/datadogV1/model/model_notebook_metadata.rs +++ b/src/datadogV1/model/model_notebook_metadata.rs @@ -28,17 +28,17 @@ impl NotebookMetadata { } } - pub fn with_is_template(&mut self, value: bool) -> &mut Self { + pub fn is_template(&mut self, value: bool) -> &mut Self { self.is_template = Some(value); self } - pub fn with_take_snapshots(&mut self, value: bool) -> &mut Self { + pub fn take_snapshots(&mut self, value: bool) -> &mut Self { self.take_snapshots = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: Option, ) -> &mut Self { @@ -46,6 +46,7 @@ impl NotebookMetadata { self } } + impl Default for NotebookMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_notebook_response.rs b/src/datadogV1/model/model_notebook_response.rs index 344dbe1c0..026fa1bb0 100644 --- a/src/datadogV1/model/model_notebook_response.rs +++ b/src/datadogV1/model/model_notebook_response.rs @@ -18,11 +18,12 @@ impl NotebookResponse { NotebookResponse { data: None } } - pub fn with_data(&mut self, value: crate::datadogV1::model::NotebookResponseData) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV1::model::NotebookResponseData) -> &mut Self { self.data = Some(value); self } } + impl Default for NotebookResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_notebook_response_data_attributes.rs b/src/datadogV1/model/model_notebook_response_data_attributes.rs index 041e0921d..435b3b6e9 100644 --- a/src/datadogV1/model/model_notebook_response_data_attributes.rs +++ b/src/datadogV1/model/model_notebook_response_data_attributes.rs @@ -52,27 +52,27 @@ impl NotebookResponseDataAttributes { } } - pub fn with_author(&mut self, value: crate::datadogV1::model::NotebookAuthor) -> &mut Self { + pub fn author(&mut self, value: crate::datadogV1::model::NotebookAuthor) -> &mut Self { self.author = Some(value); self } - pub fn with_created(&mut self, value: String) -> &mut Self { + pub fn created(&mut self, value: String) -> &mut Self { self.created = Some(value); self } - pub fn with_metadata(&mut self, value: crate::datadogV1::model::NotebookMetadata) -> &mut Self { + pub fn metadata(&mut self, value: crate::datadogV1::model::NotebookMetadata) -> &mut Self { self.metadata = Some(value); self } - pub fn with_modified(&mut self, value: String) -> &mut Self { + pub fn modified(&mut self, value: String) -> &mut Self { self.modified = Some(value); self } - pub fn with_status(&mut self, value: crate::datadogV1::model::NotebookStatus) -> &mut Self { + pub fn status(&mut self, value: crate::datadogV1::model::NotebookStatus) -> &mut Self { self.status = Some(value); self } diff --git a/src/datadogV1/model/model_notebook_timeseries_cell_attributes.rs b/src/datadogV1/model/model_notebook_timeseries_cell_attributes.rs index 3024682bf..fbdb0b4f2 100644 --- a/src/datadogV1/model/model_notebook_timeseries_cell_attributes.rs +++ b/src/datadogV1/model/model_notebook_timeseries_cell_attributes.rs @@ -34,23 +34,17 @@ impl NotebookTimeseriesCellAttributes { } } - pub fn with_graph_size( - &mut self, - value: crate::datadogV1::model::NotebookGraphSize, - ) -> &mut Self { + pub fn graph_size(&mut self, value: crate::datadogV1::model::NotebookGraphSize) -> &mut Self { self.graph_size = Some(value); self } - pub fn with_split_by(&mut self, value: crate::datadogV1::model::NotebookSplitBy) -> &mut Self { + pub fn split_by(&mut self, value: crate::datadogV1::model::NotebookSplitBy) -> &mut Self { self.split_by = Some(value); self } - pub fn with_time( - &mut self, - value: Option, - ) -> &mut Self { + pub fn time(&mut self, value: Option) -> &mut Self { self.time = Some(value); self } diff --git a/src/datadogV1/model/model_notebook_toplist_cell_attributes.rs b/src/datadogV1/model/model_notebook_toplist_cell_attributes.rs index f072ab1e1..971e1fb4a 100644 --- a/src/datadogV1/model/model_notebook_toplist_cell_attributes.rs +++ b/src/datadogV1/model/model_notebook_toplist_cell_attributes.rs @@ -34,23 +34,17 @@ impl NotebookToplistCellAttributes { } } - pub fn with_graph_size( - &mut self, - value: crate::datadogV1::model::NotebookGraphSize, - ) -> &mut Self { + pub fn graph_size(&mut self, value: crate::datadogV1::model::NotebookGraphSize) -> &mut Self { self.graph_size = Some(value); self } - pub fn with_split_by(&mut self, value: crate::datadogV1::model::NotebookSplitBy) -> &mut Self { + pub fn split_by(&mut self, value: crate::datadogV1::model::NotebookSplitBy) -> &mut Self { self.split_by = Some(value); self } - pub fn with_time( - &mut self, - value: Option, - ) -> &mut Self { + pub fn time(&mut self, value: Option) -> &mut Self { self.time = Some(value); self } diff --git a/src/datadogV1/model/model_notebook_update_cell.rs b/src/datadogV1/model/model_notebook_update_cell.rs index 67d6f75bf..5bc570d61 100644 --- a/src/datadogV1/model/model_notebook_update_cell.rs +++ b/src/datadogV1/model/model_notebook_update_cell.rs @@ -8,6 +8,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum NotebookUpdateCell { - NotebookCellCreateRequest(crate::datadogV1::model::NotebookCellCreateRequest), - NotebookCellUpdateRequest(crate::datadogV1::model::NotebookCellUpdateRequest), + NotebookCellCreateRequest(Box), + NotebookCellUpdateRequest(Box), } diff --git a/src/datadogV1/model/model_notebook_update_data_attributes.rs b/src/datadogV1/model/model_notebook_update_data_attributes.rs index 5567b47fc..5dd8e7096 100644 --- a/src/datadogV1/model/model_notebook_update_data_attributes.rs +++ b/src/datadogV1/model/model_notebook_update_data_attributes.rs @@ -40,12 +40,12 @@ impl NotebookUpdateDataAttributes { } } - pub fn with_metadata(&mut self, value: crate::datadogV1::model::NotebookMetadata) -> &mut Self { + pub fn metadata(&mut self, value: crate::datadogV1::model::NotebookMetadata) -> &mut Self { self.metadata = Some(value); self } - pub fn with_status(&mut self, value: crate::datadogV1::model::NotebookStatus) -> &mut Self { + pub fn status(&mut self, value: crate::datadogV1::model::NotebookStatus) -> &mut Self { self.status = Some(value); self } diff --git a/src/datadogV1/model/model_notebooks_response.rs b/src/datadogV1/model/model_notebooks_response.rs index 6518956b0..7860b5803 100644 --- a/src/datadogV1/model/model_notebooks_response.rs +++ b/src/datadogV1/model/model_notebooks_response.rs @@ -24,7 +24,7 @@ impl NotebooksResponse { } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -32,14 +32,12 @@ impl NotebooksResponse { self } - pub fn with_meta( - &mut self, - value: crate::datadogV1::model::NotebooksResponseMeta, - ) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV1::model::NotebooksResponseMeta) -> &mut Self { self.meta = Some(value); self } } + impl Default for NotebooksResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_notebooks_response_data_attributes.rs b/src/datadogV1/model/model_notebooks_response_data_attributes.rs index 8116fed9a..c8e0e0791 100644 --- a/src/datadogV1/model/model_notebooks_response_data_attributes.rs +++ b/src/datadogV1/model/model_notebooks_response_data_attributes.rs @@ -48,12 +48,12 @@ impl NotebooksResponseDataAttributes { } } - pub fn with_author(&mut self, value: crate::datadogV1::model::NotebookAuthor) -> &mut Self { + pub fn author(&mut self, value: crate::datadogV1::model::NotebookAuthor) -> &mut Self { self.author = Some(value); self } - pub fn with_cells( + pub fn cells( &mut self, value: Vec, ) -> &mut Self { @@ -61,27 +61,27 @@ impl NotebooksResponseDataAttributes { self } - pub fn with_created(&mut self, value: String) -> &mut Self { + pub fn created(&mut self, value: String) -> &mut Self { self.created = Some(value); self } - pub fn with_metadata(&mut self, value: crate::datadogV1::model::NotebookMetadata) -> &mut Self { + pub fn metadata(&mut self, value: crate::datadogV1::model::NotebookMetadata) -> &mut Self { self.metadata = Some(value); self } - pub fn with_modified(&mut self, value: String) -> &mut Self { + pub fn modified(&mut self, value: String) -> &mut Self { self.modified = Some(value); self } - pub fn with_status(&mut self, value: crate::datadogV1::model::NotebookStatus) -> &mut Self { + pub fn status(&mut self, value: crate::datadogV1::model::NotebookStatus) -> &mut Self { self.status = Some(value); self } - pub fn with_time(&mut self, value: crate::datadogV1::model::NotebookGlobalTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::NotebookGlobalTime) -> &mut Self { self.time = Some(value); self } diff --git a/src/datadogV1/model/model_notebooks_response_meta.rs b/src/datadogV1/model/model_notebooks_response_meta.rs index fa1d5f76c..5640ef0cd 100644 --- a/src/datadogV1/model/model_notebooks_response_meta.rs +++ b/src/datadogV1/model/model_notebooks_response_meta.rs @@ -18,14 +18,12 @@ impl NotebooksResponseMeta { NotebooksResponseMeta { page: None } } - pub fn with_page( - &mut self, - value: crate::datadogV1::model::NotebooksResponsePage, - ) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV1::model::NotebooksResponsePage) -> &mut Self { self.page = Some(value); self } } + impl Default for NotebooksResponseMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_notebooks_response_page.rs b/src/datadogV1/model/model_notebooks_response_page.rs index 57d3c80a3..cf420a32c 100644 --- a/src/datadogV1/model/model_notebooks_response_page.rs +++ b/src/datadogV1/model/model_notebooks_response_page.rs @@ -24,16 +24,17 @@ impl NotebooksResponsePage { } } - pub fn with_total_count(&mut self, value: i64) -> &mut Self { + pub fn total_count(&mut self, value: i64) -> &mut Self { self.total_count = Some(value); self } - pub fn with_total_filtered_count(&mut self, value: i64) -> &mut Self { + pub fn total_filtered_count(&mut self, value: i64) -> &mut Self { self.total_filtered_count = Some(value); self } } + impl Default for NotebooksResponsePage { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_org_downgraded_response.rs b/src/datadogV1/model/model_org_downgraded_response.rs index 271bb2c9c..4bfdcf97b 100644 --- a/src/datadogV1/model/model_org_downgraded_response.rs +++ b/src/datadogV1/model/model_org_downgraded_response.rs @@ -18,11 +18,12 @@ impl OrgDowngradedResponse { OrgDowngradedResponse { message: None } } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } } + impl Default for OrgDowngradedResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_organization.rs b/src/datadogV1/model/model_organization.rs index 19dbf2799..184afd05b 100644 --- a/src/datadogV1/model/model_organization.rs +++ b/src/datadogV1/model/model_organization.rs @@ -52,49 +52,43 @@ impl Organization { } #[allow(deprecated)] - pub fn with_billing( - &mut self, - value: crate::datadogV1::model::OrganizationBilling, - ) -> &mut Self { + pub fn billing(&mut self, value: crate::datadogV1::model::OrganizationBilling) -> &mut Self { self.billing = Some(value); self } #[allow(deprecated)] - pub fn with_created(&mut self, value: String) -> &mut Self { + pub fn created(&mut self, value: String) -> &mut Self { self.created = Some(value); self } #[allow(deprecated)] - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } #[allow(deprecated)] - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } #[allow(deprecated)] - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } #[allow(deprecated)] - pub fn with_settings( - &mut self, - value: crate::datadogV1::model::OrganizationSettings, - ) -> &mut Self { + pub fn settings(&mut self, value: crate::datadogV1::model::OrganizationSettings) -> &mut Self { self.settings = Some(value); self } #[allow(deprecated)] - pub fn with_subscription( + pub fn subscription( &mut self, value: crate::datadogV1::model::OrganizationSubscription, ) -> &mut Self { @@ -103,11 +97,12 @@ impl Organization { } #[allow(deprecated)] - pub fn with_trial(&mut self, value: bool) -> &mut Self { + pub fn trial(&mut self, value: bool) -> &mut Self { self.trial = Some(value); self } } + impl Default for Organization { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_organization_billing.rs b/src/datadogV1/model/model_organization_billing.rs index 597089de1..797d97b8c 100644 --- a/src/datadogV1/model/model_organization_billing.rs +++ b/src/datadogV1/model/model_organization_billing.rs @@ -18,11 +18,12 @@ impl OrganizationBilling { OrganizationBilling { type_: None } } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } } + impl Default for OrganizationBilling { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_organization_create_body.rs b/src/datadogV1/model/model_organization_create_body.rs index 648c2ceb2..b1625cb25 100644 --- a/src/datadogV1/model/model_organization_create_body.rs +++ b/src/datadogV1/model/model_organization_create_body.rs @@ -32,16 +32,13 @@ impl OrganizationCreateBody { } #[allow(deprecated)] - pub fn with_billing( - &mut self, - value: crate::datadogV1::model::OrganizationBilling, - ) -> &mut Self { + pub fn billing(&mut self, value: crate::datadogV1::model::OrganizationBilling) -> &mut Self { self.billing = Some(value); self } #[allow(deprecated)] - pub fn with_subscription( + pub fn subscription( &mut self, value: crate::datadogV1::model::OrganizationSubscription, ) -> &mut Self { diff --git a/src/datadogV1/model/model_organization_create_response.rs b/src/datadogV1/model/model_organization_create_response.rs index 9f538a81d..4165c62d0 100644 --- a/src/datadogV1/model/model_organization_create_response.rs +++ b/src/datadogV1/model/model_organization_create_response.rs @@ -32,29 +32,27 @@ impl OrganizationCreateResponse { } } - pub fn with_api_key(&mut self, value: crate::datadogV1::model::ApiKey) -> &mut Self { + pub fn api_key(&mut self, value: crate::datadogV1::model::ApiKey) -> &mut Self { self.api_key = Some(value); self } - pub fn with_application_key( - &mut self, - value: crate::datadogV1::model::ApplicationKey, - ) -> &mut Self { + pub fn application_key(&mut self, value: crate::datadogV1::model::ApplicationKey) -> &mut Self { self.application_key = Some(value); self } - pub fn with_org(&mut self, value: crate::datadogV1::model::Organization) -> &mut Self { + pub fn org(&mut self, value: crate::datadogV1::model::Organization) -> &mut Self { self.org = Some(value); self } - pub fn with_user(&mut self, value: crate::datadogV1::model::User) -> &mut Self { + pub fn user(&mut self, value: crate::datadogV1::model::User) -> &mut Self { self.user = Some(value); self } } + impl Default for OrganizationCreateResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_organization_list_response.rs b/src/datadogV1/model/model_organization_list_response.rs index d6cb27be9..d603b6b55 100644 --- a/src/datadogV1/model/model_organization_list_response.rs +++ b/src/datadogV1/model/model_organization_list_response.rs @@ -18,11 +18,12 @@ impl OrganizationListResponse { OrganizationListResponse { orgs: None } } - pub fn with_orgs(&mut self, value: Vec) -> &mut Self { + pub fn orgs(&mut self, value: Vec) -> &mut Self { self.orgs = Some(value); self } } + impl Default for OrganizationListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_organization_response.rs b/src/datadogV1/model/model_organization_response.rs index bdcbfacb3..045b2a50d 100644 --- a/src/datadogV1/model/model_organization_response.rs +++ b/src/datadogV1/model/model_organization_response.rs @@ -18,11 +18,12 @@ impl OrganizationResponse { OrganizationResponse { org: None } } - pub fn with_org(&mut self, value: crate::datadogV1::model::Organization) -> &mut Self { + pub fn org(&mut self, value: crate::datadogV1::model::Organization) -> &mut Self { self.org = Some(value); self } } + impl Default for OrganizationResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_organization_settings.rs b/src/datadogV1/model/model_organization_settings.rs index 97ff3abd4..71a73b137 100644 --- a/src/datadogV1/model/model_organization_settings.rs +++ b/src/datadogV1/model/model_organization_settings.rs @@ -63,20 +63,17 @@ impl OrganizationSettings { } } - pub fn with_private_widget_share(&mut self, value: bool) -> &mut Self { + pub fn private_widget_share(&mut self, value: bool) -> &mut Self { self.private_widget_share = Some(value); self } - pub fn with_saml( - &mut self, - value: crate::datadogV1::model::OrganizationSettingsSaml, - ) -> &mut Self { + pub fn saml(&mut self, value: crate::datadogV1::model::OrganizationSettingsSaml) -> &mut Self { self.saml = Some(value); self } - pub fn with_saml_autocreate_access_role( + pub fn saml_autocreate_access_role( &mut self, value: Option, ) -> &mut Self { @@ -84,7 +81,7 @@ impl OrganizationSettings { self } - pub fn with_saml_autocreate_users_domains( + pub fn saml_autocreate_users_domains( &mut self, value: crate::datadogV1::model::OrganizationSettingsSamlAutocreateUsersDomains, ) -> &mut Self { @@ -92,17 +89,17 @@ impl OrganizationSettings { self } - pub fn with_saml_can_be_enabled(&mut self, value: bool) -> &mut Self { + pub fn saml_can_be_enabled(&mut self, value: bool) -> &mut Self { self.saml_can_be_enabled = Some(value); self } - pub fn with_saml_idp_endpoint(&mut self, value: String) -> &mut Self { + pub fn saml_idp_endpoint(&mut self, value: String) -> &mut Self { self.saml_idp_endpoint = Some(value); self } - pub fn with_saml_idp_initiated_login( + pub fn saml_idp_initiated_login( &mut self, value: crate::datadogV1::model::OrganizationSettingsSamlIdpInitiatedLogin, ) -> &mut Self { @@ -110,17 +107,17 @@ impl OrganizationSettings { self } - pub fn with_saml_idp_metadata_uploaded(&mut self, value: bool) -> &mut Self { + pub fn saml_idp_metadata_uploaded(&mut self, value: bool) -> &mut Self { self.saml_idp_metadata_uploaded = Some(value); self } - pub fn with_saml_login_url(&mut self, value: String) -> &mut Self { + pub fn saml_login_url(&mut self, value: String) -> &mut Self { self.saml_login_url = Some(value); self } - pub fn with_saml_strict_mode( + pub fn saml_strict_mode( &mut self, value: crate::datadogV1::model::OrganizationSettingsSamlStrictMode, ) -> &mut Self { @@ -128,6 +125,7 @@ impl OrganizationSettings { self } } + impl Default for OrganizationSettings { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_organization_settings_saml.rs b/src/datadogV1/model/model_organization_settings_saml.rs index eb0f6588b..e2572031d 100644 --- a/src/datadogV1/model/model_organization_settings_saml.rs +++ b/src/datadogV1/model/model_organization_settings_saml.rs @@ -19,11 +19,12 @@ impl OrganizationSettingsSaml { OrganizationSettingsSaml { enabled: None } } - pub fn with_enabled(&mut self, value: bool) -> &mut Self { + pub fn enabled(&mut self, value: bool) -> &mut Self { self.enabled = Some(value); self } } + impl Default for OrganizationSettingsSaml { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_organization_settings_saml_autocreate_users_domains.rs b/src/datadogV1/model/model_organization_settings_saml_autocreate_users_domains.rs index 045356b9c..3a7400b03 100644 --- a/src/datadogV1/model/model_organization_settings_saml_autocreate_users_domains.rs +++ b/src/datadogV1/model/model_organization_settings_saml_autocreate_users_domains.rs @@ -24,16 +24,17 @@ impl OrganizationSettingsSamlAutocreateUsersDomains { } } - pub fn with_domains(&mut self, value: Vec) -> &mut Self { + pub fn domains(&mut self, value: Vec) -> &mut Self { self.domains = Some(value); self } - pub fn with_enabled(&mut self, value: bool) -> &mut Self { + pub fn enabled(&mut self, value: bool) -> &mut Self { self.enabled = Some(value); self } } + impl Default for OrganizationSettingsSamlAutocreateUsersDomains { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_organization_settings_saml_idp_initiated_login.rs b/src/datadogV1/model/model_organization_settings_saml_idp_initiated_login.rs index 074a7ce3a..5b4df0289 100644 --- a/src/datadogV1/model/model_organization_settings_saml_idp_initiated_login.rs +++ b/src/datadogV1/model/model_organization_settings_saml_idp_initiated_login.rs @@ -19,11 +19,12 @@ impl OrganizationSettingsSamlIdpInitiatedLogin { OrganizationSettingsSamlIdpInitiatedLogin { enabled: None } } - pub fn with_enabled(&mut self, value: bool) -> &mut Self { + pub fn enabled(&mut self, value: bool) -> &mut Self { self.enabled = Some(value); self } } + impl Default for OrganizationSettingsSamlIdpInitiatedLogin { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_organization_settings_saml_strict_mode.rs b/src/datadogV1/model/model_organization_settings_saml_strict_mode.rs index 5cafe3040..95ce8e083 100644 --- a/src/datadogV1/model/model_organization_settings_saml_strict_mode.rs +++ b/src/datadogV1/model/model_organization_settings_saml_strict_mode.rs @@ -19,11 +19,12 @@ impl OrganizationSettingsSamlStrictMode { OrganizationSettingsSamlStrictMode { enabled: None } } - pub fn with_enabled(&mut self, value: bool) -> &mut Self { + pub fn enabled(&mut self, value: bool) -> &mut Self { self.enabled = Some(value); self } } + impl Default for OrganizationSettingsSamlStrictMode { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_organization_subscription.rs b/src/datadogV1/model/model_organization_subscription.rs index 10d6f3bdc..dfb867ab6 100644 --- a/src/datadogV1/model/model_organization_subscription.rs +++ b/src/datadogV1/model/model_organization_subscription.rs @@ -18,11 +18,12 @@ impl OrganizationSubscription { OrganizationSubscription { type_: None } } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } } + impl Default for OrganizationSubscription { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_pagination.rs b/src/datadogV1/model/model_pagination.rs index 70afe1080..e5e97e1e1 100644 --- a/src/datadogV1/model/model_pagination.rs +++ b/src/datadogV1/model/model_pagination.rs @@ -24,16 +24,17 @@ impl Pagination { } } - pub fn with_total_count(&mut self, value: i64) -> &mut Self { + pub fn total_count(&mut self, value: i64) -> &mut Self { self.total_count = Some(value); self } - pub fn with_total_filtered_count(&mut self, value: i64) -> &mut Self { + pub fn total_filtered_count(&mut self, value: i64) -> &mut Self { self.total_filtered_count = Some(value); self } } + impl Default for Pagination { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_powerpack_template_variable_contents.rs b/src/datadogV1/model/model_powerpack_template_variable_contents.rs index 9ff5d51b7..75175a3ca 100644 --- a/src/datadogV1/model/model_powerpack_template_variable_contents.rs +++ b/src/datadogV1/model/model_powerpack_template_variable_contents.rs @@ -28,7 +28,7 @@ impl PowerpackTemplateVariableContents { } } - pub fn with_prefix(&mut self, value: String) -> &mut Self { + pub fn prefix(&mut self, value: String) -> &mut Self { self.prefix = Some(value); self } diff --git a/src/datadogV1/model/model_powerpack_template_variables.rs b/src/datadogV1/model/model_powerpack_template_variables.rs index 4c1133259..892861427 100644 --- a/src/datadogV1/model/model_powerpack_template_variables.rs +++ b/src/datadogV1/model/model_powerpack_template_variables.rs @@ -26,7 +26,7 @@ impl PowerpackTemplateVariables { } } - pub fn with_controlled_by_powerpack( + pub fn controlled_by_powerpack( &mut self, value: Vec, ) -> &mut Self { @@ -34,7 +34,7 @@ impl PowerpackTemplateVariables { self } - pub fn with_controlled_externally( + pub fn controlled_externally( &mut self, value: Vec, ) -> &mut Self { @@ -42,6 +42,7 @@ impl PowerpackTemplateVariables { self } } + impl Default for PowerpackTemplateVariables { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_powerpack_widget_definition.rs b/src/datadogV1/model/model_powerpack_widget_definition.rs index e9d2fd591..f59e5eebe 100644 --- a/src/datadogV1/model/model_powerpack_widget_definition.rs +++ b/src/datadogV1/model/model_powerpack_widget_definition.rs @@ -47,22 +47,22 @@ impl PowerpackWidgetDefinition { } } - pub fn with_background_color(&mut self, value: String) -> &mut Self { + pub fn background_color(&mut self, value: String) -> &mut Self { self.background_color = Some(value); self } - pub fn with_banner_img(&mut self, value: String) -> &mut Self { + pub fn banner_img(&mut self, value: String) -> &mut Self { self.banner_img = Some(value); self } - pub fn with_show_title(&mut self, value: bool) -> &mut Self { + pub fn show_title(&mut self, value: bool) -> &mut Self { self.show_title = Some(value); self } - pub fn with_template_variables( + pub fn template_variables( &mut self, value: crate::datadogV1::model::PowerpackTemplateVariables, ) -> &mut Self { @@ -70,7 +70,7 @@ impl PowerpackWidgetDefinition { self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } diff --git a/src/datadogV1/model/model_process_query_definition.rs b/src/datadogV1/model/model_process_query_definition.rs index 2c31ccc6c..bb8edfabf 100644 --- a/src/datadogV1/model/model_process_query_definition.rs +++ b/src/datadogV1/model/model_process_query_definition.rs @@ -32,17 +32,17 @@ impl ProcessQueryDefinition { } } - pub fn with_filter_by(&mut self, value: Vec) -> &mut Self { + pub fn filter_by(&mut self, value: Vec) -> &mut Self { self.filter_by = Some(value); self } - pub fn with_limit(&mut self, value: i64) -> &mut Self { + pub fn limit(&mut self, value: i64) -> &mut Self { self.limit = Some(value); self } - pub fn with_search_by(&mut self, value: String) -> &mut Self { + pub fn search_by(&mut self, value: String) -> &mut Self { self.search_by = Some(value); self } diff --git a/src/datadogV1/model/model_query_value_widget_definition.rs b/src/datadogV1/model/model_query_value_widget_definition.rs index 76875b8d0..b114a2ac7 100644 --- a/src/datadogV1/model/model_query_value_widget_definition.rs +++ b/src/datadogV1/model/model_query_value_widget_definition.rs @@ -67,12 +67,12 @@ impl QueryValueWidgetDefinition { } } - pub fn with_autoscale(&mut self, value: bool) -> &mut Self { + pub fn autoscale(&mut self, value: bool) -> &mut Self { self.autoscale = Some(value); self } - pub fn with_custom_links( + pub fn custom_links( &mut self, value: Vec, ) -> &mut Self { @@ -80,30 +80,27 @@ impl QueryValueWidgetDefinition { self } - pub fn with_custom_unit(&mut self, value: String) -> &mut Self { + pub fn custom_unit(&mut self, value: String) -> &mut Self { self.custom_unit = Some(value); self } - pub fn with_precision(&mut self, value: i64) -> &mut Self { + pub fn precision(&mut self, value: i64) -> &mut Self { self.precision = Some(value); self } - pub fn with_text_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn text_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.text_align = Some(value); self } - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } - pub fn with_timeseries_background( + pub fn timeseries_background( &mut self, value: crate::datadogV1::model::TimeseriesBackground, ) -> &mut Self { @@ -111,20 +108,17 @@ impl QueryValueWidgetDefinition { self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_query_value_widget_request.rs b/src/datadogV1/model/model_query_value_widget_request.rs index 7c5184327..0cec9092b 100644 --- a/src/datadogV1/model/model_query_value_widget_request.rs +++ b/src/datadogV1/model/model_query_value_widget_request.rs @@ -76,31 +76,22 @@ impl QueryValueWidgetRequest { } } - pub fn with_aggregator( - &mut self, - value: crate::datadogV1::model::WidgetAggregator, - ) -> &mut Self { + pub fn aggregator(&mut self, value: crate::datadogV1::model::WidgetAggregator) -> &mut Self { self.aggregator = Some(value); self } - pub fn with_apm_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.apm_query = Some(value); self } - pub fn with_audit_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn audit_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.audit_query = Some(value); self } - pub fn with_conditional_formats( + pub fn conditional_formats( &mut self, value: Vec, ) -> &mut Self { @@ -108,31 +99,22 @@ impl QueryValueWidgetRequest { self } - pub fn with_event_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn event_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.event_query = Some(value); self } - pub fn with_formulas( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn formulas(&mut self, value: Vec) -> &mut Self { self.formulas = Some(value); self } - pub fn with_log_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.log_query = Some(value); self } - pub fn with_network_query( + pub fn network_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -140,7 +122,7 @@ impl QueryValueWidgetRequest { self } - pub fn with_process_query( + pub fn process_query( &mut self, value: crate::datadogV1::model::ProcessQueryDefinition, ) -> &mut Self { @@ -148,7 +130,7 @@ impl QueryValueWidgetRequest { self } - pub fn with_profile_metrics_query( + pub fn profile_metrics_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -156,12 +138,12 @@ impl QueryValueWidgetRequest { self } - pub fn with_q(&mut self, value: String) -> &mut Self { + pub fn q(&mut self, value: String) -> &mut Self { self.q = Some(value); self } - pub fn with_queries( + pub fn queries( &mut self, value: Vec, ) -> &mut Self { @@ -169,7 +151,7 @@ impl QueryValueWidgetRequest { self } - pub fn with_response_format( + pub fn response_format( &mut self, value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, ) -> &mut Self { @@ -177,15 +159,12 @@ impl QueryValueWidgetRequest { self } - pub fn with_rum_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.rum_query = Some(value); self } - pub fn with_security_query( + pub fn security_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -193,6 +172,7 @@ impl QueryValueWidgetRequest { self } } + impl Default for QueryValueWidgetRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_reference_table_logs_lookup_processor.rs b/src/datadogV1/model/model_reference_table_logs_lookup_processor.rs index 3f18cd50d..64841686b 100644 --- a/src/datadogV1/model/model_reference_table_logs_lookup_processor.rs +++ b/src/datadogV1/model/model_reference_table_logs_lookup_processor.rs @@ -51,12 +51,12 @@ impl ReferenceTableLogsLookupProcessor { } } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV1/model/model_response_meta_attributes.rs b/src/datadogV1/model/model_response_meta_attributes.rs index 3c0d439bb..25f3c261d 100644 --- a/src/datadogV1/model/model_response_meta_attributes.rs +++ b/src/datadogV1/model/model_response_meta_attributes.rs @@ -18,11 +18,12 @@ impl ResponseMetaAttributes { ResponseMetaAttributes { page: None } } - pub fn with_page(&mut self, value: crate::datadogV1::model::Pagination) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV1::model::Pagination) -> &mut Self { self.page = Some(value); self } } + impl Default for ResponseMetaAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_run_workflow_widget_definition.rs b/src/datadogV1/model/model_run_workflow_widget_definition.rs index a7b32f3d9..164ad19a7 100644 --- a/src/datadogV1/model/model_run_workflow_widget_definition.rs +++ b/src/datadogV1/model/model_run_workflow_widget_definition.rs @@ -51,7 +51,7 @@ impl RunWorkflowWidgetDefinition { } } - pub fn with_custom_links( + pub fn custom_links( &mut self, value: Vec, ) -> &mut Self { @@ -59,7 +59,7 @@ impl RunWorkflowWidgetDefinition { self } - pub fn with_inputs( + pub fn inputs( &mut self, value: Vec, ) -> &mut Self { @@ -67,25 +67,22 @@ impl RunWorkflowWidgetDefinition { self } - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_scatter_plot_request.rs b/src/datadogV1/model/model_scatter_plot_request.rs index ab80e4280..f7a289293 100644 --- a/src/datadogV1/model/model_scatter_plot_request.rs +++ b/src/datadogV1/model/model_scatter_plot_request.rs @@ -56,7 +56,7 @@ impl ScatterPlotRequest { } } - pub fn with_aggregator( + pub fn aggregator( &mut self, value: crate::datadogV1::model::ScatterplotWidgetAggregator, ) -> &mut Self { @@ -64,31 +64,22 @@ impl ScatterPlotRequest { self } - pub fn with_apm_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.apm_query = Some(value); self } - pub fn with_event_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn event_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.event_query = Some(value); self } - pub fn with_log_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.log_query = Some(value); self } - pub fn with_network_query( + pub fn network_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -96,7 +87,7 @@ impl ScatterPlotRequest { self } - pub fn with_process_query( + pub fn process_query( &mut self, value: crate::datadogV1::model::ProcessQueryDefinition, ) -> &mut Self { @@ -104,7 +95,7 @@ impl ScatterPlotRequest { self } - pub fn with_profile_metrics_query( + pub fn profile_metrics_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -112,20 +103,17 @@ impl ScatterPlotRequest { self } - pub fn with_q(&mut self, value: String) -> &mut Self { + pub fn q(&mut self, value: String) -> &mut Self { self.q = Some(value); self } - pub fn with_rum_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.rum_query = Some(value); self } - pub fn with_security_query( + pub fn security_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -133,6 +121,7 @@ impl ScatterPlotRequest { self } } + impl Default for ScatterPlotRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_scatter_plot_widget_definition.rs b/src/datadogV1/model/model_scatter_plot_widget_definition.rs index 524666937..b77689e45 100644 --- a/src/datadogV1/model/model_scatter_plot_widget_definition.rs +++ b/src/datadogV1/model/model_scatter_plot_widget_definition.rs @@ -59,12 +59,12 @@ impl ScatterPlotWidgetDefinition { } } - pub fn with_color_by_groups(&mut self, value: Vec) -> &mut Self { + pub fn color_by_groups(&mut self, value: Vec) -> &mut Self { self.color_by_groups = Some(value); self } - pub fn with_custom_links( + pub fn custom_links( &mut self, value: Vec, ) -> &mut Self { @@ -72,35 +72,32 @@ impl ScatterPlotWidgetDefinition { self } - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } - pub fn with_xaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { + pub fn xaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { self.xaxis = Some(value); self } - pub fn with_yaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { + pub fn yaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { self.yaxis = Some(value); self } diff --git a/src/datadogV1/model/model_scatter_plot_widget_definition_requests.rs b/src/datadogV1/model/model_scatter_plot_widget_definition_requests.rs index c03a2964b..7e37013d9 100644 --- a/src/datadogV1/model/model_scatter_plot_widget_definition_requests.rs +++ b/src/datadogV1/model/model_scatter_plot_widget_definition_requests.rs @@ -28,24 +28,22 @@ impl ScatterPlotWidgetDefinitionRequests { } } - pub fn with_table( - &mut self, - value: crate::datadogV1::model::ScatterplotTableRequest, - ) -> &mut Self { + pub fn table(&mut self, value: crate::datadogV1::model::ScatterplotTableRequest) -> &mut Self { self.table = Some(value); self } - pub fn with_x(&mut self, value: crate::datadogV1::model::ScatterPlotRequest) -> &mut Self { + pub fn x(&mut self, value: crate::datadogV1::model::ScatterPlotRequest) -> &mut Self { self.x = Some(value); self } - pub fn with_y(&mut self, value: crate::datadogV1::model::ScatterPlotRequest) -> &mut Self { + pub fn y(&mut self, value: crate::datadogV1::model::ScatterPlotRequest) -> &mut Self { self.y = Some(value); self } } + impl Default for ScatterPlotWidgetDefinitionRequests { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_scatterplot_table_request.rs b/src/datadogV1/model/model_scatterplot_table_request.rs index bfc144c17..40c9b7810 100644 --- a/src/datadogV1/model/model_scatterplot_table_request.rs +++ b/src/datadogV1/model/model_scatterplot_table_request.rs @@ -28,7 +28,7 @@ impl ScatterplotTableRequest { } } - pub fn with_formulas( + pub fn formulas( &mut self, value: Vec, ) -> &mut Self { @@ -36,7 +36,7 @@ impl ScatterplotTableRequest { self } - pub fn with_queries( + pub fn queries( &mut self, value: Vec, ) -> &mut Self { @@ -44,7 +44,7 @@ impl ScatterplotTableRequest { self } - pub fn with_response_format( + pub fn response_format( &mut self, value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, ) -> &mut Self { @@ -52,6 +52,7 @@ impl ScatterplotTableRequest { self } } + impl Default for ScatterplotTableRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_scatterplot_widget_formula.rs b/src/datadogV1/model/model_scatterplot_widget_formula.rs index 28d0b9467..bc6ebc50e 100644 --- a/src/datadogV1/model/model_scatterplot_widget_formula.rs +++ b/src/datadogV1/model/model_scatterplot_widget_formula.rs @@ -31,7 +31,7 @@ impl ScatterplotWidgetFormula { } } - pub fn with_alias(&mut self, value: String) -> &mut Self { + pub fn alias(&mut self, value: String) -> &mut Self { self.alias = Some(value); self } diff --git a/src/datadogV1/model/model_search_service_level_objective.rs b/src/datadogV1/model/model_search_service_level_objective.rs index 242064c0f..6c30b6a49 100644 --- a/src/datadogV1/model/model_search_service_level_objective.rs +++ b/src/datadogV1/model/model_search_service_level_objective.rs @@ -18,7 +18,7 @@ impl SearchServiceLevelObjective { SearchServiceLevelObjective { data: None } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV1::model::SearchServiceLevelObjectiveData, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SearchServiceLevelObjective { self } } + impl Default for SearchServiceLevelObjective { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_search_service_level_objective_attributes.rs b/src/datadogV1/model/model_search_service_level_objective_attributes.rs index d4475078f..afefa05e8 100644 --- a/src/datadogV1/model/model_search_service_level_objective_attributes.rs +++ b/src/datadogV1/model/model_search_service_level_objective_attributes.rs @@ -106,55 +106,52 @@ impl SearchServiceLevelObjectiveAttributes { } } - pub fn with_all_tags(&mut self, value: Vec) -> &mut Self { + pub fn all_tags(&mut self, value: Vec) -> &mut Self { self.all_tags = Some(value); self } - pub fn with_created_at(&mut self, value: i64) -> &mut Self { + pub fn created_at(&mut self, value: i64) -> &mut Self { self.created_at = Some(value); self } - pub fn with_creator( - &mut self, - value: Option, - ) -> &mut Self { + pub fn creator(&mut self, value: Option) -> &mut Self { self.creator = Some(value); self } - pub fn with_description(&mut self, value: Option) -> &mut Self { + pub fn description(&mut self, value: Option) -> &mut Self { self.description = Some(value); self } - pub fn with_env_tags(&mut self, value: Vec) -> &mut Self { + pub fn env_tags(&mut self, value: Vec) -> &mut Self { self.env_tags = Some(value); self } - pub fn with_groups(&mut self, value: Option>) -> &mut Self { + pub fn groups(&mut self, value: Option>) -> &mut Self { self.groups = Some(value); self } - pub fn with_modified_at(&mut self, value: i64) -> &mut Self { + pub fn modified_at(&mut self, value: i64) -> &mut Self { self.modified_at = Some(value); self } - pub fn with_monitor_ids(&mut self, value: Option>) -> &mut Self { + pub fn monitor_ids(&mut self, value: Option>) -> &mut Self { self.monitor_ids = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_overall_status( + pub fn overall_status( &mut self, value: Vec, ) -> &mut Self { @@ -162,35 +159,32 @@ impl SearchServiceLevelObjectiveAttributes { self } - pub fn with_query( - &mut self, - value: Option, - ) -> &mut Self { + pub fn query(&mut self, value: Option) -> &mut Self { self.query = Some(value); self } - pub fn with_service_tags(&mut self, value: Vec) -> &mut Self { + pub fn service_tags(&mut self, value: Vec) -> &mut Self { self.service_tags = Some(value); self } - pub fn with_slo_type(&mut self, value: crate::datadogV1::model::SLOType) -> &mut Self { + pub fn slo_type(&mut self, value: crate::datadogV1::model::SLOType) -> &mut Self { self.slo_type = Some(value); self } - pub fn with_status(&mut self, value: crate::datadogV1::model::SLOStatus) -> &mut Self { + pub fn status(&mut self, value: crate::datadogV1::model::SLOStatus) -> &mut Self { self.status = Some(value); self } - pub fn with_team_tags(&mut self, value: Vec) -> &mut Self { + pub fn team_tags(&mut self, value: Vec) -> &mut Self { self.team_tags = Some(value); self } - pub fn with_thresholds( + pub fn thresholds( &mut self, value: Vec, ) -> &mut Self { @@ -198,6 +192,7 @@ impl SearchServiceLevelObjectiveAttributes { self } } + impl Default for SearchServiceLevelObjectiveAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_search_service_level_objective_data.rs b/src/datadogV1/model/model_search_service_level_objective_data.rs index 8ae3ed58d..d4d0f08e5 100644 --- a/src/datadogV1/model/model_search_service_level_objective_data.rs +++ b/src/datadogV1/model/model_search_service_level_objective_data.rs @@ -31,7 +31,7 @@ impl SearchServiceLevelObjectiveData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV1::model::SearchServiceLevelObjectiveAttributes, ) -> &mut Self { @@ -39,16 +39,17 @@ impl SearchServiceLevelObjectiveData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } } + impl Default for SearchServiceLevelObjectiveData { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_search_slo_query.rs b/src/datadogV1/model/model_search_slo_query.rs index a597ba294..0a4767771 100644 --- a/src/datadogV1/model/model_search_slo_query.rs +++ b/src/datadogV1/model/model_search_slo_query.rs @@ -35,21 +35,22 @@ impl SearchSLOQuery { } } - pub fn with_denominator(&mut self, value: String) -> &mut Self { + pub fn denominator(&mut self, value: String) -> &mut Self { self.denominator = Some(value); self } - pub fn with_metrics(&mut self, value: Option>) -> &mut Self { + pub fn metrics(&mut self, value: Option>) -> &mut Self { self.metrics = Some(value); self } - pub fn with_numerator(&mut self, value: String) -> &mut Self { + pub fn numerator(&mut self, value: String) -> &mut Self { self.numerator = Some(value); self } } + impl Default for SearchSLOQuery { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_search_slo_response.rs b/src/datadogV1/model/model_search_slo_response.rs index b6c667047..6b9ac65c4 100644 --- a/src/datadogV1/model/model_search_slo_response.rs +++ b/src/datadogV1/model/model_search_slo_response.rs @@ -28,30 +28,22 @@ impl SearchSLOResponse { } } - pub fn with_data( - &mut self, - value: crate::datadogV1::model::SearchSLOResponseData, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV1::model::SearchSLOResponseData) -> &mut Self { self.data = Some(value); self } - pub fn with_links( - &mut self, - value: crate::datadogV1::model::SearchSLOResponseLinks, - ) -> &mut Self { + pub fn links(&mut self, value: crate::datadogV1::model::SearchSLOResponseLinks) -> &mut Self { self.links = Some(value); self } - pub fn with_meta( - &mut self, - value: crate::datadogV1::model::SearchSLOResponseMeta, - ) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV1::model::SearchSLOResponseMeta) -> &mut Self { self.meta = Some(value); self } } + impl Default for SearchSLOResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_search_slo_response_data.rs b/src/datadogV1/model/model_search_slo_response_data.rs index 02edba6a4..a3747f59f 100644 --- a/src/datadogV1/model/model_search_slo_response_data.rs +++ b/src/datadogV1/model/model_search_slo_response_data.rs @@ -24,7 +24,7 @@ impl SearchSLOResponseData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV1::model::SearchSLOResponseDataAttributes, ) -> &mut Self { @@ -32,11 +32,12 @@ impl SearchSLOResponseData { self } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } } + impl Default for SearchSLOResponseData { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_search_slo_response_data_attributes.rs b/src/datadogV1/model/model_search_slo_response_data_attributes.rs index cfddc2a29..21aee476b 100644 --- a/src/datadogV1/model/model_search_slo_response_data_attributes.rs +++ b/src/datadogV1/model/model_search_slo_response_data_attributes.rs @@ -24,7 +24,7 @@ impl SearchSLOResponseDataAttributes { } } - pub fn with_facets( + pub fn facets( &mut self, value: crate::datadogV1::model::SearchSLOResponseDataAttributesFacets, ) -> &mut Self { @@ -32,7 +32,7 @@ impl SearchSLOResponseDataAttributes { self } - pub fn with_slos( + pub fn slos( &mut self, value: Vec, ) -> &mut Self { @@ -40,6 +40,7 @@ impl SearchSLOResponseDataAttributes { self } } + impl Default for SearchSLOResponseDataAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_search_slo_response_data_attributes_facets.rs b/src/datadogV1/model/model_search_slo_response_data_attributes_facets.rs index 76f88d7db..1f849320f 100644 --- a/src/datadogV1/model/model_search_slo_response_data_attributes_facets.rs +++ b/src/datadogV1/model/model_search_slo_response_data_attributes_facets.rs @@ -56,7 +56,7 @@ impl SearchSLOResponseDataAttributesFacets { } } - pub fn with_all_tags( + pub fn all_tags( &mut self, value: Vec, ) -> &mut Self { @@ -64,7 +64,7 @@ impl SearchSLOResponseDataAttributesFacets { self } - pub fn with_creator_name( + pub fn creator_name( &mut self, value: Vec, ) -> &mut Self { @@ -72,7 +72,7 @@ impl SearchSLOResponseDataAttributesFacets { self } - pub fn with_env_tags( + pub fn env_tags( &mut self, value: Vec, ) -> &mut Self { @@ -80,7 +80,7 @@ impl SearchSLOResponseDataAttributesFacets { self } - pub fn with_service_tags( + pub fn service_tags( &mut self, value: Vec, ) -> &mut Self { @@ -88,7 +88,7 @@ impl SearchSLOResponseDataAttributesFacets { self } - pub fn with_slo_type( + pub fn slo_type( &mut self, value: Vec, ) -> &mut Self { @@ -96,7 +96,7 @@ impl SearchSLOResponseDataAttributesFacets { self } - pub fn with_target( + pub fn target( &mut self, value: Vec, ) -> &mut Self { @@ -104,7 +104,7 @@ impl SearchSLOResponseDataAttributesFacets { self } - pub fn with_team_tags( + pub fn team_tags( &mut self, value: Vec, ) -> &mut Self { @@ -112,7 +112,7 @@ impl SearchSLOResponseDataAttributesFacets { self } - pub fn with_timeframe( + pub fn timeframe( &mut self, value: Vec, ) -> &mut Self { @@ -120,6 +120,7 @@ impl SearchSLOResponseDataAttributesFacets { self } } + impl Default for SearchSLOResponseDataAttributesFacets { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_int.rs b/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_int.rs index c9b67fc2d..4d8f280de 100644 --- a/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_int.rs +++ b/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_int.rs @@ -24,16 +24,17 @@ impl SearchSLOResponseDataAttributesFacetsObjectInt { } } - pub fn with_count(&mut self, value: i64) -> &mut Self { + pub fn count(&mut self, value: i64) -> &mut Self { self.count = Some(value); self } - pub fn with_name(&mut self, value: f64) -> &mut Self { + pub fn name(&mut self, value: f64) -> &mut Self { self.name = Some(value); self } } + impl Default for SearchSLOResponseDataAttributesFacetsObjectInt { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_string.rs b/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_string.rs index c859f090d..79d94306a 100644 --- a/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_string.rs +++ b/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_string.rs @@ -24,16 +24,17 @@ impl SearchSLOResponseDataAttributesFacetsObjectString { } } - pub fn with_count(&mut self, value: i64) -> &mut Self { + pub fn count(&mut self, value: i64) -> &mut Self { self.count = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } } + impl Default for SearchSLOResponseDataAttributesFacetsObjectString { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_search_slo_response_links.rs b/src/datadogV1/model/model_search_slo_response_links.rs index a58997db4..2dad89362 100644 --- a/src/datadogV1/model/model_search_slo_response_links.rs +++ b/src/datadogV1/model/model_search_slo_response_links.rs @@ -36,31 +36,32 @@ impl SearchSLOResponseLinks { } } - pub fn with_first(&mut self, value: String) -> &mut Self { + pub fn first(&mut self, value: String) -> &mut Self { self.first = Some(value); self } - pub fn with_last(&mut self, value: Option) -> &mut Self { + pub fn last(&mut self, value: Option) -> &mut Self { self.last = Some(value); self } - pub fn with_next(&mut self, value: String) -> &mut Self { + pub fn next(&mut self, value: String) -> &mut Self { self.next = Some(value); self } - pub fn with_prev(&mut self, value: Option) -> &mut Self { + pub fn prev(&mut self, value: Option) -> &mut Self { self.prev = Some(value); self } - pub fn with_self_(&mut self, value: String) -> &mut Self { + pub fn self_(&mut self, value: String) -> &mut Self { self.self_ = Some(value); self } } + impl Default for SearchSLOResponseLinks { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_search_slo_response_meta.rs b/src/datadogV1/model/model_search_slo_response_meta.rs index a27e89513..d3dfad7a9 100644 --- a/src/datadogV1/model/model_search_slo_response_meta.rs +++ b/src/datadogV1/model/model_search_slo_response_meta.rs @@ -18,7 +18,7 @@ impl SearchSLOResponseMeta { SearchSLOResponseMeta { pagination: None } } - pub fn with_pagination( + pub fn pagination( &mut self, value: crate::datadogV1::model::SearchSLOResponseMetaPage, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SearchSLOResponseMeta { self } } + impl Default for SearchSLOResponseMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_search_slo_response_meta_page.rs b/src/datadogV1/model/model_search_slo_response_meta_page.rs index 30be703c2..b817aebee 100644 --- a/src/datadogV1/model/model_search_slo_response_meta_page.rs +++ b/src/datadogV1/model/model_search_slo_response_meta_page.rs @@ -48,46 +48,47 @@ impl SearchSLOResponseMetaPage { } } - pub fn with_first_number(&mut self, value: i64) -> &mut Self { + pub fn first_number(&mut self, value: i64) -> &mut Self { self.first_number = Some(value); self } - pub fn with_last_number(&mut self, value: i64) -> &mut Self { + pub fn last_number(&mut self, value: i64) -> &mut Self { self.last_number = Some(value); self } - pub fn with_next_number(&mut self, value: i64) -> &mut Self { + pub fn next_number(&mut self, value: i64) -> &mut Self { self.next_number = Some(value); self } - pub fn with_number(&mut self, value: i64) -> &mut Self { + pub fn number(&mut self, value: i64) -> &mut Self { self.number = Some(value); self } - pub fn with_prev_number(&mut self, value: i64) -> &mut Self { + pub fn prev_number(&mut self, value: i64) -> &mut Self { self.prev_number = Some(value); self } - pub fn with_size(&mut self, value: i64) -> &mut Self { + pub fn size(&mut self, value: i64) -> &mut Self { self.size = Some(value); self } - pub fn with_total(&mut self, value: i64) -> &mut Self { + pub fn total(&mut self, value: i64) -> &mut Self { self.total = Some(value); self } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } } + impl Default for SearchSLOResponseMetaPage { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_search_slo_threshold.rs b/src/datadogV1/model/model_search_slo_threshold.rs index 60feac408..9cf193b68 100644 --- a/src/datadogV1/model/model_search_slo_threshold.rs +++ b/src/datadogV1/model/model_search_slo_threshold.rs @@ -56,17 +56,17 @@ impl SearchSLOThreshold { } } - pub fn with_target_display(&mut self, value: String) -> &mut Self { + pub fn target_display(&mut self, value: String) -> &mut Self { self.target_display = Some(value); self } - pub fn with_warning(&mut self, value: Option) -> &mut Self { + pub fn warning(&mut self, value: Option) -> &mut Self { self.warning = Some(value); self } - pub fn with_warning_display(&mut self, value: Option) -> &mut Self { + pub fn warning_display(&mut self, value: Option) -> &mut Self { self.warning_display = Some(value); self } diff --git a/src/datadogV1/model/model_selectable_template_variable_items.rs b/src/datadogV1/model/model_selectable_template_variable_items.rs index 13df8d965..d19b55237 100644 --- a/src/datadogV1/model/model_selectable_template_variable_items.rs +++ b/src/datadogV1/model/model_selectable_template_variable_items.rs @@ -36,26 +36,27 @@ impl SelectableTemplateVariableItems { } } - pub fn with_default_value(&mut self, value: String) -> &mut Self { + pub fn default_value(&mut self, value: String) -> &mut Self { self.default_value = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_prefix(&mut self, value: String) -> &mut Self { + pub fn prefix(&mut self, value: String) -> &mut Self { self.prefix = Some(value); self } - pub fn with_visible_tags(&mut self, value: Option>) -> &mut Self { + pub fn visible_tags(&mut self, value: Option>) -> &mut Self { self.visible_tags = Some(value); self } } + impl Default for SelectableTemplateVariableItems { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_series.rs b/src/datadogV1/model/model_series.rs index 7dfe2f85a..7119fda5e 100644 --- a/src/datadogV1/model/model_series.rs +++ b/src/datadogV1/model/model_series.rs @@ -45,22 +45,22 @@ impl Series { } } - pub fn with_host(&mut self, value: String) -> &mut Self { + pub fn host(&mut self, value: String) -> &mut Self { self.host = Some(value); self } - pub fn with_interval(&mut self, value: Option) -> &mut Self { + pub fn interval(&mut self, value: Option) -> &mut Self { self.interval = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } diff --git a/src/datadogV1/model/model_service_check.rs b/src/datadogV1/model/model_service_check.rs index 9c24d5d6f..b4027a3ec 100644 --- a/src/datadogV1/model/model_service_check.rs +++ b/src/datadogV1/model/model_service_check.rs @@ -45,12 +45,12 @@ impl ServiceCheck { } } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } - pub fn with_timestamp(&mut self, value: i64) -> &mut Self { + pub fn timestamp(&mut self, value: i64) -> &mut Self { self.timestamp = Some(value); self } diff --git a/src/datadogV1/model/model_service_level_objective.rs b/src/datadogV1/model/model_service_level_objective.rs index c6d292b09..5be0353d5 100644 --- a/src/datadogV1/model/model_service_level_objective.rs +++ b/src/datadogV1/model/model_service_level_objective.rs @@ -117,47 +117,47 @@ impl ServiceLevelObjective { } } - pub fn with_created_at(&mut self, value: i64) -> &mut Self { + pub fn created_at(&mut self, value: i64) -> &mut Self { self.created_at = Some(value); self } - pub fn with_creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + pub fn creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { self.creator = Some(value); self } - pub fn with_description(&mut self, value: Option) -> &mut Self { + pub fn description(&mut self, value: Option) -> &mut Self { self.description = Some(value); self } - pub fn with_groups(&mut self, value: Vec) -> &mut Self { + pub fn groups(&mut self, value: Vec) -> &mut Self { self.groups = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_modified_at(&mut self, value: i64) -> &mut Self { + pub fn modified_at(&mut self, value: i64) -> &mut Self { self.modified_at = Some(value); self } - pub fn with_monitor_ids(&mut self, value: Vec) -> &mut Self { + pub fn monitor_ids(&mut self, value: Vec) -> &mut Self { self.monitor_ids = Some(value); self } - pub fn with_monitor_tags(&mut self, value: Vec) -> &mut Self { + pub fn monitor_tags(&mut self, value: Vec) -> &mut Self { self.monitor_tags = Some(value); self } - pub fn with_query( + pub fn query( &mut self, value: crate::datadogV1::model::ServiceLevelObjectiveQuery, ) -> &mut Self { @@ -165,22 +165,22 @@ impl ServiceLevelObjective { self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_target_threshold(&mut self, value: f64) -> &mut Self { + pub fn target_threshold(&mut self, value: f64) -> &mut Self { self.target_threshold = Some(value); self } - pub fn with_timeframe(&mut self, value: crate::datadogV1::model::SLOTimeframe) -> &mut Self { + pub fn timeframe(&mut self, value: crate::datadogV1::model::SLOTimeframe) -> &mut Self { self.timeframe = Some(value); self } - pub fn with_warning_threshold(&mut self, value: f64) -> &mut Self { + pub fn warning_threshold(&mut self, value: f64) -> &mut Self { self.warning_threshold = Some(value); self } diff --git a/src/datadogV1/model/model_service_level_objective_request.rs b/src/datadogV1/model/model_service_level_objective_request.rs index d8094261c..c4982d13d 100644 --- a/src/datadogV1/model/model_service_level_objective_request.rs +++ b/src/datadogV1/model/model_service_level_objective_request.rs @@ -86,22 +86,22 @@ impl ServiceLevelObjectiveRequest { } } - pub fn with_description(&mut self, value: Option) -> &mut Self { + pub fn description(&mut self, value: Option) -> &mut Self { self.description = Some(value); self } - pub fn with_groups(&mut self, value: Vec) -> &mut Self { + pub fn groups(&mut self, value: Vec) -> &mut Self { self.groups = Some(value); self } - pub fn with_monitor_ids(&mut self, value: Vec) -> &mut Self { + pub fn monitor_ids(&mut self, value: Vec) -> &mut Self { self.monitor_ids = Some(value); self } - pub fn with_query( + pub fn query( &mut self, value: crate::datadogV1::model::ServiceLevelObjectiveQuery, ) -> &mut Self { @@ -109,22 +109,22 @@ impl ServiceLevelObjectiveRequest { self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_target_threshold(&mut self, value: f64) -> &mut Self { + pub fn target_threshold(&mut self, value: f64) -> &mut Self { self.target_threshold = Some(value); self } - pub fn with_timeframe(&mut self, value: crate::datadogV1::model::SLOTimeframe) -> &mut Self { + pub fn timeframe(&mut self, value: crate::datadogV1::model::SLOTimeframe) -> &mut Self { self.timeframe = Some(value); self } - pub fn with_warning_threshold(&mut self, value: f64) -> &mut Self { + pub fn warning_threshold(&mut self, value: f64) -> &mut Self { self.warning_threshold = Some(value); self } diff --git a/src/datadogV1/model/model_service_map_widget_definition.rs b/src/datadogV1/model/model_service_map_widget_definition.rs index 0c333f39c..18651ee06 100644 --- a/src/datadogV1/model/model_service_map_widget_definition.rs +++ b/src/datadogV1/model/model_service_map_widget_definition.rs @@ -48,7 +48,7 @@ impl ServiceMapWidgetDefinition { } } - pub fn with_custom_links( + pub fn custom_links( &mut self, value: Vec, ) -> &mut Self { @@ -56,20 +56,17 @@ impl ServiceMapWidgetDefinition { self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_service_summary_widget_definition.rs b/src/datadogV1/model/model_service_summary_widget_definition.rs index 94f90da8c..b3d226326 100644 --- a/src/datadogV1/model/model_service_summary_widget_definition.rs +++ b/src/datadogV1/model/model_service_summary_widget_definition.rs @@ -85,7 +85,7 @@ impl ServiceSummaryWidgetDefinition { } } - pub fn with_display_format( + pub fn display_format( &mut self, value: crate::datadogV1::model::WidgetServiceSummaryDisplayFormat, ) -> &mut Self { @@ -93,63 +93,57 @@ impl ServiceSummaryWidgetDefinition { self } - pub fn with_show_breakdown(&mut self, value: bool) -> &mut Self { + pub fn show_breakdown(&mut self, value: bool) -> &mut Self { self.show_breakdown = Some(value); self } - pub fn with_show_distribution(&mut self, value: bool) -> &mut Self { + pub fn show_distribution(&mut self, value: bool) -> &mut Self { self.show_distribution = Some(value); self } - pub fn with_show_errors(&mut self, value: bool) -> &mut Self { + pub fn show_errors(&mut self, value: bool) -> &mut Self { self.show_errors = Some(value); self } - pub fn with_show_hits(&mut self, value: bool) -> &mut Self { + pub fn show_hits(&mut self, value: bool) -> &mut Self { self.show_hits = Some(value); self } - pub fn with_show_latency(&mut self, value: bool) -> &mut Self { + pub fn show_latency(&mut self, value: bool) -> &mut Self { self.show_latency = Some(value); self } - pub fn with_show_resource_list(&mut self, value: bool) -> &mut Self { + pub fn show_resource_list(&mut self, value: bool) -> &mut Self { self.show_resource_list = Some(value); self } - pub fn with_size_format( - &mut self, - value: crate::datadogV1::model::WidgetSizeFormat, - ) -> &mut Self { + pub fn size_format(&mut self, value: crate::datadogV1::model::WidgetSizeFormat) -> &mut Self { self.size_format = Some(value); self } - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_shared_dashboard.rs b/src/datadogV1/model/model_shared_dashboard.rs index f21b08bd4..0b6e52716 100644 --- a/src/datadogV1/model/model_shared_dashboard.rs +++ b/src/datadogV1/model/model_shared_dashboard.rs @@ -80,20 +80,17 @@ impl SharedDashboard { } } - pub fn with_author( - &mut self, - value: crate::datadogV1::model::SharedDashboardAuthor, - ) -> &mut Self { + pub fn author(&mut self, value: crate::datadogV1::model::SharedDashboardAuthor) -> &mut Self { self.author = Some(value); self } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_global_time( + pub fn global_time( &mut self, value: crate::datadogV1::model::DashboardGlobalTime, ) -> &mut Self { @@ -101,17 +98,17 @@ impl SharedDashboard { self } - pub fn with_global_time_selectable_enabled(&mut self, value: Option) -> &mut Self { + pub fn global_time_selectable_enabled(&mut self, value: Option) -> &mut Self { self.global_time_selectable_enabled = Some(value); self } - pub fn with_public_url(&mut self, value: String) -> &mut Self { + pub fn public_url(&mut self, value: String) -> &mut Self { self.public_url = Some(value); self } - pub fn with_selectable_template_vars( + pub fn selectable_template_vars( &mut self, value: Option>, ) -> &mut Self { @@ -119,12 +116,12 @@ impl SharedDashboard { self } - pub fn with_share_list(&mut self, value: Option>) -> &mut Self { + pub fn share_list(&mut self, value: Option>) -> &mut Self { self.share_list = Some(value); self } - pub fn with_share_type( + pub fn share_type( &mut self, value: Option, ) -> &mut Self { @@ -132,7 +129,7 @@ impl SharedDashboard { self } - pub fn with_token(&mut self, value: String) -> &mut Self { + pub fn token(&mut self, value: String) -> &mut Self { self.token = Some(value); self } diff --git a/src/datadogV1/model/model_shared_dashboard_author.rs b/src/datadogV1/model/model_shared_dashboard_author.rs index a1dc97592..9f8ed9540 100644 --- a/src/datadogV1/model/model_shared_dashboard_author.rs +++ b/src/datadogV1/model/model_shared_dashboard_author.rs @@ -24,16 +24,17 @@ impl SharedDashboardAuthor { } } - pub fn with_handle(&mut self, value: String) -> &mut Self { + pub fn handle(&mut self, value: String) -> &mut Self { self.handle = Some(value); self } - pub fn with_name(&mut self, value: Option) -> &mut Self { + pub fn name(&mut self, value: Option) -> &mut Self { self.name = Some(value); self } } + impl Default for SharedDashboardAuthor { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_shared_dashboard_invites.rs b/src/datadogV1/model/model_shared_dashboard_invites.rs index f3fc44882..52cca47e5 100644 --- a/src/datadogV1/model/model_shared_dashboard_invites.rs +++ b/src/datadogV1/model/model_shared_dashboard_invites.rs @@ -23,7 +23,7 @@ impl SharedDashboardInvites { SharedDashboardInvites { data, meta: None } } - pub fn with_meta( + pub fn meta( &mut self, value: crate::datadogV1::model::SharedDashboardInvitesMeta, ) -> &mut Self { diff --git a/src/datadogV1/model/model_shared_dashboard_invites_data.rs b/src/datadogV1/model/model_shared_dashboard_invites_data.rs index 690ed6ac3..3ee00d5e8 100644 --- a/src/datadogV1/model/model_shared_dashboard_invites_data.rs +++ b/src/datadogV1/model/model_shared_dashboard_invites_data.rs @@ -7,6 +7,8 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum SharedDashboardInvitesData { - SharedDashboardInvitesDataObject(crate::datadogV1::model::SharedDashboardInvitesDataObject), + SharedDashboardInvitesDataObject( + Box, + ), SharedDashboardInvitesDataList(Vec), } diff --git a/src/datadogV1/model/model_shared_dashboard_invites_data_object_attributes.rs b/src/datadogV1/model/model_shared_dashboard_invites_data_object_attributes.rs index fe523b497..7e45f5a7a 100644 --- a/src/datadogV1/model/model_shared_dashboard_invites_data_object_attributes.rs +++ b/src/datadogV1/model/model_shared_dashboard_invites_data_object_attributes.rs @@ -44,36 +44,37 @@ impl SharedDashboardInvitesDataObjectAttributes { } } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_email(&mut self, value: String) -> &mut Self { + pub fn email(&mut self, value: String) -> &mut Self { self.email = Some(value); self } - pub fn with_has_session(&mut self, value: bool) -> &mut Self { + pub fn has_session(&mut self, value: bool) -> &mut Self { self.has_session = Some(value); self } - pub fn with_invitation_expiry(&mut self, value: String) -> &mut Self { + pub fn invitation_expiry(&mut self, value: String) -> &mut Self { self.invitation_expiry = Some(value); self } - pub fn with_session_expiry(&mut self, value: Option) -> &mut Self { + pub fn session_expiry(&mut self, value: Option) -> &mut Self { self.session_expiry = Some(value); self } - pub fn with_share_token(&mut self, value: String) -> &mut Self { + pub fn share_token(&mut self, value: String) -> &mut Self { self.share_token = Some(value); self } } + impl Default for SharedDashboardInvitesDataObjectAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_shared_dashboard_invites_meta.rs b/src/datadogV1/model/model_shared_dashboard_invites_meta.rs index 443e51dae..f4e9fbe04 100644 --- a/src/datadogV1/model/model_shared_dashboard_invites_meta.rs +++ b/src/datadogV1/model/model_shared_dashboard_invites_meta.rs @@ -18,7 +18,7 @@ impl SharedDashboardInvitesMeta { SharedDashboardInvitesMeta { page: None } } - pub fn with_page( + pub fn page( &mut self, value: crate::datadogV1::model::SharedDashboardInvitesMetaPage, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SharedDashboardInvitesMeta { self } } + impl Default for SharedDashboardInvitesMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_shared_dashboard_invites_meta_page.rs b/src/datadogV1/model/model_shared_dashboard_invites_meta_page.rs index b4a485242..cc2b35082 100644 --- a/src/datadogV1/model/model_shared_dashboard_invites_meta_page.rs +++ b/src/datadogV1/model/model_shared_dashboard_invites_meta_page.rs @@ -18,11 +18,12 @@ impl SharedDashboardInvitesMetaPage { SharedDashboardInvitesMetaPage { total_count: None } } - pub fn with_total_count(&mut self, value: i64) -> &mut Self { + pub fn total_count(&mut self, value: i64) -> &mut Self { self.total_count = Some(value); self } } + impl Default for SharedDashboardInvitesMetaPage { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_shared_dashboard_update_request.rs b/src/datadogV1/model/model_shared_dashboard_update_request.rs index a33c5bc6c..dd48ab143 100644 --- a/src/datadogV1/model/model_shared_dashboard_update_request.rs +++ b/src/datadogV1/model/model_shared_dashboard_update_request.rs @@ -55,12 +55,12 @@ impl SharedDashboardUpdateRequest { } } - pub fn with_global_time_selectable_enabled(&mut self, value: Option) -> &mut Self { + pub fn global_time_selectable_enabled(&mut self, value: Option) -> &mut Self { self.global_time_selectable_enabled = Some(value); self } - pub fn with_selectable_template_vars( + pub fn selectable_template_vars( &mut self, value: Option>, ) -> &mut Self { @@ -68,12 +68,12 @@ impl SharedDashboardUpdateRequest { self } - pub fn with_share_list(&mut self, value: Option>) -> &mut Self { + pub fn share_list(&mut self, value: Option>) -> &mut Self { self.share_list = Some(value); self } - pub fn with_share_type( + pub fn share_type( &mut self, value: Option, ) -> &mut Self { diff --git a/src/datadogV1/model/model_shared_dashboard_update_request_global_time.rs b/src/datadogV1/model/model_shared_dashboard_update_request_global_time.rs index 26dbe613f..19ec65f9e 100644 --- a/src/datadogV1/model/model_shared_dashboard_update_request_global_time.rs +++ b/src/datadogV1/model/model_shared_dashboard_update_request_global_time.rs @@ -18,7 +18,7 @@ impl SharedDashboardUpdateRequestGlobalTime { SharedDashboardUpdateRequestGlobalTime { live_span: None } } - pub fn with_live_span( + pub fn live_span( &mut self, value: crate::datadogV1::model::DashboardGlobalTimeLiveSpan, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SharedDashboardUpdateRequestGlobalTime { self } } + impl Default for SharedDashboardUpdateRequestGlobalTime { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_signal_assignee_update_request.rs b/src/datadogV1/model/model_signal_assignee_update_request.rs index 7ac64e2a8..db556d0c9 100644 --- a/src/datadogV1/model/model_signal_assignee_update_request.rs +++ b/src/datadogV1/model/model_signal_assignee_update_request.rs @@ -24,7 +24,7 @@ impl SignalAssigneeUpdateRequest { } } - pub fn with_version(&mut self, value: i64) -> &mut Self { + pub fn version(&mut self, value: i64) -> &mut Self { self.version = Some(value); self } diff --git a/src/datadogV1/model/model_signal_state_update_request.rs b/src/datadogV1/model/model_signal_state_update_request.rs index f08592c94..29e15bb5c 100644 --- a/src/datadogV1/model/model_signal_state_update_request.rs +++ b/src/datadogV1/model/model_signal_state_update_request.rs @@ -32,12 +32,12 @@ impl SignalStateUpdateRequest { } } - pub fn with_archive_comment(&mut self, value: String) -> &mut Self { + pub fn archive_comment(&mut self, value: String) -> &mut Self { self.archive_comment = Some(value); self } - pub fn with_archive_reason( + pub fn archive_reason( &mut self, value: crate::datadogV1::model::SignalArchiveReason, ) -> &mut Self { @@ -45,7 +45,7 @@ impl SignalStateUpdateRequest { self } - pub fn with_version(&mut self, value: i64) -> &mut Self { + pub fn version(&mut self, value: i64) -> &mut Self { self.version = Some(value); self } diff --git a/src/datadogV1/model/model_slack_integration_channel.rs b/src/datadogV1/model/model_slack_integration_channel.rs index 6bb28125c..4397f7ef7 100644 --- a/src/datadogV1/model/model_slack_integration_channel.rs +++ b/src/datadogV1/model/model_slack_integration_channel.rs @@ -24,7 +24,7 @@ impl SlackIntegrationChannel { } } - pub fn with_display( + pub fn display( &mut self, value: crate::datadogV1::model::SlackIntegrationChannelDisplay, ) -> &mut Self { @@ -32,11 +32,12 @@ impl SlackIntegrationChannel { self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } } + impl Default for SlackIntegrationChannel { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slack_integration_channel_display.rs b/src/datadogV1/model/model_slack_integration_channel_display.rs index 9d3c2cdde..34841198b 100644 --- a/src/datadogV1/model/model_slack_integration_channel_display.rs +++ b/src/datadogV1/model/model_slack_integration_channel_display.rs @@ -32,26 +32,27 @@ impl SlackIntegrationChannelDisplay { } } - pub fn with_message(&mut self, value: bool) -> &mut Self { + pub fn message(&mut self, value: bool) -> &mut Self { self.message = Some(value); self } - pub fn with_notified(&mut self, value: bool) -> &mut Self { + pub fn notified(&mut self, value: bool) -> &mut Self { self.notified = Some(value); self } - pub fn with_snapshot(&mut self, value: bool) -> &mut Self { + pub fn snapshot(&mut self, value: bool) -> &mut Self { self.snapshot = Some(value); self } - pub fn with_tags(&mut self, value: bool) -> &mut Self { + pub fn tags(&mut self, value: bool) -> &mut Self { self.tags = Some(value); self } } + impl Default for SlackIntegrationChannelDisplay { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_bulk_delete_response.rs b/src/datadogV1/model/model_slo_bulk_delete_response.rs index 0e8d11b3f..4905b531f 100644 --- a/src/datadogV1/model/model_slo_bulk_delete_response.rs +++ b/src/datadogV1/model/model_slo_bulk_delete_response.rs @@ -29,22 +29,17 @@ impl SLOBulkDeleteResponse { } } - pub fn with_data( - &mut self, - value: crate::datadogV1::model::SLOBulkDeleteResponseData, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV1::model::SLOBulkDeleteResponseData) -> &mut Self { self.data = Some(value); self } - pub fn with_errors( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn errors(&mut self, value: Vec) -> &mut Self { self.errors = Some(value); self } } + impl Default for SLOBulkDeleteResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_bulk_delete_response_data.rs b/src/datadogV1/model/model_slo_bulk_delete_response_data.rs index 4ef27a7f6..7fd6c20f6 100644 --- a/src/datadogV1/model/model_slo_bulk_delete_response_data.rs +++ b/src/datadogV1/model/model_slo_bulk_delete_response_data.rs @@ -27,16 +27,17 @@ impl SLOBulkDeleteResponseData { } } - pub fn with_deleted(&mut self, value: Vec) -> &mut Self { + pub fn deleted(&mut self, value: Vec) -> &mut Self { self.deleted = Some(value); self } - pub fn with_updated(&mut self, value: Vec) -> &mut Self { + pub fn updated(&mut self, value: Vec) -> &mut Self { self.updated = Some(value); self } } + impl Default for SLOBulkDeleteResponseData { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_correction.rs b/src/datadogV1/model/model_slo_correction.rs index e14ff3e7d..d31e34b7e 100644 --- a/src/datadogV1/model/model_slo_correction.rs +++ b/src/datadogV1/model/model_slo_correction.rs @@ -28,7 +28,7 @@ impl SLOCorrection { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV1::model::SLOCorrectionResponseAttributes, ) -> &mut Self { @@ -36,16 +36,17 @@ impl SLOCorrection { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV1::model::SLOCorrectionType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV1::model::SLOCorrectionType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for SLOCorrection { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_correction_create_data.rs b/src/datadogV1/model/model_slo_correction_create_data.rs index c45a197b9..7f8e8cd63 100644 --- a/src/datadogV1/model/model_slo_correction_create_data.rs +++ b/src/datadogV1/model/model_slo_correction_create_data.rs @@ -24,7 +24,7 @@ impl SLOCorrectionCreateData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV1::model::SLOCorrectionCreateRequestAttributes, ) -> &mut Self { diff --git a/src/datadogV1/model/model_slo_correction_create_request.rs b/src/datadogV1/model/model_slo_correction_create_request.rs index 1019b9787..1c90dfe33 100644 --- a/src/datadogV1/model/model_slo_correction_create_request.rs +++ b/src/datadogV1/model/model_slo_correction_create_request.rs @@ -18,14 +18,12 @@ impl SLOCorrectionCreateRequest { SLOCorrectionCreateRequest { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV1::model::SLOCorrectionCreateData, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV1::model::SLOCorrectionCreateData) -> &mut Self { self.data = Some(value); self } } + impl Default for SLOCorrectionCreateRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_correction_create_request_attributes.rs b/src/datadogV1/model/model_slo_correction_create_request_attributes.rs index 27e05af17..0b8dd4061 100644 --- a/src/datadogV1/model/model_slo_correction_create_request_attributes.rs +++ b/src/datadogV1/model/model_slo_correction_create_request_attributes.rs @@ -53,27 +53,27 @@ impl SLOCorrectionCreateRequestAttributes { } } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_duration(&mut self, value: i64) -> &mut Self { + pub fn duration(&mut self, value: i64) -> &mut Self { self.duration = Some(value); self } - pub fn with_end(&mut self, value: i64) -> &mut Self { + pub fn end(&mut self, value: i64) -> &mut Self { self.end = Some(value); self } - pub fn with_rrule(&mut self, value: String) -> &mut Self { + pub fn rrule(&mut self, value: String) -> &mut Self { self.rrule = Some(value); self } - pub fn with_timezone(&mut self, value: String) -> &mut Self { + pub fn timezone(&mut self, value: String) -> &mut Self { self.timezone = Some(value); self } diff --git a/src/datadogV1/model/model_slo_correction_list_response.rs b/src/datadogV1/model/model_slo_correction_list_response.rs index 8db1bfb02..97a349b47 100644 --- a/src/datadogV1/model/model_slo_correction_list_response.rs +++ b/src/datadogV1/model/model_slo_correction_list_response.rs @@ -24,19 +24,17 @@ impl SLOCorrectionListResponse { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_meta( - &mut self, - value: crate::datadogV1::model::ResponseMetaAttributes, - ) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV1::model::ResponseMetaAttributes) -> &mut Self { self.meta = Some(value); self } } + impl Default for SLOCorrectionListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_correction_response.rs b/src/datadogV1/model/model_slo_correction_response.rs index c71e34615..4571a6abd 100644 --- a/src/datadogV1/model/model_slo_correction_response.rs +++ b/src/datadogV1/model/model_slo_correction_response.rs @@ -18,11 +18,12 @@ impl SLOCorrectionResponse { SLOCorrectionResponse { data: None } } - pub fn with_data(&mut self, value: crate::datadogV1::model::SLOCorrection) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV1::model::SLOCorrection) -> &mut Self { self.data = Some(value); self } } + impl Default for SLOCorrectionResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_correction_response_attributes.rs b/src/datadogV1/model/model_slo_correction_response_attributes.rs index 44bcec170..9a6f5e58f 100644 --- a/src/datadogV1/model/model_slo_correction_response_attributes.rs +++ b/src/datadogV1/model/model_slo_correction_response_attributes.rs @@ -81,45 +81,42 @@ impl SLOCorrectionResponseAttributes { } } - pub fn with_category( - &mut self, - value: crate::datadogV1::model::SLOCorrectionCategory, - ) -> &mut Self { + pub fn category(&mut self, value: crate::datadogV1::model::SLOCorrectionCategory) -> &mut Self { self.category = Some(value); self } - pub fn with_created_at(&mut self, value: Option) -> &mut Self { + pub fn created_at(&mut self, value: Option) -> &mut Self { self.created_at = Some(value); self } - pub fn with_creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + pub fn creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { self.creator = Some(value); self } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_duration(&mut self, value: Option) -> &mut Self { + pub fn duration(&mut self, value: Option) -> &mut Self { self.duration = Some(value); self } - pub fn with_end(&mut self, value: Option) -> &mut Self { + pub fn end(&mut self, value: Option) -> &mut Self { self.end = Some(value); self } - pub fn with_modified_at(&mut self, value: Option) -> &mut Self { + pub fn modified_at(&mut self, value: Option) -> &mut Self { self.modified_at = Some(value); self } - pub fn with_modifier( + pub fn modifier( &mut self, value: Option, ) -> &mut Self { @@ -127,26 +124,27 @@ impl SLOCorrectionResponseAttributes { self } - pub fn with_rrule(&mut self, value: Option) -> &mut Self { + pub fn rrule(&mut self, value: Option) -> &mut Self { self.rrule = Some(value); self } - pub fn with_slo_id(&mut self, value: String) -> &mut Self { + pub fn slo_id(&mut self, value: String) -> &mut Self { self.slo_id = Some(value); self } - pub fn with_start(&mut self, value: i64) -> &mut Self { + pub fn start(&mut self, value: i64) -> &mut Self { self.start = Some(value); self } - pub fn with_timezone(&mut self, value: String) -> &mut Self { + pub fn timezone(&mut self, value: String) -> &mut Self { self.timezone = Some(value); self } } + impl Default for SLOCorrectionResponseAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_correction_response_attributes_modifier.rs b/src/datadogV1/model/model_slo_correction_response_attributes_modifier.rs index 433802565..edc508b00 100644 --- a/src/datadogV1/model/model_slo_correction_response_attributes_modifier.rs +++ b/src/datadogV1/model/model_slo_correction_response_attributes_modifier.rs @@ -28,21 +28,22 @@ impl SLOCorrectionResponseAttributesModifier { } } - pub fn with_email(&mut self, value: String) -> &mut Self { + pub fn email(&mut self, value: String) -> &mut Self { self.email = Some(value); self } - pub fn with_handle(&mut self, value: String) -> &mut Self { + pub fn handle(&mut self, value: String) -> &mut Self { self.handle = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } } + impl Default for SLOCorrectionResponseAttributesModifier { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_correction_update_data.rs b/src/datadogV1/model/model_slo_correction_update_data.rs index a89c2d44e..e47e4e5f6 100644 --- a/src/datadogV1/model/model_slo_correction_update_data.rs +++ b/src/datadogV1/model/model_slo_correction_update_data.rs @@ -24,7 +24,7 @@ impl SLOCorrectionUpdateData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV1::model::SLOCorrectionUpdateRequestAttributes, ) -> &mut Self { @@ -32,11 +32,12 @@ impl SLOCorrectionUpdateData { self } - pub fn with_type_(&mut self, value: crate::datadogV1::model::SLOCorrectionType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV1::model::SLOCorrectionType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for SLOCorrectionUpdateData { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_correction_update_request.rs b/src/datadogV1/model/model_slo_correction_update_request.rs index df3feca82..019fde484 100644 --- a/src/datadogV1/model/model_slo_correction_update_request.rs +++ b/src/datadogV1/model/model_slo_correction_update_request.rs @@ -18,14 +18,12 @@ impl SLOCorrectionUpdateRequest { SLOCorrectionUpdateRequest { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV1::model::SLOCorrectionUpdateData, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV1::model::SLOCorrectionUpdateData) -> &mut Self { self.data = Some(value); self } } + impl Default for SLOCorrectionUpdateRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_correction_update_request_attributes.rs b/src/datadogV1/model/model_slo_correction_update_request_attributes.rs index 74ac0adc0..8a970d09c 100644 --- a/src/datadogV1/model/model_slo_correction_update_request_attributes.rs +++ b/src/datadogV1/model/model_slo_correction_update_request_attributes.rs @@ -45,44 +45,42 @@ impl SLOCorrectionUpdateRequestAttributes { } } - pub fn with_category( - &mut self, - value: crate::datadogV1::model::SLOCorrectionCategory, - ) -> &mut Self { + pub fn category(&mut self, value: crate::datadogV1::model::SLOCorrectionCategory) -> &mut Self { self.category = Some(value); self } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_duration(&mut self, value: i64) -> &mut Self { + pub fn duration(&mut self, value: i64) -> &mut Self { self.duration = Some(value); self } - pub fn with_end(&mut self, value: i64) -> &mut Self { + pub fn end(&mut self, value: i64) -> &mut Self { self.end = Some(value); self } - pub fn with_rrule(&mut self, value: String) -> &mut Self { + pub fn rrule(&mut self, value: String) -> &mut Self { self.rrule = Some(value); self } - pub fn with_start(&mut self, value: i64) -> &mut Self { + pub fn start(&mut self, value: i64) -> &mut Self { self.start = Some(value); self } - pub fn with_timezone(&mut self, value: String) -> &mut Self { + pub fn timezone(&mut self, value: String) -> &mut Self { self.timezone = Some(value); self } } + impl Default for SLOCorrectionUpdateRequestAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_creator.rs b/src/datadogV1/model/model_slo_creator.rs index 7a298a0f6..fe5d63f6e 100644 --- a/src/datadogV1/model/model_slo_creator.rs +++ b/src/datadogV1/model/model_slo_creator.rs @@ -28,21 +28,22 @@ impl SLOCreator { } } - pub fn with_email(&mut self, value: String) -> &mut Self { + pub fn email(&mut self, value: String) -> &mut Self { self.email = Some(value); self } - pub fn with_id(&mut self, value: i64) -> &mut Self { + pub fn id(&mut self, value: i64) -> &mut Self { self.id = Some(value); self } - pub fn with_name(&mut self, value: Option) -> &mut Self { + pub fn name(&mut self, value: Option) -> &mut Self { self.name = Some(value); self } } + impl Default for SLOCreator { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_delete_response.rs b/src/datadogV1/model/model_slo_delete_response.rs index 1c48edc49..c70746228 100644 --- a/src/datadogV1/model/model_slo_delete_response.rs +++ b/src/datadogV1/model/model_slo_delete_response.rs @@ -24,16 +24,17 @@ impl SLODeleteResponse { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_errors(&mut self, value: std::collections::BTreeMap) -> &mut Self { + pub fn errors(&mut self, value: std::collections::BTreeMap) -> &mut Self { self.errors = Some(value); self } } + impl Default for SLODeleteResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_history_metrics.rs b/src/datadogV1/model/model_slo_history_metrics.rs index ea28e2df7..d6fab6d97 100644 --- a/src/datadogV1/model/model_slo_history_metrics.rs +++ b/src/datadogV1/model/model_slo_history_metrics.rs @@ -60,7 +60,7 @@ impl SLOHistoryMetrics { } } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } diff --git a/src/datadogV1/model/model_slo_history_metrics_series.rs b/src/datadogV1/model/model_slo_history_metrics_series.rs index d1d8b6948..d644f222e 100644 --- a/src/datadogV1/model/model_slo_history_metrics_series.rs +++ b/src/datadogV1/model/model_slo_history_metrics_series.rs @@ -33,7 +33,7 @@ impl SLOHistoryMetricsSeries { } } - pub fn with_metadata( + pub fn metadata( &mut self, value: crate::datadogV1::model::SLOHistoryMetricsSeriesMetadata, ) -> &mut Self { diff --git a/src/datadogV1/model/model_slo_history_metrics_series_metadata.rs b/src/datadogV1/model/model_slo_history_metrics_series_metadata.rs index e1edea0d8..3fcd14b01 100644 --- a/src/datadogV1/model/model_slo_history_metrics_series_metadata.rs +++ b/src/datadogV1/model/model_slo_history_metrics_series_metadata.rs @@ -43,32 +43,32 @@ impl SLOHistoryMetricsSeriesMetadata { } } - pub fn with_aggr(&mut self, value: String) -> &mut Self { + pub fn aggr(&mut self, value: String) -> &mut Self { self.aggr = Some(value); self } - pub fn with_expression(&mut self, value: String) -> &mut Self { + pub fn expression(&mut self, value: String) -> &mut Self { self.expression = Some(value); self } - pub fn with_metric(&mut self, value: String) -> &mut Self { + pub fn metric(&mut self, value: String) -> &mut Self { self.metric = Some(value); self } - pub fn with_query_index(&mut self, value: i64) -> &mut Self { + pub fn query_index(&mut self, value: i64) -> &mut Self { self.query_index = Some(value); self } - pub fn with_scope(&mut self, value: String) -> &mut Self { + pub fn scope(&mut self, value: String) -> &mut Self { self.scope = Some(value); self } - pub fn with_unit( + pub fn unit( &mut self, value: Option>>, ) -> &mut Self { @@ -76,6 +76,7 @@ impl SLOHistoryMetricsSeriesMetadata { self } } + impl Default for SLOHistoryMetricsSeriesMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_history_metrics_series_metadata_unit.rs b/src/datadogV1/model/model_slo_history_metrics_series_metadata_unit.rs index 667d5e8ad..c2e031109 100644 --- a/src/datadogV1/model/model_slo_history_metrics_series_metadata_unit.rs +++ b/src/datadogV1/model/model_slo_history_metrics_series_metadata_unit.rs @@ -44,36 +44,37 @@ impl SLOHistoryMetricsSeriesMetadataUnit { } } - pub fn with_family(&mut self, value: String) -> &mut Self { + pub fn family(&mut self, value: String) -> &mut Self { self.family = Some(value); self } - pub fn with_id(&mut self, value: i64) -> &mut Self { + pub fn id(&mut self, value: i64) -> &mut Self { self.id = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_plural(&mut self, value: Option) -> &mut Self { + pub fn plural(&mut self, value: Option) -> &mut Self { self.plural = Some(value); self } - pub fn with_scale_factor(&mut self, value: f64) -> &mut Self { + pub fn scale_factor(&mut self, value: f64) -> &mut Self { self.scale_factor = Some(value); self } - pub fn with_short_name(&mut self, value: Option) -> &mut Self { + pub fn short_name(&mut self, value: Option) -> &mut Self { self.short_name = Some(value); self } } + impl Default for SLOHistoryMetricsSeriesMetadataUnit { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_history_monitor.rs b/src/datadogV1/model/model_slo_history_monitor.rs index f8c197100..319758a0c 100644 --- a/src/datadogV1/model/model_slo_history_monitor.rs +++ b/src/datadogV1/model/model_slo_history_monitor.rs @@ -74,7 +74,7 @@ impl SLOHistoryMonitor { } #[allow(deprecated)] - pub fn with_error_budget_remaining( + pub fn error_budget_remaining( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -83,7 +83,7 @@ impl SLOHistoryMonitor { } #[allow(deprecated)] - pub fn with_errors( + pub fn errors( &mut self, value: Vec, ) -> &mut Self { @@ -92,65 +92,66 @@ impl SLOHistoryMonitor { } #[allow(deprecated)] - pub fn with_group(&mut self, value: String) -> &mut Self { + pub fn group(&mut self, value: String) -> &mut Self { self.group = Some(value); self } #[allow(deprecated)] - pub fn with_history(&mut self, value: Vec>) -> &mut Self { + pub fn history(&mut self, value: Vec>) -> &mut Self { self.history = Some(value); self } #[allow(deprecated)] - pub fn with_monitor_modified(&mut self, value: i64) -> &mut Self { + pub fn monitor_modified(&mut self, value: i64) -> &mut Self { self.monitor_modified = Some(value); self } #[allow(deprecated)] - pub fn with_monitor_type(&mut self, value: String) -> &mut Self { + pub fn monitor_type(&mut self, value: String) -> &mut Self { self.monitor_type = Some(value); self } #[allow(deprecated)] - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } #[allow(deprecated)] - pub fn with_precision(&mut self, value: f64) -> &mut Self { + pub fn precision(&mut self, value: f64) -> &mut Self { self.precision = Some(value); self } #[allow(deprecated)] - pub fn with_preview(&mut self, value: bool) -> &mut Self { + pub fn preview(&mut self, value: bool) -> &mut Self { self.preview = Some(value); self } #[allow(deprecated)] - pub fn with_sli_value(&mut self, value: Option) -> &mut Self { + pub fn sli_value(&mut self, value: Option) -> &mut Self { self.sli_value = Some(value); self } #[allow(deprecated)] - pub fn with_span_precision(&mut self, value: f64) -> &mut Self { + pub fn span_precision(&mut self, value: f64) -> &mut Self { self.span_precision = Some(value); self } #[allow(deprecated)] - pub fn with_uptime(&mut self, value: f64) -> &mut Self { + pub fn uptime(&mut self, value: f64) -> &mut Self { self.uptime = Some(value); self } } + impl Default for SLOHistoryMonitor { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_history_response.rs b/src/datadogV1/model/model_slo_history_response.rs index 3f5321a6a..34164671a 100644 --- a/src/datadogV1/model/model_slo_history_response.rs +++ b/src/datadogV1/model/model_slo_history_response.rs @@ -24,15 +24,12 @@ impl SLOHistoryResponse { } } - pub fn with_data( - &mut self, - value: crate::datadogV1::model::SLOHistoryResponseData, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV1::model::SLOHistoryResponseData) -> &mut Self { self.data = Some(value); self } - pub fn with_errors( + pub fn errors( &mut self, value: Option>, ) -> &mut Self { @@ -40,6 +37,7 @@ impl SLOHistoryResponse { self } } + impl Default for SLOHistoryResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_history_response_data.rs b/src/datadogV1/model/model_slo_history_response_data.rs index 8f8d57f57..cfd8cf675 100644 --- a/src/datadogV1/model/model_slo_history_response_data.rs +++ b/src/datadogV1/model/model_slo_history_response_data.rs @@ -68,25 +68,22 @@ impl SLOHistoryResponseData { } } - pub fn with_from_ts(&mut self, value: i64) -> &mut Self { + pub fn from_ts(&mut self, value: i64) -> &mut Self { self.from_ts = Some(value); self } - pub fn with_group_by(&mut self, value: Vec) -> &mut Self { + pub fn group_by(&mut self, value: Vec) -> &mut Self { self.group_by = Some(value); self } - pub fn with_groups( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn groups(&mut self, value: Vec) -> &mut Self { self.groups = Some(value); self } - pub fn with_monitors( + pub fn monitors( &mut self, value: Vec, ) -> &mut Self { @@ -94,17 +91,17 @@ impl SLOHistoryResponseData { self } - pub fn with_overall(&mut self, value: crate::datadogV1::model::SLOHistorySLIData) -> &mut Self { + pub fn overall(&mut self, value: crate::datadogV1::model::SLOHistorySLIData) -> &mut Self { self.overall = Some(value); self } - pub fn with_series(&mut self, value: crate::datadogV1::model::SLOHistoryMetrics) -> &mut Self { + pub fn series(&mut self, value: crate::datadogV1::model::SLOHistoryMetrics) -> &mut Self { self.series = Some(value); self } - pub fn with_thresholds( + pub fn thresholds( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -112,21 +109,22 @@ impl SLOHistoryResponseData { self } - pub fn with_to_ts(&mut self, value: i64) -> &mut Self { + pub fn to_ts(&mut self, value: i64) -> &mut Self { self.to_ts = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV1::model::SLOType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV1::model::SLOType) -> &mut Self { self.type_ = Some(value); self } - pub fn with_type_id(&mut self, value: crate::datadogV1::model::SLOTypeNumeric) -> &mut Self { + pub fn type_id(&mut self, value: crate::datadogV1::model::SLOTypeNumeric) -> &mut Self { self.type_id = Some(value); self } } + impl Default for SLOHistoryResponseData { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_history_response_error.rs b/src/datadogV1/model/model_slo_history_response_error.rs index cf81a0f14..ab67236b3 100644 --- a/src/datadogV1/model/model_slo_history_response_error.rs +++ b/src/datadogV1/model/model_slo_history_response_error.rs @@ -18,11 +18,12 @@ impl SLOHistoryResponseError { SLOHistoryResponseError { error: None } } - pub fn with_error(&mut self, value: String) -> &mut Self { + pub fn error(&mut self, value: String) -> &mut Self { self.error = Some(value); self } } + impl Default for SLOHistoryResponseError { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_history_sli_data.rs b/src/datadogV1/model/model_slo_history_sli_data.rs index 65f99711c..c408b3adb 100644 --- a/src/datadogV1/model/model_slo_history_sli_data.rs +++ b/src/datadogV1/model/model_slo_history_sli_data.rs @@ -73,7 +73,7 @@ impl SLOHistorySLIData { } #[allow(deprecated)] - pub fn with_error_budget_remaining( + pub fn error_budget_remaining( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -82,7 +82,7 @@ impl SLOHistorySLIData { } #[allow(deprecated)] - pub fn with_errors( + pub fn errors( &mut self, value: Vec, ) -> &mut Self { @@ -91,65 +91,66 @@ impl SLOHistorySLIData { } #[allow(deprecated)] - pub fn with_group(&mut self, value: String) -> &mut Self { + pub fn group(&mut self, value: String) -> &mut Self { self.group = Some(value); self } #[allow(deprecated)] - pub fn with_history(&mut self, value: Vec>) -> &mut Self { + pub fn history(&mut self, value: Vec>) -> &mut Self { self.history = Some(value); self } #[allow(deprecated)] - pub fn with_monitor_modified(&mut self, value: i64) -> &mut Self { + pub fn monitor_modified(&mut self, value: i64) -> &mut Self { self.monitor_modified = Some(value); self } #[allow(deprecated)] - pub fn with_monitor_type(&mut self, value: String) -> &mut Self { + pub fn monitor_type(&mut self, value: String) -> &mut Self { self.monitor_type = Some(value); self } #[allow(deprecated)] - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } #[allow(deprecated)] - pub fn with_precision(&mut self, value: std::collections::BTreeMap) -> &mut Self { + pub fn precision(&mut self, value: std::collections::BTreeMap) -> &mut Self { self.precision = Some(value); self } #[allow(deprecated)] - pub fn with_preview(&mut self, value: bool) -> &mut Self { + pub fn preview(&mut self, value: bool) -> &mut Self { self.preview = Some(value); self } #[allow(deprecated)] - pub fn with_sli_value(&mut self, value: Option) -> &mut Self { + pub fn sli_value(&mut self, value: Option) -> &mut Self { self.sli_value = Some(value); self } #[allow(deprecated)] - pub fn with_span_precision(&mut self, value: f64) -> &mut Self { + pub fn span_precision(&mut self, value: f64) -> &mut Self { self.span_precision = Some(value); self } #[allow(deprecated)] - pub fn with_uptime(&mut self, value: Option) -> &mut Self { + pub fn uptime(&mut self, value: Option) -> &mut Self { self.uptime = Some(value); self } } + impl Default for SLOHistorySLIData { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_list_response.rs b/src/datadogV1/model/model_slo_list_response.rs index f3e709651..25b81fa3a 100644 --- a/src/datadogV1/model/model_slo_list_response.rs +++ b/src/datadogV1/model/model_slo_list_response.rs @@ -29,7 +29,7 @@ impl SLOListResponse { } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -37,12 +37,12 @@ impl SLOListResponse { self } - pub fn with_errors(&mut self, value: Vec) -> &mut Self { + pub fn errors(&mut self, value: Vec) -> &mut Self { self.errors = Some(value); self } - pub fn with_metadata( + pub fn metadata( &mut self, value: crate::datadogV1::model::SLOListResponseMetadata, ) -> &mut Self { @@ -50,6 +50,7 @@ impl SLOListResponse { self } } + impl Default for SLOListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_list_response_metadata.rs b/src/datadogV1/model/model_slo_list_response_metadata.rs index 312051b5c..72462533e 100644 --- a/src/datadogV1/model/model_slo_list_response_metadata.rs +++ b/src/datadogV1/model/model_slo_list_response_metadata.rs @@ -18,7 +18,7 @@ impl SLOListResponseMetadata { SLOListResponseMetadata { page: None } } - pub fn with_page( + pub fn page( &mut self, value: crate::datadogV1::model::SLOListResponseMetadataPage, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SLOListResponseMetadata { self } } + impl Default for SLOListResponseMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_list_response_metadata_page.rs b/src/datadogV1/model/model_slo_list_response_metadata_page.rs index ad5b5fff6..9c7ed9d38 100644 --- a/src/datadogV1/model/model_slo_list_response_metadata_page.rs +++ b/src/datadogV1/model/model_slo_list_response_metadata_page.rs @@ -24,16 +24,17 @@ impl SLOListResponseMetadataPage { } } - pub fn with_total_count(&mut self, value: i64) -> &mut Self { + pub fn total_count(&mut self, value: i64) -> &mut Self { self.total_count = Some(value); self } - pub fn with_total_filtered_count(&mut self, value: i64) -> &mut Self { + pub fn total_filtered_count(&mut self, value: i64) -> &mut Self { self.total_filtered_count = Some(value); self } } + impl Default for SLOListResponseMetadataPage { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_list_widget_definition.rs b/src/datadogV1/model/model_slo_list_widget_definition.rs index efe94721d..b13eeded0 100644 --- a/src/datadogV1/model/model_slo_list_widget_definition.rs +++ b/src/datadogV1/model/model_slo_list_widget_definition.rs @@ -39,20 +39,17 @@ impl SLOListWidgetDefinition { } } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_slo_list_widget_query.rs b/src/datadogV1/model/model_slo_list_widget_query.rs index f6e52f56c..adc5f858b 100644 --- a/src/datadogV1/model/model_slo_list_widget_query.rs +++ b/src/datadogV1/model/model_slo_list_widget_query.rs @@ -28,12 +28,12 @@ impl SLOListWidgetQuery { } } - pub fn with_limit(&mut self, value: i64) -> &mut Self { + pub fn limit(&mut self, value: i64) -> &mut Self { self.limit = Some(value); self } - pub fn with_sort(&mut self, value: Vec) -> &mut Self { + pub fn sort(&mut self, value: Vec) -> &mut Self { self.sort = Some(value); self } diff --git a/src/datadogV1/model/model_slo_overall_statuses.rs b/src/datadogV1/model/model_slo_overall_statuses.rs index 31fe7ed59..0dead8824 100644 --- a/src/datadogV1/model/model_slo_overall_statuses.rs +++ b/src/datadogV1/model/model_slo_overall_statuses.rs @@ -66,22 +66,22 @@ impl SLOOverallStatuses { } } - pub fn with_error(&mut self, value: Option) -> &mut Self { + pub fn error(&mut self, value: Option) -> &mut Self { self.error = Some(value); self } - pub fn with_error_budget_remaining(&mut self, value: Option) -> &mut Self { + pub fn error_budget_remaining(&mut self, value: Option) -> &mut Self { self.error_budget_remaining = Some(value); self } - pub fn with_indexed_at(&mut self, value: i64) -> &mut Self { + pub fn indexed_at(&mut self, value: i64) -> &mut Self { self.indexed_at = Some(value); self } - pub fn with_raw_error_budget_remaining( + pub fn raw_error_budget_remaining( &mut self, value: Option, ) -> &mut Self { @@ -89,31 +89,32 @@ impl SLOOverallStatuses { self } - pub fn with_span_precision(&mut self, value: Option) -> &mut Self { + pub fn span_precision(&mut self, value: Option) -> &mut Self { self.span_precision = Some(value); self } - pub fn with_state(&mut self, value: crate::datadogV1::model::SLOState) -> &mut Self { + pub fn state(&mut self, value: crate::datadogV1::model::SLOState) -> &mut Self { self.state = Some(value); self } - pub fn with_status(&mut self, value: Option) -> &mut Self { + pub fn status(&mut self, value: Option) -> &mut Self { self.status = Some(value); self } - pub fn with_target(&mut self, value: f64) -> &mut Self { + pub fn target(&mut self, value: f64) -> &mut Self { self.target = Some(value); self } - pub fn with_timeframe(&mut self, value: crate::datadogV1::model::SLOTimeframe) -> &mut Self { + pub fn timeframe(&mut self, value: crate::datadogV1::model::SLOTimeframe) -> &mut Self { self.timeframe = Some(value); self } } + impl Default for SLOOverallStatuses { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_raw_error_budget_remaining.rs b/src/datadogV1/model/model_slo_raw_error_budget_remaining.rs index 7f0854397..6b3282d16 100644 --- a/src/datadogV1/model/model_slo_raw_error_budget_remaining.rs +++ b/src/datadogV1/model/model_slo_raw_error_budget_remaining.rs @@ -24,16 +24,17 @@ impl SLORawErrorBudgetRemaining { } } - pub fn with_unit(&mut self, value: String) -> &mut Self { + pub fn unit(&mut self, value: String) -> &mut Self { self.unit = Some(value); self } - pub fn with_value(&mut self, value: f64) -> &mut Self { + pub fn value(&mut self, value: f64) -> &mut Self { self.value = Some(value); self } } + impl Default for SLORawErrorBudgetRemaining { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_response.rs b/src/datadogV1/model/model_slo_response.rs index 8db94db0e..cb828856a 100644 --- a/src/datadogV1/model/model_slo_response.rs +++ b/src/datadogV1/model/model_slo_response.rs @@ -26,16 +26,17 @@ impl SLOResponse { } } - pub fn with_data(&mut self, value: crate::datadogV1::model::SLOResponseData) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV1::model::SLOResponseData) -> &mut Self { self.data = Some(value); self } - pub fn with_errors(&mut self, value: Vec) -> &mut Self { + pub fn errors(&mut self, value: Vec) -> &mut Self { self.errors = Some(value); self } } + impl Default for SLOResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_response_data.rs b/src/datadogV1/model/model_slo_response_data.rs index 124ef4d57..5b3bd168a 100644 --- a/src/datadogV1/model/model_slo_response_data.rs +++ b/src/datadogV1/model/model_slo_response_data.rs @@ -117,57 +117,57 @@ impl SLOResponseData { } } - pub fn with_configured_alert_ids(&mut self, value: Vec) -> &mut Self { + pub fn configured_alert_ids(&mut self, value: Vec) -> &mut Self { self.configured_alert_ids = Some(value); self } - pub fn with_created_at(&mut self, value: i64) -> &mut Self { + pub fn created_at(&mut self, value: i64) -> &mut Self { self.created_at = Some(value); self } - pub fn with_creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + pub fn creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { self.creator = Some(value); self } - pub fn with_description(&mut self, value: Option) -> &mut Self { + pub fn description(&mut self, value: Option) -> &mut Self { self.description = Some(value); self } - pub fn with_groups(&mut self, value: Vec) -> &mut Self { + pub fn groups(&mut self, value: Vec) -> &mut Self { self.groups = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_modified_at(&mut self, value: i64) -> &mut Self { + pub fn modified_at(&mut self, value: i64) -> &mut Self { self.modified_at = Some(value); self } - pub fn with_monitor_ids(&mut self, value: Vec) -> &mut Self { + pub fn monitor_ids(&mut self, value: Vec) -> &mut Self { self.monitor_ids = Some(value); self } - pub fn with_monitor_tags(&mut self, value: Vec) -> &mut Self { + pub fn monitor_tags(&mut self, value: Vec) -> &mut Self { self.monitor_tags = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_query( + pub fn query( &mut self, value: crate::datadogV1::model::ServiceLevelObjectiveQuery, ) -> &mut Self { @@ -175,39 +175,37 @@ impl SLOResponseData { self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_target_threshold(&mut self, value: f64) -> &mut Self { + pub fn target_threshold(&mut self, value: f64) -> &mut Self { self.target_threshold = Some(value); self } - pub fn with_thresholds( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn thresholds(&mut self, value: Vec) -> &mut Self { self.thresholds = Some(value); self } - pub fn with_timeframe(&mut self, value: crate::datadogV1::model::SLOTimeframe) -> &mut Self { + pub fn timeframe(&mut self, value: crate::datadogV1::model::SLOTimeframe) -> &mut Self { self.timeframe = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV1::model::SLOType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV1::model::SLOType) -> &mut Self { self.type_ = Some(value); self } - pub fn with_warning_threshold(&mut self, value: f64) -> &mut Self { + pub fn warning_threshold(&mut self, value: f64) -> &mut Self { self.warning_threshold = Some(value); self } } + impl Default for SLOResponseData { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_status.rs b/src/datadogV1/model/model_slo_status.rs index 1450cca5e..0180ef155 100644 --- a/src/datadogV1/model/model_slo_status.rs +++ b/src/datadogV1/model/model_slo_status.rs @@ -62,22 +62,22 @@ impl SLOStatus { } } - pub fn with_calculation_error(&mut self, value: Option) -> &mut Self { + pub fn calculation_error(&mut self, value: Option) -> &mut Self { self.calculation_error = Some(value); self } - pub fn with_error_budget_remaining(&mut self, value: Option) -> &mut Self { + pub fn error_budget_remaining(&mut self, value: Option) -> &mut Self { self.error_budget_remaining = Some(value); self } - pub fn with_indexed_at(&mut self, value: i64) -> &mut Self { + pub fn indexed_at(&mut self, value: i64) -> &mut Self { self.indexed_at = Some(value); self } - pub fn with_raw_error_budget_remaining( + pub fn raw_error_budget_remaining( &mut self, value: Option, ) -> &mut Self { @@ -85,21 +85,22 @@ impl SLOStatus { self } - pub fn with_sli(&mut self, value: Option) -> &mut Self { + pub fn sli(&mut self, value: Option) -> &mut Self { self.sli = Some(value); self } - pub fn with_span_precision(&mut self, value: Option) -> &mut Self { + pub fn span_precision(&mut self, value: Option) -> &mut Self { self.span_precision = Some(value); self } - pub fn with_state(&mut self, value: crate::datadogV1::model::SLOState) -> &mut Self { + pub fn state(&mut self, value: crate::datadogV1::model::SLOState) -> &mut Self { self.state = Some(value); self } } + impl Default for SLOStatus { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_slo_threshold.rs b/src/datadogV1/model/model_slo_threshold.rs index 29aec48fb..72f00067b 100644 --- a/src/datadogV1/model/model_slo_threshold.rs +++ b/src/datadogV1/model/model_slo_threshold.rs @@ -45,17 +45,17 @@ impl SLOThreshold { } } - pub fn with_target_display(&mut self, value: String) -> &mut Self { + pub fn target_display(&mut self, value: String) -> &mut Self { self.target_display = Some(value); self } - pub fn with_warning(&mut self, value: f64) -> &mut Self { + pub fn warning(&mut self, value: f64) -> &mut Self { self.warning = Some(value); self } - pub fn with_warning_display(&mut self, value: String) -> &mut Self { + pub fn warning_display(&mut self, value: String) -> &mut Self { self.warning_display = Some(value); self } diff --git a/src/datadogV1/model/model_slo_widget_definition.rs b/src/datadogV1/model/model_slo_widget_definition.rs index 73a961194..2676b5014 100644 --- a/src/datadogV1/model/model_slo_widget_definition.rs +++ b/src/datadogV1/model/model_slo_widget_definition.rs @@ -63,27 +63,27 @@ impl SLOWidgetDefinition { } } - pub fn with_additional_query_filters(&mut self, value: String) -> &mut Self { + pub fn additional_query_filters(&mut self, value: String) -> &mut Self { self.additional_query_filters = Some(value); self } - pub fn with_global_time_target(&mut self, value: String) -> &mut Self { + pub fn global_time_target(&mut self, value: String) -> &mut Self { self.global_time_target = Some(value); self } - pub fn with_show_error_budget(&mut self, value: bool) -> &mut Self { + pub fn show_error_budget(&mut self, value: bool) -> &mut Self { self.show_error_budget = Some(value); self } - pub fn with_slo_id(&mut self, value: String) -> &mut Self { + pub fn slo_id(&mut self, value: String) -> &mut Self { self.slo_id = Some(value); self } - pub fn with_time_windows( + pub fn time_windows( &mut self, value: Vec, ) -> &mut Self { @@ -91,25 +91,22 @@ impl SLOWidgetDefinition { self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } - pub fn with_view_mode(&mut self, value: crate::datadogV1::model::WidgetViewMode) -> &mut Self { + pub fn view_mode(&mut self, value: crate::datadogV1::model::WidgetViewMode) -> &mut Self { self.view_mode = Some(value); self } diff --git a/src/datadogV1/model/model_split_config.rs b/src/datadogV1/model/model_split_config.rs index 0af41527f..e2bb0c0df 100644 --- a/src/datadogV1/model/model_split_config.rs +++ b/src/datadogV1/model/model_split_config.rs @@ -36,7 +36,7 @@ impl SplitConfig { } } - pub fn with_static_splits( + pub fn static_splits( &mut self, value: Vec>, ) -> &mut Self { diff --git a/src/datadogV1/model/model_split_graph_source_widget_definition.rs b/src/datadogV1/model/model_split_graph_source_widget_definition.rs index 1ef1eb165..a80777657 100644 --- a/src/datadogV1/model/model_split_graph_source_widget_definition.rs +++ b/src/datadogV1/model/model_split_graph_source_widget_definition.rs @@ -7,13 +7,13 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum SplitGraphSourceWidgetDefinition { - ChangeWidgetDefinition(crate::datadogV1::model::ChangeWidgetDefinition), - GeomapWidgetDefinition(crate::datadogV1::model::GeomapWidgetDefinition), - QueryValueWidgetDefinition(crate::datadogV1::model::QueryValueWidgetDefinition), - ScatterPlotWidgetDefinition(crate::datadogV1::model::ScatterPlotWidgetDefinition), - SunburstWidgetDefinition(crate::datadogV1::model::SunburstWidgetDefinition), - TableWidgetDefinition(crate::datadogV1::model::TableWidgetDefinition), - TimeseriesWidgetDefinition(crate::datadogV1::model::TimeseriesWidgetDefinition), - ToplistWidgetDefinition(crate::datadogV1::model::ToplistWidgetDefinition), - TreeMapWidgetDefinition(crate::datadogV1::model::TreeMapWidgetDefinition), + ChangeWidgetDefinition(Box), + GeomapWidgetDefinition(Box), + QueryValueWidgetDefinition(Box), + ScatterPlotWidgetDefinition(Box), + SunburstWidgetDefinition(Box), + TableWidgetDefinition(Box), + TimeseriesWidgetDefinition(Box), + ToplistWidgetDefinition(Box), + TreeMapWidgetDefinition(Box), } diff --git a/src/datadogV1/model/model_split_graph_widget_definition.rs b/src/datadogV1/model/model_split_graph_widget_definition.rs index 7baa2884a..5486b48fe 100644 --- a/src/datadogV1/model/model_split_graph_widget_definition.rs +++ b/src/datadogV1/model/model_split_graph_widget_definition.rs @@ -50,17 +50,17 @@ impl SplitGraphWidgetDefinition { } } - pub fn with_has_uniform_y_axes(&mut self, value: bool) -> &mut Self { + pub fn has_uniform_y_axes(&mut self, value: bool) -> &mut Self { self.has_uniform_y_axes = Some(value); self } - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } diff --git a/src/datadogV1/model/model_split_sort.rs b/src/datadogV1/model/model_split_sort.rs index 780fe425b..928c694d3 100644 --- a/src/datadogV1/model/model_split_sort.rs +++ b/src/datadogV1/model/model_split_sort.rs @@ -24,10 +24,7 @@ impl SplitSort { } } - pub fn with_compute( - &mut self, - value: crate::datadogV1::model::SplitConfigSortCompute, - ) -> &mut Self { + pub fn compute(&mut self, value: crate::datadogV1::model::SplitConfigSortCompute) -> &mut Self { self.compute = Some(value); self } diff --git a/src/datadogV1/model/model_successful_signal_update_response.rs b/src/datadogV1/model/model_successful_signal_update_response.rs index d7cb56083..9844c53e2 100644 --- a/src/datadogV1/model/model_successful_signal_update_response.rs +++ b/src/datadogV1/model/model_successful_signal_update_response.rs @@ -18,11 +18,12 @@ impl SuccessfulSignalUpdateResponse { SuccessfulSignalUpdateResponse { status: None } } - pub fn with_status(&mut self, value: String) -> &mut Self { + pub fn status(&mut self, value: String) -> &mut Self { self.status = Some(value); self } } + impl Default for SuccessfulSignalUpdateResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_sunburst_widget_definition.rs b/src/datadogV1/model/model_sunburst_widget_definition.rs index c8c91fcbc..914bf0974 100644 --- a/src/datadogV1/model/model_sunburst_widget_definition.rs +++ b/src/datadogV1/model/model_sunburst_widget_definition.rs @@ -55,7 +55,7 @@ impl SunburstWidgetDefinition { } } - pub fn with_custom_links( + pub fn custom_links( &mut self, value: Vec, ) -> &mut Self { @@ -63,38 +63,32 @@ impl SunburstWidgetDefinition { self } - pub fn with_hide_total(&mut self, value: bool) -> &mut Self { + pub fn hide_total(&mut self, value: bool) -> &mut Self { self.hide_total = Some(value); self } - pub fn with_legend( - &mut self, - value: crate::datadogV1::model::SunburstWidgetLegend, - ) -> &mut Self { + pub fn legend(&mut self, value: crate::datadogV1::model::SunburstWidgetLegend) -> &mut Self { self.legend = Some(value); self } - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_sunburst_widget_legend.rs b/src/datadogV1/model/model_sunburst_widget_legend.rs index 1ead84869..af4481c32 100644 --- a/src/datadogV1/model/model_sunburst_widget_legend.rs +++ b/src/datadogV1/model/model_sunburst_widget_legend.rs @@ -7,8 +7,8 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum SunburstWidgetLegend { - SunburstWidgetLegendTable(crate::datadogV1::model::SunburstWidgetLegendTable), + SunburstWidgetLegendTable(Box), SunburstWidgetLegendInlineAutomatic( - crate::datadogV1::model::SunburstWidgetLegendInlineAutomatic, + Box, ), } diff --git a/src/datadogV1/model/model_sunburst_widget_legend_inline_automatic.rs b/src/datadogV1/model/model_sunburst_widget_legend_inline_automatic.rs index 23e955fb6..45fc13f7a 100644 --- a/src/datadogV1/model/model_sunburst_widget_legend_inline_automatic.rs +++ b/src/datadogV1/model/model_sunburst_widget_legend_inline_automatic.rs @@ -30,12 +30,12 @@ impl SunburstWidgetLegendInlineAutomatic { } } - pub fn with_hide_percent(&mut self, value: bool) -> &mut Self { + pub fn hide_percent(&mut self, value: bool) -> &mut Self { self.hide_percent = Some(value); self } - pub fn with_hide_value(&mut self, value: bool) -> &mut Self { + pub fn hide_value(&mut self, value: bool) -> &mut Self { self.hide_value = Some(value); self } diff --git a/src/datadogV1/model/model_sunburst_widget_request.rs b/src/datadogV1/model/model_sunburst_widget_request.rs index 813e0b97e..c9f9dc3d3 100644 --- a/src/datadogV1/model/model_sunburst_widget_request.rs +++ b/src/datadogV1/model/model_sunburst_widget_request.rs @@ -72,47 +72,32 @@ impl SunburstWidgetRequest { } } - pub fn with_apm_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.apm_query = Some(value); self } - pub fn with_audit_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn audit_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.audit_query = Some(value); self } - pub fn with_event_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn event_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.event_query = Some(value); self } - pub fn with_formulas( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn formulas(&mut self, value: Vec) -> &mut Self { self.formulas = Some(value); self } - pub fn with_log_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.log_query = Some(value); self } - pub fn with_network_query( + pub fn network_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -120,7 +105,7 @@ impl SunburstWidgetRequest { self } - pub fn with_process_query( + pub fn process_query( &mut self, value: crate::datadogV1::model::ProcessQueryDefinition, ) -> &mut Self { @@ -128,7 +113,7 @@ impl SunburstWidgetRequest { self } - pub fn with_profile_metrics_query( + pub fn profile_metrics_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -136,12 +121,12 @@ impl SunburstWidgetRequest { self } - pub fn with_q(&mut self, value: String) -> &mut Self { + pub fn q(&mut self, value: String) -> &mut Self { self.q = Some(value); self } - pub fn with_queries( + pub fn queries( &mut self, value: Vec, ) -> &mut Self { @@ -149,7 +134,7 @@ impl SunburstWidgetRequest { self } - pub fn with_response_format( + pub fn response_format( &mut self, value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, ) -> &mut Self { @@ -157,15 +142,12 @@ impl SunburstWidgetRequest { self } - pub fn with_rum_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.rum_query = Some(value); self } - pub fn with_security_query( + pub fn security_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -173,11 +155,12 @@ impl SunburstWidgetRequest { self } - pub fn with_style(&mut self, value: crate::datadogV1::model::WidgetStyle) -> &mut Self { + pub fn style(&mut self, value: crate::datadogV1::model::WidgetStyle) -> &mut Self { self.style = Some(value); self } } + impl Default for SunburstWidgetRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_api_step.rs b/src/datadogV1/model/model_synthetics_api_step.rs index f669b1660..26181f9fa 100644 --- a/src/datadogV1/model/model_synthetics_api_step.rs +++ b/src/datadogV1/model/model_synthetics_api_step.rs @@ -54,12 +54,12 @@ impl SyntheticsAPIStep { } } - pub fn with_allow_failure(&mut self, value: bool) -> &mut Self { + pub fn allow_failure(&mut self, value: bool) -> &mut Self { self.allow_failure = Some(value); self } - pub fn with_extracted_values( + pub fn extracted_values( &mut self, value: Vec, ) -> &mut Self { @@ -67,12 +67,12 @@ impl SyntheticsAPIStep { self } - pub fn with_is_critical(&mut self, value: bool) -> &mut Self { + pub fn is_critical(&mut self, value: bool) -> &mut Self { self.is_critical = Some(value); self } - pub fn with_retry( + pub fn retry( &mut self, value: crate::datadogV1::model::SyntheticsTestOptionsRetry, ) -> &mut Self { diff --git a/src/datadogV1/model/model_synthetics_api_test.rs b/src/datadogV1/model/model_synthetics_api_test.rs index dee7ffbeb..454c8f3e1 100644 --- a/src/datadogV1/model/model_synthetics_api_test.rs +++ b/src/datadogV1/model/model_synthetics_api_test.rs @@ -69,17 +69,17 @@ impl SyntheticsAPITest { } } - pub fn with_monitor_id(&mut self, value: i64) -> &mut Self { + pub fn monitor_id(&mut self, value: i64) -> &mut Self { self.monitor_id = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_status( + pub fn status( &mut self, value: crate::datadogV1::model::SyntheticsTestPauseStatus, ) -> &mut Self { @@ -87,7 +87,7 @@ impl SyntheticsAPITest { self } - pub fn with_subtype( + pub fn subtype( &mut self, value: crate::datadogV1::model::SyntheticsTestDetailsSubType, ) -> &mut Self { @@ -95,7 +95,7 @@ impl SyntheticsAPITest { self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } diff --git a/src/datadogV1/model/model_synthetics_api_test_config.rs b/src/datadogV1/model/model_synthetics_api_test_config.rs index 1a9196538..ba564f205 100644 --- a/src/datadogV1/model/model_synthetics_api_test_config.rs +++ b/src/datadogV1/model/model_synthetics_api_test_config.rs @@ -32,7 +32,7 @@ impl SyntheticsAPITestConfig { } } - pub fn with_assertions( + pub fn assertions( &mut self, value: Vec, ) -> &mut Self { @@ -40,7 +40,7 @@ impl SyntheticsAPITestConfig { self } - pub fn with_config_variables( + pub fn config_variables( &mut self, value: Vec, ) -> &mut Self { @@ -48,22 +48,17 @@ impl SyntheticsAPITestConfig { self } - pub fn with_request( - &mut self, - value: crate::datadogV1::model::SyntheticsTestRequest, - ) -> &mut Self { + pub fn request(&mut self, value: crate::datadogV1::model::SyntheticsTestRequest) -> &mut Self { self.request = Some(value); self } - pub fn with_steps( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn steps(&mut self, value: Vec) -> &mut Self { self.steps = Some(value); self } } + impl Default for SyntheticsAPITestConfig { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_api_test_result_data.rs b/src/datadogV1/model/model_synthetics_api_test_result_data.rs index 7a03a9483..6bfbe6d29 100644 --- a/src/datadogV1/model/model_synthetics_api_test_result_data.rs +++ b/src/datadogV1/model/model_synthetics_api_test_result_data.rs @@ -55,15 +55,12 @@ impl SyntheticsAPITestResultData { } } - pub fn with_cert( - &mut self, - value: crate::datadogV1::model::SyntheticsSSLCertificate, - ) -> &mut Self { + pub fn cert(&mut self, value: crate::datadogV1::model::SyntheticsSSLCertificate) -> &mut Self { self.cert = Some(value); self } - pub fn with_event_type( + pub fn event_type( &mut self, value: crate::datadogV1::model::SyntheticsTestProcessStatus, ) -> &mut Self { @@ -71,7 +68,7 @@ impl SyntheticsAPITestResultData { self } - pub fn with_failure( + pub fn failure( &mut self, value: crate::datadogV1::model::SyntheticsApiTestResultFailure, ) -> &mut Self { @@ -79,12 +76,12 @@ impl SyntheticsAPITestResultData { self } - pub fn with_http_status_code(&mut self, value: i64) -> &mut Self { + pub fn http_status_code(&mut self, value: i64) -> &mut Self { self.http_status_code = Some(value); self } - pub fn with_request_headers( + pub fn request_headers( &mut self, value: std::collections::BTreeMap< String, @@ -95,12 +92,12 @@ impl SyntheticsAPITestResultData { self } - pub fn with_response_body(&mut self, value: String) -> &mut Self { + pub fn response_body(&mut self, value: String) -> &mut Self { self.response_body = Some(value); self } - pub fn with_response_headers( + pub fn response_headers( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -108,16 +105,17 @@ impl SyntheticsAPITestResultData { self } - pub fn with_response_size(&mut self, value: i64) -> &mut Self { + pub fn response_size(&mut self, value: i64) -> &mut Self { self.response_size = Some(value); self } - pub fn with_timings(&mut self, value: crate::datadogV1::model::SyntheticsTiming) -> &mut Self { + pub fn timings(&mut self, value: crate::datadogV1::model::SyntheticsTiming) -> &mut Self { self.timings = Some(value); self } } + impl Default for SyntheticsAPITestResultData { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_api_test_result_failure.rs b/src/datadogV1/model/model_synthetics_api_test_result_failure.rs index 840c67826..e99b70af2 100644 --- a/src/datadogV1/model/model_synthetics_api_test_result_failure.rs +++ b/src/datadogV1/model/model_synthetics_api_test_result_failure.rs @@ -24,7 +24,7 @@ impl SyntheticsApiTestResultFailure { } } - pub fn with_code( + pub fn code( &mut self, value: crate::datadogV1::model::SyntheticsApiTestFailureCode, ) -> &mut Self { @@ -32,11 +32,12 @@ impl SyntheticsApiTestResultFailure { self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } } + impl Default for SyntheticsApiTestResultFailure { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_api_test_result_full.rs b/src/datadogV1/model/model_synthetics_api_test_result_full.rs index adf82d0ba..4d95d6739 100644 --- a/src/datadogV1/model/model_synthetics_api_test_result_full.rs +++ b/src/datadogV1/model/model_synthetics_api_test_result_full.rs @@ -47,7 +47,7 @@ impl SyntheticsAPITestResultFull { } } - pub fn with_check( + pub fn check( &mut self, value: crate::datadogV1::model::SyntheticsAPITestResultFullCheck, ) -> &mut Self { @@ -55,22 +55,22 @@ impl SyntheticsAPITestResultFull { self } - pub fn with_check_time(&mut self, value: f64) -> &mut Self { + pub fn check_time(&mut self, value: f64) -> &mut Self { self.check_time = Some(value); self } - pub fn with_check_version(&mut self, value: i64) -> &mut Self { + pub fn check_version(&mut self, value: i64) -> &mut Self { self.check_version = Some(value); self } - pub fn with_probe_dc(&mut self, value: String) -> &mut Self { + pub fn probe_dc(&mut self, value: String) -> &mut Self { self.probe_dc = Some(value); self } - pub fn with_result( + pub fn result( &mut self, value: crate::datadogV1::model::SyntheticsAPITestResultData, ) -> &mut Self { @@ -78,12 +78,12 @@ impl SyntheticsAPITestResultFull { self } - pub fn with_result_id(&mut self, value: String) -> &mut Self { + pub fn result_id(&mut self, value: String) -> &mut Self { self.result_id = Some(value); self } - pub fn with_status( + pub fn status( &mut self, value: crate::datadogV1::model::SyntheticsTestMonitorStatus, ) -> &mut Self { @@ -91,6 +91,7 @@ impl SyntheticsAPITestResultFull { self } } + impl Default for SyntheticsAPITestResultFull { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_api_test_result_short.rs b/src/datadogV1/model/model_synthetics_api_test_result_short.rs index a45d727a5..11b9933dc 100644 --- a/src/datadogV1/model/model_synthetics_api_test_result_short.rs +++ b/src/datadogV1/model/model_synthetics_api_test_result_short.rs @@ -39,17 +39,17 @@ impl SyntheticsAPITestResultShort { } } - pub fn with_check_time(&mut self, value: f64) -> &mut Self { + pub fn check_time(&mut self, value: f64) -> &mut Self { self.check_time = Some(value); self } - pub fn with_probe_dc(&mut self, value: String) -> &mut Self { + pub fn probe_dc(&mut self, value: String) -> &mut Self { self.probe_dc = Some(value); self } - pub fn with_result( + pub fn result( &mut self, value: crate::datadogV1::model::SyntheticsAPITestResultShortResult, ) -> &mut Self { @@ -57,12 +57,12 @@ impl SyntheticsAPITestResultShort { self } - pub fn with_result_id(&mut self, value: String) -> &mut Self { + pub fn result_id(&mut self, value: String) -> &mut Self { self.result_id = Some(value); self } - pub fn with_status( + pub fn status( &mut self, value: crate::datadogV1::model::SyntheticsTestMonitorStatus, ) -> &mut Self { @@ -70,6 +70,7 @@ impl SyntheticsAPITestResultShort { self } } + impl Default for SyntheticsAPITestResultShort { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_api_test_result_short_result.rs b/src/datadogV1/model/model_synthetics_api_test_result_short_result.rs index 23d7262f9..ddda00e51 100644 --- a/src/datadogV1/model/model_synthetics_api_test_result_short_result.rs +++ b/src/datadogV1/model/model_synthetics_api_test_result_short_result.rs @@ -25,16 +25,17 @@ impl SyntheticsAPITestResultShortResult { } } - pub fn with_passed(&mut self, value: bool) -> &mut Self { + pub fn passed(&mut self, value: bool) -> &mut Self { self.passed = Some(value); self } - pub fn with_timings(&mut self, value: crate::datadogV1::model::SyntheticsTiming) -> &mut Self { + pub fn timings(&mut self, value: crate::datadogV1::model::SyntheticsTiming) -> &mut Self { self.timings = Some(value); self } } + impl Default for SyntheticsAPITestResultShortResult { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_assertion.rs b/src/datadogV1/model/model_synthetics_assertion.rs index ae64f5e88..e127a46c2 100644 --- a/src/datadogV1/model/model_synthetics_assertion.rs +++ b/src/datadogV1/model/model_synthetics_assertion.rs @@ -8,7 +8,9 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum SyntheticsAssertion { - SyntheticsAssertionTarget(crate::datadogV1::model::SyntheticsAssertionTarget), - SyntheticsAssertionJSONPathTarget(crate::datadogV1::model::SyntheticsAssertionJSONPathTarget), - SyntheticsAssertionXPathTarget(crate::datadogV1::model::SyntheticsAssertionXPathTarget), + SyntheticsAssertionTarget(Box), + SyntheticsAssertionJSONPathTarget( + Box, + ), + SyntheticsAssertionXPathTarget(Box), } diff --git a/src/datadogV1/model/model_synthetics_assertion_json_path_target.rs b/src/datadogV1/model/model_synthetics_assertion_json_path_target.rs index c887200c4..252bd9e96 100644 --- a/src/datadogV1/model/model_synthetics_assertion_json_path_target.rs +++ b/src/datadogV1/model/model_synthetics_assertion_json_path_target.rs @@ -35,12 +35,12 @@ impl SyntheticsAssertionJSONPathTarget { } } - pub fn with_property(&mut self, value: String) -> &mut Self { + pub fn property(&mut self, value: String) -> &mut Self { self.property = Some(value); self } - pub fn with_target( + pub fn target( &mut self, value: crate::datadogV1::model::SyntheticsAssertionJSONPathTargetTarget, ) -> &mut Self { diff --git a/src/datadogV1/model/model_synthetics_assertion_json_path_target_target.rs b/src/datadogV1/model/model_synthetics_assertion_json_path_target_target.rs index 7ea5b4f62..34dd82a53 100644 --- a/src/datadogV1/model/model_synthetics_assertion_json_path_target_target.rs +++ b/src/datadogV1/model/model_synthetics_assertion_json_path_target_target.rs @@ -28,21 +28,22 @@ impl SyntheticsAssertionJSONPathTargetTarget { } } - pub fn with_json_path(&mut self, value: String) -> &mut Self { + pub fn json_path(&mut self, value: String) -> &mut Self { self.json_path = Some(value); self } - pub fn with_operator(&mut self, value: String) -> &mut Self { + pub fn operator(&mut self, value: String) -> &mut Self { self.operator = Some(value); self } - pub fn with_target_value(&mut self, value: serde_json::Value) -> &mut Self { + pub fn target_value(&mut self, value: serde_json::Value) -> &mut Self { self.target_value = Some(value); self } } + impl Default for SyntheticsAssertionJSONPathTargetTarget { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_assertion_target.rs b/src/datadogV1/model/model_synthetics_assertion_target.rs index dcd237141..8ef7a5222 100644 --- a/src/datadogV1/model/model_synthetics_assertion_target.rs +++ b/src/datadogV1/model/model_synthetics_assertion_target.rs @@ -40,12 +40,12 @@ impl SyntheticsAssertionTarget { } } - pub fn with_property(&mut self, value: String) -> &mut Self { + pub fn property(&mut self, value: String) -> &mut Self { self.property = Some(value); self } - pub fn with_timings_scope( + pub fn timings_scope( &mut self, value: crate::datadogV1::model::SyntheticsAssertionTimingsScope, ) -> &mut Self { diff --git a/src/datadogV1/model/model_synthetics_assertion_x_path_target.rs b/src/datadogV1/model/model_synthetics_assertion_x_path_target.rs index 89d9ab170..a3a07619b 100644 --- a/src/datadogV1/model/model_synthetics_assertion_x_path_target.rs +++ b/src/datadogV1/model/model_synthetics_assertion_x_path_target.rs @@ -35,12 +35,12 @@ impl SyntheticsAssertionXPathTarget { } } - pub fn with_property(&mut self, value: String) -> &mut Self { + pub fn property(&mut self, value: String) -> &mut Self { self.property = Some(value); self } - pub fn with_target( + pub fn target( &mut self, value: crate::datadogV1::model::SyntheticsAssertionXPathTargetTarget, ) -> &mut Self { diff --git a/src/datadogV1/model/model_synthetics_assertion_x_path_target_target.rs b/src/datadogV1/model/model_synthetics_assertion_x_path_target_target.rs index 4d36e80c9..19f3c4c08 100644 --- a/src/datadogV1/model/model_synthetics_assertion_x_path_target_target.rs +++ b/src/datadogV1/model/model_synthetics_assertion_x_path_target_target.rs @@ -28,21 +28,22 @@ impl SyntheticsAssertionXPathTargetTarget { } } - pub fn with_operator(&mut self, value: String) -> &mut Self { + pub fn operator(&mut self, value: String) -> &mut Self { self.operator = Some(value); self } - pub fn with_target_value(&mut self, value: serde_json::Value) -> &mut Self { + pub fn target_value(&mut self, value: serde_json::Value) -> &mut Self { self.target_value = Some(value); self } - pub fn with_x_path(&mut self, value: String) -> &mut Self { + pub fn x_path(&mut self, value: String) -> &mut Self { self.x_path = Some(value); self } } + impl Default for SyntheticsAssertionXPathTargetTarget { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_basic_auth.rs b/src/datadogV1/model/model_synthetics_basic_auth.rs index 66f3188c8..ee4738958 100644 --- a/src/datadogV1/model/model_synthetics_basic_auth.rs +++ b/src/datadogV1/model/model_synthetics_basic_auth.rs @@ -7,10 +7,10 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum SyntheticsBasicAuth { - SyntheticsBasicAuthWeb(crate::datadogV1::model::SyntheticsBasicAuthWeb), - SyntheticsBasicAuthSigv4(crate::datadogV1::model::SyntheticsBasicAuthSigv4), - SyntheticsBasicAuthNTLM(crate::datadogV1::model::SyntheticsBasicAuthNTLM), - SyntheticsBasicAuthDigest(crate::datadogV1::model::SyntheticsBasicAuthDigest), - SyntheticsBasicAuthOauthClient(crate::datadogV1::model::SyntheticsBasicAuthOauthClient), - SyntheticsBasicAuthOauthROP(crate::datadogV1::model::SyntheticsBasicAuthOauthROP), + SyntheticsBasicAuthWeb(Box), + SyntheticsBasicAuthSigv4(Box), + SyntheticsBasicAuthNTLM(Box), + SyntheticsBasicAuthDigest(Box), + SyntheticsBasicAuthOauthClient(Box), + SyntheticsBasicAuthOauthROP(Box), } diff --git a/src/datadogV1/model/model_synthetics_basic_auth_digest.rs b/src/datadogV1/model/model_synthetics_basic_auth_digest.rs index 0a1d154ae..9fcaa87ba 100644 --- a/src/datadogV1/model/model_synthetics_basic_auth_digest.rs +++ b/src/datadogV1/model/model_synthetics_basic_auth_digest.rs @@ -28,7 +28,7 @@ impl SyntheticsBasicAuthDigest { } } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV1::model::SyntheticsBasicAuthDigestType, ) -> &mut Self { diff --git a/src/datadogV1/model/model_synthetics_basic_auth_ntlm.rs b/src/datadogV1/model/model_synthetics_basic_auth_ntlm.rs index 705342cf2..9cdd4985c 100644 --- a/src/datadogV1/model/model_synthetics_basic_auth_ntlm.rs +++ b/src/datadogV1/model/model_synthetics_basic_auth_ntlm.rs @@ -38,22 +38,22 @@ impl SyntheticsBasicAuthNTLM { } } - pub fn with_domain(&mut self, value: String) -> &mut Self { + pub fn domain(&mut self, value: String) -> &mut Self { self.domain = Some(value); self } - pub fn with_password(&mut self, value: String) -> &mut Self { + pub fn password(&mut self, value: String) -> &mut Self { self.password = Some(value); self } - pub fn with_username(&mut self, value: String) -> &mut Self { + pub fn username(&mut self, value: String) -> &mut Self { self.username = Some(value); self } - pub fn with_workstation(&mut self, value: String) -> &mut Self { + pub fn workstation(&mut self, value: String) -> &mut Self { self.workstation = Some(value); self } diff --git a/src/datadogV1/model/model_synthetics_basic_auth_oauth_client.rs b/src/datadogV1/model/model_synthetics_basic_auth_oauth_client.rs index ac878bb9b..131a4d41c 100644 --- a/src/datadogV1/model/model_synthetics_basic_auth_oauth_client.rs +++ b/src/datadogV1/model/model_synthetics_basic_auth_oauth_client.rs @@ -54,22 +54,22 @@ impl SyntheticsBasicAuthOauthClient { } } - pub fn with_audience(&mut self, value: String) -> &mut Self { + pub fn audience(&mut self, value: String) -> &mut Self { self.audience = Some(value); self } - pub fn with_resource(&mut self, value: String) -> &mut Self { + pub fn resource(&mut self, value: String) -> &mut Self { self.resource = Some(value); self } - pub fn with_scope(&mut self, value: String) -> &mut Self { + pub fn scope(&mut self, value: String) -> &mut Self { self.scope = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV1::model::SyntheticsBasicAuthOauthClientType, ) -> &mut Self { diff --git a/src/datadogV1/model/model_synthetics_basic_auth_oauth_rop.rs b/src/datadogV1/model/model_synthetics_basic_auth_oauth_rop.rs index a18d83d78..ccc3e3049 100644 --- a/src/datadogV1/model/model_synthetics_basic_auth_oauth_rop.rs +++ b/src/datadogV1/model/model_synthetics_basic_auth_oauth_rop.rs @@ -62,32 +62,32 @@ impl SyntheticsBasicAuthOauthROP { } } - pub fn with_audience(&mut self, value: String) -> &mut Self { + pub fn audience(&mut self, value: String) -> &mut Self { self.audience = Some(value); self } - pub fn with_client_id(&mut self, value: String) -> &mut Self { + pub fn client_id(&mut self, value: String) -> &mut Self { self.client_id = Some(value); self } - pub fn with_client_secret(&mut self, value: String) -> &mut Self { + pub fn client_secret(&mut self, value: String) -> &mut Self { self.client_secret = Some(value); self } - pub fn with_resource(&mut self, value: String) -> &mut Self { + pub fn resource(&mut self, value: String) -> &mut Self { self.resource = Some(value); self } - pub fn with_scope(&mut self, value: String) -> &mut Self { + pub fn scope(&mut self, value: String) -> &mut Self { self.scope = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV1::model::SyntheticsBasicAuthOauthROPType, ) -> &mut Self { diff --git a/src/datadogV1/model/model_synthetics_basic_auth_sigv4.rs b/src/datadogV1/model/model_synthetics_basic_auth_sigv4.rs index c8c0d989d..daed3bee4 100644 --- a/src/datadogV1/model/model_synthetics_basic_auth_sigv4.rs +++ b/src/datadogV1/model/model_synthetics_basic_auth_sigv4.rs @@ -44,17 +44,17 @@ impl SyntheticsBasicAuthSigv4 { } } - pub fn with_region(&mut self, value: String) -> &mut Self { + pub fn region(&mut self, value: String) -> &mut Self { self.region = Some(value); self } - pub fn with_service_name(&mut self, value: String) -> &mut Self { + pub fn service_name(&mut self, value: String) -> &mut Self { self.service_name = Some(value); self } - pub fn with_session_token(&mut self, value: String) -> &mut Self { + pub fn session_token(&mut self, value: String) -> &mut Self { self.session_token = Some(value); self } diff --git a/src/datadogV1/model/model_synthetics_basic_auth_web.rs b/src/datadogV1/model/model_synthetics_basic_auth_web.rs index e6c3a22d7..259192f0a 100644 --- a/src/datadogV1/model/model_synthetics_basic_auth_web.rs +++ b/src/datadogV1/model/model_synthetics_basic_auth_web.rs @@ -28,7 +28,7 @@ impl SyntheticsBasicAuthWeb { } } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV1::model::SyntheticsBasicAuthWebType, ) -> &mut Self { diff --git a/src/datadogV1/model/model_synthetics_batch_details.rs b/src/datadogV1/model/model_synthetics_batch_details.rs index e07a30194..7354e72f4 100644 --- a/src/datadogV1/model/model_synthetics_batch_details.rs +++ b/src/datadogV1/model/model_synthetics_batch_details.rs @@ -18,7 +18,7 @@ impl SyntheticsBatchDetails { SyntheticsBatchDetails { data: None } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV1::model::SyntheticsBatchDetailsData, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SyntheticsBatchDetails { self } } + impl Default for SyntheticsBatchDetails { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_batch_details_data.rs b/src/datadogV1/model/model_synthetics_batch_details_data.rs index 0da004997..6234a13f0 100644 --- a/src/datadogV1/model/model_synthetics_batch_details_data.rs +++ b/src/datadogV1/model/model_synthetics_batch_details_data.rs @@ -28,7 +28,7 @@ impl SyntheticsBatchDetailsData { } } - pub fn with_metadata( + pub fn metadata( &mut self, value: crate::datadogV1::model::SyntheticsCIBatchMetadata, ) -> &mut Self { @@ -36,7 +36,7 @@ impl SyntheticsBatchDetailsData { self } - pub fn with_results( + pub fn results( &mut self, value: Vec, ) -> &mut Self { @@ -44,11 +44,12 @@ impl SyntheticsBatchDetailsData { self } - pub fn with_status(&mut self, value: crate::datadogV1::model::SyntheticsStatus) -> &mut Self { + pub fn status(&mut self, value: crate::datadogV1::model::SyntheticsStatus) -> &mut Self { self.status = Some(value); self } } + impl Default for SyntheticsBatchDetailsData { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_batch_result.rs b/src/datadogV1/model/model_synthetics_batch_result.rs index 3f9305e5e..96e76fa67 100644 --- a/src/datadogV1/model/model_synthetics_batch_result.rs +++ b/src/datadogV1/model/model_synthetics_batch_result.rs @@ -56,17 +56,17 @@ impl SyntheticsBatchResult { } } - pub fn with_device(&mut self, value: crate::datadogV1::model::SyntheticsDeviceID) -> &mut Self { + pub fn device(&mut self, value: crate::datadogV1::model::SyntheticsDeviceID) -> &mut Self { self.device = Some(value); self } - pub fn with_duration(&mut self, value: f64) -> &mut Self { + pub fn duration(&mut self, value: f64) -> &mut Self { self.duration = Some(value); self } - pub fn with_execution_rule( + pub fn execution_rule( &mut self, value: crate::datadogV1::model::SyntheticsTestExecutionRule, ) -> &mut Self { @@ -74,37 +74,37 @@ impl SyntheticsBatchResult { self } - pub fn with_location(&mut self, value: String) -> &mut Self { + pub fn location(&mut self, value: String) -> &mut Self { self.location = Some(value); self } - pub fn with_result_id(&mut self, value: String) -> &mut Self { + pub fn result_id(&mut self, value: String) -> &mut Self { self.result_id = Some(value); self } - pub fn with_retries(&mut self, value: f64) -> &mut Self { + pub fn retries(&mut self, value: f64) -> &mut Self { self.retries = Some(value); self } - pub fn with_status(&mut self, value: crate::datadogV1::model::SyntheticsStatus) -> &mut Self { + pub fn status(&mut self, value: crate::datadogV1::model::SyntheticsStatus) -> &mut Self { self.status = Some(value); self } - pub fn with_test_name(&mut self, value: String) -> &mut Self { + pub fn test_name(&mut self, value: String) -> &mut Self { self.test_name = Some(value); self } - pub fn with_test_public_id(&mut self, value: String) -> &mut Self { + pub fn test_public_id(&mut self, value: String) -> &mut Self { self.test_public_id = Some(value); self } - pub fn with_test_type( + pub fn test_type( &mut self, value: crate::datadogV1::model::SyntheticsTestDetailsType, ) -> &mut Self { @@ -112,6 +112,7 @@ impl SyntheticsBatchResult { self } } + impl Default for SyntheticsBatchResult { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_browser_error.rs b/src/datadogV1/model/model_synthetics_browser_error.rs index af78a5c92..e96325ad8 100644 --- a/src/datadogV1/model/model_synthetics_browser_error.rs +++ b/src/datadogV1/model/model_synthetics_browser_error.rs @@ -36,7 +36,7 @@ impl SyntheticsBrowserError { } } - pub fn with_status(&mut self, value: i64) -> &mut Self { + pub fn status(&mut self, value: i64) -> &mut Self { self.status = Some(value); self } diff --git a/src/datadogV1/model/model_synthetics_browser_test.rs b/src/datadogV1/model/model_synthetics_browser_test.rs index eb72553c7..bbf8755f5 100644 --- a/src/datadogV1/model/model_synthetics_browser_test.rs +++ b/src/datadogV1/model/model_synthetics_browser_test.rs @@ -68,17 +68,17 @@ impl SyntheticsBrowserTest { } } - pub fn with_monitor_id(&mut self, value: i64) -> &mut Self { + pub fn monitor_id(&mut self, value: i64) -> &mut Self { self.monitor_id = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_status( + pub fn status( &mut self, value: crate::datadogV1::model::SyntheticsTestPauseStatus, ) -> &mut Self { @@ -86,12 +86,12 @@ impl SyntheticsBrowserTest { self } - pub fn with_steps(&mut self, value: Vec) -> &mut Self { + pub fn steps(&mut self, value: Vec) -> &mut Self { self.steps = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } diff --git a/src/datadogV1/model/model_synthetics_browser_test_config.rs b/src/datadogV1/model/model_synthetics_browser_test_config.rs index ef1ea1768..5653cef13 100644 --- a/src/datadogV1/model/model_synthetics_browser_test_config.rs +++ b/src/datadogV1/model/model_synthetics_browser_test_config.rs @@ -39,7 +39,7 @@ impl SyntheticsBrowserTestConfig { } } - pub fn with_config_variables( + pub fn config_variables( &mut self, value: Vec, ) -> &mut Self { @@ -47,12 +47,12 @@ impl SyntheticsBrowserTestConfig { self } - pub fn with_set_cookie(&mut self, value: String) -> &mut Self { + pub fn set_cookie(&mut self, value: String) -> &mut Self { self.set_cookie = Some(value); self } - pub fn with_variables( + pub fn variables( &mut self, value: Vec, ) -> &mut Self { diff --git a/src/datadogV1/model/model_synthetics_browser_test_result_data.rs b/src/datadogV1/model/model_synthetics_browser_test_result_data.rs index 6ad755f82..dc0ec9955 100644 --- a/src/datadogV1/model/model_synthetics_browser_test_result_data.rs +++ b/src/datadogV1/model/model_synthetics_browser_test_result_data.rs @@ -65,32 +65,32 @@ impl SyntheticsBrowserTestResultData { } } - pub fn with_browser_type(&mut self, value: String) -> &mut Self { + pub fn browser_type(&mut self, value: String) -> &mut Self { self.browser_type = Some(value); self } - pub fn with_browser_version(&mut self, value: String) -> &mut Self { + pub fn browser_version(&mut self, value: String) -> &mut Self { self.browser_version = Some(value); self } - pub fn with_device(&mut self, value: crate::datadogV1::model::SyntheticsDevice) -> &mut Self { + pub fn device(&mut self, value: crate::datadogV1::model::SyntheticsDevice) -> &mut Self { self.device = Some(value); self } - pub fn with_duration(&mut self, value: f64) -> &mut Self { + pub fn duration(&mut self, value: f64) -> &mut Self { self.duration = Some(value); self } - pub fn with_error(&mut self, value: String) -> &mut Self { + pub fn error(&mut self, value: String) -> &mut Self { self.error = Some(value); self } - pub fn with_failure( + pub fn failure( &mut self, value: crate::datadogV1::model::SyntheticsBrowserTestResultFailure, ) -> &mut Self { @@ -98,22 +98,22 @@ impl SyntheticsBrowserTestResultData { self } - pub fn with_passed(&mut self, value: bool) -> &mut Self { + pub fn passed(&mut self, value: bool) -> &mut Self { self.passed = Some(value); self } - pub fn with_received_email_count(&mut self, value: i64) -> &mut Self { + pub fn received_email_count(&mut self, value: i64) -> &mut Self { self.received_email_count = Some(value); self } - pub fn with_start_url(&mut self, value: String) -> &mut Self { + pub fn start_url(&mut self, value: String) -> &mut Self { self.start_url = Some(value); self } - pub fn with_step_details( + pub fn step_details( &mut self, value: Vec, ) -> &mut Self { @@ -121,16 +121,17 @@ impl SyntheticsBrowserTestResultData { self } - pub fn with_thumbnails_bucket_key(&mut self, value: bool) -> &mut Self { + pub fn thumbnails_bucket_key(&mut self, value: bool) -> &mut Self { self.thumbnails_bucket_key = Some(value); self } - pub fn with_time_to_interactive(&mut self, value: f64) -> &mut Self { + pub fn time_to_interactive(&mut self, value: f64) -> &mut Self { self.time_to_interactive = Some(value); self } } + impl Default for SyntheticsBrowserTestResultData { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_browser_test_result_failure.rs b/src/datadogV1/model/model_synthetics_browser_test_result_failure.rs index 2d3e146ac..b5c992741 100644 --- a/src/datadogV1/model/model_synthetics_browser_test_result_failure.rs +++ b/src/datadogV1/model/model_synthetics_browser_test_result_failure.rs @@ -24,7 +24,7 @@ impl SyntheticsBrowserTestResultFailure { } } - pub fn with_code( + pub fn code( &mut self, value: crate::datadogV1::model::SyntheticsBrowserTestFailureCode, ) -> &mut Self { @@ -32,11 +32,12 @@ impl SyntheticsBrowserTestResultFailure { self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } } + impl Default for SyntheticsBrowserTestResultFailure { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_browser_test_result_full.rs b/src/datadogV1/model/model_synthetics_browser_test_result_full.rs index 51e33c741..f053526ae 100644 --- a/src/datadogV1/model/model_synthetics_browser_test_result_full.rs +++ b/src/datadogV1/model/model_synthetics_browser_test_result_full.rs @@ -47,7 +47,7 @@ impl SyntheticsBrowserTestResultFull { } } - pub fn with_check( + pub fn check( &mut self, value: crate::datadogV1::model::SyntheticsBrowserTestResultFullCheck, ) -> &mut Self { @@ -55,22 +55,22 @@ impl SyntheticsBrowserTestResultFull { self } - pub fn with_check_time(&mut self, value: f64) -> &mut Self { + pub fn check_time(&mut self, value: f64) -> &mut Self { self.check_time = Some(value); self } - pub fn with_check_version(&mut self, value: i64) -> &mut Self { + pub fn check_version(&mut self, value: i64) -> &mut Self { self.check_version = Some(value); self } - pub fn with_probe_dc(&mut self, value: String) -> &mut Self { + pub fn probe_dc(&mut self, value: String) -> &mut Self { self.probe_dc = Some(value); self } - pub fn with_result( + pub fn result( &mut self, value: crate::datadogV1::model::SyntheticsBrowserTestResultData, ) -> &mut Self { @@ -78,12 +78,12 @@ impl SyntheticsBrowserTestResultFull { self } - pub fn with_result_id(&mut self, value: String) -> &mut Self { + pub fn result_id(&mut self, value: String) -> &mut Self { self.result_id = Some(value); self } - pub fn with_status( + pub fn status( &mut self, value: crate::datadogV1::model::SyntheticsTestMonitorStatus, ) -> &mut Self { @@ -91,6 +91,7 @@ impl SyntheticsBrowserTestResultFull { self } } + impl Default for SyntheticsBrowserTestResultFull { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_browser_test_result_short.rs b/src/datadogV1/model/model_synthetics_browser_test_result_short.rs index b2439a661..624ae68b9 100644 --- a/src/datadogV1/model/model_synthetics_browser_test_result_short.rs +++ b/src/datadogV1/model/model_synthetics_browser_test_result_short.rs @@ -39,17 +39,17 @@ impl SyntheticsBrowserTestResultShort { } } - pub fn with_check_time(&mut self, value: f64) -> &mut Self { + pub fn check_time(&mut self, value: f64) -> &mut Self { self.check_time = Some(value); self } - pub fn with_probe_dc(&mut self, value: String) -> &mut Self { + pub fn probe_dc(&mut self, value: String) -> &mut Self { self.probe_dc = Some(value); self } - pub fn with_result( + pub fn result( &mut self, value: crate::datadogV1::model::SyntheticsBrowserTestResultShortResult, ) -> &mut Self { @@ -57,12 +57,12 @@ impl SyntheticsBrowserTestResultShort { self } - pub fn with_result_id(&mut self, value: String) -> &mut Self { + pub fn result_id(&mut self, value: String) -> &mut Self { self.result_id = Some(value); self } - pub fn with_status( + pub fn status( &mut self, value: crate::datadogV1::model::SyntheticsTestMonitorStatus, ) -> &mut Self { @@ -70,6 +70,7 @@ impl SyntheticsBrowserTestResultShort { self } } + impl Default for SyntheticsBrowserTestResultShort { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_browser_test_result_short_result.rs b/src/datadogV1/model/model_synthetics_browser_test_result_short_result.rs index de155e875..5cb2d6bda 100644 --- a/src/datadogV1/model/model_synthetics_browser_test_result_short_result.rs +++ b/src/datadogV1/model/model_synthetics_browser_test_result_short_result.rs @@ -36,31 +36,32 @@ impl SyntheticsBrowserTestResultShortResult { } } - pub fn with_device(&mut self, value: crate::datadogV1::model::SyntheticsDevice) -> &mut Self { + pub fn device(&mut self, value: crate::datadogV1::model::SyntheticsDevice) -> &mut Self { self.device = Some(value); self } - pub fn with_duration(&mut self, value: f64) -> &mut Self { + pub fn duration(&mut self, value: f64) -> &mut Self { self.duration = Some(value); self } - pub fn with_error_count(&mut self, value: i64) -> &mut Self { + pub fn error_count(&mut self, value: i64) -> &mut Self { self.error_count = Some(value); self } - pub fn with_step_count_completed(&mut self, value: i64) -> &mut Self { + pub fn step_count_completed(&mut self, value: i64) -> &mut Self { self.step_count_completed = Some(value); self } - pub fn with_step_count_total(&mut self, value: i64) -> &mut Self { + pub fn step_count_total(&mut self, value: i64) -> &mut Self { self.step_count_total = Some(value); self } } + impl Default for SyntheticsBrowserTestResultShortResult { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_browser_test_rum_settings.rs b/src/datadogV1/model/model_synthetics_browser_test_rum_settings.rs index 4825aa8ea..c339e0004 100644 --- a/src/datadogV1/model/model_synthetics_browser_test_rum_settings.rs +++ b/src/datadogV1/model/model_synthetics_browser_test_rum_settings.rs @@ -38,12 +38,12 @@ impl SyntheticsBrowserTestRumSettings { } } - pub fn with_application_id(&mut self, value: String) -> &mut Self { + pub fn application_id(&mut self, value: String) -> &mut Self { self.application_id = Some(value); self } - pub fn with_client_token_id(&mut self, value: i64) -> &mut Self { + pub fn client_token_id(&mut self, value: i64) -> &mut Self { self.client_token_id = Some(value); self } diff --git a/src/datadogV1/model/model_synthetics_browser_variable.rs b/src/datadogV1/model/model_synthetics_browser_variable.rs index 62919e6d3..debce806f 100644 --- a/src/datadogV1/model/model_synthetics_browser_variable.rs +++ b/src/datadogV1/model/model_synthetics_browser_variable.rs @@ -44,22 +44,22 @@ impl SyntheticsBrowserVariable { } } - pub fn with_example(&mut self, value: String) -> &mut Self { + pub fn example(&mut self, value: String) -> &mut Self { self.example = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_pattern(&mut self, value: String) -> &mut Self { + pub fn pattern(&mut self, value: String) -> &mut Self { self.pattern = Some(value); self } - pub fn with_secure(&mut self, value: bool) -> &mut Self { + pub fn secure(&mut self, value: bool) -> &mut Self { self.secure = Some(value); self } diff --git a/src/datadogV1/model/model_synthetics_ci_batch_metadata.rs b/src/datadogV1/model/model_synthetics_ci_batch_metadata.rs index 2edfe9e8d..8224f9e22 100644 --- a/src/datadogV1/model/model_synthetics_ci_batch_metadata.rs +++ b/src/datadogV1/model/model_synthetics_ci_batch_metadata.rs @@ -24,15 +24,12 @@ impl SyntheticsCIBatchMetadata { } } - pub fn with_ci( - &mut self, - value: crate::datadogV1::model::SyntheticsCIBatchMetadataCI, - ) -> &mut Self { + pub fn ci(&mut self, value: crate::datadogV1::model::SyntheticsCIBatchMetadataCI) -> &mut Self { self.ci = Some(value); self } - pub fn with_git( + pub fn git( &mut self, value: crate::datadogV1::model::SyntheticsCIBatchMetadataGit, ) -> &mut Self { @@ -40,6 +37,7 @@ impl SyntheticsCIBatchMetadata { self } } + impl Default for SyntheticsCIBatchMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_ci_batch_metadata_ci.rs b/src/datadogV1/model/model_synthetics_ci_batch_metadata_ci.rs index 2961e3688..154ab83cf 100644 --- a/src/datadogV1/model/model_synthetics_ci_batch_metadata_ci.rs +++ b/src/datadogV1/model/model_synthetics_ci_batch_metadata_ci.rs @@ -24,7 +24,7 @@ impl SyntheticsCIBatchMetadataCI { } } - pub fn with_pipeline( + pub fn pipeline( &mut self, value: crate::datadogV1::model::SyntheticsCIBatchMetadataPipeline, ) -> &mut Self { @@ -32,7 +32,7 @@ impl SyntheticsCIBatchMetadataCI { self } - pub fn with_provider( + pub fn provider( &mut self, value: crate::datadogV1::model::SyntheticsCIBatchMetadataProvider, ) -> &mut Self { @@ -40,6 +40,7 @@ impl SyntheticsCIBatchMetadataCI { self } } + impl Default for SyntheticsCIBatchMetadataCI { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_ci_batch_metadata_git.rs b/src/datadogV1/model/model_synthetics_ci_batch_metadata_git.rs index 73928af68..360975ee2 100644 --- a/src/datadogV1/model/model_synthetics_ci_batch_metadata_git.rs +++ b/src/datadogV1/model/model_synthetics_ci_batch_metadata_git.rs @@ -24,16 +24,17 @@ impl SyntheticsCIBatchMetadataGit { } } - pub fn with_branch(&mut self, value: String) -> &mut Self { + pub fn branch(&mut self, value: String) -> &mut Self { self.branch = Some(value); self } - pub fn with_commit_sha(&mut self, value: String) -> &mut Self { + pub fn commit_sha(&mut self, value: String) -> &mut Self { self.commit_sha = Some(value); self } } + impl Default for SyntheticsCIBatchMetadataGit { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_ci_batch_metadata_pipeline.rs b/src/datadogV1/model/model_synthetics_ci_batch_metadata_pipeline.rs index 92c3d9298..2b281302b 100644 --- a/src/datadogV1/model/model_synthetics_ci_batch_metadata_pipeline.rs +++ b/src/datadogV1/model/model_synthetics_ci_batch_metadata_pipeline.rs @@ -18,11 +18,12 @@ impl SyntheticsCIBatchMetadataPipeline { SyntheticsCIBatchMetadataPipeline { url: None } } - pub fn with_url(&mut self, value: String) -> &mut Self { + pub fn url(&mut self, value: String) -> &mut Self { self.url = Some(value); self } } + impl Default for SyntheticsCIBatchMetadataPipeline { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_ci_batch_metadata_provider.rs b/src/datadogV1/model/model_synthetics_ci_batch_metadata_provider.rs index dcbbac2be..e844d6a36 100644 --- a/src/datadogV1/model/model_synthetics_ci_batch_metadata_provider.rs +++ b/src/datadogV1/model/model_synthetics_ci_batch_metadata_provider.rs @@ -18,11 +18,12 @@ impl SyntheticsCIBatchMetadataProvider { SyntheticsCIBatchMetadataProvider { name: None } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } } + impl Default for SyntheticsCIBatchMetadataProvider { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_ci_test.rs b/src/datadogV1/model/model_synthetics_ci_test.rs index dbe8c45af..3c18fde5d 100644 --- a/src/datadogV1/model/model_synthetics_ci_test.rs +++ b/src/datadogV1/model/model_synthetics_ci_test.rs @@ -72,35 +72,32 @@ impl SyntheticsCITest { } } - pub fn with_allow_insecure_certificates(&mut self, value: bool) -> &mut Self { + pub fn allow_insecure_certificates(&mut self, value: bool) -> &mut Self { self.allow_insecure_certificates = Some(value); self } - pub fn with_basic_auth( - &mut self, - value: crate::datadogV1::model::SyntheticsBasicAuth, - ) -> &mut Self { + pub fn basic_auth(&mut self, value: crate::datadogV1::model::SyntheticsBasicAuth) -> &mut Self { self.basic_auth = Some(value); self } - pub fn with_body(&mut self, value: String) -> &mut Self { + pub fn body(&mut self, value: String) -> &mut Self { self.body = Some(value); self } - pub fn with_body_type(&mut self, value: String) -> &mut Self { + pub fn body_type(&mut self, value: String) -> &mut Self { self.body_type = Some(value); self } - pub fn with_cookies(&mut self, value: String) -> &mut Self { + pub fn cookies(&mut self, value: String) -> &mut Self { self.cookies = Some(value); self } - pub fn with_device_ids( + pub fn device_ids( &mut self, value: Vec, ) -> &mut Self { @@ -108,22 +105,22 @@ impl SyntheticsCITest { self } - pub fn with_follow_redirects(&mut self, value: bool) -> &mut Self { + pub fn follow_redirects(&mut self, value: bool) -> &mut Self { self.follow_redirects = Some(value); self } - pub fn with_headers(&mut self, value: std::collections::BTreeMap) -> &mut Self { + pub fn headers(&mut self, value: std::collections::BTreeMap) -> &mut Self { self.headers = Some(value); self } - pub fn with_locations(&mut self, value: Vec) -> &mut Self { + pub fn locations(&mut self, value: Vec) -> &mut Self { self.locations = Some(value); self } - pub fn with_metadata( + pub fn metadata( &mut self, value: crate::datadogV1::model::SyntheticsCIBatchMetadata, ) -> &mut Self { @@ -131,7 +128,7 @@ impl SyntheticsCITest { self } - pub fn with_retry( + pub fn retry( &mut self, value: crate::datadogV1::model::SyntheticsTestOptionsRetry, ) -> &mut Self { @@ -139,15 +136,12 @@ impl SyntheticsCITest { self } - pub fn with_start_url(&mut self, value: String) -> &mut Self { + pub fn start_url(&mut self, value: String) -> &mut Self { self.start_url = Some(value); self } - pub fn with_variables( - &mut self, - value: std::collections::BTreeMap, - ) -> &mut Self { + pub fn variables(&mut self, value: std::collections::BTreeMap) -> &mut Self { self.variables = Some(value); self } diff --git a/src/datadogV1/model/model_synthetics_ci_test_body.rs b/src/datadogV1/model/model_synthetics_ci_test_body.rs index fb681ffd8..fa4d4f16d 100644 --- a/src/datadogV1/model/model_synthetics_ci_test_body.rs +++ b/src/datadogV1/model/model_synthetics_ci_test_body.rs @@ -18,14 +18,12 @@ impl SyntheticsCITestBody { SyntheticsCITestBody { tests: None } } - pub fn with_tests( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn tests(&mut self, value: Vec) -> &mut Self { self.tests = Some(value); self } } + impl Default for SyntheticsCITestBody { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_config_variable.rs b/src/datadogV1/model/model_synthetics_config_variable.rs index 220b1972b..dc1343d58 100644 --- a/src/datadogV1/model/model_synthetics_config_variable.rs +++ b/src/datadogV1/model/model_synthetics_config_variable.rs @@ -43,22 +43,22 @@ impl SyntheticsConfigVariable { } } - pub fn with_example(&mut self, value: String) -> &mut Self { + pub fn example(&mut self, value: String) -> &mut Self { self.example = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_pattern(&mut self, value: String) -> &mut Self { + pub fn pattern(&mut self, value: String) -> &mut Self { self.pattern = Some(value); self } - pub fn with_secure(&mut self, value: bool) -> &mut Self { + pub fn secure(&mut self, value: bool) -> &mut Self { self.secure = Some(value); self } diff --git a/src/datadogV1/model/model_synthetics_core_web_vitals.rs b/src/datadogV1/model/model_synthetics_core_web_vitals.rs index 2a163e811..11460fc6a 100644 --- a/src/datadogV1/model/model_synthetics_core_web_vitals.rs +++ b/src/datadogV1/model/model_synthetics_core_web_vitals.rs @@ -28,21 +28,22 @@ impl SyntheticsCoreWebVitals { } } - pub fn with_cls(&mut self, value: f64) -> &mut Self { + pub fn cls(&mut self, value: f64) -> &mut Self { self.cls = Some(value); self } - pub fn with_lcp(&mut self, value: f64) -> &mut Self { + pub fn lcp(&mut self, value: f64) -> &mut Self { self.lcp = Some(value); self } - pub fn with_url(&mut self, value: String) -> &mut Self { + pub fn url(&mut self, value: String) -> &mut Self { self.url = Some(value); self } } + impl Default for SyntheticsCoreWebVitals { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_delete_tests_payload.rs b/src/datadogV1/model/model_synthetics_delete_tests_payload.rs index 0a2d976fd..0fd53683b 100644 --- a/src/datadogV1/model/model_synthetics_delete_tests_payload.rs +++ b/src/datadogV1/model/model_synthetics_delete_tests_payload.rs @@ -19,11 +19,12 @@ impl SyntheticsDeleteTestsPayload { SyntheticsDeleteTestsPayload { public_ids: None } } - pub fn with_public_ids(&mut self, value: Vec) -> &mut Self { + pub fn public_ids(&mut self, value: Vec) -> &mut Self { self.public_ids = Some(value); self } } + impl Default for SyntheticsDeleteTestsPayload { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_delete_tests_response.rs b/src/datadogV1/model/model_synthetics_delete_tests_response.rs index 1d07256e0..a0326d56b 100644 --- a/src/datadogV1/model/model_synthetics_delete_tests_response.rs +++ b/src/datadogV1/model/model_synthetics_delete_tests_response.rs @@ -21,7 +21,7 @@ impl SyntheticsDeleteTestsResponse { } } - pub fn with_deleted_tests( + pub fn deleted_tests( &mut self, value: Vec, ) -> &mut Self { @@ -29,6 +29,7 @@ impl SyntheticsDeleteTestsResponse { self } } + impl Default for SyntheticsDeleteTestsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_deleted_test.rs b/src/datadogV1/model/model_synthetics_deleted_test.rs index 80875d417..89d9a685c 100644 --- a/src/datadogV1/model/model_synthetics_deleted_test.rs +++ b/src/datadogV1/model/model_synthetics_deleted_test.rs @@ -25,16 +25,17 @@ impl SyntheticsDeletedTest { } } - pub fn with_deleted_at(&mut self, value: String) -> &mut Self { + pub fn deleted_at(&mut self, value: String) -> &mut Self { self.deleted_at = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for SyntheticsDeletedTest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_device.rs b/src/datadogV1/model/model_synthetics_device.rs index 48541ad41..64de6f01f 100644 --- a/src/datadogV1/model/model_synthetics_device.rs +++ b/src/datadogV1/model/model_synthetics_device.rs @@ -41,7 +41,7 @@ impl SyntheticsDevice { } } - pub fn with_is_mobile(&mut self, value: bool) -> &mut Self { + pub fn is_mobile(&mut self, value: bool) -> &mut Self { self.is_mobile = Some(value); self } diff --git a/src/datadogV1/model/model_synthetics_get_api_test_latest_results_response.rs b/src/datadogV1/model/model_synthetics_get_api_test_latest_results_response.rs index d3181056d..11a644ad0 100644 --- a/src/datadogV1/model/model_synthetics_get_api_test_latest_results_response.rs +++ b/src/datadogV1/model/model_synthetics_get_api_test_latest_results_response.rs @@ -24,12 +24,12 @@ impl SyntheticsGetAPITestLatestResultsResponse { } } - pub fn with_last_timestamp_fetched(&mut self, value: i64) -> &mut Self { + pub fn last_timestamp_fetched(&mut self, value: i64) -> &mut Self { self.last_timestamp_fetched = Some(value); self } - pub fn with_results( + pub fn results( &mut self, value: Vec, ) -> &mut Self { @@ -37,6 +37,7 @@ impl SyntheticsGetAPITestLatestResultsResponse { self } } + impl Default for SyntheticsGetAPITestLatestResultsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_get_browser_test_latest_results_response.rs b/src/datadogV1/model/model_synthetics_get_browser_test_latest_results_response.rs index 3c6e08270..0d669cf96 100644 --- a/src/datadogV1/model/model_synthetics_get_browser_test_latest_results_response.rs +++ b/src/datadogV1/model/model_synthetics_get_browser_test_latest_results_response.rs @@ -24,12 +24,12 @@ impl SyntheticsGetBrowserTestLatestResultsResponse { } } - pub fn with_last_timestamp_fetched(&mut self, value: i64) -> &mut Self { + pub fn last_timestamp_fetched(&mut self, value: i64) -> &mut Self { self.last_timestamp_fetched = Some(value); self } - pub fn with_results( + pub fn results( &mut self, value: Vec, ) -> &mut Self { @@ -37,6 +37,7 @@ impl SyntheticsGetBrowserTestLatestResultsResponse { self } } + impl Default for SyntheticsGetBrowserTestLatestResultsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_global_variable.rs b/src/datadogV1/model/model_synthetics_global_variable.rs index fa383641a..789621ec8 100644 --- a/src/datadogV1/model/model_synthetics_global_variable.rs +++ b/src/datadogV1/model/model_synthetics_global_variable.rs @@ -54,7 +54,7 @@ impl SyntheticsGlobalVariable { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV1::model::SyntheticsGlobalVariableAttributes, ) -> &mut Self { @@ -62,12 +62,12 @@ impl SyntheticsGlobalVariable { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_parse_test_options( + pub fn parse_test_options( &mut self, value: crate::datadogV1::model::SyntheticsGlobalVariableParseTestOptions, ) -> &mut Self { @@ -75,7 +75,7 @@ impl SyntheticsGlobalVariable { self } - pub fn with_parse_test_public_id(&mut self, value: String) -> &mut Self { + pub fn parse_test_public_id(&mut self, value: String) -> &mut Self { self.parse_test_public_id = Some(value); self } diff --git a/src/datadogV1/model/model_synthetics_global_variable_attributes.rs b/src/datadogV1/model/model_synthetics_global_variable_attributes.rs index fcf6b02dc..e92d28922 100644 --- a/src/datadogV1/model/model_synthetics_global_variable_attributes.rs +++ b/src/datadogV1/model/model_synthetics_global_variable_attributes.rs @@ -20,11 +20,12 @@ impl SyntheticsGlobalVariableAttributes { } } - pub fn with_restricted_roles(&mut self, value: Vec) -> &mut Self { + pub fn restricted_roles(&mut self, value: Vec) -> &mut Self { self.restricted_roles = Some(value); self } } + impl Default for SyntheticsGlobalVariableAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_global_variable_options.rs b/src/datadogV1/model/model_synthetics_global_variable_options.rs index 894b84c77..2f0c70e68 100644 --- a/src/datadogV1/model/model_synthetics_global_variable_options.rs +++ b/src/datadogV1/model/model_synthetics_global_variable_options.rs @@ -20,7 +20,7 @@ impl SyntheticsGlobalVariableOptions { } } - pub fn with_totp_parameters( + pub fn totp_parameters( &mut self, value: crate::datadogV1::model::SyntheticsGlobalVariableTOTPParameters, ) -> &mut Self { @@ -28,6 +28,7 @@ impl SyntheticsGlobalVariableOptions { self } } + impl Default for SyntheticsGlobalVariableOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_global_variable_parse_test_options.rs b/src/datadogV1/model/model_synthetics_global_variable_parse_test_options.rs index 524fe47b1..766069559 100644 --- a/src/datadogV1/model/model_synthetics_global_variable_parse_test_options.rs +++ b/src/datadogV1/model/model_synthetics_global_variable_parse_test_options.rs @@ -34,17 +34,17 @@ impl SyntheticsGlobalVariableParseTestOptions { } } - pub fn with_field(&mut self, value: String) -> &mut Self { + pub fn field(&mut self, value: String) -> &mut Self { self.field = Some(value); self } - pub fn with_local_variable_name(&mut self, value: String) -> &mut Self { + pub fn local_variable_name(&mut self, value: String) -> &mut Self { self.local_variable_name = Some(value); self } - pub fn with_parser( + pub fn parser( &mut self, value: crate::datadogV1::model::SyntheticsVariableParser, ) -> &mut Self { diff --git a/src/datadogV1/model/model_synthetics_global_variable_totp_parameters.rs b/src/datadogV1/model/model_synthetics_global_variable_totp_parameters.rs index 7f02c1063..7a87f87f9 100644 --- a/src/datadogV1/model/model_synthetics_global_variable_totp_parameters.rs +++ b/src/datadogV1/model/model_synthetics_global_variable_totp_parameters.rs @@ -24,16 +24,17 @@ impl SyntheticsGlobalVariableTOTPParameters { } } - pub fn with_digits(&mut self, value: i32) -> &mut Self { + pub fn digits(&mut self, value: i32) -> &mut Self { self.digits = Some(value); self } - pub fn with_refresh_interval(&mut self, value: i32) -> &mut Self { + pub fn refresh_interval(&mut self, value: i32) -> &mut Self { self.refresh_interval = Some(value); self } } + impl Default for SyntheticsGlobalVariableTOTPParameters { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_global_variable_value.rs b/src/datadogV1/model/model_synthetics_global_variable_value.rs index fc47fd45c..0751648cf 100644 --- a/src/datadogV1/model/model_synthetics_global_variable_value.rs +++ b/src/datadogV1/model/model_synthetics_global_variable_value.rs @@ -29,7 +29,7 @@ impl SyntheticsGlobalVariableValue { } } - pub fn with_options( + pub fn options( &mut self, value: crate::datadogV1::model::SyntheticsGlobalVariableOptions, ) -> &mut Self { @@ -37,16 +37,17 @@ impl SyntheticsGlobalVariableValue { self } - pub fn with_secure(&mut self, value: bool) -> &mut Self { + pub fn secure(&mut self, value: bool) -> &mut Self { self.secure = Some(value); self } - pub fn with_value(&mut self, value: String) -> &mut Self { + pub fn value(&mut self, value: String) -> &mut Self { self.value = Some(value); self } } + impl Default for SyntheticsGlobalVariableValue { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_list_global_variables_response.rs b/src/datadogV1/model/model_synthetics_list_global_variables_response.rs index f13d644da..94a0101e5 100644 --- a/src/datadogV1/model/model_synthetics_list_global_variables_response.rs +++ b/src/datadogV1/model/model_synthetics_list_global_variables_response.rs @@ -18,7 +18,7 @@ impl SyntheticsListGlobalVariablesResponse { SyntheticsListGlobalVariablesResponse { variables: None } } - pub fn with_variables( + pub fn variables( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SyntheticsListGlobalVariablesResponse { self } } + impl Default for SyntheticsListGlobalVariablesResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_list_tests_response.rs b/src/datadogV1/model/model_synthetics_list_tests_response.rs index 4cec7a5b7..1431089cc 100644 --- a/src/datadogV1/model/model_synthetics_list_tests_response.rs +++ b/src/datadogV1/model/model_synthetics_list_tests_response.rs @@ -18,7 +18,7 @@ impl SyntheticsListTestsResponse { SyntheticsListTestsResponse { tests: None } } - pub fn with_tests( + pub fn tests( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SyntheticsListTestsResponse { self } } + impl Default for SyntheticsListTestsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_location.rs b/src/datadogV1/model/model_synthetics_location.rs index c5e469396..89331ddbf 100644 --- a/src/datadogV1/model/model_synthetics_location.rs +++ b/src/datadogV1/model/model_synthetics_location.rs @@ -25,16 +25,17 @@ impl SyntheticsLocation { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } } + impl Default for SyntheticsLocation { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_locations.rs b/src/datadogV1/model/model_synthetics_locations.rs index 061e2b254..b7ce7fdff 100644 --- a/src/datadogV1/model/model_synthetics_locations.rs +++ b/src/datadogV1/model/model_synthetics_locations.rs @@ -18,7 +18,7 @@ impl SyntheticsLocations { SyntheticsLocations { locations: None } } - pub fn with_locations( + pub fn locations( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SyntheticsLocations { self } } + impl Default for SyntheticsLocations { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_parsing_options.rs b/src/datadogV1/model/model_synthetics_parsing_options.rs index 22445e61a..670d934c1 100644 --- a/src/datadogV1/model/model_synthetics_parsing_options.rs +++ b/src/datadogV1/model/model_synthetics_parsing_options.rs @@ -36,17 +36,17 @@ impl SyntheticsParsingOptions { } } - pub fn with_field(&mut self, value: String) -> &mut Self { + pub fn field(&mut self, value: String) -> &mut Self { self.field = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_parser( + pub fn parser( &mut self, value: crate::datadogV1::model::SyntheticsVariableParser, ) -> &mut Self { @@ -54,12 +54,12 @@ impl SyntheticsParsingOptions { self } - pub fn with_secure(&mut self, value: bool) -> &mut Self { + pub fn secure(&mut self, value: bool) -> &mut Self { self.secure = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV1::model::SyntheticsGlobalVariableParseTestOptionsType, ) -> &mut Self { @@ -67,6 +67,7 @@ impl SyntheticsParsingOptions { self } } + impl Default for SyntheticsParsingOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_patch_test_body.rs b/src/datadogV1/model/model_synthetics_patch_test_body.rs index d64e0efbc..8479b8323 100644 --- a/src/datadogV1/model/model_synthetics_patch_test_body.rs +++ b/src/datadogV1/model/model_synthetics_patch_test_body.rs @@ -18,7 +18,7 @@ impl SyntheticsPatchTestBody { SyntheticsPatchTestBody { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SyntheticsPatchTestBody { self } } + impl Default for SyntheticsPatchTestBody { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_patch_test_operation.rs b/src/datadogV1/model/model_synthetics_patch_test_operation.rs index 602a4a0e0..8dff46cfe 100644 --- a/src/datadogV1/model/model_synthetics_patch_test_operation.rs +++ b/src/datadogV1/model/model_synthetics_patch_test_operation.rs @@ -28,7 +28,7 @@ impl SyntheticsPatchTestOperation { } } - pub fn with_op( + pub fn op( &mut self, value: crate::datadogV1::model::SyntheticsPatchTestOperationName, ) -> &mut Self { @@ -36,16 +36,17 @@ impl SyntheticsPatchTestOperation { self } - pub fn with_path(&mut self, value: String) -> &mut Self { + pub fn path(&mut self, value: String) -> &mut Self { self.path = Some(value); self } - pub fn with_value(&mut self, value: serde_json::Value) -> &mut Self { + pub fn value(&mut self, value: serde_json::Value) -> &mut Self { self.value = Some(value); self } } + impl Default for SyntheticsPatchTestOperation { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_private_location.rs b/src/datadogV1/model/model_synthetics_private_location.rs index d836725ad..d64539a10 100644 --- a/src/datadogV1/model/model_synthetics_private_location.rs +++ b/src/datadogV1/model/model_synthetics_private_location.rs @@ -40,12 +40,12 @@ impl SyntheticsPrivateLocation { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_metadata( + pub fn metadata( &mut self, value: crate::datadogV1::model::SyntheticsPrivateLocationMetadata, ) -> &mut Self { @@ -53,7 +53,7 @@ impl SyntheticsPrivateLocation { self } - pub fn with_secrets( + pub fn secrets( &mut self, value: crate::datadogV1::model::SyntheticsPrivateLocationSecrets, ) -> &mut Self { diff --git a/src/datadogV1/model/model_synthetics_private_location_creation_response.rs b/src/datadogV1/model/model_synthetics_private_location_creation_response.rs index cb3a8a93e..cd4c53273 100644 --- a/src/datadogV1/model/model_synthetics_private_location_creation_response.rs +++ b/src/datadogV1/model/model_synthetics_private_location_creation_response.rs @@ -29,7 +29,7 @@ impl SyntheticsPrivateLocationCreationResponse { } } - pub fn with_config( + pub fn config( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -37,7 +37,7 @@ impl SyntheticsPrivateLocationCreationResponse { self } - pub fn with_private_location( + pub fn private_location( &mut self, value: crate::datadogV1::model::SyntheticsPrivateLocation, ) -> &mut Self { @@ -45,7 +45,7 @@ impl SyntheticsPrivateLocationCreationResponse { self } - pub fn with_result_encryption( + pub fn result_encryption( &mut self, value: crate::datadogV1::model::SyntheticsPrivateLocationCreationResponseResultEncryption, ) -> &mut Self { @@ -53,6 +53,7 @@ impl SyntheticsPrivateLocationCreationResponse { self } } + impl Default for SyntheticsPrivateLocationCreationResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_private_location_creation_response_result_encryption.rs b/src/datadogV1/model/model_synthetics_private_location_creation_response_result_encryption.rs index f8dd801ec..77c6ef1d2 100644 --- a/src/datadogV1/model/model_synthetics_private_location_creation_response_result_encryption.rs +++ b/src/datadogV1/model/model_synthetics_private_location_creation_response_result_encryption.rs @@ -24,16 +24,17 @@ impl SyntheticsPrivateLocationCreationResponseResultEncryption { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_key(&mut self, value: String) -> &mut Self { + pub fn key(&mut self, value: String) -> &mut Self { self.key = Some(value); self } } + impl Default for SyntheticsPrivateLocationCreationResponseResultEncryption { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_private_location_metadata.rs b/src/datadogV1/model/model_synthetics_private_location_metadata.rs index 329aedb65..062829989 100644 --- a/src/datadogV1/model/model_synthetics_private_location_metadata.rs +++ b/src/datadogV1/model/model_synthetics_private_location_metadata.rs @@ -20,11 +20,12 @@ impl SyntheticsPrivateLocationMetadata { } } - pub fn with_restricted_roles(&mut self, value: Vec) -> &mut Self { + pub fn restricted_roles(&mut self, value: Vec) -> &mut Self { self.restricted_roles = Some(value); self } } + impl Default for SyntheticsPrivateLocationMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_private_location_secrets.rs b/src/datadogV1/model/model_synthetics_private_location_secrets.rs index 6122a8173..89fbaf96c 100644 --- a/src/datadogV1/model/model_synthetics_private_location_secrets.rs +++ b/src/datadogV1/model/model_synthetics_private_location_secrets.rs @@ -26,7 +26,7 @@ impl SyntheticsPrivateLocationSecrets { } } - pub fn with_authentication( + pub fn authentication( &mut self, value: crate::datadogV1::model::SyntheticsPrivateLocationSecretsAuthentication, ) -> &mut Self { @@ -34,7 +34,7 @@ impl SyntheticsPrivateLocationSecrets { self } - pub fn with_config_decryption( + pub fn config_decryption( &mut self, value: crate::datadogV1::model::SyntheticsPrivateLocationSecretsConfigDecryption, ) -> &mut Self { @@ -42,6 +42,7 @@ impl SyntheticsPrivateLocationSecrets { self } } + impl Default for SyntheticsPrivateLocationSecrets { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_private_location_secrets_authentication.rs b/src/datadogV1/model/model_synthetics_private_location_secrets_authentication.rs index 530b89efe..c53dc00dc 100644 --- a/src/datadogV1/model/model_synthetics_private_location_secrets_authentication.rs +++ b/src/datadogV1/model/model_synthetics_private_location_secrets_authentication.rs @@ -24,16 +24,17 @@ impl SyntheticsPrivateLocationSecretsAuthentication { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_key(&mut self, value: String) -> &mut Self { + pub fn key(&mut self, value: String) -> &mut Self { self.key = Some(value); self } } + impl Default for SyntheticsPrivateLocationSecretsAuthentication { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_private_location_secrets_config_decryption.rs b/src/datadogV1/model/model_synthetics_private_location_secrets_config_decryption.rs index cf7803c52..1f7f24e9d 100644 --- a/src/datadogV1/model/model_synthetics_private_location_secrets_config_decryption.rs +++ b/src/datadogV1/model/model_synthetics_private_location_secrets_config_decryption.rs @@ -18,11 +18,12 @@ impl SyntheticsPrivateLocationSecretsConfigDecryption { SyntheticsPrivateLocationSecretsConfigDecryption { key: None } } - pub fn with_key(&mut self, value: String) -> &mut Self { + pub fn key(&mut self, value: String) -> &mut Self { self.key = Some(value); self } } + impl Default for SyntheticsPrivateLocationSecretsConfigDecryption { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_ssl_certificate.rs b/src/datadogV1/model/model_synthetics_ssl_certificate.rs index 4aaf9630e..f254eaca6 100644 --- a/src/datadogV1/model/model_synthetics_ssl_certificate.rs +++ b/src/datadogV1/model/model_synthetics_ssl_certificate.rs @@ -64,32 +64,32 @@ impl SyntheticsSSLCertificate { } } - pub fn with_cipher(&mut self, value: String) -> &mut Self { + pub fn cipher(&mut self, value: String) -> &mut Self { self.cipher = Some(value); self } - pub fn with_exponent(&mut self, value: f64) -> &mut Self { + pub fn exponent(&mut self, value: f64) -> &mut Self { self.exponent = Some(value); self } - pub fn with_ext_key_usage(&mut self, value: Vec) -> &mut Self { + pub fn ext_key_usage(&mut self, value: Vec) -> &mut Self { self.ext_key_usage = Some(value); self } - pub fn with_fingerprint(&mut self, value: String) -> &mut Self { + pub fn fingerprint(&mut self, value: String) -> &mut Self { self.fingerprint = Some(value); self } - pub fn with_fingerprint256(&mut self, value: String) -> &mut Self { + pub fn fingerprint256(&mut self, value: String) -> &mut Self { self.fingerprint256 = Some(value); self } - pub fn with_issuer( + pub fn issuer( &mut self, value: crate::datadogV1::model::SyntheticsSSLCertificateIssuer, ) -> &mut Self { @@ -97,22 +97,22 @@ impl SyntheticsSSLCertificate { self } - pub fn with_modulus(&mut self, value: String) -> &mut Self { + pub fn modulus(&mut self, value: String) -> &mut Self { self.modulus = Some(value); self } - pub fn with_protocol(&mut self, value: String) -> &mut Self { + pub fn protocol(&mut self, value: String) -> &mut Self { self.protocol = Some(value); self } - pub fn with_serial_number(&mut self, value: String) -> &mut Self { + pub fn serial_number(&mut self, value: String) -> &mut Self { self.serial_number = Some(value); self } - pub fn with_subject( + pub fn subject( &mut self, value: crate::datadogV1::model::SyntheticsSSLCertificateSubject, ) -> &mut Self { @@ -120,16 +120,17 @@ impl SyntheticsSSLCertificate { self } - pub fn with_valid_from(&mut self, value: String) -> &mut Self { + pub fn valid_from(&mut self, value: String) -> &mut Self { self.valid_from = Some(value); self } - pub fn with_valid_to(&mut self, value: String) -> &mut Self { + pub fn valid_to(&mut self, value: String) -> &mut Self { self.valid_to = Some(value); self } } + impl Default for SyntheticsSSLCertificate { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_ssl_certificate_issuer.rs b/src/datadogV1/model/model_synthetics_ssl_certificate_issuer.rs index e8d4d6a0d..8dbfb7e32 100644 --- a/src/datadogV1/model/model_synthetics_ssl_certificate_issuer.rs +++ b/src/datadogV1/model/model_synthetics_ssl_certificate_issuer.rs @@ -40,36 +40,37 @@ impl SyntheticsSSLCertificateIssuer { } } - pub fn with_c(&mut self, value: String) -> &mut Self { + pub fn c(&mut self, value: String) -> &mut Self { self.c = Some(value); self } - pub fn with_cn(&mut self, value: String) -> &mut Self { + pub fn cn(&mut self, value: String) -> &mut Self { self.cn = Some(value); self } - pub fn with_l(&mut self, value: String) -> &mut Self { + pub fn l(&mut self, value: String) -> &mut Self { self.l = Some(value); self } - pub fn with_o(&mut self, value: String) -> &mut Self { + pub fn o(&mut self, value: String) -> &mut Self { self.o = Some(value); self } - pub fn with_ou(&mut self, value: String) -> &mut Self { + pub fn ou(&mut self, value: String) -> &mut Self { self.ou = Some(value); self } - pub fn with_st(&mut self, value: String) -> &mut Self { + pub fn st(&mut self, value: String) -> &mut Self { self.st = Some(value); self } } + impl Default for SyntheticsSSLCertificateIssuer { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_ssl_certificate_subject.rs b/src/datadogV1/model/model_synthetics_ssl_certificate_subject.rs index 80bee3439..d78b2b045 100644 --- a/src/datadogV1/model/model_synthetics_ssl_certificate_subject.rs +++ b/src/datadogV1/model/model_synthetics_ssl_certificate_subject.rs @@ -44,41 +44,42 @@ impl SyntheticsSSLCertificateSubject { } } - pub fn with_c(&mut self, value: String) -> &mut Self { + pub fn c(&mut self, value: String) -> &mut Self { self.c = Some(value); self } - pub fn with_cn(&mut self, value: String) -> &mut Self { + pub fn cn(&mut self, value: String) -> &mut Self { self.cn = Some(value); self } - pub fn with_l(&mut self, value: String) -> &mut Self { + pub fn l(&mut self, value: String) -> &mut Self { self.l = Some(value); self } - pub fn with_o(&mut self, value: String) -> &mut Self { + pub fn o(&mut self, value: String) -> &mut Self { self.o = Some(value); self } - pub fn with_ou(&mut self, value: String) -> &mut Self { + pub fn ou(&mut self, value: String) -> &mut Self { self.ou = Some(value); self } - pub fn with_st(&mut self, value: String) -> &mut Self { + pub fn st(&mut self, value: String) -> &mut Self { self.st = Some(value); self } - pub fn with_alt_name(&mut self, value: String) -> &mut Self { + pub fn alt_name(&mut self, value: String) -> &mut Self { self.alt_name = Some(value); self } } + impl Default for SyntheticsSSLCertificateSubject { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_step.rs b/src/datadogV1/model/model_synthetics_step.rs index b0cdf3248..e8d33f05b 100644 --- a/src/datadogV1/model/model_synthetics_step.rs +++ b/src/datadogV1/model/model_synthetics_step.rs @@ -44,27 +44,27 @@ impl SyntheticsStep { } } - pub fn with_allow_failure(&mut self, value: bool) -> &mut Self { + pub fn allow_failure(&mut self, value: bool) -> &mut Self { self.allow_failure = Some(value); self } - pub fn with_is_critical(&mut self, value: bool) -> &mut Self { + pub fn is_critical(&mut self, value: bool) -> &mut Self { self.is_critical = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_no_screenshot(&mut self, value: bool) -> &mut Self { + pub fn no_screenshot(&mut self, value: bool) -> &mut Self { self.no_screenshot = Some(value); self } - pub fn with_params( + pub fn params( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -72,16 +72,17 @@ impl SyntheticsStep { self } - pub fn with_timeout(&mut self, value: i64) -> &mut Self { + pub fn timeout(&mut self, value: i64) -> &mut Self { self.timeout = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV1::model::SyntheticsStepType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV1::model::SyntheticsStepType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for SyntheticsStep { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_step_detail.rs b/src/datadogV1/model/model_synthetics_step_detail.rs index 7218fd629..b057a0f1f 100644 --- a/src/datadogV1/model/model_synthetics_step_detail.rs +++ b/src/datadogV1/model/model_synthetics_step_detail.rs @@ -85,7 +85,7 @@ impl SyntheticsStepDetail { } } - pub fn with_browser_errors( + pub fn browser_errors( &mut self, value: Vec, ) -> &mut Self { @@ -93,30 +93,27 @@ impl SyntheticsStepDetail { self } - pub fn with_check_type( - &mut self, - value: crate::datadogV1::model::SyntheticsCheckType, - ) -> &mut Self { + pub fn check_type(&mut self, value: crate::datadogV1::model::SyntheticsCheckType) -> &mut Self { self.check_type = Some(value); self } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_duration(&mut self, value: f64) -> &mut Self { + pub fn duration(&mut self, value: f64) -> &mut Self { self.duration = Some(value); self } - pub fn with_error(&mut self, value: String) -> &mut Self { + pub fn error(&mut self, value: String) -> &mut Self { self.error = Some(value); self } - pub fn with_playing_tab( + pub fn playing_tab( &mut self, value: crate::datadogV1::model::SyntheticsPlayingTab, ) -> &mut Self { @@ -124,27 +121,27 @@ impl SyntheticsStepDetail { self } - pub fn with_screenshot_bucket_key(&mut self, value: bool) -> &mut Self { + pub fn screenshot_bucket_key(&mut self, value: bool) -> &mut Self { self.screenshot_bucket_key = Some(value); self } - pub fn with_skipped(&mut self, value: bool) -> &mut Self { + pub fn skipped(&mut self, value: bool) -> &mut Self { self.skipped = Some(value); self } - pub fn with_snapshot_bucket_key(&mut self, value: bool) -> &mut Self { + pub fn snapshot_bucket_key(&mut self, value: bool) -> &mut Self { self.snapshot_bucket_key = Some(value); self } - pub fn with_step_id(&mut self, value: i64) -> &mut Self { + pub fn step_id(&mut self, value: i64) -> &mut Self { self.step_id = Some(value); self } - pub fn with_sub_test_step_details( + pub fn sub_test_step_details( &mut self, value: Vec, ) -> &mut Self { @@ -152,27 +149,27 @@ impl SyntheticsStepDetail { self } - pub fn with_time_to_interactive(&mut self, value: f64) -> &mut Self { + pub fn time_to_interactive(&mut self, value: f64) -> &mut Self { self.time_to_interactive = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV1::model::SyntheticsStepType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV1::model::SyntheticsStepType) -> &mut Self { self.type_ = Some(value); self } - pub fn with_url(&mut self, value: String) -> &mut Self { + pub fn url(&mut self, value: String) -> &mut Self { self.url = Some(value); self } - pub fn with_value(&mut self, value: serde_json::Value) -> &mut Self { + pub fn value(&mut self, value: serde_json::Value) -> &mut Self { self.value = Some(value); self } - pub fn with_vitals_metrics( + pub fn vitals_metrics( &mut self, value: Vec, ) -> &mut Self { @@ -180,7 +177,7 @@ impl SyntheticsStepDetail { self } - pub fn with_warnings( + pub fn warnings( &mut self, value: Vec, ) -> &mut Self { @@ -188,6 +185,7 @@ impl SyntheticsStepDetail { self } } + impl Default for SyntheticsStepDetail { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_test_ci_options.rs b/src/datadogV1/model/model_synthetics_test_ci_options.rs index af17e2503..8fe11df11 100644 --- a/src/datadogV1/model/model_synthetics_test_ci_options.rs +++ b/src/datadogV1/model/model_synthetics_test_ci_options.rs @@ -20,7 +20,7 @@ impl SyntheticsTestCiOptions { } } - pub fn with_execution_rule( + pub fn execution_rule( &mut self, value: crate::datadogV1::model::SyntheticsTestExecutionRule, ) -> &mut Self { @@ -28,6 +28,7 @@ impl SyntheticsTestCiOptions { self } } + impl Default for SyntheticsTestCiOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_test_config.rs b/src/datadogV1/model/model_synthetics_test_config.rs index c57b402f8..5df333a96 100644 --- a/src/datadogV1/model/model_synthetics_test_config.rs +++ b/src/datadogV1/model/model_synthetics_test_config.rs @@ -32,7 +32,7 @@ impl SyntheticsTestConfig { } } - pub fn with_assertions( + pub fn assertions( &mut self, value: Vec, ) -> &mut Self { @@ -40,7 +40,7 @@ impl SyntheticsTestConfig { self } - pub fn with_config_variables( + pub fn config_variables( &mut self, value: Vec, ) -> &mut Self { @@ -48,15 +48,12 @@ impl SyntheticsTestConfig { self } - pub fn with_request( - &mut self, - value: crate::datadogV1::model::SyntheticsTestRequest, - ) -> &mut Self { + pub fn request(&mut self, value: crate::datadogV1::model::SyntheticsTestRequest) -> &mut Self { self.request = Some(value); self } - pub fn with_variables( + pub fn variables( &mut self, value: Vec, ) -> &mut Self { @@ -64,6 +61,7 @@ impl SyntheticsTestConfig { self } } + impl Default for SyntheticsTestConfig { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_test_details.rs b/src/datadogV1/model/model_synthetics_test_details.rs index 9111a22d7..24b2562a2 100644 --- a/src/datadogV1/model/model_synthetics_test_details.rs +++ b/src/datadogV1/model/model_synthetics_test_details.rs @@ -70,53 +70,47 @@ impl SyntheticsTestDetails { } } - pub fn with_config( - &mut self, - value: crate::datadogV1::model::SyntheticsTestConfig, - ) -> &mut Self { + pub fn config(&mut self, value: crate::datadogV1::model::SyntheticsTestConfig) -> &mut Self { self.config = Some(value); self } - pub fn with_creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + pub fn creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { self.creator = Some(value); self } - pub fn with_locations(&mut self, value: Vec) -> &mut Self { + pub fn locations(&mut self, value: Vec) -> &mut Self { self.locations = Some(value); self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } - pub fn with_monitor_id(&mut self, value: i64) -> &mut Self { + pub fn monitor_id(&mut self, value: i64) -> &mut Self { self.monitor_id = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_options( - &mut self, - value: crate::datadogV1::model::SyntheticsTestOptions, - ) -> &mut Self { + pub fn options(&mut self, value: crate::datadogV1::model::SyntheticsTestOptions) -> &mut Self { self.options = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_status( + pub fn status( &mut self, value: crate::datadogV1::model::SyntheticsTestPauseStatus, ) -> &mut Self { @@ -124,12 +118,12 @@ impl SyntheticsTestDetails { self } - pub fn with_steps(&mut self, value: Vec) -> &mut Self { + pub fn steps(&mut self, value: Vec) -> &mut Self { self.steps = Some(value); self } - pub fn with_subtype( + pub fn subtype( &mut self, value: crate::datadogV1::model::SyntheticsTestDetailsSubType, ) -> &mut Self { @@ -137,12 +131,12 @@ impl SyntheticsTestDetails { self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV1::model::SyntheticsTestDetailsType, ) -> &mut Self { @@ -150,6 +144,7 @@ impl SyntheticsTestDetails { self } } + impl Default for SyntheticsTestDetails { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_test_options.rs b/src/datadogV1/model/model_synthetics_test_options.rs index d7b8b4a10..c6ad169f6 100644 --- a/src/datadogV1/model/model_synthetics_test_options.rs +++ b/src/datadogV1/model/model_synthetics_test_options.rs @@ -117,30 +117,27 @@ impl SyntheticsTestOptions { } } - pub fn with_accept_self_signed(&mut self, value: bool) -> &mut Self { + pub fn accept_self_signed(&mut self, value: bool) -> &mut Self { self.accept_self_signed = Some(value); self } - pub fn with_allow_insecure(&mut self, value: bool) -> &mut Self { + pub fn allow_insecure(&mut self, value: bool) -> &mut Self { self.allow_insecure = Some(value); self } - pub fn with_check_certificate_revocation(&mut self, value: bool) -> &mut Self { + pub fn check_certificate_revocation(&mut self, value: bool) -> &mut Self { self.check_certificate_revocation = Some(value); self } - pub fn with_ci( - &mut self, - value: crate::datadogV1::model::SyntheticsTestCiOptions, - ) -> &mut Self { + pub fn ci(&mut self, value: crate::datadogV1::model::SyntheticsTestCiOptions) -> &mut Self { self.ci = Some(value); self } - pub fn with_device_ids( + pub fn device_ids( &mut self, value: Vec, ) -> &mut Self { @@ -148,22 +145,22 @@ impl SyntheticsTestOptions { self } - pub fn with_disable_cors(&mut self, value: bool) -> &mut Self { + pub fn disable_cors(&mut self, value: bool) -> &mut Self { self.disable_cors = Some(value); self } - pub fn with_disable_csp(&mut self, value: bool) -> &mut Self { + pub fn disable_csp(&mut self, value: bool) -> &mut Self { self.disable_csp = Some(value); self } - pub fn with_follow_redirects(&mut self, value: bool) -> &mut Self { + pub fn follow_redirects(&mut self, value: bool) -> &mut Self { self.follow_redirects = Some(value); self } - pub fn with_http_version( + pub fn http_version( &mut self, value: crate::datadogV1::model::SyntheticsTestOptionsHTTPVersion, ) -> &mut Self { @@ -171,32 +168,32 @@ impl SyntheticsTestOptions { self } - pub fn with_ignore_server_certificate_error(&mut self, value: bool) -> &mut Self { + pub fn ignore_server_certificate_error(&mut self, value: bool) -> &mut Self { self.ignore_server_certificate_error = Some(value); self } - pub fn with_initial_navigation_timeout(&mut self, value: i64) -> &mut Self { + pub fn initial_navigation_timeout(&mut self, value: i64) -> &mut Self { self.initial_navigation_timeout = Some(value); self } - pub fn with_min_failure_duration(&mut self, value: i64) -> &mut Self { + pub fn min_failure_duration(&mut self, value: i64) -> &mut Self { self.min_failure_duration = Some(value); self } - pub fn with_min_location_failed(&mut self, value: i64) -> &mut Self { + pub fn min_location_failed(&mut self, value: i64) -> &mut Self { self.min_location_failed = Some(value); self } - pub fn with_monitor_name(&mut self, value: String) -> &mut Self { + pub fn monitor_name(&mut self, value: String) -> &mut Self { self.monitor_name = Some(value); self } - pub fn with_monitor_options( + pub fn monitor_options( &mut self, value: crate::datadogV1::model::SyntheticsTestOptionsMonitorOptions, ) -> &mut Self { @@ -204,22 +201,22 @@ impl SyntheticsTestOptions { self } - pub fn with_monitor_priority(&mut self, value: i32) -> &mut Self { + pub fn monitor_priority(&mut self, value: i32) -> &mut Self { self.monitor_priority = Some(value); self } - pub fn with_no_screenshot(&mut self, value: bool) -> &mut Self { + pub fn no_screenshot(&mut self, value: bool) -> &mut Self { self.no_screenshot = Some(value); self } - pub fn with_restricted_roles(&mut self, value: Vec) -> &mut Self { + pub fn restricted_roles(&mut self, value: Vec) -> &mut Self { self.restricted_roles = Some(value); self } - pub fn with_retry( + pub fn retry( &mut self, value: crate::datadogV1::model::SyntheticsTestOptionsRetry, ) -> &mut Self { @@ -227,7 +224,7 @@ impl SyntheticsTestOptions { self } - pub fn with_rum_settings( + pub fn rum_settings( &mut self, value: crate::datadogV1::model::SyntheticsBrowserTestRumSettings, ) -> &mut Self { @@ -235,7 +232,7 @@ impl SyntheticsTestOptions { self } - pub fn with_scheduling( + pub fn scheduling( &mut self, value: crate::datadogV1::model::SyntheticsTestOptionsScheduling, ) -> &mut Self { @@ -243,11 +240,12 @@ impl SyntheticsTestOptions { self } - pub fn with_tick_every(&mut self, value: i64) -> &mut Self { + pub fn tick_every(&mut self, value: i64) -> &mut Self { self.tick_every = Some(value); self } } + impl Default for SyntheticsTestOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_test_options_monitor_options.rs b/src/datadogV1/model/model_synthetics_test_options_monitor_options.rs index 0d7761e21..287e2cd3b 100644 --- a/src/datadogV1/model/model_synthetics_test_options_monitor_options.rs +++ b/src/datadogV1/model/model_synthetics_test_options_monitor_options.rs @@ -22,11 +22,12 @@ impl SyntheticsTestOptionsMonitorOptions { } } - pub fn with_renotify_interval(&mut self, value: i64) -> &mut Self { + pub fn renotify_interval(&mut self, value: i64) -> &mut Self { self.renotify_interval = Some(value); self } } + impl Default for SyntheticsTestOptionsMonitorOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_test_options_retry.rs b/src/datadogV1/model/model_synthetics_test_options_retry.rs index 61e862f14..af229cbaf 100644 --- a/src/datadogV1/model/model_synthetics_test_options_retry.rs +++ b/src/datadogV1/model/model_synthetics_test_options_retry.rs @@ -26,16 +26,17 @@ impl SyntheticsTestOptionsRetry { } } - pub fn with_count(&mut self, value: i64) -> &mut Self { + pub fn count(&mut self, value: i64) -> &mut Self { self.count = Some(value); self } - pub fn with_interval(&mut self, value: f64) -> &mut Self { + pub fn interval(&mut self, value: f64) -> &mut Self { self.interval = Some(value); self } } + impl Default for SyntheticsTestOptionsRetry { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_test_options_scheduling.rs b/src/datadogV1/model/model_synthetics_test_options_scheduling.rs index 6d301759f..e43a95763 100644 --- a/src/datadogV1/model/model_synthetics_test_options_scheduling.rs +++ b/src/datadogV1/model/model_synthetics_test_options_scheduling.rs @@ -24,7 +24,7 @@ impl SyntheticsTestOptionsScheduling { } } - pub fn with_timeframes( + pub fn timeframes( &mut self, value: Vec, ) -> &mut Self { @@ -32,11 +32,12 @@ impl SyntheticsTestOptionsScheduling { self } - pub fn with_timezone(&mut self, value: String) -> &mut Self { + pub fn timezone(&mut self, value: String) -> &mut Self { self.timezone = Some(value); self } } + impl Default for SyntheticsTestOptionsScheduling { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_test_options_scheduling_timeframe.rs b/src/datadogV1/model/model_synthetics_test_options_scheduling_timeframe.rs index 1cc909a58..24b3eba48 100644 --- a/src/datadogV1/model/model_synthetics_test_options_scheduling_timeframe.rs +++ b/src/datadogV1/model/model_synthetics_test_options_scheduling_timeframe.rs @@ -28,21 +28,22 @@ impl SyntheticsTestOptionsSchedulingTimeframe { } } - pub fn with_day(&mut self, value: i32) -> &mut Self { + pub fn day(&mut self, value: i32) -> &mut Self { self.day = Some(value); self } - pub fn with_from(&mut self, value: String) -> &mut Self { + pub fn from(&mut self, value: String) -> &mut Self { self.from = Some(value); self } - pub fn with_to(&mut self, value: String) -> &mut Self { + pub fn to(&mut self, value: String) -> &mut Self { self.to = Some(value); self } } + impl Default for SyntheticsTestOptionsSchedulingTimeframe { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_test_request.rs b/src/datadogV1/model/model_synthetics_test_request.rs index e782e8fce..7c19fc136 100644 --- a/src/datadogV1/model/model_synthetics_test_request.rs +++ b/src/datadogV1/model/model_synthetics_test_request.rs @@ -126,25 +126,22 @@ impl SyntheticsTestRequest { } } - pub fn with_allow_insecure(&mut self, value: bool) -> &mut Self { + pub fn allow_insecure(&mut self, value: bool) -> &mut Self { self.allow_insecure = Some(value); self } - pub fn with_basic_auth( - &mut self, - value: crate::datadogV1::model::SyntheticsBasicAuth, - ) -> &mut Self { + pub fn basic_auth(&mut self, value: crate::datadogV1::model::SyntheticsBasicAuth) -> &mut Self { self.basic_auth = Some(value); self } - pub fn with_body(&mut self, value: String) -> &mut Self { + pub fn body(&mut self, value: String) -> &mut Self { self.body = Some(value); self } - pub fn with_body_type( + pub fn body_type( &mut self, value: crate::datadogV1::model::SyntheticsTestRequestBodyType, ) -> &mut Self { @@ -152,7 +149,7 @@ impl SyntheticsTestRequest { self } - pub fn with_call_type( + pub fn call_type( &mut self, value: crate::datadogV1::model::SyntheticsTestCallType, ) -> &mut Self { @@ -160,7 +157,7 @@ impl SyntheticsTestRequest { self } - pub fn with_certificate( + pub fn certificate( &mut self, value: crate::datadogV1::model::SyntheticsTestRequestCertificate, ) -> &mut Self { @@ -168,80 +165,77 @@ impl SyntheticsTestRequest { self } - pub fn with_certificate_domains(&mut self, value: Vec) -> &mut Self { + pub fn certificate_domains(&mut self, value: Vec) -> &mut Self { self.certificate_domains = Some(value); self } - pub fn with_compressed_json_descriptor(&mut self, value: String) -> &mut Self { + pub fn compressed_json_descriptor(&mut self, value: String) -> &mut Self { self.compressed_json_descriptor = Some(value); self } - pub fn with_dns_server(&mut self, value: String) -> &mut Self { + pub fn dns_server(&mut self, value: String) -> &mut Self { self.dns_server = Some(value); self } - pub fn with_dns_server_port(&mut self, value: i32) -> &mut Self { + pub fn dns_server_port(&mut self, value: i32) -> &mut Self { self.dns_server_port = Some(value); self } - pub fn with_follow_redirects(&mut self, value: bool) -> &mut Self { + pub fn follow_redirects(&mut self, value: bool) -> &mut Self { self.follow_redirects = Some(value); self } - pub fn with_headers(&mut self, value: std::collections::BTreeMap) -> &mut Self { + pub fn headers(&mut self, value: std::collections::BTreeMap) -> &mut Self { self.headers = Some(value); self } - pub fn with_host(&mut self, value: String) -> &mut Self { + pub fn host(&mut self, value: String) -> &mut Self { self.host = Some(value); self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } - pub fn with_metadata( - &mut self, - value: std::collections::BTreeMap, - ) -> &mut Self { + pub fn metadata(&mut self, value: std::collections::BTreeMap) -> &mut Self { self.metadata = Some(value); self } - pub fn with_method(&mut self, value: String) -> &mut Self { + pub fn method(&mut self, value: String) -> &mut Self { self.method = Some(value); self } - pub fn with_no_saving_response_body(&mut self, value: bool) -> &mut Self { + pub fn no_saving_response_body(&mut self, value: bool) -> &mut Self { self.no_saving_response_body = Some(value); self } - pub fn with_number_of_packets(&mut self, value: i32) -> &mut Self { + pub fn number_of_packets(&mut self, value: i32) -> &mut Self { self.number_of_packets = Some(value); self } - pub fn with_persist_cookies(&mut self, value: bool) -> &mut Self { + pub fn persist_cookies(&mut self, value: bool) -> &mut Self { self.persist_cookies = Some(value); self } - pub fn with_port(&mut self, value: i64) -> &mut Self { + pub fn port(&mut self, value: i64) -> &mut Self { self.port = Some(value); self } - pub fn with_proxy( + pub fn proxy( &mut self, value: crate::datadogV1::model::SyntheticsTestRequestProxy, ) -> &mut Self { @@ -249,7 +243,7 @@ impl SyntheticsTestRequest { self } - pub fn with_query( + pub fn query( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -257,31 +251,32 @@ impl SyntheticsTestRequest { self } - pub fn with_servername(&mut self, value: String) -> &mut Self { + pub fn servername(&mut self, value: String) -> &mut Self { self.servername = Some(value); self } - pub fn with_service(&mut self, value: String) -> &mut Self { + pub fn service(&mut self, value: String) -> &mut Self { self.service = Some(value); self } - pub fn with_should_track_hops(&mut self, value: bool) -> &mut Self { + pub fn should_track_hops(&mut self, value: bool) -> &mut Self { self.should_track_hops = Some(value); self } - pub fn with_timeout(&mut self, value: f64) -> &mut Self { + pub fn timeout(&mut self, value: f64) -> &mut Self { self.timeout = Some(value); self } - pub fn with_url(&mut self, value: String) -> &mut Self { + pub fn url(&mut self, value: String) -> &mut Self { self.url = Some(value); self } } + impl Default for SyntheticsTestRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_test_request_certificate.rs b/src/datadogV1/model/model_synthetics_test_request_certificate.rs index 9c5670a9d..b468e614a 100644 --- a/src/datadogV1/model/model_synthetics_test_request_certificate.rs +++ b/src/datadogV1/model/model_synthetics_test_request_certificate.rs @@ -24,7 +24,7 @@ impl SyntheticsTestRequestCertificate { } } - pub fn with_cert( + pub fn cert( &mut self, value: crate::datadogV1::model::SyntheticsTestRequestCertificateItem, ) -> &mut Self { @@ -32,7 +32,7 @@ impl SyntheticsTestRequestCertificate { self } - pub fn with_key( + pub fn key( &mut self, value: crate::datadogV1::model::SyntheticsTestRequestCertificateItem, ) -> &mut Self { @@ -40,6 +40,7 @@ impl SyntheticsTestRequestCertificate { self } } + impl Default for SyntheticsTestRequestCertificate { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_test_request_certificate_item.rs b/src/datadogV1/model/model_synthetics_test_request_certificate_item.rs index 6df51ee49..eeb28713e 100644 --- a/src/datadogV1/model/model_synthetics_test_request_certificate_item.rs +++ b/src/datadogV1/model/model_synthetics_test_request_certificate_item.rs @@ -28,21 +28,22 @@ impl SyntheticsTestRequestCertificateItem { } } - pub fn with_content(&mut self, value: String) -> &mut Self { + pub fn content(&mut self, value: String) -> &mut Self { self.content = Some(value); self } - pub fn with_filename(&mut self, value: String) -> &mut Self { + pub fn filename(&mut self, value: String) -> &mut Self { self.filename = Some(value); self } - pub fn with_updated_at(&mut self, value: String) -> &mut Self { + pub fn updated_at(&mut self, value: String) -> &mut Self { self.updated_at = Some(value); self } } + impl Default for SyntheticsTestRequestCertificateItem { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_test_request_proxy.rs b/src/datadogV1/model/model_synthetics_test_request_proxy.rs index 9342930e4..20b6c650c 100644 --- a/src/datadogV1/model/model_synthetics_test_request_proxy.rs +++ b/src/datadogV1/model/model_synthetics_test_request_proxy.rs @@ -21,7 +21,7 @@ impl SyntheticsTestRequestProxy { SyntheticsTestRequestProxy { headers: None, url } } - pub fn with_headers(&mut self, value: std::collections::BTreeMap) -> &mut Self { + pub fn headers(&mut self, value: std::collections::BTreeMap) -> &mut Self { self.headers = Some(value); self } diff --git a/src/datadogV1/model/model_synthetics_timing.rs b/src/datadogV1/model/model_synthetics_timing.rs index bc58d2734..bab44b05d 100644 --- a/src/datadogV1/model/model_synthetics_timing.rs +++ b/src/datadogV1/model/model_synthetics_timing.rs @@ -53,51 +53,52 @@ impl SyntheticsTiming { } } - pub fn with_dns(&mut self, value: f64) -> &mut Self { + pub fn dns(&mut self, value: f64) -> &mut Self { self.dns = Some(value); self } - pub fn with_download(&mut self, value: f64) -> &mut Self { + pub fn download(&mut self, value: f64) -> &mut Self { self.download = Some(value); self } - pub fn with_first_byte(&mut self, value: f64) -> &mut Self { + pub fn first_byte(&mut self, value: f64) -> &mut Self { self.first_byte = Some(value); self } - pub fn with_handshake(&mut self, value: f64) -> &mut Self { + pub fn handshake(&mut self, value: f64) -> &mut Self { self.handshake = Some(value); self } - pub fn with_redirect(&mut self, value: f64) -> &mut Self { + pub fn redirect(&mut self, value: f64) -> &mut Self { self.redirect = Some(value); self } - pub fn with_ssl(&mut self, value: f64) -> &mut Self { + pub fn ssl(&mut self, value: f64) -> &mut Self { self.ssl = Some(value); self } - pub fn with_tcp(&mut self, value: f64) -> &mut Self { + pub fn tcp(&mut self, value: f64) -> &mut Self { self.tcp = Some(value); self } - pub fn with_total(&mut self, value: f64) -> &mut Self { + pub fn total(&mut self, value: f64) -> &mut Self { self.total = Some(value); self } - pub fn with_wait(&mut self, value: f64) -> &mut Self { + pub fn wait(&mut self, value: f64) -> &mut Self { self.wait = Some(value); self } } + impl Default for SyntheticsTiming { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_trigger_ci_test_location.rs b/src/datadogV1/model/model_synthetics_trigger_ci_test_location.rs index 5b4e6d0b1..0120eea4d 100644 --- a/src/datadogV1/model/model_synthetics_trigger_ci_test_location.rs +++ b/src/datadogV1/model/model_synthetics_trigger_ci_test_location.rs @@ -24,16 +24,17 @@ impl SyntheticsTriggerCITestLocation { } } - pub fn with_id(&mut self, value: i64) -> &mut Self { + pub fn id(&mut self, value: i64) -> &mut Self { self.id = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } } + impl Default for SyntheticsTriggerCITestLocation { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_trigger_ci_test_run_result.rs b/src/datadogV1/model/model_synthetics_trigger_ci_test_run_result.rs index 3d6a7058e..5cc967546 100644 --- a/src/datadogV1/model/model_synthetics_trigger_ci_test_run_result.rs +++ b/src/datadogV1/model/model_synthetics_trigger_ci_test_run_result.rs @@ -32,26 +32,27 @@ impl SyntheticsTriggerCITestRunResult { } } - pub fn with_device(&mut self, value: crate::datadogV1::model::SyntheticsDeviceID) -> &mut Self { + pub fn device(&mut self, value: crate::datadogV1::model::SyntheticsDeviceID) -> &mut Self { self.device = Some(value); self } - pub fn with_location(&mut self, value: i64) -> &mut Self { + pub fn location(&mut self, value: i64) -> &mut Self { self.location = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_result_id(&mut self, value: String) -> &mut Self { + pub fn result_id(&mut self, value: String) -> &mut Self { self.result_id = Some(value); self } } + impl Default for SyntheticsTriggerCITestRunResult { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_trigger_ci_tests_response.rs b/src/datadogV1/model/model_synthetics_trigger_ci_tests_response.rs index 03258d793..b6c0e6437 100644 --- a/src/datadogV1/model/model_synthetics_trigger_ci_tests_response.rs +++ b/src/datadogV1/model/model_synthetics_trigger_ci_tests_response.rs @@ -36,12 +36,12 @@ impl SyntheticsTriggerCITestsResponse { } } - pub fn with_batch_id(&mut self, value: Option) -> &mut Self { + pub fn batch_id(&mut self, value: Option) -> &mut Self { self.batch_id = Some(value); self } - pub fn with_locations( + pub fn locations( &mut self, value: Vec, ) -> &mut Self { @@ -49,7 +49,7 @@ impl SyntheticsTriggerCITestsResponse { self } - pub fn with_results( + pub fn results( &mut self, value: Vec, ) -> &mut Self { @@ -57,11 +57,12 @@ impl SyntheticsTriggerCITestsResponse { self } - pub fn with_triggered_check_ids(&mut self, value: Vec) -> &mut Self { + pub fn triggered_check_ids(&mut self, value: Vec) -> &mut Self { self.triggered_check_ids = Some(value); self } } + impl Default for SyntheticsTriggerCITestsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_trigger_test.rs b/src/datadogV1/model/model_synthetics_trigger_test.rs index 7d278684a..a120998c9 100644 --- a/src/datadogV1/model/model_synthetics_trigger_test.rs +++ b/src/datadogV1/model/model_synthetics_trigger_test.rs @@ -24,7 +24,7 @@ impl SyntheticsTriggerTest { } } - pub fn with_metadata( + pub fn metadata( &mut self, value: crate::datadogV1::model::SyntheticsCIBatchMetadata, ) -> &mut Self { diff --git a/src/datadogV1/model/model_synthetics_update_test_pause_status_payload.rs b/src/datadogV1/model/model_synthetics_update_test_pause_status_payload.rs index f41660709..d68c84d28 100644 --- a/src/datadogV1/model/model_synthetics_update_test_pause_status_payload.rs +++ b/src/datadogV1/model/model_synthetics_update_test_pause_status_payload.rs @@ -19,7 +19,7 @@ impl SyntheticsUpdateTestPauseStatusPayload { SyntheticsUpdateTestPauseStatusPayload { new_status: None } } - pub fn with_new_status( + pub fn new_status( &mut self, value: crate::datadogV1::model::SyntheticsTestPauseStatus, ) -> &mut Self { @@ -27,6 +27,7 @@ impl SyntheticsUpdateTestPauseStatusPayload { self } } + impl Default for SyntheticsUpdateTestPauseStatusPayload { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_synthetics_variable_parser.rs b/src/datadogV1/model/model_synthetics_variable_parser.rs index 207a0fd16..43bb96435 100644 --- a/src/datadogV1/model/model_synthetics_variable_parser.rs +++ b/src/datadogV1/model/model_synthetics_variable_parser.rs @@ -23,7 +23,7 @@ impl SyntheticsVariableParser { SyntheticsVariableParser { type_, value: None } } - pub fn with_value(&mut self, value: String) -> &mut Self { + pub fn value(&mut self, value: String) -> &mut Self { self.value = Some(value); self } diff --git a/src/datadogV1/model/model_table_widget_definition.rs b/src/datadogV1/model/model_table_widget_definition.rs index 40456e26a..b2a1302a5 100644 --- a/src/datadogV1/model/model_table_widget_definition.rs +++ b/src/datadogV1/model/model_table_widget_definition.rs @@ -51,7 +51,7 @@ impl TableWidgetDefinition { } } - pub fn with_custom_links( + pub fn custom_links( &mut self, value: Vec, ) -> &mut Self { @@ -59,7 +59,7 @@ impl TableWidgetDefinition { self } - pub fn with_has_search_bar( + pub fn has_search_bar( &mut self, value: crate::datadogV1::model::TableWidgetHasSearchBar, ) -> &mut Self { @@ -67,25 +67,22 @@ impl TableWidgetDefinition { self } - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_table_widget_request.rs b/src/datadogV1/model/model_table_widget_request.rs index 51158ebad..ae592aecf 100644 --- a/src/datadogV1/model/model_table_widget_request.rs +++ b/src/datadogV1/model/model_table_widget_request.rs @@ -92,28 +92,22 @@ impl TableWidgetRequest { } } - pub fn with_aggregator( - &mut self, - value: crate::datadogV1::model::WidgetAggregator, - ) -> &mut Self { + pub fn aggregator(&mut self, value: crate::datadogV1::model::WidgetAggregator) -> &mut Self { self.aggregator = Some(value); self } - pub fn with_alias(&mut self, value: String) -> &mut Self { + pub fn alias(&mut self, value: String) -> &mut Self { self.alias = Some(value); self } - pub fn with_apm_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.apm_query = Some(value); self } - pub fn with_apm_stats_query( + pub fn apm_stats_query( &mut self, value: crate::datadogV1::model::ApmStatsQueryDefinition, ) -> &mut Self { @@ -121,7 +115,7 @@ impl TableWidgetRequest { self } - pub fn with_cell_display_mode( + pub fn cell_display_mode( &mut self, value: Vec, ) -> &mut Self { @@ -129,7 +123,7 @@ impl TableWidgetRequest { self } - pub fn with_conditional_formats( + pub fn conditional_formats( &mut self, value: Vec, ) -> &mut Self { @@ -137,36 +131,27 @@ impl TableWidgetRequest { self } - pub fn with_event_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn event_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.event_query = Some(value); self } - pub fn with_formulas( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn formulas(&mut self, value: Vec) -> &mut Self { self.formulas = Some(value); self } - pub fn with_limit(&mut self, value: i64) -> &mut Self { + pub fn limit(&mut self, value: i64) -> &mut Self { self.limit = Some(value); self } - pub fn with_log_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.log_query = Some(value); self } - pub fn with_network_query( + pub fn network_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -174,12 +159,12 @@ impl TableWidgetRequest { self } - pub fn with_order(&mut self, value: crate::datadogV1::model::WidgetSort) -> &mut Self { + pub fn order(&mut self, value: crate::datadogV1::model::WidgetSort) -> &mut Self { self.order = Some(value); self } - pub fn with_process_query( + pub fn process_query( &mut self, value: crate::datadogV1::model::ProcessQueryDefinition, ) -> &mut Self { @@ -187,7 +172,7 @@ impl TableWidgetRequest { self } - pub fn with_profile_metrics_query( + pub fn profile_metrics_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -195,12 +180,12 @@ impl TableWidgetRequest { self } - pub fn with_q(&mut self, value: String) -> &mut Self { + pub fn q(&mut self, value: String) -> &mut Self { self.q = Some(value); self } - pub fn with_queries( + pub fn queries( &mut self, value: Vec, ) -> &mut Self { @@ -208,7 +193,7 @@ impl TableWidgetRequest { self } - pub fn with_response_format( + pub fn response_format( &mut self, value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, ) -> &mut Self { @@ -216,15 +201,12 @@ impl TableWidgetRequest { self } - pub fn with_rum_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.rum_query = Some(value); self } - pub fn with_security_query( + pub fn security_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -232,6 +214,7 @@ impl TableWidgetRequest { self } } + impl Default for TableWidgetRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_tag_to_hosts.rs b/src/datadogV1/model/model_tag_to_hosts.rs index cec218c2e..276785992 100644 --- a/src/datadogV1/model/model_tag_to_hosts.rs +++ b/src/datadogV1/model/model_tag_to_hosts.rs @@ -18,14 +18,12 @@ impl TagToHosts { TagToHosts { tags: None } } - pub fn with_tags( - &mut self, - value: std::collections::BTreeMap>, - ) -> &mut Self { + pub fn tags(&mut self, value: std::collections::BTreeMap>) -> &mut Self { self.tags = Some(value); self } } + impl Default for TagToHosts { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_timeseries_background.rs b/src/datadogV1/model/model_timeseries_background.rs index 55eb89421..a5b180550 100644 --- a/src/datadogV1/model/model_timeseries_background.rs +++ b/src/datadogV1/model/model_timeseries_background.rs @@ -21,7 +21,7 @@ impl TimeseriesBackground { TimeseriesBackground { type_, yaxis: None } } - pub fn with_yaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { + pub fn yaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { self.yaxis = Some(value); self } diff --git a/src/datadogV1/model/model_timeseries_widget_definition.rs b/src/datadogV1/model/model_timeseries_widget_definition.rs index 4db120ce3..2d44302bc 100644 --- a/src/datadogV1/model/model_timeseries_widget_definition.rs +++ b/src/datadogV1/model/model_timeseries_widget_definition.rs @@ -79,7 +79,7 @@ impl TimeseriesWidgetDefinition { } } - pub fn with_custom_links( + pub fn custom_links( &mut self, value: Vec, ) -> &mut Self { @@ -87,12 +87,12 @@ impl TimeseriesWidgetDefinition { self } - pub fn with_events(&mut self, value: Vec) -> &mut Self { + pub fn events(&mut self, value: Vec) -> &mut Self { self.events = Some(value); self } - pub fn with_legend_columns( + pub fn legend_columns( &mut self, value: Vec, ) -> &mut Self { @@ -100,7 +100,7 @@ impl TimeseriesWidgetDefinition { self } - pub fn with_legend_layout( + pub fn legend_layout( &mut self, value: crate::datadogV1::model::TimeseriesWidgetLegendLayout, ) -> &mut Self { @@ -108,50 +108,47 @@ impl TimeseriesWidgetDefinition { self } - pub fn with_legend_size(&mut self, value: String) -> &mut Self { + pub fn legend_size(&mut self, value: String) -> &mut Self { self.legend_size = Some(value); self } - pub fn with_markers(&mut self, value: Vec) -> &mut Self { + pub fn markers(&mut self, value: Vec) -> &mut Self { self.markers = Some(value); self } - pub fn with_right_yaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { + pub fn right_yaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { self.right_yaxis = Some(value); self } - pub fn with_show_legend(&mut self, value: bool) -> &mut Self { + pub fn show_legend(&mut self, value: bool) -> &mut Self { self.show_legend = Some(value); self } - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } - pub fn with_yaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { + pub fn yaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { self.yaxis = Some(value); self } diff --git a/src/datadogV1/model/model_timeseries_widget_expression_alias.rs b/src/datadogV1/model/model_timeseries_widget_expression_alias.rs index f7a2d2793..6b9884469 100644 --- a/src/datadogV1/model/model_timeseries_widget_expression_alias.rs +++ b/src/datadogV1/model/model_timeseries_widget_expression_alias.rs @@ -24,7 +24,7 @@ impl TimeseriesWidgetExpressionAlias { } } - pub fn with_alias_name(&mut self, value: String) -> &mut Self { + pub fn alias_name(&mut self, value: String) -> &mut Self { self.alias_name = Some(value); self } diff --git a/src/datadogV1/model/model_timeseries_widget_request.rs b/src/datadogV1/model/model_timeseries_widget_request.rs index 36e286f0b..df873c533 100644 --- a/src/datadogV1/model/model_timeseries_widget_request.rs +++ b/src/datadogV1/model/model_timeseries_widget_request.rs @@ -84,55 +84,37 @@ impl TimeseriesWidgetRequest { } } - pub fn with_apm_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.apm_query = Some(value); self } - pub fn with_audit_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn audit_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.audit_query = Some(value); self } - pub fn with_display_type( - &mut self, - value: crate::datadogV1::model::WidgetDisplayType, - ) -> &mut Self { + pub fn display_type(&mut self, value: crate::datadogV1::model::WidgetDisplayType) -> &mut Self { self.display_type = Some(value); self } - pub fn with_event_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn event_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.event_query = Some(value); self } - pub fn with_formulas( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn formulas(&mut self, value: Vec) -> &mut Self { self.formulas = Some(value); self } - pub fn with_log_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.log_query = Some(value); self } - pub fn with_metadata( + pub fn metadata( &mut self, value: Vec, ) -> &mut Self { @@ -140,7 +122,7 @@ impl TimeseriesWidgetRequest { self } - pub fn with_network_query( + pub fn network_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -148,12 +130,12 @@ impl TimeseriesWidgetRequest { self } - pub fn with_on_right_yaxis(&mut self, value: bool) -> &mut Self { + pub fn on_right_yaxis(&mut self, value: bool) -> &mut Self { self.on_right_yaxis = Some(value); self } - pub fn with_process_query( + pub fn process_query( &mut self, value: crate::datadogV1::model::ProcessQueryDefinition, ) -> &mut Self { @@ -161,7 +143,7 @@ impl TimeseriesWidgetRequest { self } - pub fn with_profile_metrics_query( + pub fn profile_metrics_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -169,12 +151,12 @@ impl TimeseriesWidgetRequest { self } - pub fn with_q(&mut self, value: String) -> &mut Self { + pub fn q(&mut self, value: String) -> &mut Self { self.q = Some(value); self } - pub fn with_queries( + pub fn queries( &mut self, value: Vec, ) -> &mut Self { @@ -182,7 +164,7 @@ impl TimeseriesWidgetRequest { self } - pub fn with_response_format( + pub fn response_format( &mut self, value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, ) -> &mut Self { @@ -190,15 +172,12 @@ impl TimeseriesWidgetRequest { self } - pub fn with_rum_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.rum_query = Some(value); self } - pub fn with_security_query( + pub fn security_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -206,11 +185,12 @@ impl TimeseriesWidgetRequest { self } - pub fn with_style(&mut self, value: crate::datadogV1::model::WidgetRequestStyle) -> &mut Self { + pub fn style(&mut self, value: crate::datadogV1::model::WidgetRequestStyle) -> &mut Self { self.style = Some(value); self } } + impl Default for TimeseriesWidgetRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_toplist_widget_definition.rs b/src/datadogV1/model/model_toplist_widget_definition.rs index bca523ce1..007daee5b 100644 --- a/src/datadogV1/model/model_toplist_widget_definition.rs +++ b/src/datadogV1/model/model_toplist_widget_definition.rs @@ -51,7 +51,7 @@ impl ToplistWidgetDefinition { } } - pub fn with_custom_links( + pub fn custom_links( &mut self, value: Vec, ) -> &mut Self { @@ -59,30 +59,27 @@ impl ToplistWidgetDefinition { self } - pub fn with_style(&mut self, value: crate::datadogV1::model::ToplistWidgetStyle) -> &mut Self { + pub fn style(&mut self, value: crate::datadogV1::model::ToplistWidgetStyle) -> &mut Self { self.style = Some(value); self } - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_toplist_widget_display.rs b/src/datadogV1/model/model_toplist_widget_display.rs index e3c43c419..508b23690 100644 --- a/src/datadogV1/model/model_toplist_widget_display.rs +++ b/src/datadogV1/model/model_toplist_widget_display.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ToplistWidgetDisplay { - ToplistWidgetStacked(crate::datadogV1::model::ToplistWidgetStacked), - ToplistWidgetFlat(crate::datadogV1::model::ToplistWidgetFlat), + ToplistWidgetStacked(Box), + ToplistWidgetFlat(Box), } diff --git a/src/datadogV1/model/model_toplist_widget_request.rs b/src/datadogV1/model/model_toplist_widget_request.rs index 102d7f9cb..9e946e69c 100644 --- a/src/datadogV1/model/model_toplist_widget_request.rs +++ b/src/datadogV1/model/model_toplist_widget_request.rs @@ -76,23 +76,17 @@ impl ToplistWidgetRequest { } } - pub fn with_apm_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.apm_query = Some(value); self } - pub fn with_audit_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn audit_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.audit_query = Some(value); self } - pub fn with_conditional_formats( + pub fn conditional_formats( &mut self, value: Vec, ) -> &mut Self { @@ -100,31 +94,22 @@ impl ToplistWidgetRequest { self } - pub fn with_event_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn event_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.event_query = Some(value); self } - pub fn with_formulas( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn formulas(&mut self, value: Vec) -> &mut Self { self.formulas = Some(value); self } - pub fn with_log_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.log_query = Some(value); self } - pub fn with_network_query( + pub fn network_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -132,7 +117,7 @@ impl ToplistWidgetRequest { self } - pub fn with_process_query( + pub fn process_query( &mut self, value: crate::datadogV1::model::ProcessQueryDefinition, ) -> &mut Self { @@ -140,7 +125,7 @@ impl ToplistWidgetRequest { self } - pub fn with_profile_metrics_query( + pub fn profile_metrics_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -148,12 +133,12 @@ impl ToplistWidgetRequest { self } - pub fn with_q(&mut self, value: String) -> &mut Self { + pub fn q(&mut self, value: String) -> &mut Self { self.q = Some(value); self } - pub fn with_queries( + pub fn queries( &mut self, value: Vec, ) -> &mut Self { @@ -161,7 +146,7 @@ impl ToplistWidgetRequest { self } - pub fn with_response_format( + pub fn response_format( &mut self, value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, ) -> &mut Self { @@ -169,15 +154,12 @@ impl ToplistWidgetRequest { self } - pub fn with_rum_query( - &mut self, - value: crate::datadogV1::model::LogQueryDefinition, - ) -> &mut Self { + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { self.rum_query = Some(value); self } - pub fn with_security_query( + pub fn security_query( &mut self, value: crate::datadogV1::model::LogQueryDefinition, ) -> &mut Self { @@ -185,11 +167,12 @@ impl ToplistWidgetRequest { self } - pub fn with_style(&mut self, value: crate::datadogV1::model::WidgetRequestStyle) -> &mut Self { + pub fn style(&mut self, value: crate::datadogV1::model::WidgetRequestStyle) -> &mut Self { self.style = Some(value); self } } + impl Default for ToplistWidgetRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_toplist_widget_style.rs b/src/datadogV1/model/model_toplist_widget_style.rs index 9e7e55336..701258fb3 100644 --- a/src/datadogV1/model/model_toplist_widget_style.rs +++ b/src/datadogV1/model/model_toplist_widget_style.rs @@ -24,22 +24,17 @@ impl ToplistWidgetStyle { } } - pub fn with_display( - &mut self, - value: crate::datadogV1::model::ToplistWidgetDisplay, - ) -> &mut Self { + pub fn display(&mut self, value: crate::datadogV1::model::ToplistWidgetDisplay) -> &mut Self { self.display = Some(value); self } - pub fn with_scaling( - &mut self, - value: crate::datadogV1::model::ToplistWidgetScaling, - ) -> &mut Self { + pub fn scaling(&mut self, value: crate::datadogV1::model::ToplistWidgetScaling) -> &mut Self { self.scaling = Some(value); self } } + impl Default for ToplistWidgetStyle { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_topology_map_widget_definition.rs b/src/datadogV1/model/model_topology_map_widget_definition.rs index aa247549e..c2ad808d9 100644 --- a/src/datadogV1/model/model_topology_map_widget_definition.rs +++ b/src/datadogV1/model/model_topology_map_widget_definition.rs @@ -43,7 +43,7 @@ impl TopologyMapWidgetDefinition { } } - pub fn with_custom_links( + pub fn custom_links( &mut self, value: Vec, ) -> &mut Self { @@ -51,20 +51,17 @@ impl TopologyMapWidgetDefinition { self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_title_align( - &mut self, - value: crate::datadogV1::model::WidgetTextAlign, - ) -> &mut Self { + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { self.title_align = Some(value); self } - pub fn with_title_size(&mut self, value: String) -> &mut Self { + pub fn title_size(&mut self, value: String) -> &mut Self { self.title_size = Some(value); self } diff --git a/src/datadogV1/model/model_topology_query.rs b/src/datadogV1/model/model_topology_query.rs index eb82830c6..5f8c8d735 100644 --- a/src/datadogV1/model/model_topology_query.rs +++ b/src/datadogV1/model/model_topology_query.rs @@ -28,7 +28,7 @@ impl TopologyQuery { } } - pub fn with_data_source( + pub fn data_source( &mut self, value: crate::datadogV1::model::TopologyQueryDataSource, ) -> &mut Self { @@ -36,16 +36,17 @@ impl TopologyQuery { self } - pub fn with_filters(&mut self, value: Vec) -> &mut Self { + pub fn filters(&mut self, value: Vec) -> &mut Self { self.filters = Some(value); self } - pub fn with_service(&mut self, value: String) -> &mut Self { + pub fn service(&mut self, value: String) -> &mut Self { self.service = Some(value); self } } + impl Default for TopologyQuery { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_topology_request.rs b/src/datadogV1/model/model_topology_request.rs index c3598c300..2ab5a0c36 100644 --- a/src/datadogV1/model/model_topology_request.rs +++ b/src/datadogV1/model/model_topology_request.rs @@ -24,12 +24,12 @@ impl TopologyRequest { } } - pub fn with_query(&mut self, value: crate::datadogV1::model::TopologyQuery) -> &mut Self { + pub fn query(&mut self, value: crate::datadogV1::model::TopologyQuery) -> &mut Self { self.query = Some(value); self } - pub fn with_request_type( + pub fn request_type( &mut self, value: crate::datadogV1::model::TopologyRequestType, ) -> &mut Self { @@ -37,6 +37,7 @@ impl TopologyRequest { self } } + impl Default for TopologyRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_tree_map_widget_definition.rs b/src/datadogV1/model/model_tree_map_widget_definition.rs index 4f4282c01..6f42c13dc 100644 --- a/src/datadogV1/model/model_tree_map_widget_definition.rs +++ b/src/datadogV1/model/model_tree_map_widget_definition.rs @@ -56,13 +56,13 @@ impl TreeMapWidgetDefinition { } #[allow(deprecated)] - pub fn with_color_by(&mut self, value: crate::datadogV1::model::TreeMapColorBy) -> &mut Self { + pub fn color_by(&mut self, value: crate::datadogV1::model::TreeMapColorBy) -> &mut Self { self.color_by = Some(value); self } #[allow(deprecated)] - pub fn with_custom_links( + pub fn custom_links( &mut self, value: Vec, ) -> &mut Self { @@ -71,25 +71,25 @@ impl TreeMapWidgetDefinition { } #[allow(deprecated)] - pub fn with_group_by(&mut self, value: crate::datadogV1::model::TreeMapGroupBy) -> &mut Self { + pub fn group_by(&mut self, value: crate::datadogV1::model::TreeMapGroupBy) -> &mut Self { self.group_by = Some(value); self } #[allow(deprecated)] - pub fn with_size_by(&mut self, value: crate::datadogV1::model::TreeMapSizeBy) -> &mut Self { + pub fn size_by(&mut self, value: crate::datadogV1::model::TreeMapSizeBy) -> &mut Self { self.size_by = Some(value); self } #[allow(deprecated)] - pub fn with_time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { self.time = Some(value); self } #[allow(deprecated)] - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } diff --git a/src/datadogV1/model/model_tree_map_widget_request.rs b/src/datadogV1/model/model_tree_map_widget_request.rs index 0e6262aaf..a239cbfff 100644 --- a/src/datadogV1/model/model_tree_map_widget_request.rs +++ b/src/datadogV1/model/model_tree_map_widget_request.rs @@ -32,20 +32,17 @@ impl TreeMapWidgetRequest { } } - pub fn with_formulas( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn formulas(&mut self, value: Vec) -> &mut Self { self.formulas = Some(value); self } - pub fn with_q(&mut self, value: String) -> &mut Self { + pub fn q(&mut self, value: String) -> &mut Self { self.q = Some(value); self } - pub fn with_queries( + pub fn queries( &mut self, value: Vec, ) -> &mut Self { @@ -53,7 +50,7 @@ impl TreeMapWidgetRequest { self } - pub fn with_response_format( + pub fn response_format( &mut self, value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, ) -> &mut Self { @@ -61,6 +58,7 @@ impl TreeMapWidgetRequest { self } } + impl Default for TreeMapWidgetRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_analyzed_logs_hour.rs b/src/datadogV1/model/model_usage_analyzed_logs_hour.rs index ec96f6cbf..03a6dae38 100644 --- a/src/datadogV1/model/model_usage_analyzed_logs_hour.rs +++ b/src/datadogV1/model/model_usage_analyzed_logs_hour.rs @@ -36,26 +36,27 @@ impl UsageAnalyzedLogsHour { } } - pub fn with_analyzed_logs(&mut self, value: Option) -> &mut Self { + pub fn analyzed_logs(&mut self, value: Option) -> &mut Self { self.analyzed_logs = Some(value); self } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageAnalyzedLogsHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_analyzed_logs_response.rs b/src/datadogV1/model/model_usage_analyzed_logs_response.rs index cc9d694f0..bc5da7f3c 100644 --- a/src/datadogV1/model/model_usage_analyzed_logs_response.rs +++ b/src/datadogV1/model/model_usage_analyzed_logs_response.rs @@ -18,7 +18,7 @@ impl UsageAnalyzedLogsResponse { UsageAnalyzedLogsResponse { usage: None } } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl UsageAnalyzedLogsResponse { self } } + impl Default for UsageAnalyzedLogsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_attribution_aggregates_body.rs b/src/datadogV1/model/model_usage_attribution_aggregates_body.rs index 4d61425c6..e2fdb821f 100644 --- a/src/datadogV1/model/model_usage_attribution_aggregates_body.rs +++ b/src/datadogV1/model/model_usage_attribution_aggregates_body.rs @@ -28,21 +28,22 @@ impl UsageAttributionAggregatesBody { } } - pub fn with_agg_type(&mut self, value: String) -> &mut Self { + pub fn agg_type(&mut self, value: String) -> &mut Self { self.agg_type = Some(value); self } - pub fn with_field(&mut self, value: String) -> &mut Self { + pub fn field(&mut self, value: String) -> &mut Self { self.field = Some(value); self } - pub fn with_value(&mut self, value: f64) -> &mut Self { + pub fn value(&mut self, value: f64) -> &mut Self { self.value = Some(value); self } } + impl Default for UsageAttributionAggregatesBody { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_attribution_body.rs b/src/datadogV1/model/model_usage_attribution_body.rs index dd0f5f010..095ecc61a 100644 --- a/src/datadogV1/model/model_usage_attribution_body.rs +++ b/src/datadogV1/model/model_usage_attribution_body.rs @@ -48,27 +48,27 @@ impl UsageAttributionBody { } } - pub fn with_month(&mut self, value: String) -> &mut Self { + pub fn month(&mut self, value: String) -> &mut Self { self.month = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_tag_config_source(&mut self, value: String) -> &mut Self { + pub fn tag_config_source(&mut self, value: String) -> &mut Self { self.tag_config_source = Some(value); self } - pub fn with_tags( + pub fn tags( &mut self, value: Option>>>, ) -> &mut Self { @@ -76,19 +76,17 @@ impl UsageAttributionBody { self } - pub fn with_updated_at(&mut self, value: String) -> &mut Self { + pub fn updated_at(&mut self, value: String) -> &mut Self { self.updated_at = Some(value); self } - pub fn with_values( - &mut self, - value: crate::datadogV1::model::UsageAttributionValues, - ) -> &mut Self { + pub fn values(&mut self, value: crate::datadogV1::model::UsageAttributionValues) -> &mut Self { self.values = Some(value); self } } + impl Default for UsageAttributionBody { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_attribution_metadata.rs b/src/datadogV1/model/model_usage_attribution_metadata.rs index d14e5255f..16b2a7cc2 100644 --- a/src/datadogV1/model/model_usage_attribution_metadata.rs +++ b/src/datadogV1/model/model_usage_attribution_metadata.rs @@ -24,7 +24,7 @@ impl UsageAttributionMetadata { } } - pub fn with_aggregates( + pub fn aggregates( &mut self, value: Vec, ) -> &mut Self { @@ -32,7 +32,7 @@ impl UsageAttributionMetadata { self } - pub fn with_pagination( + pub fn pagination( &mut self, value: crate::datadogV1::model::UsageAttributionPagination, ) -> &mut Self { @@ -40,6 +40,7 @@ impl UsageAttributionMetadata { self } } + impl Default for UsageAttributionMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_attribution_pagination.rs b/src/datadogV1/model/model_usage_attribution_pagination.rs index d3dae1fb4..bfe2a50b9 100644 --- a/src/datadogV1/model/model_usage_attribution_pagination.rs +++ b/src/datadogV1/model/model_usage_attribution_pagination.rs @@ -36,31 +36,32 @@ impl UsageAttributionPagination { } } - pub fn with_limit(&mut self, value: i64) -> &mut Self { + pub fn limit(&mut self, value: i64) -> &mut Self { self.limit = Some(value); self } - pub fn with_offset(&mut self, value: i64) -> &mut Self { + pub fn offset(&mut self, value: i64) -> &mut Self { self.offset = Some(value); self } - pub fn with_sort_direction(&mut self, value: String) -> &mut Self { + pub fn sort_direction(&mut self, value: String) -> &mut Self { self.sort_direction = Some(value); self } - pub fn with_sort_name(&mut self, value: String) -> &mut Self { + pub fn sort_name(&mut self, value: String) -> &mut Self { self.sort_name = Some(value); self } - pub fn with_total_number_of_records(&mut self, value: i64) -> &mut Self { + pub fn total_number_of_records(&mut self, value: i64) -> &mut Self { self.total_number_of_records = Some(value); self } } + impl Default for UsageAttributionPagination { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_attribution_response.rs b/src/datadogV1/model/model_usage_attribution_response.rs index b932a7b8a..b198a1e9c 100644 --- a/src/datadogV1/model/model_usage_attribution_response.rs +++ b/src/datadogV1/model/model_usage_attribution_response.rs @@ -24,7 +24,7 @@ impl UsageAttributionResponse { } } - pub fn with_metadata( + pub fn metadata( &mut self, value: crate::datadogV1::model::UsageAttributionMetadata, ) -> &mut Self { @@ -32,7 +32,7 @@ impl UsageAttributionResponse { self } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -40,6 +40,7 @@ impl UsageAttributionResponse { self } } + impl Default for UsageAttributionResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_attribution_values.rs b/src/datadogV1/model/model_usage_attribution_values.rs index 16a1169c9..91ce5df02 100644 --- a/src/datadogV1/model/model_usage_attribution_values.rs +++ b/src/datadogV1/model/model_usage_attribution_values.rs @@ -224,266 +224,267 @@ impl UsageAttributionValues { } } - pub fn with_api_percentage(&mut self, value: f64) -> &mut Self { + pub fn api_percentage(&mut self, value: f64) -> &mut Self { self.api_percentage = Some(value); self } - pub fn with_api_usage(&mut self, value: f64) -> &mut Self { + pub fn api_usage(&mut self, value: f64) -> &mut Self { self.api_usage = Some(value); self } - pub fn with_apm_fargate_percentage(&mut self, value: f64) -> &mut Self { + pub fn apm_fargate_percentage(&mut self, value: f64) -> &mut Self { self.apm_fargate_percentage = Some(value); self } - pub fn with_apm_fargate_usage(&mut self, value: f64) -> &mut Self { + pub fn apm_fargate_usage(&mut self, value: f64) -> &mut Self { self.apm_fargate_usage = Some(value); self } - pub fn with_apm_host_percentage(&mut self, value: f64) -> &mut Self { + pub fn apm_host_percentage(&mut self, value: f64) -> &mut Self { self.apm_host_percentage = Some(value); self } - pub fn with_apm_host_usage(&mut self, value: f64) -> &mut Self { + pub fn apm_host_usage(&mut self, value: f64) -> &mut Self { self.apm_host_usage = Some(value); self } - pub fn with_appsec_fargate_percentage(&mut self, value: f64) -> &mut Self { + pub fn appsec_fargate_percentage(&mut self, value: f64) -> &mut Self { self.appsec_fargate_percentage = Some(value); self } - pub fn with_appsec_fargate_usage(&mut self, value: f64) -> &mut Self { + pub fn appsec_fargate_usage(&mut self, value: f64) -> &mut Self { self.appsec_fargate_usage = Some(value); self } - pub fn with_appsec_percentage(&mut self, value: f64) -> &mut Self { + pub fn appsec_percentage(&mut self, value: f64) -> &mut Self { self.appsec_percentage = Some(value); self } - pub fn with_appsec_usage(&mut self, value: f64) -> &mut Self { + pub fn appsec_usage(&mut self, value: f64) -> &mut Self { self.appsec_usage = Some(value); self } - pub fn with_browser_percentage(&mut self, value: f64) -> &mut Self { + pub fn browser_percentage(&mut self, value: f64) -> &mut Self { self.browser_percentage = Some(value); self } - pub fn with_browser_usage(&mut self, value: f64) -> &mut Self { + pub fn browser_usage(&mut self, value: f64) -> &mut Self { self.browser_usage = Some(value); self } - pub fn with_container_percentage(&mut self, value: f64) -> &mut Self { + pub fn container_percentage(&mut self, value: f64) -> &mut Self { self.container_percentage = Some(value); self } - pub fn with_container_usage(&mut self, value: f64) -> &mut Self { + pub fn container_usage(&mut self, value: f64) -> &mut Self { self.container_usage = Some(value); self } - pub fn with_cspm_container_percentage(&mut self, value: f64) -> &mut Self { + pub fn cspm_container_percentage(&mut self, value: f64) -> &mut Self { self.cspm_container_percentage = Some(value); self } - pub fn with_cspm_container_usage(&mut self, value: f64) -> &mut Self { + pub fn cspm_container_usage(&mut self, value: f64) -> &mut Self { self.cspm_container_usage = Some(value); self } - pub fn with_cspm_host_percentage(&mut self, value: f64) -> &mut Self { + pub fn cspm_host_percentage(&mut self, value: f64) -> &mut Self { self.cspm_host_percentage = Some(value); self } - pub fn with_cspm_host_usage(&mut self, value: f64) -> &mut Self { + pub fn cspm_host_usage(&mut self, value: f64) -> &mut Self { self.cspm_host_usage = Some(value); self } - pub fn with_custom_timeseries_percentage(&mut self, value: f64) -> &mut Self { + pub fn custom_timeseries_percentage(&mut self, value: f64) -> &mut Self { self.custom_timeseries_percentage = Some(value); self } - pub fn with_custom_timeseries_usage(&mut self, value: f64) -> &mut Self { + pub fn custom_timeseries_usage(&mut self, value: f64) -> &mut Self { self.custom_timeseries_usage = Some(value); self } - pub fn with_cws_container_percentage(&mut self, value: f64) -> &mut Self { + pub fn cws_container_percentage(&mut self, value: f64) -> &mut Self { self.cws_container_percentage = Some(value); self } - pub fn with_cws_container_usage(&mut self, value: f64) -> &mut Self { + pub fn cws_container_usage(&mut self, value: f64) -> &mut Self { self.cws_container_usage = Some(value); self } - pub fn with_cws_host_percentage(&mut self, value: f64) -> &mut Self { + pub fn cws_host_percentage(&mut self, value: f64) -> &mut Self { self.cws_host_percentage = Some(value); self } - pub fn with_cws_host_usage(&mut self, value: f64) -> &mut Self { + pub fn cws_host_usage(&mut self, value: f64) -> &mut Self { self.cws_host_usage = Some(value); self } - pub fn with_dbm_hosts_percentage(&mut self, value: f64) -> &mut Self { + pub fn dbm_hosts_percentage(&mut self, value: f64) -> &mut Self { self.dbm_hosts_percentage = Some(value); self } - pub fn with_dbm_hosts_usage(&mut self, value: f64) -> &mut Self { + pub fn dbm_hosts_usage(&mut self, value: f64) -> &mut Self { self.dbm_hosts_usage = Some(value); self } - pub fn with_dbm_queries_percentage(&mut self, value: f64) -> &mut Self { + pub fn dbm_queries_percentage(&mut self, value: f64) -> &mut Self { self.dbm_queries_percentage = Some(value); self } - pub fn with_dbm_queries_usage(&mut self, value: f64) -> &mut Self { + pub fn dbm_queries_usage(&mut self, value: f64) -> &mut Self { self.dbm_queries_usage = Some(value); self } - pub fn with_estimated_indexed_logs_percentage(&mut self, value: f64) -> &mut Self { + pub fn estimated_indexed_logs_percentage(&mut self, value: f64) -> &mut Self { self.estimated_indexed_logs_percentage = Some(value); self } - pub fn with_estimated_indexed_logs_usage(&mut self, value: f64) -> &mut Self { + pub fn estimated_indexed_logs_usage(&mut self, value: f64) -> &mut Self { self.estimated_indexed_logs_usage = Some(value); self } - pub fn with_estimated_indexed_spans_percentage(&mut self, value: f64) -> &mut Self { + pub fn estimated_indexed_spans_percentage(&mut self, value: f64) -> &mut Self { self.estimated_indexed_spans_percentage = Some(value); self } - pub fn with_estimated_indexed_spans_usage(&mut self, value: f64) -> &mut Self { + pub fn estimated_indexed_spans_usage(&mut self, value: f64) -> &mut Self { self.estimated_indexed_spans_usage = Some(value); self } - pub fn with_estimated_ingested_logs_percentage(&mut self, value: f64) -> &mut Self { + pub fn estimated_ingested_logs_percentage(&mut self, value: f64) -> &mut Self { self.estimated_ingested_logs_percentage = Some(value); self } - pub fn with_estimated_ingested_logs_usage(&mut self, value: f64) -> &mut Self { + pub fn estimated_ingested_logs_usage(&mut self, value: f64) -> &mut Self { self.estimated_ingested_logs_usage = Some(value); self } - pub fn with_estimated_ingested_spans_percentage(&mut self, value: f64) -> &mut Self { + pub fn estimated_ingested_spans_percentage(&mut self, value: f64) -> &mut Self { self.estimated_ingested_spans_percentage = Some(value); self } - pub fn with_estimated_ingested_spans_usage(&mut self, value: f64) -> &mut Self { + pub fn estimated_ingested_spans_usage(&mut self, value: f64) -> &mut Self { self.estimated_ingested_spans_usage = Some(value); self } - pub fn with_estimated_rum_sessions_percentage(&mut self, value: f64) -> &mut Self { + pub fn estimated_rum_sessions_percentage(&mut self, value: f64) -> &mut Self { self.estimated_rum_sessions_percentage = Some(value); self } - pub fn with_estimated_rum_sessions_usage(&mut self, value: f64) -> &mut Self { + pub fn estimated_rum_sessions_usage(&mut self, value: f64) -> &mut Self { self.estimated_rum_sessions_usage = Some(value); self } - pub fn with_infra_host_percentage(&mut self, value: f64) -> &mut Self { + pub fn infra_host_percentage(&mut self, value: f64) -> &mut Self { self.infra_host_percentage = Some(value); self } - pub fn with_infra_host_usage(&mut self, value: f64) -> &mut Self { + pub fn infra_host_usage(&mut self, value: f64) -> &mut Self { self.infra_host_usage = Some(value); self } - pub fn with_lambda_functions_percentage(&mut self, value: f64) -> &mut Self { + pub fn lambda_functions_percentage(&mut self, value: f64) -> &mut Self { self.lambda_functions_percentage = Some(value); self } - pub fn with_lambda_functions_usage(&mut self, value: f64) -> &mut Self { + pub fn lambda_functions_usage(&mut self, value: f64) -> &mut Self { self.lambda_functions_usage = Some(value); self } - pub fn with_lambda_invocations_percentage(&mut self, value: f64) -> &mut Self { + pub fn lambda_invocations_percentage(&mut self, value: f64) -> &mut Self { self.lambda_invocations_percentage = Some(value); self } - pub fn with_lambda_invocations_usage(&mut self, value: f64) -> &mut Self { + pub fn lambda_invocations_usage(&mut self, value: f64) -> &mut Self { self.lambda_invocations_usage = Some(value); self } - pub fn with_npm_host_percentage(&mut self, value: f64) -> &mut Self { + pub fn npm_host_percentage(&mut self, value: f64) -> &mut Self { self.npm_host_percentage = Some(value); self } - pub fn with_npm_host_usage(&mut self, value: f64) -> &mut Self { + pub fn npm_host_usage(&mut self, value: f64) -> &mut Self { self.npm_host_usage = Some(value); self } - pub fn with_profiled_container_percentage(&mut self, value: f64) -> &mut Self { + pub fn profiled_container_percentage(&mut self, value: f64) -> &mut Self { self.profiled_container_percentage = Some(value); self } - pub fn with_profiled_container_usage(&mut self, value: f64) -> &mut Self { + pub fn profiled_container_usage(&mut self, value: f64) -> &mut Self { self.profiled_container_usage = Some(value); self } - pub fn with_profiled_hosts_percentage(&mut self, value: f64) -> &mut Self { + pub fn profiled_hosts_percentage(&mut self, value: f64) -> &mut Self { self.profiled_hosts_percentage = Some(value); self } - pub fn with_profiled_hosts_usage(&mut self, value: f64) -> &mut Self { + pub fn profiled_hosts_usage(&mut self, value: f64) -> &mut Self { self.profiled_hosts_usage = Some(value); self } - pub fn with_snmp_percentage(&mut self, value: f64) -> &mut Self { + pub fn snmp_percentage(&mut self, value: f64) -> &mut Self { self.snmp_percentage = Some(value); self } - pub fn with_snmp_usage(&mut self, value: f64) -> &mut Self { + pub fn snmp_usage(&mut self, value: f64) -> &mut Self { self.snmp_usage = Some(value); self } } + impl Default for UsageAttributionValues { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_audit_logs_hour.rs b/src/datadogV1/model/model_usage_audit_logs_hour.rs index 431958f83..05b1f5178 100644 --- a/src/datadogV1/model/model_usage_audit_logs_hour.rs +++ b/src/datadogV1/model/model_usage_audit_logs_hour.rs @@ -36,26 +36,27 @@ impl UsageAuditLogsHour { } } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_lines_indexed(&mut self, value: Option) -> &mut Self { + pub fn lines_indexed(&mut self, value: Option) -> &mut Self { self.lines_indexed = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageAuditLogsHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_audit_logs_response.rs b/src/datadogV1/model/model_usage_audit_logs_response.rs index b30563023..015ef3756 100644 --- a/src/datadogV1/model/model_usage_audit_logs_response.rs +++ b/src/datadogV1/model/model_usage_audit_logs_response.rs @@ -18,14 +18,12 @@ impl UsageAuditLogsResponse { UsageAuditLogsResponse { usage: None } } - pub fn with_usage( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn usage(&mut self, value: Vec) -> &mut Self { self.usage = Some(value); self } } + impl Default for UsageAuditLogsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_billable_summary_body.rs b/src/datadogV1/model/model_usage_billable_summary_body.rs index 76a0bc6a6..359761324 100644 --- a/src/datadogV1/model/model_usage_billable_summary_body.rs +++ b/src/datadogV1/model/model_usage_billable_summary_body.rs @@ -44,41 +44,42 @@ impl UsageBillableSummaryBody { } } - pub fn with_account_billable_usage(&mut self, value: i64) -> &mut Self { + pub fn account_billable_usage(&mut self, value: i64) -> &mut Self { self.account_billable_usage = Some(value); self } - pub fn with_elapsed_usage_hours(&mut self, value: i64) -> &mut Self { + pub fn elapsed_usage_hours(&mut self, value: i64) -> &mut Self { self.elapsed_usage_hours = Some(value); self } - pub fn with_first_billable_usage_hour(&mut self, value: String) -> &mut Self { + pub fn first_billable_usage_hour(&mut self, value: String) -> &mut Self { self.first_billable_usage_hour = Some(value); self } - pub fn with_last_billable_usage_hour(&mut self, value: String) -> &mut Self { + pub fn last_billable_usage_hour(&mut self, value: String) -> &mut Self { self.last_billable_usage_hour = Some(value); self } - pub fn with_org_billable_usage(&mut self, value: i64) -> &mut Self { + pub fn org_billable_usage(&mut self, value: i64) -> &mut Self { self.org_billable_usage = Some(value); self } - pub fn with_percentage_in_account(&mut self, value: f64) -> &mut Self { + pub fn percentage_in_account(&mut self, value: f64) -> &mut Self { self.percentage_in_account = Some(value); self } - pub fn with_usage_unit(&mut self, value: String) -> &mut Self { + pub fn usage_unit(&mut self, value: String) -> &mut Self { self.usage_unit = Some(value); self } } + impl Default for UsageBillableSummaryBody { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_billable_summary_hour.rs b/src/datadogV1/model/model_usage_billable_summary_hour.rs index 3185a3ac7..ff9860000 100644 --- a/src/datadogV1/model/model_usage_billable_summary_hour.rs +++ b/src/datadogV1/model/model_usage_billable_summary_hour.rs @@ -52,54 +52,52 @@ impl UsageBillableSummaryHour { } } - pub fn with_billing_plan(&mut self, value: String) -> &mut Self { + pub fn billing_plan(&mut self, value: String) -> &mut Self { self.billing_plan = Some(value); self } - pub fn with_end_date(&mut self, value: String) -> &mut Self { + pub fn end_date(&mut self, value: String) -> &mut Self { self.end_date = Some(value); self } - pub fn with_num_orgs(&mut self, value: i64) -> &mut Self { + pub fn num_orgs(&mut self, value: i64) -> &mut Self { self.num_orgs = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_ratio_in_month(&mut self, value: f64) -> &mut Self { + pub fn ratio_in_month(&mut self, value: f64) -> &mut Self { self.ratio_in_month = Some(value); self } - pub fn with_region(&mut self, value: String) -> &mut Self { + pub fn region(&mut self, value: String) -> &mut Self { self.region = Some(value); self } - pub fn with_start_date(&mut self, value: String) -> &mut Self { + pub fn start_date(&mut self, value: String) -> &mut Self { self.start_date = Some(value); self } - pub fn with_usage( - &mut self, - value: crate::datadogV1::model::UsageBillableSummaryKeys, - ) -> &mut Self { + pub fn usage(&mut self, value: crate::datadogV1::model::UsageBillableSummaryKeys) -> &mut Self { self.usage = Some(value); self } } + impl Default for UsageBillableSummaryHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_billable_summary_keys.rs b/src/datadogV1/model/model_usage_billable_summary_keys.rs index ec00a3759..4d96d8d04 100644 --- a/src/datadogV1/model/model_usage_billable_summary_keys.rs +++ b/src/datadogV1/model/model_usage_billable_summary_keys.rs @@ -373,7 +373,7 @@ impl UsageBillableSummaryKeys { } } - pub fn with_apm_fargate_average( + pub fn apm_fargate_average( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -381,7 +381,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_apm_fargate_sum( + pub fn apm_fargate_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -389,7 +389,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_apm_host_sum( + pub fn apm_host_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -397,7 +397,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_apm_host_top99p( + pub fn apm_host_top99p( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -405,7 +405,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_apm_profiler_host_sum( + pub fn apm_profiler_host_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -413,7 +413,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_apm_profiler_host_top99p( + pub fn apm_profiler_host_top99p( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -421,7 +421,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_apm_trace_search_sum( + pub fn apm_trace_search_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -429,7 +429,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_application_security_fargate_average( + pub fn application_security_fargate_average( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -437,7 +437,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_application_security_host_sum( + pub fn application_security_host_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -445,7 +445,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_application_security_host_top99p( + pub fn application_security_host_top99p( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -453,7 +453,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_ci_pipeline_indexed_spans_sum( + pub fn ci_pipeline_indexed_spans_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -461,7 +461,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_ci_pipeline_maximum( + pub fn ci_pipeline_maximum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -469,7 +469,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_ci_pipeline_sum( + pub fn ci_pipeline_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -477,7 +477,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_ci_test_indexed_spans_sum( + pub fn ci_test_indexed_spans_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -485,7 +485,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_ci_testing_maximum( + pub fn ci_testing_maximum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -493,7 +493,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_ci_testing_sum( + pub fn ci_testing_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -501,7 +501,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_cloud_cost_management_average( + pub fn cloud_cost_management_average( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -509,7 +509,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_cloud_cost_management_sum( + pub fn cloud_cost_management_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -517,7 +517,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_cspm_container_sum( + pub fn cspm_container_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -525,7 +525,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_cspm_host_sum( + pub fn cspm_host_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -533,7 +533,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_cspm_host_top99p( + pub fn cspm_host_top99p( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -541,7 +541,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_custom_event_sum( + pub fn custom_event_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -549,7 +549,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_cws_container_sum( + pub fn cws_container_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -557,7 +557,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_cws_host_sum( + pub fn cws_host_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -565,7 +565,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_cws_host_top99p( + pub fn cws_host_top99p( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -573,7 +573,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_dbm_host_sum( + pub fn dbm_host_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -581,7 +581,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_dbm_host_top99p( + pub fn dbm_host_top99p( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -589,7 +589,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_dbm_normalized_queries_average( + pub fn dbm_normalized_queries_average( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -597,7 +597,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_dbm_normalized_queries_sum( + pub fn dbm_normalized_queries_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -605,7 +605,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_fargate_container_apm_and_profiler_average( + pub fn fargate_container_apm_and_profiler_average( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -613,7 +613,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_fargate_container_apm_and_profiler_sum( + pub fn fargate_container_apm_and_profiler_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -621,7 +621,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_fargate_container_average( + pub fn fargate_container_average( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -629,7 +629,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_fargate_container_profiler_average( + pub fn fargate_container_profiler_average( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -637,7 +637,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_fargate_container_profiler_sum( + pub fn fargate_container_profiler_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -645,7 +645,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_fargate_container_sum( + pub fn fargate_container_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -653,7 +653,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_incident_management_maximum( + pub fn incident_management_maximum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -661,7 +661,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_incident_management_sum( + pub fn incident_management_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -669,7 +669,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_infra_and_apm_host_sum( + pub fn infra_and_apm_host_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -677,7 +677,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_infra_and_apm_host_top99p( + pub fn infra_and_apm_host_top99p( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -685,7 +685,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_infra_container_sum( + pub fn infra_container_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -693,7 +693,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_infra_host_sum( + pub fn infra_host_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -701,7 +701,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_infra_host_top99p( + pub fn infra_host_top99p( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -709,7 +709,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_ingested_spans_sum( + pub fn ingested_spans_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -717,7 +717,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_ingested_timeseries_average( + pub fn ingested_timeseries_average( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -725,7 +725,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_ingested_timeseries_sum( + pub fn ingested_timeseries_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -733,7 +733,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_iot_sum( + pub fn iot_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -741,7 +741,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_iot_top99p( + pub fn iot_top99p( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -749,7 +749,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_lambda_function_average( + pub fn lambda_function_average( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -757,7 +757,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_lambda_function_sum( + pub fn lambda_function_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -765,7 +765,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_logs_forwarding_sum( + pub fn logs_forwarding_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -773,7 +773,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_logs_indexed_15day_sum( + pub fn logs_indexed_15day_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -781,7 +781,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_logs_indexed_180day_sum( + pub fn logs_indexed_180day_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -789,7 +789,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_logs_indexed_30day_sum( + pub fn logs_indexed_30day_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -797,7 +797,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_logs_indexed_360day_sum( + pub fn logs_indexed_360day_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -805,7 +805,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_logs_indexed_3day_sum( + pub fn logs_indexed_3day_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -813,7 +813,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_logs_indexed_45day_sum( + pub fn logs_indexed_45day_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -821,7 +821,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_logs_indexed_60day_sum( + pub fn logs_indexed_60day_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -829,7 +829,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_logs_indexed_7day_sum( + pub fn logs_indexed_7day_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -837,7 +837,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_logs_indexed_90day_sum( + pub fn logs_indexed_90day_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -845,7 +845,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_logs_indexed_custom_retention_sum( + pub fn logs_indexed_custom_retention_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -853,7 +853,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_logs_indexed_sum( + pub fn logs_indexed_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -861,7 +861,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_logs_ingested_sum( + pub fn logs_ingested_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -869,7 +869,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_network_device_sum( + pub fn network_device_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -877,7 +877,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_network_device_top99p( + pub fn network_device_top99p( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -885,7 +885,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_npm_flow_sum( + pub fn npm_flow_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -893,7 +893,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_npm_host_sum( + pub fn npm_host_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -901,7 +901,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_npm_host_top99p( + pub fn npm_host_top99p( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -909,7 +909,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_observability_pipeline_sum( + pub fn observability_pipeline_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -917,7 +917,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_online_archive_sum( + pub fn online_archive_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -925,7 +925,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_prof_container_sum( + pub fn prof_container_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -933,7 +933,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_prof_host_sum( + pub fn prof_host_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -941,7 +941,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_prof_host_top99p( + pub fn prof_host_top99p( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -949,7 +949,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_rum_lite_sum( + pub fn rum_lite_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -957,7 +957,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_rum_replay_sum( + pub fn rum_replay_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -965,7 +965,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_rum_sum( + pub fn rum_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -973,7 +973,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_rum_units_sum( + pub fn rum_units_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -981,7 +981,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_sensitive_data_scanner_sum( + pub fn sensitive_data_scanner_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -989,7 +989,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_serverless_apm_sum( + pub fn serverless_apm_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -997,7 +997,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_serverless_infra_average( + pub fn serverless_infra_average( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -1005,7 +1005,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_serverless_infra_sum( + pub fn serverless_infra_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -1013,7 +1013,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_serverless_invocation_sum( + pub fn serverless_invocation_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -1021,7 +1021,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_siem_sum( + pub fn siem_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -1029,7 +1029,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_standard_timeseries_average( + pub fn standard_timeseries_average( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -1037,7 +1037,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_synthetics_api_tests_sum( + pub fn synthetics_api_tests_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -1045,7 +1045,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_synthetics_app_testing_maximum( + pub fn synthetics_app_testing_maximum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -1053,7 +1053,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_synthetics_browser_checks_sum( + pub fn synthetics_browser_checks_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -1061,7 +1061,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_timeseries_average( + pub fn timeseries_average( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -1069,7 +1069,7 @@ impl UsageBillableSummaryKeys { self } - pub fn with_timeseries_sum( + pub fn timeseries_sum( &mut self, value: crate::datadogV1::model::UsageBillableSummaryBody, ) -> &mut Self { @@ -1077,6 +1077,7 @@ impl UsageBillableSummaryKeys { self } } + impl Default for UsageBillableSummaryKeys { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_billable_summary_response.rs b/src/datadogV1/model/model_usage_billable_summary_response.rs index 27f8fdd94..5763796eb 100644 --- a/src/datadogV1/model/model_usage_billable_summary_response.rs +++ b/src/datadogV1/model/model_usage_billable_summary_response.rs @@ -18,7 +18,7 @@ impl UsageBillableSummaryResponse { UsageBillableSummaryResponse { usage: None } } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl UsageBillableSummaryResponse { self } } + impl Default for UsageBillableSummaryResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_ci_visibility_hour.rs b/src/datadogV1/model/model_usage_ci_visibility_hour.rs index ac9a855da..5c2267816 100644 --- a/src/datadogV1/model/model_usage_ci_visibility_hour.rs +++ b/src/datadogV1/model/model_usage_ci_visibility_hour.rs @@ -64,41 +64,42 @@ impl UsageCIVisibilityHour { } } - pub fn with_ci_pipeline_indexed_spans(&mut self, value: Option) -> &mut Self { + pub fn ci_pipeline_indexed_spans(&mut self, value: Option) -> &mut Self { self.ci_pipeline_indexed_spans = Some(value); self } - pub fn with_ci_test_indexed_spans(&mut self, value: Option) -> &mut Self { + pub fn ci_test_indexed_spans(&mut self, value: Option) -> &mut Self { self.ci_test_indexed_spans = Some(value); self } - pub fn with_ci_visibility_itr_committers(&mut self, value: Option) -> &mut Self { + pub fn ci_visibility_itr_committers(&mut self, value: Option) -> &mut Self { self.ci_visibility_itr_committers = Some(value); self } - pub fn with_ci_visibility_pipeline_committers(&mut self, value: Option) -> &mut Self { + pub fn ci_visibility_pipeline_committers(&mut self, value: Option) -> &mut Self { self.ci_visibility_pipeline_committers = Some(value); self } - pub fn with_ci_visibility_test_committers(&mut self, value: Option) -> &mut Self { + pub fn ci_visibility_test_committers(&mut self, value: Option) -> &mut Self { self.ci_visibility_test_committers = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageCIVisibilityHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_ci_visibility_response.rs b/src/datadogV1/model/model_usage_ci_visibility_response.rs index e609be5cb..bfbf9f847 100644 --- a/src/datadogV1/model/model_usage_ci_visibility_response.rs +++ b/src/datadogV1/model/model_usage_ci_visibility_response.rs @@ -18,7 +18,7 @@ impl UsageCIVisibilityResponse { UsageCIVisibilityResponse { usage: None } } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl UsageCIVisibilityResponse { self } } + impl Default for UsageCIVisibilityResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_cloud_security_posture_management_hour.rs b/src/datadogV1/model/model_usage_cloud_security_posture_management_hour.rs index 5ce3606e0..72918f464 100644 --- a/src/datadogV1/model/model_usage_cloud_security_posture_management_hour.rs +++ b/src/datadogV1/model/model_usage_cloud_security_posture_management_hour.rs @@ -84,56 +84,57 @@ impl UsageCloudSecurityPostureManagementHour { } } - pub fn with_aas_host_count(&mut self, value: Option) -> &mut Self { + pub fn aas_host_count(&mut self, value: Option) -> &mut Self { self.aas_host_count = Some(value); self } - pub fn with_aws_host_count(&mut self, value: Option) -> &mut Self { + pub fn aws_host_count(&mut self, value: Option) -> &mut Self { self.aws_host_count = Some(value); self } - pub fn with_azure_host_count(&mut self, value: Option) -> &mut Self { + pub fn azure_host_count(&mut self, value: Option) -> &mut Self { self.azure_host_count = Some(value); self } - pub fn with_compliance_host_count(&mut self, value: Option) -> &mut Self { + pub fn compliance_host_count(&mut self, value: Option) -> &mut Self { self.compliance_host_count = Some(value); self } - pub fn with_container_count(&mut self, value: Option) -> &mut Self { + pub fn container_count(&mut self, value: Option) -> &mut Self { self.container_count = Some(value); self } - pub fn with_gcp_host_count(&mut self, value: Option) -> &mut Self { + pub fn gcp_host_count(&mut self, value: Option) -> &mut Self { self.gcp_host_count = Some(value); self } - pub fn with_host_count(&mut self, value: Option) -> &mut Self { + pub fn host_count(&mut self, value: Option) -> &mut Self { self.host_count = Some(value); self } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageCloudSecurityPostureManagementHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_cloud_security_posture_management_response.rs b/src/datadogV1/model/model_usage_cloud_security_posture_management_response.rs index e584070e2..d77eca3fc 100644 --- a/src/datadogV1/model/model_usage_cloud_security_posture_management_response.rs +++ b/src/datadogV1/model/model_usage_cloud_security_posture_management_response.rs @@ -18,7 +18,7 @@ impl UsageCloudSecurityPostureManagementResponse { UsageCloudSecurityPostureManagementResponse { usage: None } } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl UsageCloudSecurityPostureManagementResponse { self } } + impl Default for UsageCloudSecurityPostureManagementResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_custom_reports_attributes.rs b/src/datadogV1/model/model_usage_custom_reports_attributes.rs index dbc6a5bbb..b1d9e7960 100644 --- a/src/datadogV1/model/model_usage_custom_reports_attributes.rs +++ b/src/datadogV1/model/model_usage_custom_reports_attributes.rs @@ -36,31 +36,32 @@ impl UsageCustomReportsAttributes { } } - pub fn with_computed_on(&mut self, value: String) -> &mut Self { + pub fn computed_on(&mut self, value: String) -> &mut Self { self.computed_on = Some(value); self } - pub fn with_end_date(&mut self, value: String) -> &mut Self { + pub fn end_date(&mut self, value: String) -> &mut Self { self.end_date = Some(value); self } - pub fn with_size(&mut self, value: i64) -> &mut Self { + pub fn size(&mut self, value: i64) -> &mut Self { self.size = Some(value); self } - pub fn with_start_date(&mut self, value: String) -> &mut Self { + pub fn start_date(&mut self, value: String) -> &mut Self { self.start_date = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } } + impl Default for UsageCustomReportsAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_custom_reports_data.rs b/src/datadogV1/model/model_usage_custom_reports_data.rs index 6dc5ebbb8..dfb9c2959 100644 --- a/src/datadogV1/model/model_usage_custom_reports_data.rs +++ b/src/datadogV1/model/model_usage_custom_reports_data.rs @@ -28,7 +28,7 @@ impl UsageCustomReportsData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV1::model::UsageCustomReportsAttributes, ) -> &mut Self { @@ -36,16 +36,17 @@ impl UsageCustomReportsData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV1::model::UsageReportsType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV1::model::UsageReportsType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for UsageCustomReportsData { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_custom_reports_meta.rs b/src/datadogV1/model/model_usage_custom_reports_meta.rs index b7dcd4a53..4293f9c14 100644 --- a/src/datadogV1/model/model_usage_custom_reports_meta.rs +++ b/src/datadogV1/model/model_usage_custom_reports_meta.rs @@ -18,14 +18,12 @@ impl UsageCustomReportsMeta { UsageCustomReportsMeta { page: None } } - pub fn with_page( - &mut self, - value: crate::datadogV1::model::UsageCustomReportsPage, - ) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV1::model::UsageCustomReportsPage) -> &mut Self { self.page = Some(value); self } } + impl Default for UsageCustomReportsMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_custom_reports_page.rs b/src/datadogV1/model/model_usage_custom_reports_page.rs index e3c153f63..95948977f 100644 --- a/src/datadogV1/model/model_usage_custom_reports_page.rs +++ b/src/datadogV1/model/model_usage_custom_reports_page.rs @@ -18,11 +18,12 @@ impl UsageCustomReportsPage { UsageCustomReportsPage { total_count: None } } - pub fn with_total_count(&mut self, value: i64) -> &mut Self { + pub fn total_count(&mut self, value: i64) -> &mut Self { self.total_count = Some(value); self } } + impl Default for UsageCustomReportsPage { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_custom_reports_response.rs b/src/datadogV1/model/model_usage_custom_reports_response.rs index 6b9623567..568a64d3d 100644 --- a/src/datadogV1/model/model_usage_custom_reports_response.rs +++ b/src/datadogV1/model/model_usage_custom_reports_response.rs @@ -24,7 +24,7 @@ impl UsageCustomReportsResponse { } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -32,14 +32,12 @@ impl UsageCustomReportsResponse { self } - pub fn with_meta( - &mut self, - value: crate::datadogV1::model::UsageCustomReportsMeta, - ) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV1::model::UsageCustomReportsMeta) -> &mut Self { self.meta = Some(value); self } } + impl Default for UsageCustomReportsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_cws_hour.rs b/src/datadogV1/model/model_usage_cws_hour.rs index e786c4745..45a183536 100644 --- a/src/datadogV1/model/model_usage_cws_hour.rs +++ b/src/datadogV1/model/model_usage_cws_hour.rs @@ -44,31 +44,32 @@ impl UsageCWSHour { } } - pub fn with_cws_container_count(&mut self, value: Option) -> &mut Self { + pub fn cws_container_count(&mut self, value: Option) -> &mut Self { self.cws_container_count = Some(value); self } - pub fn with_cws_host_count(&mut self, value: Option) -> &mut Self { + pub fn cws_host_count(&mut self, value: Option) -> &mut Self { self.cws_host_count = Some(value); self } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageCWSHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_cws_response.rs b/src/datadogV1/model/model_usage_cws_response.rs index b7379f222..a019fdebc 100644 --- a/src/datadogV1/model/model_usage_cws_response.rs +++ b/src/datadogV1/model/model_usage_cws_response.rs @@ -18,11 +18,12 @@ impl UsageCWSResponse { UsageCWSResponse { usage: None } } - pub fn with_usage(&mut self, value: Vec) -> &mut Self { + pub fn usage(&mut self, value: Vec) -> &mut Self { self.usage = Some(value); self } } + impl Default for UsageCWSResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_dbm_hour.rs b/src/datadogV1/model/model_usage_dbm_hour.rs index 30f426b50..81a731a76 100644 --- a/src/datadogV1/model/model_usage_dbm_hour.rs +++ b/src/datadogV1/model/model_usage_dbm_hour.rs @@ -44,31 +44,32 @@ impl UsageDBMHour { } } - pub fn with_dbm_host_count(&mut self, value: Option) -> &mut Self { + pub fn dbm_host_count(&mut self, value: Option) -> &mut Self { self.dbm_host_count = Some(value); self } - pub fn with_dbm_queries_count(&mut self, value: Option) -> &mut Self { + pub fn dbm_queries_count(&mut self, value: Option) -> &mut Self { self.dbm_queries_count = Some(value); self } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageDBMHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_dbm_response.rs b/src/datadogV1/model/model_usage_dbm_response.rs index 8085b65b1..3829262dd 100644 --- a/src/datadogV1/model/model_usage_dbm_response.rs +++ b/src/datadogV1/model/model_usage_dbm_response.rs @@ -18,11 +18,12 @@ impl UsageDBMResponse { UsageDBMResponse { usage: None } } - pub fn with_usage(&mut self, value: Vec) -> &mut Self { + pub fn usage(&mut self, value: Vec) -> &mut Self { self.usage = Some(value); self } } + impl Default for UsageDBMResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_fargate_hour.rs b/src/datadogV1/model/model_usage_fargate_hour.rs index b70d7661e..04ffcb4e5 100644 --- a/src/datadogV1/model/model_usage_fargate_hour.rs +++ b/src/datadogV1/model/model_usage_fargate_hour.rs @@ -60,41 +60,42 @@ impl UsageFargateHour { } } - pub fn with_apm_fargate_count(&mut self, value: Option) -> &mut Self { + pub fn apm_fargate_count(&mut self, value: Option) -> &mut Self { self.apm_fargate_count = Some(value); self } - pub fn with_appsec_fargate_count(&mut self, value: Option) -> &mut Self { + pub fn appsec_fargate_count(&mut self, value: Option) -> &mut Self { self.appsec_fargate_count = Some(value); self } - pub fn with_avg_profiled_fargate_tasks(&mut self, value: Option) -> &mut Self { + pub fn avg_profiled_fargate_tasks(&mut self, value: Option) -> &mut Self { self.avg_profiled_fargate_tasks = Some(value); self } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_tasks_count(&mut self, value: Option) -> &mut Self { + pub fn tasks_count(&mut self, value: Option) -> &mut Self { self.tasks_count = Some(value); self } } + impl Default for UsageFargateHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_fargate_response.rs b/src/datadogV1/model/model_usage_fargate_response.rs index 8256f8d63..a1313ac4c 100644 --- a/src/datadogV1/model/model_usage_fargate_response.rs +++ b/src/datadogV1/model/model_usage_fargate_response.rs @@ -18,14 +18,12 @@ impl UsageFargateResponse { UsageFargateResponse { usage: None } } - pub fn with_usage( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn usage(&mut self, value: Vec) -> &mut Self { self.usage = Some(value); self } } + impl Default for UsageFargateResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_host_hour.rs b/src/datadogV1/model/model_usage_host_hour.rs index ced0729f6..d0bb980d6 100644 --- a/src/datadogV1/model/model_usage_host_hour.rs +++ b/src/datadogV1/model/model_usage_host_hour.rs @@ -149,91 +149,92 @@ impl UsageHostHour { } } - pub fn with_agent_host_count(&mut self, value: Option) -> &mut Self { + pub fn agent_host_count(&mut self, value: Option) -> &mut Self { self.agent_host_count = Some(value); self } - pub fn with_alibaba_host_count(&mut self, value: Option) -> &mut Self { + pub fn alibaba_host_count(&mut self, value: Option) -> &mut Self { self.alibaba_host_count = Some(value); self } - pub fn with_apm_azure_app_service_host_count(&mut self, value: Option) -> &mut Self { + pub fn apm_azure_app_service_host_count(&mut self, value: Option) -> &mut Self { self.apm_azure_app_service_host_count = Some(value); self } - pub fn with_apm_host_count(&mut self, value: Option) -> &mut Self { + pub fn apm_host_count(&mut self, value: Option) -> &mut Self { self.apm_host_count = Some(value); self } - pub fn with_aws_host_count(&mut self, value: Option) -> &mut Self { + pub fn aws_host_count(&mut self, value: Option) -> &mut Self { self.aws_host_count = Some(value); self } - pub fn with_azure_host_count(&mut self, value: Option) -> &mut Self { + pub fn azure_host_count(&mut self, value: Option) -> &mut Self { self.azure_host_count = Some(value); self } - pub fn with_container_count(&mut self, value: Option) -> &mut Self { + pub fn container_count(&mut self, value: Option) -> &mut Self { self.container_count = Some(value); self } - pub fn with_gcp_host_count(&mut self, value: Option) -> &mut Self { + pub fn gcp_host_count(&mut self, value: Option) -> &mut Self { self.gcp_host_count = Some(value); self } - pub fn with_heroku_host_count(&mut self, value: Option) -> &mut Self { + pub fn heroku_host_count(&mut self, value: Option) -> &mut Self { self.heroku_host_count = Some(value); self } - pub fn with_host_count(&mut self, value: Option) -> &mut Self { + pub fn host_count(&mut self, value: Option) -> &mut Self { self.host_count = Some(value); self } - pub fn with_hour(&mut self, value: Option) -> &mut Self { + pub fn hour(&mut self, value: Option) -> &mut Self { self.hour = Some(value); self } - pub fn with_infra_azure_app_service(&mut self, value: Option) -> &mut Self { + pub fn infra_azure_app_service(&mut self, value: Option) -> &mut Self { self.infra_azure_app_service = Some(value); self } - pub fn with_opentelemetry_apm_host_count(&mut self, value: Option) -> &mut Self { + pub fn opentelemetry_apm_host_count(&mut self, value: Option) -> &mut Self { self.opentelemetry_apm_host_count = Some(value); self } - pub fn with_opentelemetry_host_count(&mut self, value: Option) -> &mut Self { + pub fn opentelemetry_host_count(&mut self, value: Option) -> &mut Self { self.opentelemetry_host_count = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_vsphere_host_count(&mut self, value: Option) -> &mut Self { + pub fn vsphere_host_count(&mut self, value: Option) -> &mut Self { self.vsphere_host_count = Some(value); self } } + impl Default for UsageHostHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_hosts_response.rs b/src/datadogV1/model/model_usage_hosts_response.rs index 9b5d0c207..d0e0bf6c7 100644 --- a/src/datadogV1/model/model_usage_hosts_response.rs +++ b/src/datadogV1/model/model_usage_hosts_response.rs @@ -18,11 +18,12 @@ impl UsageHostsResponse { UsageHostsResponse { usage: None } } - pub fn with_usage(&mut self, value: Vec) -> &mut Self { + pub fn usage(&mut self, value: Vec) -> &mut Self { self.usage = Some(value); self } } + impl Default for UsageHostsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_incident_management_hour.rs b/src/datadogV1/model/model_usage_incident_management_hour.rs index 48f63b960..40b5dc803 100644 --- a/src/datadogV1/model/model_usage_incident_management_hour.rs +++ b/src/datadogV1/model/model_usage_incident_management_hour.rs @@ -36,26 +36,27 @@ impl UsageIncidentManagementHour { } } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_monthly_active_users(&mut self, value: Option) -> &mut Self { + pub fn monthly_active_users(&mut self, value: Option) -> &mut Self { self.monthly_active_users = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageIncidentManagementHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_incident_management_response.rs b/src/datadogV1/model/model_usage_incident_management_response.rs index 3fa82c2bf..d29d49874 100644 --- a/src/datadogV1/model/model_usage_incident_management_response.rs +++ b/src/datadogV1/model/model_usage_incident_management_response.rs @@ -18,7 +18,7 @@ impl UsageIncidentManagementResponse { UsageIncidentManagementResponse { usage: None } } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl UsageIncidentManagementResponse { self } } + impl Default for UsageIncidentManagementResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_indexed_spans_hour.rs b/src/datadogV1/model/model_usage_indexed_spans_hour.rs index ada34170e..ae57f5753 100644 --- a/src/datadogV1/model/model_usage_indexed_spans_hour.rs +++ b/src/datadogV1/model/model_usage_indexed_spans_hour.rs @@ -36,26 +36,27 @@ impl UsageIndexedSpansHour { } } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_indexed_events_count(&mut self, value: Option) -> &mut Self { + pub fn indexed_events_count(&mut self, value: Option) -> &mut Self { self.indexed_events_count = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageIndexedSpansHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_indexed_spans_response.rs b/src/datadogV1/model/model_usage_indexed_spans_response.rs index d8afbce97..5d7c979c7 100644 --- a/src/datadogV1/model/model_usage_indexed_spans_response.rs +++ b/src/datadogV1/model/model_usage_indexed_spans_response.rs @@ -18,7 +18,7 @@ impl UsageIndexedSpansResponse { UsageIndexedSpansResponse { usage: None } } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl UsageIndexedSpansResponse { self } } + impl Default for UsageIndexedSpansResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_ingested_spans_hour.rs b/src/datadogV1/model/model_usage_ingested_spans_hour.rs index 421c89496..3652d9119 100644 --- a/src/datadogV1/model/model_usage_ingested_spans_hour.rs +++ b/src/datadogV1/model/model_usage_ingested_spans_hour.rs @@ -36,26 +36,27 @@ impl UsageIngestedSpansHour { } } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_ingested_events_bytes(&mut self, value: Option) -> &mut Self { + pub fn ingested_events_bytes(&mut self, value: Option) -> &mut Self { self.ingested_events_bytes = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageIngestedSpansHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_ingested_spans_response.rs b/src/datadogV1/model/model_usage_ingested_spans_response.rs index 706b7393a..9b86ac4d9 100644 --- a/src/datadogV1/model/model_usage_ingested_spans_response.rs +++ b/src/datadogV1/model/model_usage_ingested_spans_response.rs @@ -18,7 +18,7 @@ impl UsageIngestedSpansResponse { UsageIngestedSpansResponse { usage: None } } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl UsageIngestedSpansResponse { self } } + impl Default for UsageIngestedSpansResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_io_t_hour.rs b/src/datadogV1/model/model_usage_io_t_hour.rs index a67d17a0b..674261045 100644 --- a/src/datadogV1/model/model_usage_io_t_hour.rs +++ b/src/datadogV1/model/model_usage_io_t_hour.rs @@ -36,26 +36,27 @@ impl UsageIoTHour { } } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_iot_device_count(&mut self, value: Option) -> &mut Self { + pub fn iot_device_count(&mut self, value: Option) -> &mut Self { self.iot_device_count = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageIoTHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_io_t_response.rs b/src/datadogV1/model/model_usage_io_t_response.rs index dcb545770..446fec2e5 100644 --- a/src/datadogV1/model/model_usage_io_t_response.rs +++ b/src/datadogV1/model/model_usage_io_t_response.rs @@ -18,11 +18,12 @@ impl UsageIoTResponse { UsageIoTResponse { usage: None } } - pub fn with_usage(&mut self, value: Vec) -> &mut Self { + pub fn usage(&mut self, value: Vec) -> &mut Self { self.usage = Some(value); self } } + impl Default for UsageIoTResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_lambda_hour.rs b/src/datadogV1/model/model_usage_lambda_hour.rs index 860292f3c..adf212027 100644 --- a/src/datadogV1/model/model_usage_lambda_hour.rs +++ b/src/datadogV1/model/model_usage_lambda_hour.rs @@ -45,31 +45,32 @@ impl UsageLambdaHour { } } - pub fn with_func_count(&mut self, value: Option) -> &mut Self { + pub fn func_count(&mut self, value: Option) -> &mut Self { self.func_count = Some(value); self } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_invocations_sum(&mut self, value: Option) -> &mut Self { + pub fn invocations_sum(&mut self, value: Option) -> &mut Self { self.invocations_sum = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageLambdaHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_lambda_response.rs b/src/datadogV1/model/model_usage_lambda_response.rs index a74601059..a82d59e0e 100644 --- a/src/datadogV1/model/model_usage_lambda_response.rs +++ b/src/datadogV1/model/model_usage_lambda_response.rs @@ -19,14 +19,12 @@ impl UsageLambdaResponse { UsageLambdaResponse { usage: None } } - pub fn with_usage( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn usage(&mut self, value: Vec) -> &mut Self { self.usage = Some(value); self } } + impl Default for UsageLambdaResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_logs_by_index_hour.rs b/src/datadogV1/model/model_usage_logs_by_index_hour.rs index 6eb79e085..d95dc6271 100644 --- a/src/datadogV1/model/model_usage_logs_by_index_hour.rs +++ b/src/datadogV1/model/model_usage_logs_by_index_hour.rs @@ -44,41 +44,42 @@ impl UsageLogsByIndexHour { } } - pub fn with_event_count(&mut self, value: i64) -> &mut Self { + pub fn event_count(&mut self, value: i64) -> &mut Self { self.event_count = Some(value); self } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_index_id(&mut self, value: String) -> &mut Self { + pub fn index_id(&mut self, value: String) -> &mut Self { self.index_id = Some(value); self } - pub fn with_index_name(&mut self, value: String) -> &mut Self { + pub fn index_name(&mut self, value: String) -> &mut Self { self.index_name = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_retention(&mut self, value: i64) -> &mut Self { + pub fn retention(&mut self, value: i64) -> &mut Self { self.retention = Some(value); self } } + impl Default for UsageLogsByIndexHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_logs_by_index_response.rs b/src/datadogV1/model/model_usage_logs_by_index_response.rs index aa5854b87..7385997ea 100644 --- a/src/datadogV1/model/model_usage_logs_by_index_response.rs +++ b/src/datadogV1/model/model_usage_logs_by_index_response.rs @@ -18,7 +18,7 @@ impl UsageLogsByIndexResponse { UsageLogsByIndexResponse { usage: None } } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl UsageLogsByIndexResponse { self } } + impl Default for UsageLogsByIndexResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_logs_by_retention_hour.rs b/src/datadogV1/model/model_usage_logs_by_retention_hour.rs index 25cc9d4af..560e505b0 100644 --- a/src/datadogV1/model/model_usage_logs_by_retention_hour.rs +++ b/src/datadogV1/model/model_usage_logs_by_retention_hour.rs @@ -56,36 +56,37 @@ impl UsageLogsByRetentionHour { } } - pub fn with_indexed_events_count(&mut self, value: Option) -> &mut Self { + pub fn indexed_events_count(&mut self, value: Option) -> &mut Self { self.indexed_events_count = Some(value); self } - pub fn with_live_indexed_events_count(&mut self, value: Option) -> &mut Self { + pub fn live_indexed_events_count(&mut self, value: Option) -> &mut Self { self.live_indexed_events_count = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_rehydrated_indexed_events_count(&mut self, value: Option) -> &mut Self { + pub fn rehydrated_indexed_events_count(&mut self, value: Option) -> &mut Self { self.rehydrated_indexed_events_count = Some(value); self } - pub fn with_retention(&mut self, value: Option) -> &mut Self { + pub fn retention(&mut self, value: Option) -> &mut Self { self.retention = Some(value); self } } + impl Default for UsageLogsByRetentionHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_logs_by_retention_response.rs b/src/datadogV1/model/model_usage_logs_by_retention_response.rs index 3c1e515d9..e1afdc96f 100644 --- a/src/datadogV1/model/model_usage_logs_by_retention_response.rs +++ b/src/datadogV1/model/model_usage_logs_by_retention_response.rs @@ -18,7 +18,7 @@ impl UsageLogsByRetentionResponse { UsageLogsByRetentionResponse { usage: None } } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl UsageLogsByRetentionResponse { self } } + impl Default for UsageLogsByRetentionResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_logs_hour.rs b/src/datadogV1/model/model_usage_logs_hour.rs index 0652ecb3d..28b78f871 100644 --- a/src/datadogV1/model/model_usage_logs_hour.rs +++ b/src/datadogV1/model/model_usage_logs_hour.rs @@ -92,61 +92,62 @@ impl UsageLogsHour { } } - pub fn with_billable_ingested_bytes(&mut self, value: Option) -> &mut Self { + pub fn billable_ingested_bytes(&mut self, value: Option) -> &mut Self { self.billable_ingested_bytes = Some(value); self } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_indexed_events_count(&mut self, value: Option) -> &mut Self { + pub fn indexed_events_count(&mut self, value: Option) -> &mut Self { self.indexed_events_count = Some(value); self } - pub fn with_ingested_events_bytes(&mut self, value: Option) -> &mut Self { + pub fn ingested_events_bytes(&mut self, value: Option) -> &mut Self { self.ingested_events_bytes = Some(value); self } - pub fn with_logs_forwarding_events_bytes(&mut self, value: Option) -> &mut Self { + pub fn logs_forwarding_events_bytes(&mut self, value: Option) -> &mut Self { self.logs_forwarding_events_bytes = Some(value); self } - pub fn with_logs_live_indexed_count(&mut self, value: Option) -> &mut Self { + pub fn logs_live_indexed_count(&mut self, value: Option) -> &mut Self { self.logs_live_indexed_count = Some(value); self } - pub fn with_logs_live_ingested_bytes(&mut self, value: Option) -> &mut Self { + pub fn logs_live_ingested_bytes(&mut self, value: Option) -> &mut Self { self.logs_live_ingested_bytes = Some(value); self } - pub fn with_logs_rehydrated_indexed_count(&mut self, value: Option) -> &mut Self { + pub fn logs_rehydrated_indexed_count(&mut self, value: Option) -> &mut Self { self.logs_rehydrated_indexed_count = Some(value); self } - pub fn with_logs_rehydrated_ingested_bytes(&mut self, value: Option) -> &mut Self { + pub fn logs_rehydrated_ingested_bytes(&mut self, value: Option) -> &mut Self { self.logs_rehydrated_ingested_bytes = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageLogsHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_logs_response.rs b/src/datadogV1/model/model_usage_logs_response.rs index 3a581ae84..02663e441 100644 --- a/src/datadogV1/model/model_usage_logs_response.rs +++ b/src/datadogV1/model/model_usage_logs_response.rs @@ -18,11 +18,12 @@ impl UsageLogsResponse { UsageLogsResponse { usage: None } } - pub fn with_usage(&mut self, value: Vec) -> &mut Self { + pub fn usage(&mut self, value: Vec) -> &mut Self { self.usage = Some(value); self } } + impl Default for UsageLogsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_network_flows_hour.rs b/src/datadogV1/model/model_usage_network_flows_hour.rs index 4649973c0..702935dee 100644 --- a/src/datadogV1/model/model_usage_network_flows_hour.rs +++ b/src/datadogV1/model/model_usage_network_flows_hour.rs @@ -36,26 +36,27 @@ impl UsageNetworkFlowsHour { } } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_indexed_events_count(&mut self, value: Option) -> &mut Self { + pub fn indexed_events_count(&mut self, value: Option) -> &mut Self { self.indexed_events_count = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageNetworkFlowsHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_network_flows_response.rs b/src/datadogV1/model/model_usage_network_flows_response.rs index 3d6612f3c..c66198e58 100644 --- a/src/datadogV1/model/model_usage_network_flows_response.rs +++ b/src/datadogV1/model/model_usage_network_flows_response.rs @@ -18,7 +18,7 @@ impl UsageNetworkFlowsResponse { UsageNetworkFlowsResponse { usage: None } } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl UsageNetworkFlowsResponse { self } } + impl Default for UsageNetworkFlowsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_network_hosts_hour.rs b/src/datadogV1/model/model_usage_network_hosts_hour.rs index f74b0a1b1..1e6dd708e 100644 --- a/src/datadogV1/model/model_usage_network_hosts_hour.rs +++ b/src/datadogV1/model/model_usage_network_hosts_hour.rs @@ -36,26 +36,27 @@ impl UsageNetworkHostsHour { } } - pub fn with_host_count(&mut self, value: Option) -> &mut Self { + pub fn host_count(&mut self, value: Option) -> &mut Self { self.host_count = Some(value); self } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageNetworkHostsHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_network_hosts_response.rs b/src/datadogV1/model/model_usage_network_hosts_response.rs index dff527d86..809775424 100644 --- a/src/datadogV1/model/model_usage_network_hosts_response.rs +++ b/src/datadogV1/model/model_usage_network_hosts_response.rs @@ -18,7 +18,7 @@ impl UsageNetworkHostsResponse { UsageNetworkHostsResponse { usage: None } } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl UsageNetworkHostsResponse { self } } + impl Default for UsageNetworkHostsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_online_archive_hour.rs b/src/datadogV1/model/model_usage_online_archive_hour.rs index a40f4597d..3165830b7 100644 --- a/src/datadogV1/model/model_usage_online_archive_hour.rs +++ b/src/datadogV1/model/model_usage_online_archive_hour.rs @@ -36,26 +36,27 @@ impl UsageOnlineArchiveHour { } } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_online_archive_events_count(&mut self, value: Option) -> &mut Self { + pub fn online_archive_events_count(&mut self, value: Option) -> &mut Self { self.online_archive_events_count = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageOnlineArchiveHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_online_archive_response.rs b/src/datadogV1/model/model_usage_online_archive_response.rs index caffcf2d8..3a7388c25 100644 --- a/src/datadogV1/model/model_usage_online_archive_response.rs +++ b/src/datadogV1/model/model_usage_online_archive_response.rs @@ -18,7 +18,7 @@ impl UsageOnlineArchiveResponse { UsageOnlineArchiveResponse { usage: None } } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl UsageOnlineArchiveResponse { self } } + impl Default for UsageOnlineArchiveResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_profiling_hour.rs b/src/datadogV1/model/model_usage_profiling_hour.rs index d8ea85b1d..5d856ce0e 100644 --- a/src/datadogV1/model/model_usage_profiling_hour.rs +++ b/src/datadogV1/model/model_usage_profiling_hour.rs @@ -52,36 +52,37 @@ impl UsageProfilingHour { } } - pub fn with_aas_count(&mut self, value: Option) -> &mut Self { + pub fn aas_count(&mut self, value: Option) -> &mut Self { self.aas_count = Some(value); self } - pub fn with_avg_container_agent_count(&mut self, value: Option) -> &mut Self { + pub fn avg_container_agent_count(&mut self, value: Option) -> &mut Self { self.avg_container_agent_count = Some(value); self } - pub fn with_host_count(&mut self, value: Option) -> &mut Self { + pub fn host_count(&mut self, value: Option) -> &mut Self { self.host_count = Some(value); self } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageProfilingHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_profiling_response.rs b/src/datadogV1/model/model_usage_profiling_response.rs index 0d8a24e97..91982ea5c 100644 --- a/src/datadogV1/model/model_usage_profiling_response.rs +++ b/src/datadogV1/model/model_usage_profiling_response.rs @@ -18,14 +18,12 @@ impl UsageProfilingResponse { UsageProfilingResponse { usage: None } } - pub fn with_usage( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn usage(&mut self, value: Vec) -> &mut Self { self.usage = Some(value); self } } + impl Default for UsageProfilingResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_rum_sessions_hour.rs b/src/datadogV1/model/model_usage_rum_sessions_hour.rs index 8ad812c27..12bc38693 100644 --- a/src/datadogV1/model/model_usage_rum_sessions_hour.rs +++ b/src/datadogV1/model/model_usage_rum_sessions_hour.rs @@ -72,51 +72,52 @@ impl UsageRumSessionsHour { } } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_replay_session_count(&mut self, value: i64) -> &mut Self { + pub fn replay_session_count(&mut self, value: i64) -> &mut Self { self.replay_session_count = Some(value); self } - pub fn with_session_count(&mut self, value: Option) -> &mut Self { + pub fn session_count(&mut self, value: Option) -> &mut Self { self.session_count = Some(value); self } - pub fn with_session_count_android(&mut self, value: Option) -> &mut Self { + pub fn session_count_android(&mut self, value: Option) -> &mut Self { self.session_count_android = Some(value); self } - pub fn with_session_count_flutter(&mut self, value: Option) -> &mut Self { + pub fn session_count_flutter(&mut self, value: Option) -> &mut Self { self.session_count_flutter = Some(value); self } - pub fn with_session_count_ios(&mut self, value: Option) -> &mut Self { + pub fn session_count_ios(&mut self, value: Option) -> &mut Self { self.session_count_ios = Some(value); self } - pub fn with_session_count_reactnative(&mut self, value: Option) -> &mut Self { + pub fn session_count_reactnative(&mut self, value: Option) -> &mut Self { self.session_count_reactnative = Some(value); self } } + impl Default for UsageRumSessionsHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_rum_sessions_response.rs b/src/datadogV1/model/model_usage_rum_sessions_response.rs index 320b01f3c..9e54e8831 100644 --- a/src/datadogV1/model/model_usage_rum_sessions_response.rs +++ b/src/datadogV1/model/model_usage_rum_sessions_response.rs @@ -18,7 +18,7 @@ impl UsageRumSessionsResponse { UsageRumSessionsResponse { usage: None } } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl UsageRumSessionsResponse { self } } + impl Default for UsageRumSessionsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_rum_units_hour.rs b/src/datadogV1/model/model_usage_rum_units_hour.rs index a9da8bf92..8a91cd891 100644 --- a/src/datadogV1/model/model_usage_rum_units_hour.rs +++ b/src/datadogV1/model/model_usage_rum_units_hour.rs @@ -48,31 +48,32 @@ impl UsageRumUnitsHour { } } - pub fn with_browser_rum_units(&mut self, value: Option) -> &mut Self { + pub fn browser_rum_units(&mut self, value: Option) -> &mut Self { self.browser_rum_units = Some(value); self } - pub fn with_mobile_rum_units(&mut self, value: Option) -> &mut Self { + pub fn mobile_rum_units(&mut self, value: Option) -> &mut Self { self.mobile_rum_units = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_rum_units(&mut self, value: Option) -> &mut Self { + pub fn rum_units(&mut self, value: Option) -> &mut Self { self.rum_units = Some(value); self } } + impl Default for UsageRumUnitsHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_rum_units_response.rs b/src/datadogV1/model/model_usage_rum_units_response.rs index 08d15a9ec..7b9a38e8f 100644 --- a/src/datadogV1/model/model_usage_rum_units_response.rs +++ b/src/datadogV1/model/model_usage_rum_units_response.rs @@ -18,14 +18,12 @@ impl UsageRumUnitsResponse { UsageRumUnitsResponse { usage: None } } - pub fn with_usage( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn usage(&mut self, value: Vec) -> &mut Self { self.usage = Some(value); self } } + impl Default for UsageRumUnitsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_sds_hour.rs b/src/datadogV1/model/model_usage_sds_hour.rs index 7642f95b2..a9554208d 100644 --- a/src/datadogV1/model/model_usage_sds_hour.rs +++ b/src/datadogV1/model/model_usage_sds_hour.rs @@ -68,46 +68,47 @@ impl UsageSDSHour { } } - pub fn with_apm_scanned_bytes(&mut self, value: Option) -> &mut Self { + pub fn apm_scanned_bytes(&mut self, value: Option) -> &mut Self { self.apm_scanned_bytes = Some(value); self } - pub fn with_events_scanned_bytes(&mut self, value: Option) -> &mut Self { + pub fn events_scanned_bytes(&mut self, value: Option) -> &mut Self { self.events_scanned_bytes = Some(value); self } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_logs_scanned_bytes(&mut self, value: Option) -> &mut Self { + pub fn logs_scanned_bytes(&mut self, value: Option) -> &mut Self { self.logs_scanned_bytes = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_rum_scanned_bytes(&mut self, value: Option) -> &mut Self { + pub fn rum_scanned_bytes(&mut self, value: Option) -> &mut Self { self.rum_scanned_bytes = Some(value); self } - pub fn with_total_scanned_bytes(&mut self, value: Option) -> &mut Self { + pub fn total_scanned_bytes(&mut self, value: Option) -> &mut Self { self.total_scanned_bytes = Some(value); self } } + impl Default for UsageSDSHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_sds_response.rs b/src/datadogV1/model/model_usage_sds_response.rs index 74bfdbd38..11cd5bd43 100644 --- a/src/datadogV1/model/model_usage_sds_response.rs +++ b/src/datadogV1/model/model_usage_sds_response.rs @@ -18,11 +18,12 @@ impl UsageSDSResponse { UsageSDSResponse { usage: None } } - pub fn with_usage(&mut self, value: Vec) -> &mut Self { + pub fn usage(&mut self, value: Vec) -> &mut Self { self.usage = Some(value); self } } + impl Default for UsageSDSResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_snmp_hour.rs b/src/datadogV1/model/model_usage_snmp_hour.rs index 3fd335273..8c78fbb35 100644 --- a/src/datadogV1/model/model_usage_snmp_hour.rs +++ b/src/datadogV1/model/model_usage_snmp_hour.rs @@ -36,26 +36,27 @@ impl UsageSNMPHour { } } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_snmp_devices(&mut self, value: Option) -> &mut Self { + pub fn snmp_devices(&mut self, value: Option) -> &mut Self { self.snmp_devices = Some(value); self } } + impl Default for UsageSNMPHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_snmp_response.rs b/src/datadogV1/model/model_usage_snmp_response.rs index ed208b5d5..19e49e5bc 100644 --- a/src/datadogV1/model/model_usage_snmp_response.rs +++ b/src/datadogV1/model/model_usage_snmp_response.rs @@ -18,11 +18,12 @@ impl UsageSNMPResponse { UsageSNMPResponse { usage: None } } - pub fn with_usage(&mut self, value: Vec) -> &mut Self { + pub fn usage(&mut self, value: Vec) -> &mut Self { self.usage = Some(value); self } } + impl Default for UsageSNMPResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_specified_custom_reports_attributes.rs b/src/datadogV1/model/model_usage_specified_custom_reports_attributes.rs index 6aa085aa7..854c75466 100644 --- a/src/datadogV1/model/model_usage_specified_custom_reports_attributes.rs +++ b/src/datadogV1/model/model_usage_specified_custom_reports_attributes.rs @@ -40,36 +40,37 @@ impl UsageSpecifiedCustomReportsAttributes { } } - pub fn with_computed_on(&mut self, value: String) -> &mut Self { + pub fn computed_on(&mut self, value: String) -> &mut Self { self.computed_on = Some(value); self } - pub fn with_end_date(&mut self, value: String) -> &mut Self { + pub fn end_date(&mut self, value: String) -> &mut Self { self.end_date = Some(value); self } - pub fn with_location(&mut self, value: String) -> &mut Self { + pub fn location(&mut self, value: String) -> &mut Self { self.location = Some(value); self } - pub fn with_size(&mut self, value: i64) -> &mut Self { + pub fn size(&mut self, value: i64) -> &mut Self { self.size = Some(value); self } - pub fn with_start_date(&mut self, value: String) -> &mut Self { + pub fn start_date(&mut self, value: String) -> &mut Self { self.start_date = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } } + impl Default for UsageSpecifiedCustomReportsAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_specified_custom_reports_data.rs b/src/datadogV1/model/model_usage_specified_custom_reports_data.rs index ed5231b9e..db998aec1 100644 --- a/src/datadogV1/model/model_usage_specified_custom_reports_data.rs +++ b/src/datadogV1/model/model_usage_specified_custom_reports_data.rs @@ -28,7 +28,7 @@ impl UsageSpecifiedCustomReportsData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV1::model::UsageSpecifiedCustomReportsAttributes, ) -> &mut Self { @@ -36,16 +36,17 @@ impl UsageSpecifiedCustomReportsData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV1::model::UsageReportsType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV1::model::UsageReportsType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for UsageSpecifiedCustomReportsData { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_specified_custom_reports_meta.rs b/src/datadogV1/model/model_usage_specified_custom_reports_meta.rs index e67dd4298..f9d92c8f4 100644 --- a/src/datadogV1/model/model_usage_specified_custom_reports_meta.rs +++ b/src/datadogV1/model/model_usage_specified_custom_reports_meta.rs @@ -18,7 +18,7 @@ impl UsageSpecifiedCustomReportsMeta { UsageSpecifiedCustomReportsMeta { page: None } } - pub fn with_page( + pub fn page( &mut self, value: crate::datadogV1::model::UsageSpecifiedCustomReportsPage, ) -> &mut Self { @@ -26,6 +26,7 @@ impl UsageSpecifiedCustomReportsMeta { self } } + impl Default for UsageSpecifiedCustomReportsMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_specified_custom_reports_page.rs b/src/datadogV1/model/model_usage_specified_custom_reports_page.rs index 0ed7579aa..8513ab095 100644 --- a/src/datadogV1/model/model_usage_specified_custom_reports_page.rs +++ b/src/datadogV1/model/model_usage_specified_custom_reports_page.rs @@ -18,11 +18,12 @@ impl UsageSpecifiedCustomReportsPage { UsageSpecifiedCustomReportsPage { total_count: None } } - pub fn with_total_count(&mut self, value: i64) -> &mut Self { + pub fn total_count(&mut self, value: i64) -> &mut Self { self.total_count = Some(value); self } } + impl Default for UsageSpecifiedCustomReportsPage { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_specified_custom_reports_response.rs b/src/datadogV1/model/model_usage_specified_custom_reports_response.rs index 1cc7f3af7..b46749939 100644 --- a/src/datadogV1/model/model_usage_specified_custom_reports_response.rs +++ b/src/datadogV1/model/model_usage_specified_custom_reports_response.rs @@ -24,7 +24,7 @@ impl UsageSpecifiedCustomReportsResponse { } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV1::model::UsageSpecifiedCustomReportsData, ) -> &mut Self { @@ -32,7 +32,7 @@ impl UsageSpecifiedCustomReportsResponse { self } - pub fn with_meta( + pub fn meta( &mut self, value: crate::datadogV1::model::UsageSpecifiedCustomReportsMeta, ) -> &mut Self { @@ -40,6 +40,7 @@ impl UsageSpecifiedCustomReportsResponse { self } } + impl Default for UsageSpecifiedCustomReportsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_summary_date.rs b/src/datadogV1/model/model_usage_summary_date.rs index 6164b57a8..dccaa07d2 100644 --- a/src/datadogV1/model/model_usage_summary_date.rs +++ b/src/datadogV1/model/model_usage_summary_date.rs @@ -427,623 +427,618 @@ impl UsageSummaryDate { } #[allow(deprecated)] - pub fn with_agent_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn agent_host_top99p(&mut self, value: i64) -> &mut Self { self.agent_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_apm_azure_app_service_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn apm_azure_app_service_host_top99p(&mut self, value: i64) -> &mut Self { self.apm_azure_app_service_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_apm_fargate_count_avg(&mut self, value: i64) -> &mut Self { + pub fn apm_fargate_count_avg(&mut self, value: i64) -> &mut Self { self.apm_fargate_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_apm_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn apm_host_top99p(&mut self, value: i64) -> &mut Self { self.apm_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_appsec_fargate_count_avg(&mut self, value: i64) -> &mut Self { + pub fn appsec_fargate_count_avg(&mut self, value: i64) -> &mut Self { self.appsec_fargate_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_audit_logs_lines_indexed_sum(&mut self, value: i64) -> &mut Self { + pub fn audit_logs_lines_indexed_sum(&mut self, value: i64) -> &mut Self { self.audit_logs_lines_indexed_sum = Some(value); self } #[allow(deprecated)] - pub fn with_audit_trail_enabled_hwm(&mut self, value: i64) -> &mut Self { + pub fn audit_trail_enabled_hwm(&mut self, value: i64) -> &mut Self { self.audit_trail_enabled_hwm = Some(value); self } #[allow(deprecated)] - pub fn with_avg_profiled_fargate_tasks(&mut self, value: i64) -> &mut Self { + pub fn avg_profiled_fargate_tasks(&mut self, value: i64) -> &mut Self { self.avg_profiled_fargate_tasks = Some(value); self } #[allow(deprecated)] - pub fn with_aws_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn aws_host_top99p(&mut self, value: i64) -> &mut Self { self.aws_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_aws_lambda_func_count(&mut self, value: i64) -> &mut Self { + pub fn aws_lambda_func_count(&mut self, value: i64) -> &mut Self { self.aws_lambda_func_count = Some(value); self } #[allow(deprecated)] - pub fn with_aws_lambda_invocations_sum(&mut self, value: i64) -> &mut Self { + pub fn aws_lambda_invocations_sum(&mut self, value: i64) -> &mut Self { self.aws_lambda_invocations_sum = Some(value); self } #[allow(deprecated)] - pub fn with_azure_app_service_top99p(&mut self, value: i64) -> &mut Self { + pub fn azure_app_service_top99p(&mut self, value: i64) -> &mut Self { self.azure_app_service_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_billable_ingested_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn billable_ingested_bytes_sum(&mut self, value: i64) -> &mut Self { self.billable_ingested_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_browser_rum_lite_session_count_sum(&mut self, value: i64) -> &mut Self { + pub fn browser_rum_lite_session_count_sum(&mut self, value: i64) -> &mut Self { self.browser_rum_lite_session_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_browser_rum_replay_session_count_sum(&mut self, value: i64) -> &mut Self { + pub fn browser_rum_replay_session_count_sum(&mut self, value: i64) -> &mut Self { self.browser_rum_replay_session_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_browser_rum_units_sum(&mut self, value: i64) -> &mut Self { + pub fn browser_rum_units_sum(&mut self, value: i64) -> &mut Self { self.browser_rum_units_sum = Some(value); self } #[allow(deprecated)] - pub fn with_ci_pipeline_indexed_spans_sum(&mut self, value: i64) -> &mut Self { + pub fn ci_pipeline_indexed_spans_sum(&mut self, value: i64) -> &mut Self { self.ci_pipeline_indexed_spans_sum = Some(value); self } #[allow(deprecated)] - pub fn with_ci_test_indexed_spans_sum(&mut self, value: i64) -> &mut Self { + pub fn ci_test_indexed_spans_sum(&mut self, value: i64) -> &mut Self { self.ci_test_indexed_spans_sum = Some(value); self } #[allow(deprecated)] - pub fn with_ci_visibility_itr_committers_hwm(&mut self, value: i64) -> &mut Self { + pub fn ci_visibility_itr_committers_hwm(&mut self, value: i64) -> &mut Self { self.ci_visibility_itr_committers_hwm = Some(value); self } #[allow(deprecated)] - pub fn with_ci_visibility_pipeline_committers_hwm(&mut self, value: i64) -> &mut Self { + pub fn ci_visibility_pipeline_committers_hwm(&mut self, value: i64) -> &mut Self { self.ci_visibility_pipeline_committers_hwm = Some(value); self } #[allow(deprecated)] - pub fn with_ci_visibility_test_committers_hwm(&mut self, value: i64) -> &mut Self { + pub fn ci_visibility_test_committers_hwm(&mut self, value: i64) -> &mut Self { self.ci_visibility_test_committers_hwm = Some(value); self } #[allow(deprecated)] - pub fn with_cloud_cost_management_aws_host_count_avg(&mut self, value: i64) -> &mut Self { + pub fn cloud_cost_management_aws_host_count_avg(&mut self, value: i64) -> &mut Self { self.cloud_cost_management_aws_host_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_cloud_cost_management_azure_host_count_avg(&mut self, value: i64) -> &mut Self { + pub fn cloud_cost_management_azure_host_count_avg(&mut self, value: i64) -> &mut Self { self.cloud_cost_management_azure_host_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_cloud_cost_management_host_count_avg(&mut self, value: i64) -> &mut Self { + pub fn cloud_cost_management_host_count_avg(&mut self, value: i64) -> &mut Self { self.cloud_cost_management_host_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_cloud_siem_events_sum(&mut self, value: i64) -> &mut Self { + pub fn cloud_siem_events_sum(&mut self, value: i64) -> &mut Self { self.cloud_siem_events_sum = Some(value); self } #[allow(deprecated)] - pub fn with_container_avg(&mut self, value: i64) -> &mut Self { + pub fn container_avg(&mut self, value: i64) -> &mut Self { self.container_avg = Some(value); self } #[allow(deprecated)] - pub fn with_container_excl_agent_avg(&mut self, value: i64) -> &mut Self { + pub fn container_excl_agent_avg(&mut self, value: i64) -> &mut Self { self.container_excl_agent_avg = Some(value); self } #[allow(deprecated)] - pub fn with_container_hwm(&mut self, value: i64) -> &mut Self { + pub fn container_hwm(&mut self, value: i64) -> &mut Self { self.container_hwm = Some(value); self } #[allow(deprecated)] - pub fn with_csm_container_enterprise_compliance_count_sum(&mut self, value: i64) -> &mut Self { + pub fn csm_container_enterprise_compliance_count_sum(&mut self, value: i64) -> &mut Self { self.csm_container_enterprise_compliance_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_csm_container_enterprise_cws_count_sum(&mut self, value: i64) -> &mut Self { + pub fn csm_container_enterprise_cws_count_sum(&mut self, value: i64) -> &mut Self { self.csm_container_enterprise_cws_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_csm_container_enterprise_total_count_sum(&mut self, value: i64) -> &mut Self { + pub fn csm_container_enterprise_total_count_sum(&mut self, value: i64) -> &mut Self { self.csm_container_enterprise_total_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_aas_host_count_top99p(&mut self, value: i64) -> &mut Self { + pub fn csm_host_enterprise_aas_host_count_top99p(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_aas_host_count_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_aws_host_count_top99p(&mut self, value: i64) -> &mut Self { + pub fn csm_host_enterprise_aws_host_count_top99p(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_aws_host_count_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_azure_host_count_top99p(&mut self, value: i64) -> &mut Self { + pub fn csm_host_enterprise_azure_host_count_top99p(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_azure_host_count_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_compliance_host_count_top99p( - &mut self, - value: i64, - ) -> &mut Self { + pub fn csm_host_enterprise_compliance_host_count_top99p(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_compliance_host_count_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_cws_host_count_top99p(&mut self, value: i64) -> &mut Self { + pub fn csm_host_enterprise_cws_host_count_top99p(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_cws_host_count_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_gcp_host_count_top99p(&mut self, value: i64) -> &mut Self { + pub fn csm_host_enterprise_gcp_host_count_top99p(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_gcp_host_count_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_total_host_count_top99p(&mut self, value: i64) -> &mut Self { + pub fn csm_host_enterprise_total_host_count_top99p(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_total_host_count_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_aas_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn cspm_aas_host_top99p(&mut self, value: i64) -> &mut Self { self.cspm_aas_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_aws_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn cspm_aws_host_top99p(&mut self, value: i64) -> &mut Self { self.cspm_aws_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_azure_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn cspm_azure_host_top99p(&mut self, value: i64) -> &mut Self { self.cspm_azure_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_container_avg(&mut self, value: i64) -> &mut Self { + pub fn cspm_container_avg(&mut self, value: i64) -> &mut Self { self.cspm_container_avg = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_container_hwm(&mut self, value: i64) -> &mut Self { + pub fn cspm_container_hwm(&mut self, value: i64) -> &mut Self { self.cspm_container_hwm = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_gcp_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn cspm_gcp_host_top99p(&mut self, value: i64) -> &mut Self { self.cspm_gcp_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn cspm_host_top99p(&mut self, value: i64) -> &mut Self { self.cspm_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_custom_ts_avg(&mut self, value: i64) -> &mut Self { + pub fn custom_ts_avg(&mut self, value: i64) -> &mut Self { self.custom_ts_avg = Some(value); self } #[allow(deprecated)] - pub fn with_cws_container_count_avg(&mut self, value: i64) -> &mut Self { + pub fn cws_container_count_avg(&mut self, value: i64) -> &mut Self { self.cws_container_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_cws_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn cws_host_top99p(&mut self, value: i64) -> &mut Self { self.cws_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_date(&mut self, value: String) -> &mut Self { + pub fn date(&mut self, value: String) -> &mut Self { self.date = Some(value); self } #[allow(deprecated)] - pub fn with_dbm_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn dbm_host_top99p(&mut self, value: i64) -> &mut Self { self.dbm_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_dbm_queries_count_avg(&mut self, value: i64) -> &mut Self { + pub fn dbm_queries_count_avg(&mut self, value: i64) -> &mut Self { self.dbm_queries_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_fargate_tasks_count_avg(&mut self, value: i64) -> &mut Self { + pub fn fargate_tasks_count_avg(&mut self, value: i64) -> &mut Self { self.fargate_tasks_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_fargate_tasks_count_hwm(&mut self, value: i64) -> &mut Self { + pub fn fargate_tasks_count_hwm(&mut self, value: i64) -> &mut Self { self.fargate_tasks_count_hwm = Some(value); self } #[allow(deprecated)] - pub fn with_forwarding_events_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn forwarding_events_bytes_sum(&mut self, value: i64) -> &mut Self { self.forwarding_events_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_gcp_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn gcp_host_top99p(&mut self, value: i64) -> &mut Self { self.gcp_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_heroku_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn heroku_host_top99p(&mut self, value: i64) -> &mut Self { self.heroku_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_incident_management_monthly_active_users_hwm(&mut self, value: i64) -> &mut Self { + pub fn incident_management_monthly_active_users_hwm(&mut self, value: i64) -> &mut Self { self.incident_management_monthly_active_users_hwm = Some(value); self } #[allow(deprecated)] - pub fn with_indexed_events_count_sum(&mut self, value: i64) -> &mut Self { + pub fn indexed_events_count_sum(&mut self, value: i64) -> &mut Self { self.indexed_events_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_infra_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn infra_host_top99p(&mut self, value: i64) -> &mut Self { self.infra_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_ingested_events_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn ingested_events_bytes_sum(&mut self, value: i64) -> &mut Self { self.ingested_events_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_iot_device_sum(&mut self, value: i64) -> &mut Self { + pub fn iot_device_sum(&mut self, value: i64) -> &mut Self { self.iot_device_sum = Some(value); self } #[allow(deprecated)] - pub fn with_iot_device_top99p(&mut self, value: i64) -> &mut Self { + pub fn iot_device_top99p(&mut self, value: i64) -> &mut Self { self.iot_device_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_lite_session_count_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_lite_session_count_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_lite_session_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_session_count_android_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_session_count_android_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_session_count_android_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_session_count_flutter_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_session_count_flutter_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_session_count_flutter_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_session_count_ios_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_session_count_ios_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_session_count_ios_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_session_count_reactnative_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_session_count_reactnative_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_session_count_reactnative_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_session_count_roku_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_session_count_roku_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_session_count_roku_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_session_count_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_session_count_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_session_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_units_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_units_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_units_sum = Some(value); self } #[allow(deprecated)] - pub fn with_ndm_netflow_events_sum(&mut self, value: i64) -> &mut Self { + pub fn ndm_netflow_events_sum(&mut self, value: i64) -> &mut Self { self.ndm_netflow_events_sum = Some(value); self } #[allow(deprecated)] - pub fn with_netflow_indexed_events_count_sum(&mut self, value: i64) -> &mut Self { + pub fn netflow_indexed_events_count_sum(&mut self, value: i64) -> &mut Self { self.netflow_indexed_events_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_npm_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn npm_host_top99p(&mut self, value: i64) -> &mut Self { self.npm_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_observability_pipelines_bytes_processed_sum(&mut self, value: i64) -> &mut Self { + pub fn observability_pipelines_bytes_processed_sum(&mut self, value: i64) -> &mut Self { self.observability_pipelines_bytes_processed_sum = Some(value); self } #[allow(deprecated)] - pub fn with_online_archive_events_count_sum(&mut self, value: i64) -> &mut Self { + pub fn online_archive_events_count_sum(&mut self, value: i64) -> &mut Self { self.online_archive_events_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_opentelemetry_apm_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn opentelemetry_apm_host_top99p(&mut self, value: i64) -> &mut Self { self.opentelemetry_apm_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_opentelemetry_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn opentelemetry_host_top99p(&mut self, value: i64) -> &mut Self { self.opentelemetry_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_orgs( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn orgs(&mut self, value: Vec) -> &mut Self { self.orgs = Some(value); self } #[allow(deprecated)] - pub fn with_profiling_aas_count_top99p(&mut self, value: i64) -> &mut Self { + pub fn profiling_aas_count_top99p(&mut self, value: i64) -> &mut Self { self.profiling_aas_count_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_profiling_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn profiling_host_top99p(&mut self, value: i64) -> &mut Self { self.profiling_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_rum_browser_and_mobile_session_count(&mut self, value: i64) -> &mut Self { + pub fn rum_browser_and_mobile_session_count(&mut self, value: i64) -> &mut Self { self.rum_browser_and_mobile_session_count = Some(value); self } #[allow(deprecated)] - pub fn with_rum_session_count_sum(&mut self, value: i64) -> &mut Self { + pub fn rum_session_count_sum(&mut self, value: i64) -> &mut Self { self.rum_session_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_rum_total_session_count_sum(&mut self, value: i64) -> &mut Self { + pub fn rum_total_session_count_sum(&mut self, value: i64) -> &mut Self { self.rum_total_session_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_rum_units_sum(&mut self, value: i64) -> &mut Self { + pub fn rum_units_sum(&mut self, value: i64) -> &mut Self { self.rum_units_sum = Some(value); self } #[allow(deprecated)] - pub fn with_sds_apm_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn sds_apm_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { self.sds_apm_scanned_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_sds_events_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn sds_events_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { self.sds_events_scanned_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_sds_logs_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn sds_logs_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { self.sds_logs_scanned_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_sds_rum_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn sds_rum_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { self.sds_rum_scanned_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_sds_total_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn sds_total_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { self.sds_total_scanned_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_serverless_apps_azure_count_avg(&mut self, value: i64) -> &mut Self { + pub fn serverless_apps_azure_count_avg(&mut self, value: i64) -> &mut Self { self.serverless_apps_azure_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_serverless_apps_google_count_avg(&mut self, value: i64) -> &mut Self { + pub fn serverless_apps_google_count_avg(&mut self, value: i64) -> &mut Self { self.serverless_apps_google_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_serverless_apps_total_count_avg(&mut self, value: i64) -> &mut Self { + pub fn serverless_apps_total_count_avg(&mut self, value: i64) -> &mut Self { self.serverless_apps_total_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_synthetics_browser_check_calls_count_sum(&mut self, value: i64) -> &mut Self { + pub fn synthetics_browser_check_calls_count_sum(&mut self, value: i64) -> &mut Self { self.synthetics_browser_check_calls_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_synthetics_check_calls_count_sum(&mut self, value: i64) -> &mut Self { + pub fn synthetics_check_calls_count_sum(&mut self, value: i64) -> &mut Self { self.synthetics_check_calls_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_synthetics_mobile_test_runs_sum(&mut self, value: i64) -> &mut Self { + pub fn synthetics_mobile_test_runs_sum(&mut self, value: i64) -> &mut Self { self.synthetics_mobile_test_runs_sum = Some(value); self } #[allow(deprecated)] - pub fn with_synthetics_parallel_testing_max_slots_hwm(&mut self, value: i64) -> &mut Self { + pub fn synthetics_parallel_testing_max_slots_hwm(&mut self, value: i64) -> &mut Self { self.synthetics_parallel_testing_max_slots_hwm = Some(value); self } #[allow(deprecated)] - pub fn with_trace_search_indexed_events_count_sum(&mut self, value: i64) -> &mut Self { + pub fn trace_search_indexed_events_count_sum(&mut self, value: i64) -> &mut Self { self.trace_search_indexed_events_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_twol_ingested_events_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn twol_ingested_events_bytes_sum(&mut self, value: i64) -> &mut Self { self.twol_ingested_events_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_universal_service_monitoring_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn universal_service_monitoring_host_top99p(&mut self, value: i64) -> &mut Self { self.universal_service_monitoring_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_vsphere_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn vsphere_host_top99p(&mut self, value: i64) -> &mut Self { self.vsphere_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_vuln_management_host_count_top99p(&mut self, value: i64) -> &mut Self { + pub fn vuln_management_host_count_top99p(&mut self, value: i64) -> &mut Self { self.vuln_management_host_count_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_workflow_executions_usage_sum(&mut self, value: i64) -> &mut Self { + pub fn workflow_executions_usage_sum(&mut self, value: i64) -> &mut Self { self.workflow_executions_usage_sum = Some(value); self } } + impl Default for UsageSummaryDate { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_summary_date_org.rs b/src/datadogV1/model/model_usage_summary_date_org.rs index 3bd52b70c..3780e7c71 100644 --- a/src/datadogV1/model/model_usage_summary_date_org.rs +++ b/src/datadogV1/model/model_usage_summary_date_org.rs @@ -443,644 +443,642 @@ impl UsageSummaryDateOrg { } #[allow(deprecated)] - pub fn with_agent_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn agent_host_top99p(&mut self, value: i64) -> &mut Self { self.agent_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_apm_azure_app_service_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn apm_azure_app_service_host_top99p(&mut self, value: i64) -> &mut Self { self.apm_azure_app_service_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_apm_fargate_count_avg(&mut self, value: i64) -> &mut Self { + pub fn apm_fargate_count_avg(&mut self, value: i64) -> &mut Self { self.apm_fargate_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_apm_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn apm_host_top99p(&mut self, value: i64) -> &mut Self { self.apm_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_appsec_fargate_count_avg(&mut self, value: i64) -> &mut Self { + pub fn appsec_fargate_count_avg(&mut self, value: i64) -> &mut Self { self.appsec_fargate_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_audit_logs_lines_indexed_sum(&mut self, value: i64) -> &mut Self { + pub fn audit_logs_lines_indexed_sum(&mut self, value: i64) -> &mut Self { self.audit_logs_lines_indexed_sum = Some(value); self } #[allow(deprecated)] - pub fn with_audit_trail_enabled_hwm(&mut self, value: i64) -> &mut Self { + pub fn audit_trail_enabled_hwm(&mut self, value: i64) -> &mut Self { self.audit_trail_enabled_hwm = Some(value); self } #[allow(deprecated)] - pub fn with_avg_profiled_fargate_tasks(&mut self, value: i64) -> &mut Self { + pub fn avg_profiled_fargate_tasks(&mut self, value: i64) -> &mut Self { self.avg_profiled_fargate_tasks = Some(value); self } #[allow(deprecated)] - pub fn with_aws_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn aws_host_top99p(&mut self, value: i64) -> &mut Self { self.aws_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_aws_lambda_func_count(&mut self, value: i64) -> &mut Self { + pub fn aws_lambda_func_count(&mut self, value: i64) -> &mut Self { self.aws_lambda_func_count = Some(value); self } #[allow(deprecated)] - pub fn with_aws_lambda_invocations_sum(&mut self, value: i64) -> &mut Self { + pub fn aws_lambda_invocations_sum(&mut self, value: i64) -> &mut Self { self.aws_lambda_invocations_sum = Some(value); self } #[allow(deprecated)] - pub fn with_azure_app_service_top99p(&mut self, value: i64) -> &mut Self { + pub fn azure_app_service_top99p(&mut self, value: i64) -> &mut Self { self.azure_app_service_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_billable_ingested_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn billable_ingested_bytes_sum(&mut self, value: i64) -> &mut Self { self.billable_ingested_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_browser_rum_lite_session_count_sum(&mut self, value: i64) -> &mut Self { + pub fn browser_rum_lite_session_count_sum(&mut self, value: i64) -> &mut Self { self.browser_rum_lite_session_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_browser_rum_replay_session_count_sum(&mut self, value: i64) -> &mut Self { + pub fn browser_rum_replay_session_count_sum(&mut self, value: i64) -> &mut Self { self.browser_rum_replay_session_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_browser_rum_units_sum(&mut self, value: i64) -> &mut Self { + pub fn browser_rum_units_sum(&mut self, value: i64) -> &mut Self { self.browser_rum_units_sum = Some(value); self } #[allow(deprecated)] - pub fn with_ci_pipeline_indexed_spans_sum(&mut self, value: i64) -> &mut Self { + pub fn ci_pipeline_indexed_spans_sum(&mut self, value: i64) -> &mut Self { self.ci_pipeline_indexed_spans_sum = Some(value); self } #[allow(deprecated)] - pub fn with_ci_test_indexed_spans_sum(&mut self, value: i64) -> &mut Self { + pub fn ci_test_indexed_spans_sum(&mut self, value: i64) -> &mut Self { self.ci_test_indexed_spans_sum = Some(value); self } #[allow(deprecated)] - pub fn with_ci_visibility_itr_committers_hwm(&mut self, value: i64) -> &mut Self { + pub fn ci_visibility_itr_committers_hwm(&mut self, value: i64) -> &mut Self { self.ci_visibility_itr_committers_hwm = Some(value); self } #[allow(deprecated)] - pub fn with_ci_visibility_pipeline_committers_hwm(&mut self, value: i64) -> &mut Self { + pub fn ci_visibility_pipeline_committers_hwm(&mut self, value: i64) -> &mut Self { self.ci_visibility_pipeline_committers_hwm = Some(value); self } #[allow(deprecated)] - pub fn with_ci_visibility_test_committers_hwm(&mut self, value: i64) -> &mut Self { + pub fn ci_visibility_test_committers_hwm(&mut self, value: i64) -> &mut Self { self.ci_visibility_test_committers_hwm = Some(value); self } #[allow(deprecated)] - pub fn with_cloud_cost_management_aws_host_count_avg(&mut self, value: i64) -> &mut Self { + pub fn cloud_cost_management_aws_host_count_avg(&mut self, value: i64) -> &mut Self { self.cloud_cost_management_aws_host_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_cloud_cost_management_azure_host_count_avg(&mut self, value: i64) -> &mut Self { + pub fn cloud_cost_management_azure_host_count_avg(&mut self, value: i64) -> &mut Self { self.cloud_cost_management_azure_host_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_cloud_cost_management_host_count_avg(&mut self, value: i64) -> &mut Self { + pub fn cloud_cost_management_host_count_avg(&mut self, value: i64) -> &mut Self { self.cloud_cost_management_host_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_cloud_siem_events_sum(&mut self, value: i64) -> &mut Self { + pub fn cloud_siem_events_sum(&mut self, value: i64) -> &mut Self { self.cloud_siem_events_sum = Some(value); self } #[allow(deprecated)] - pub fn with_container_avg(&mut self, value: i64) -> &mut Self { + pub fn container_avg(&mut self, value: i64) -> &mut Self { self.container_avg = Some(value); self } #[allow(deprecated)] - pub fn with_container_excl_agent_avg(&mut self, value: i64) -> &mut Self { + pub fn container_excl_agent_avg(&mut self, value: i64) -> &mut Self { self.container_excl_agent_avg = Some(value); self } #[allow(deprecated)] - pub fn with_container_hwm(&mut self, value: i64) -> &mut Self { + pub fn container_hwm(&mut self, value: i64) -> &mut Self { self.container_hwm = Some(value); self } #[allow(deprecated)] - pub fn with_csm_container_enterprise_compliance_count_sum(&mut self, value: i64) -> &mut Self { + pub fn csm_container_enterprise_compliance_count_sum(&mut self, value: i64) -> &mut Self { self.csm_container_enterprise_compliance_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_csm_container_enterprise_cws_count_sum(&mut self, value: i64) -> &mut Self { + pub fn csm_container_enterprise_cws_count_sum(&mut self, value: i64) -> &mut Self { self.csm_container_enterprise_cws_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_csm_container_enterprise_total_count_sum(&mut self, value: i64) -> &mut Self { + pub fn csm_container_enterprise_total_count_sum(&mut self, value: i64) -> &mut Self { self.csm_container_enterprise_total_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_aas_host_count_top99p(&mut self, value: i64) -> &mut Self { + pub fn csm_host_enterprise_aas_host_count_top99p(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_aas_host_count_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_aws_host_count_top99p(&mut self, value: i64) -> &mut Self { + pub fn csm_host_enterprise_aws_host_count_top99p(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_aws_host_count_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_azure_host_count_top99p(&mut self, value: i64) -> &mut Self { + pub fn csm_host_enterprise_azure_host_count_top99p(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_azure_host_count_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_compliance_host_count_top99p( - &mut self, - value: i64, - ) -> &mut Self { + pub fn csm_host_enterprise_compliance_host_count_top99p(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_compliance_host_count_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_cws_host_count_top99p(&mut self, value: i64) -> &mut Self { + pub fn csm_host_enterprise_cws_host_count_top99p(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_cws_host_count_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_gcp_host_count_top99p(&mut self, value: i64) -> &mut Self { + pub fn csm_host_enterprise_gcp_host_count_top99p(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_gcp_host_count_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_total_host_count_top99p(&mut self, value: i64) -> &mut Self { + pub fn csm_host_enterprise_total_host_count_top99p(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_total_host_count_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_aas_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn cspm_aas_host_top99p(&mut self, value: i64) -> &mut Self { self.cspm_aas_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_aws_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn cspm_aws_host_top99p(&mut self, value: i64) -> &mut Self { self.cspm_aws_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_azure_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn cspm_azure_host_top99p(&mut self, value: i64) -> &mut Self { self.cspm_azure_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_container_avg(&mut self, value: i64) -> &mut Self { + pub fn cspm_container_avg(&mut self, value: i64) -> &mut Self { self.cspm_container_avg = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_container_hwm(&mut self, value: i64) -> &mut Self { + pub fn cspm_container_hwm(&mut self, value: i64) -> &mut Self { self.cspm_container_hwm = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_gcp_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn cspm_gcp_host_top99p(&mut self, value: i64) -> &mut Self { self.cspm_gcp_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn cspm_host_top99p(&mut self, value: i64) -> &mut Self { self.cspm_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_custom_historical_ts_avg(&mut self, value: i64) -> &mut Self { + pub fn custom_historical_ts_avg(&mut self, value: i64) -> &mut Self { self.custom_historical_ts_avg = Some(value); self } #[allow(deprecated)] - pub fn with_custom_live_ts_avg(&mut self, value: i64) -> &mut Self { + pub fn custom_live_ts_avg(&mut self, value: i64) -> &mut Self { self.custom_live_ts_avg = Some(value); self } #[allow(deprecated)] - pub fn with_custom_ts_avg(&mut self, value: i64) -> &mut Self { + pub fn custom_ts_avg(&mut self, value: i64) -> &mut Self { self.custom_ts_avg = Some(value); self } #[allow(deprecated)] - pub fn with_cws_container_count_avg(&mut self, value: i64) -> &mut Self { + pub fn cws_container_count_avg(&mut self, value: i64) -> &mut Self { self.cws_container_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_cws_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn cws_host_top99p(&mut self, value: i64) -> &mut Self { self.cws_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_dbm_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn dbm_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.dbm_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_dbm_queries_avg_sum(&mut self, value: i64) -> &mut Self { + pub fn dbm_queries_avg_sum(&mut self, value: i64) -> &mut Self { self.dbm_queries_avg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_fargate_tasks_count_avg(&mut self, value: i64) -> &mut Self { + pub fn fargate_tasks_count_avg(&mut self, value: i64) -> &mut Self { self.fargate_tasks_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_fargate_tasks_count_hwm(&mut self, value: i64) -> &mut Self { + pub fn fargate_tasks_count_hwm(&mut self, value: i64) -> &mut Self { self.fargate_tasks_count_hwm = Some(value); self } #[allow(deprecated)] - pub fn with_forwarding_events_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn forwarding_events_bytes_sum(&mut self, value: i64) -> &mut Self { self.forwarding_events_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_gcp_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn gcp_host_top99p(&mut self, value: i64) -> &mut Self { self.gcp_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_heroku_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn heroku_host_top99p(&mut self, value: i64) -> &mut Self { self.heroku_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } #[allow(deprecated)] - pub fn with_incident_management_monthly_active_users_hwm(&mut self, value: i64) -> &mut Self { + pub fn incident_management_monthly_active_users_hwm(&mut self, value: i64) -> &mut Self { self.incident_management_monthly_active_users_hwm = Some(value); self } #[allow(deprecated)] - pub fn with_indexed_events_count_sum(&mut self, value: i64) -> &mut Self { + pub fn indexed_events_count_sum(&mut self, value: i64) -> &mut Self { self.indexed_events_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_infra_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn infra_host_top99p(&mut self, value: i64) -> &mut Self { self.infra_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_ingested_events_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn ingested_events_bytes_sum(&mut self, value: i64) -> &mut Self { self.ingested_events_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_iot_device_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn iot_device_agg_sum(&mut self, value: i64) -> &mut Self { self.iot_device_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_iot_device_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn iot_device_top99p_sum(&mut self, value: i64) -> &mut Self { self.iot_device_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_lite_session_count_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_lite_session_count_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_lite_session_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_session_count_android_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_session_count_android_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_session_count_android_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_session_count_flutter_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_session_count_flutter_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_session_count_flutter_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_session_count_ios_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_session_count_ios_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_session_count_ios_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_session_count_reactnative_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_session_count_reactnative_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_session_count_reactnative_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_session_count_roku_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_session_count_roku_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_session_count_roku_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_session_count_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_session_count_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_session_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_units_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_units_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_units_sum = Some(value); self } #[allow(deprecated)] - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } #[allow(deprecated)] - pub fn with_ndm_netflow_events_sum(&mut self, value: i64) -> &mut Self { + pub fn ndm_netflow_events_sum(&mut self, value: i64) -> &mut Self { self.ndm_netflow_events_sum = Some(value); self } #[allow(deprecated)] - pub fn with_netflow_indexed_events_count_sum(&mut self, value: i64) -> &mut Self { + pub fn netflow_indexed_events_count_sum(&mut self, value: i64) -> &mut Self { self.netflow_indexed_events_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_npm_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn npm_host_top99p(&mut self, value: i64) -> &mut Self { self.npm_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_observability_pipelines_bytes_processed_sum(&mut self, value: i64) -> &mut Self { + pub fn observability_pipelines_bytes_processed_sum(&mut self, value: i64) -> &mut Self { self.observability_pipelines_bytes_processed_sum = Some(value); self } #[allow(deprecated)] - pub fn with_online_archive_events_count_sum(&mut self, value: i64) -> &mut Self { + pub fn online_archive_events_count_sum(&mut self, value: i64) -> &mut Self { self.online_archive_events_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_opentelemetry_apm_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn opentelemetry_apm_host_top99p(&mut self, value: i64) -> &mut Self { self.opentelemetry_apm_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_opentelemetry_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn opentelemetry_host_top99p(&mut self, value: i64) -> &mut Self { self.opentelemetry_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_profiling_aas_count_top99p(&mut self, value: i64) -> &mut Self { + pub fn profiling_aas_count_top99p(&mut self, value: i64) -> &mut Self { self.profiling_aas_count_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_profiling_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn profiling_host_top99p(&mut self, value: i64) -> &mut Self { self.profiling_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } #[allow(deprecated)] - pub fn with_region(&mut self, value: String) -> &mut Self { + pub fn region(&mut self, value: String) -> &mut Self { self.region = Some(value); self } #[allow(deprecated)] - pub fn with_rum_browser_and_mobile_session_count(&mut self, value: i64) -> &mut Self { + pub fn rum_browser_and_mobile_session_count(&mut self, value: i64) -> &mut Self { self.rum_browser_and_mobile_session_count = Some(value); self } #[allow(deprecated)] - pub fn with_rum_session_count_sum(&mut self, value: i64) -> &mut Self { + pub fn rum_session_count_sum(&mut self, value: i64) -> &mut Self { self.rum_session_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_rum_total_session_count_sum(&mut self, value: i64) -> &mut Self { + pub fn rum_total_session_count_sum(&mut self, value: i64) -> &mut Self { self.rum_total_session_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_rum_units_sum(&mut self, value: i64) -> &mut Self { + pub fn rum_units_sum(&mut self, value: i64) -> &mut Self { self.rum_units_sum = Some(value); self } #[allow(deprecated)] - pub fn with_sds_apm_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn sds_apm_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { self.sds_apm_scanned_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_sds_events_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn sds_events_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { self.sds_events_scanned_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_sds_logs_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn sds_logs_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { self.sds_logs_scanned_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_sds_rum_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn sds_rum_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { self.sds_rum_scanned_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_sds_total_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn sds_total_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { self.sds_total_scanned_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_serverless_apps_azure_count_avg(&mut self, value: i64) -> &mut Self { + pub fn serverless_apps_azure_count_avg(&mut self, value: i64) -> &mut Self { self.serverless_apps_azure_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_serverless_apps_google_count_avg(&mut self, value: i64) -> &mut Self { + pub fn serverless_apps_google_count_avg(&mut self, value: i64) -> &mut Self { self.serverless_apps_google_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_serverless_apps_total_count_avg(&mut self, value: i64) -> &mut Self { + pub fn serverless_apps_total_count_avg(&mut self, value: i64) -> &mut Self { self.serverless_apps_total_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_synthetics_browser_check_calls_count_sum(&mut self, value: i64) -> &mut Self { + pub fn synthetics_browser_check_calls_count_sum(&mut self, value: i64) -> &mut Self { self.synthetics_browser_check_calls_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_synthetics_check_calls_count_sum(&mut self, value: i64) -> &mut Self { + pub fn synthetics_check_calls_count_sum(&mut self, value: i64) -> &mut Self { self.synthetics_check_calls_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_synthetics_mobile_test_runs_sum(&mut self, value: i64) -> &mut Self { + pub fn synthetics_mobile_test_runs_sum(&mut self, value: i64) -> &mut Self { self.synthetics_mobile_test_runs_sum = Some(value); self } #[allow(deprecated)] - pub fn with_synthetics_parallel_testing_max_slots_hwm(&mut self, value: i64) -> &mut Self { + pub fn synthetics_parallel_testing_max_slots_hwm(&mut self, value: i64) -> &mut Self { self.synthetics_parallel_testing_max_slots_hwm = Some(value); self } #[allow(deprecated)] - pub fn with_trace_search_indexed_events_count_sum(&mut self, value: i64) -> &mut Self { + pub fn trace_search_indexed_events_count_sum(&mut self, value: i64) -> &mut Self { self.trace_search_indexed_events_count_sum = Some(value); self } #[allow(deprecated)] - pub fn with_twol_ingested_events_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn twol_ingested_events_bytes_sum(&mut self, value: i64) -> &mut Self { self.twol_ingested_events_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_universal_service_monitoring_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn universal_service_monitoring_host_top99p(&mut self, value: i64) -> &mut Self { self.universal_service_monitoring_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_vsphere_host_top99p(&mut self, value: i64) -> &mut Self { + pub fn vsphere_host_top99p(&mut self, value: i64) -> &mut Self { self.vsphere_host_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_vuln_management_host_count_top99p(&mut self, value: i64) -> &mut Self { + pub fn vuln_management_host_count_top99p(&mut self, value: i64) -> &mut Self { self.vuln_management_host_count_top99p = Some(value); self } #[allow(deprecated)] - pub fn with_workflow_executions_usage_sum(&mut self, value: i64) -> &mut Self { + pub fn workflow_executions_usage_sum(&mut self, value: i64) -> &mut Self { self.workflow_executions_usage_sum = Some(value); self } } + impl Default for UsageSummaryDateOrg { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_summary_response.rs b/src/datadogV1/model/model_usage_summary_response.rs index 7abf87eac..331c2e45e 100644 --- a/src/datadogV1/model/model_usage_summary_response.rs +++ b/src/datadogV1/model/model_usage_summary_response.rs @@ -471,223 +471,217 @@ impl UsageSummaryResponse { } #[allow(deprecated)] - pub fn with_agent_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn agent_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.agent_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_apm_azure_app_service_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn apm_azure_app_service_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.apm_azure_app_service_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_apm_fargate_count_avg_sum(&mut self, value: i64) -> &mut Self { + pub fn apm_fargate_count_avg_sum(&mut self, value: i64) -> &mut Self { self.apm_fargate_count_avg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_apm_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn apm_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.apm_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_appsec_fargate_count_avg_sum(&mut self, value: i64) -> &mut Self { + pub fn appsec_fargate_count_avg_sum(&mut self, value: i64) -> &mut Self { self.appsec_fargate_count_avg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_audit_logs_lines_indexed_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn audit_logs_lines_indexed_agg_sum(&mut self, value: i64) -> &mut Self { self.audit_logs_lines_indexed_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_audit_trail_enabled_hwm_sum(&mut self, value: i64) -> &mut Self { + pub fn audit_trail_enabled_hwm_sum(&mut self, value: i64) -> &mut Self { self.audit_trail_enabled_hwm_sum = Some(value); self } #[allow(deprecated)] - pub fn with_avg_profiled_fargate_tasks_sum(&mut self, value: i64) -> &mut Self { + pub fn avg_profiled_fargate_tasks_sum(&mut self, value: i64) -> &mut Self { self.avg_profiled_fargate_tasks_sum = Some(value); self } #[allow(deprecated)] - pub fn with_aws_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn aws_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.aws_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_aws_lambda_func_count(&mut self, value: i64) -> &mut Self { + pub fn aws_lambda_func_count(&mut self, value: i64) -> &mut Self { self.aws_lambda_func_count = Some(value); self } #[allow(deprecated)] - pub fn with_aws_lambda_invocations_sum(&mut self, value: i64) -> &mut Self { + pub fn aws_lambda_invocations_sum(&mut self, value: i64) -> &mut Self { self.aws_lambda_invocations_sum = Some(value); self } #[allow(deprecated)] - pub fn with_azure_app_service_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn azure_app_service_top99p_sum(&mut self, value: i64) -> &mut Self { self.azure_app_service_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_azure_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn azure_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.azure_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_billable_ingested_bytes_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn billable_ingested_bytes_agg_sum(&mut self, value: i64) -> &mut Self { self.billable_ingested_bytes_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_browser_rum_lite_session_count_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn browser_rum_lite_session_count_agg_sum(&mut self, value: i64) -> &mut Self { self.browser_rum_lite_session_count_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_browser_rum_replay_session_count_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn browser_rum_replay_session_count_agg_sum(&mut self, value: i64) -> &mut Self { self.browser_rum_replay_session_count_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_browser_rum_units_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn browser_rum_units_agg_sum(&mut self, value: i64) -> &mut Self { self.browser_rum_units_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_ci_pipeline_indexed_spans_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn ci_pipeline_indexed_spans_agg_sum(&mut self, value: i64) -> &mut Self { self.ci_pipeline_indexed_spans_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_ci_test_indexed_spans_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn ci_test_indexed_spans_agg_sum(&mut self, value: i64) -> &mut Self { self.ci_test_indexed_spans_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_ci_visibility_itr_committers_hwm_sum(&mut self, value: i64) -> &mut Self { + pub fn ci_visibility_itr_committers_hwm_sum(&mut self, value: i64) -> &mut Self { self.ci_visibility_itr_committers_hwm_sum = Some(value); self } #[allow(deprecated)] - pub fn with_ci_visibility_pipeline_committers_hwm_sum(&mut self, value: i64) -> &mut Self { + pub fn ci_visibility_pipeline_committers_hwm_sum(&mut self, value: i64) -> &mut Self { self.ci_visibility_pipeline_committers_hwm_sum = Some(value); self } #[allow(deprecated)] - pub fn with_ci_visibility_test_committers_hwm_sum(&mut self, value: i64) -> &mut Self { + pub fn ci_visibility_test_committers_hwm_sum(&mut self, value: i64) -> &mut Self { self.ci_visibility_test_committers_hwm_sum = Some(value); self } #[allow(deprecated)] - pub fn with_cloud_cost_management_aws_host_count_avg_sum(&mut self, value: i64) -> &mut Self { + pub fn cloud_cost_management_aws_host_count_avg_sum(&mut self, value: i64) -> &mut Self { self.cloud_cost_management_aws_host_count_avg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_cloud_cost_management_azure_host_count_avg_sum(&mut self, value: i64) -> &mut Self { + pub fn cloud_cost_management_azure_host_count_avg_sum(&mut self, value: i64) -> &mut Self { self.cloud_cost_management_azure_host_count_avg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_cloud_cost_management_host_count_avg_sum(&mut self, value: i64) -> &mut Self { + pub fn cloud_cost_management_host_count_avg_sum(&mut self, value: i64) -> &mut Self { self.cloud_cost_management_host_count_avg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_cloud_siem_events_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn cloud_siem_events_agg_sum(&mut self, value: i64) -> &mut Self { self.cloud_siem_events_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_container_avg_sum(&mut self, value: i64) -> &mut Self { + pub fn container_avg_sum(&mut self, value: i64) -> &mut Self { self.container_avg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_container_excl_agent_avg_sum(&mut self, value: i64) -> &mut Self { + pub fn container_excl_agent_avg_sum(&mut self, value: i64) -> &mut Self { self.container_excl_agent_avg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_container_hwm_sum(&mut self, value: i64) -> &mut Self { + pub fn container_hwm_sum(&mut self, value: i64) -> &mut Self { self.container_hwm_sum = Some(value); self } #[allow(deprecated)] - pub fn with_csm_container_enterprise_compliance_count_agg_sum( - &mut self, - value: i64, - ) -> &mut Self { + pub fn csm_container_enterprise_compliance_count_agg_sum(&mut self, value: i64) -> &mut Self { self.csm_container_enterprise_compliance_count_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_csm_container_enterprise_cws_count_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn csm_container_enterprise_cws_count_agg_sum(&mut self, value: i64) -> &mut Self { self.csm_container_enterprise_cws_count_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_csm_container_enterprise_total_count_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn csm_container_enterprise_total_count_agg_sum(&mut self, value: i64) -> &mut Self { self.csm_container_enterprise_total_count_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_aas_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn csm_host_enterprise_aas_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_aas_host_count_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_aws_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn csm_host_enterprise_aws_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_aws_host_count_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_azure_host_count_top99p_sum( - &mut self, - value: i64, - ) -> &mut Self { + pub fn csm_host_enterprise_azure_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_azure_host_count_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_compliance_host_count_top99p_sum( + pub fn csm_host_enterprise_compliance_host_count_top99p_sum( &mut self, value: i64, ) -> &mut Self { @@ -696,205 +690,199 @@ impl UsageSummaryResponse { } #[allow(deprecated)] - pub fn with_csm_host_enterprise_cws_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn csm_host_enterprise_cws_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_cws_host_count_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_gcp_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn csm_host_enterprise_gcp_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_gcp_host_count_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_csm_host_enterprise_total_host_count_top99p_sum( - &mut self, - value: i64, - ) -> &mut Self { + pub fn csm_host_enterprise_total_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { self.csm_host_enterprise_total_host_count_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_aas_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn cspm_aas_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.cspm_aas_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_aws_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn cspm_aws_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.cspm_aws_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_azure_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn cspm_azure_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.cspm_azure_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_container_avg_sum(&mut self, value: i64) -> &mut Self { + pub fn cspm_container_avg_sum(&mut self, value: i64) -> &mut Self { self.cspm_container_avg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_container_hwm_sum(&mut self, value: i64) -> &mut Self { + pub fn cspm_container_hwm_sum(&mut self, value: i64) -> &mut Self { self.cspm_container_hwm_sum = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_gcp_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn cspm_gcp_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.cspm_gcp_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_cspm_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn cspm_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.cspm_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_custom_historical_ts_sum(&mut self, value: i64) -> &mut Self { + pub fn custom_historical_ts_sum(&mut self, value: i64) -> &mut Self { self.custom_historical_ts_sum = Some(value); self } #[allow(deprecated)] - pub fn with_custom_live_ts_sum(&mut self, value: i64) -> &mut Self { + pub fn custom_live_ts_sum(&mut self, value: i64) -> &mut Self { self.custom_live_ts_sum = Some(value); self } #[allow(deprecated)] - pub fn with_custom_ts_sum(&mut self, value: i64) -> &mut Self { + pub fn custom_ts_sum(&mut self, value: i64) -> &mut Self { self.custom_ts_sum = Some(value); self } #[allow(deprecated)] - pub fn with_cws_containers_avg_sum(&mut self, value: i64) -> &mut Self { + pub fn cws_containers_avg_sum(&mut self, value: i64) -> &mut Self { self.cws_containers_avg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_cws_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn cws_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.cws_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_dbm_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn dbm_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.dbm_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_dbm_queries_avg_sum(&mut self, value: i64) -> &mut Self { + pub fn dbm_queries_avg_sum(&mut self, value: i64) -> &mut Self { self.dbm_queries_avg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_end_date(&mut self, value: String) -> &mut Self { + pub fn end_date(&mut self, value: String) -> &mut Self { self.end_date = Some(value); self } #[allow(deprecated)] - pub fn with_fargate_tasks_count_avg_sum(&mut self, value: i64) -> &mut Self { + pub fn fargate_tasks_count_avg_sum(&mut self, value: i64) -> &mut Self { self.fargate_tasks_count_avg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_fargate_tasks_count_hwm_sum(&mut self, value: i64) -> &mut Self { + pub fn fargate_tasks_count_hwm_sum(&mut self, value: i64) -> &mut Self { self.fargate_tasks_count_hwm_sum = Some(value); self } #[allow(deprecated)] - pub fn with_forwarding_events_bytes_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn forwarding_events_bytes_agg_sum(&mut self, value: i64) -> &mut Self { self.forwarding_events_bytes_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_gcp_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn gcp_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.gcp_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_heroku_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn heroku_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.heroku_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_incident_management_monthly_active_users_hwm_sum( - &mut self, - value: i64, - ) -> &mut Self { + pub fn incident_management_monthly_active_users_hwm_sum(&mut self, value: i64) -> &mut Self { self.incident_management_monthly_active_users_hwm_sum = Some(value); self } #[allow(deprecated)] - pub fn with_indexed_events_count_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn indexed_events_count_agg_sum(&mut self, value: i64) -> &mut Self { self.indexed_events_count_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_infra_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn infra_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.infra_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_ingested_events_bytes_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn ingested_events_bytes_agg_sum(&mut self, value: i64) -> &mut Self { self.ingested_events_bytes_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_iot_device_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn iot_device_agg_sum(&mut self, value: i64) -> &mut Self { self.iot_device_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_iot_device_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn iot_device_top99p_sum(&mut self, value: i64) -> &mut Self { self.iot_device_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_last_updated(&mut self, value: String) -> &mut Self { + pub fn last_updated(&mut self, value: String) -> &mut Self { self.last_updated = Some(value); self } #[allow(deprecated)] - pub fn with_live_indexed_events_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn live_indexed_events_agg_sum(&mut self, value: i64) -> &mut Self { self.live_indexed_events_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_live_ingested_bytes_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn live_ingested_bytes_agg_sum(&mut self, value: i64) -> &mut Self { self.live_ingested_bytes_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_logs_by_retention( + pub fn logs_by_retention( &mut self, value: crate::datadogV1::model::LogsByRetention, ) -> &mut Self { @@ -903,275 +891,270 @@ impl UsageSummaryResponse { } #[allow(deprecated)] - pub fn with_mobile_rum_lite_session_count_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_lite_session_count_agg_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_lite_session_count_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_session_count_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_session_count_agg_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_session_count_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_session_count_android_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_session_count_android_agg_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_session_count_android_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_session_count_flutter_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_session_count_flutter_agg_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_session_count_flutter_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_session_count_ios_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_session_count_ios_agg_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_session_count_ios_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_session_count_reactnative_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_session_count_reactnative_agg_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_session_count_reactnative_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_session_count_roku_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_session_count_roku_agg_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_session_count_roku_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_mobile_rum_units_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn mobile_rum_units_agg_sum(&mut self, value: i64) -> &mut Self { self.mobile_rum_units_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_ndm_netflow_events_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn ndm_netflow_events_agg_sum(&mut self, value: i64) -> &mut Self { self.ndm_netflow_events_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_netflow_indexed_events_count_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn netflow_indexed_events_count_agg_sum(&mut self, value: i64) -> &mut Self { self.netflow_indexed_events_count_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_npm_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn npm_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.npm_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_observability_pipelines_bytes_processed_agg_sum( - &mut self, - value: i64, - ) -> &mut Self { + pub fn observability_pipelines_bytes_processed_agg_sum(&mut self, value: i64) -> &mut Self { self.observability_pipelines_bytes_processed_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_online_archive_events_count_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn online_archive_events_count_agg_sum(&mut self, value: i64) -> &mut Self { self.online_archive_events_count_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_opentelemetry_apm_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn opentelemetry_apm_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.opentelemetry_apm_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_opentelemetry_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn opentelemetry_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.opentelemetry_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_profiling_aas_count_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn profiling_aas_count_top99p_sum(&mut self, value: i64) -> &mut Self { self.profiling_aas_count_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_profiling_container_agent_count_avg(&mut self, value: i64) -> &mut Self { + pub fn profiling_container_agent_count_avg(&mut self, value: i64) -> &mut Self { self.profiling_container_agent_count_avg = Some(value); self } #[allow(deprecated)] - pub fn with_profiling_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn profiling_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { self.profiling_host_count_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_rehydrated_indexed_events_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn rehydrated_indexed_events_agg_sum(&mut self, value: i64) -> &mut Self { self.rehydrated_indexed_events_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_rehydrated_ingested_bytes_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn rehydrated_ingested_bytes_agg_sum(&mut self, value: i64) -> &mut Self { self.rehydrated_ingested_bytes_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_rum_browser_and_mobile_session_count(&mut self, value: i64) -> &mut Self { + pub fn rum_browser_and_mobile_session_count(&mut self, value: i64) -> &mut Self { self.rum_browser_and_mobile_session_count = Some(value); self } #[allow(deprecated)] - pub fn with_rum_session_count_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn rum_session_count_agg_sum(&mut self, value: i64) -> &mut Self { self.rum_session_count_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_rum_total_session_count_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn rum_total_session_count_agg_sum(&mut self, value: i64) -> &mut Self { self.rum_total_session_count_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_rum_units_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn rum_units_agg_sum(&mut self, value: i64) -> &mut Self { self.rum_units_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_sds_apm_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn sds_apm_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { self.sds_apm_scanned_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_sds_events_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn sds_events_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { self.sds_events_scanned_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_sds_logs_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn sds_logs_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { self.sds_logs_scanned_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_sds_rum_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn sds_rum_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { self.sds_rum_scanned_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_sds_total_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + pub fn sds_total_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { self.sds_total_scanned_bytes_sum = Some(value); self } #[allow(deprecated)] - pub fn with_serverless_apps_azure_count_avg_sum(&mut self, value: i64) -> &mut Self { + pub fn serverless_apps_azure_count_avg_sum(&mut self, value: i64) -> &mut Self { self.serverless_apps_azure_count_avg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_serverless_apps_google_count_avg_sum(&mut self, value: i64) -> &mut Self { + pub fn serverless_apps_google_count_avg_sum(&mut self, value: i64) -> &mut Self { self.serverless_apps_google_count_avg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_serverless_apps_total_count_avg_sum(&mut self, value: i64) -> &mut Self { + pub fn serverless_apps_total_count_avg_sum(&mut self, value: i64) -> &mut Self { self.serverless_apps_total_count_avg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_start_date(&mut self, value: String) -> &mut Self { + pub fn start_date(&mut self, value: String) -> &mut Self { self.start_date = Some(value); self } #[allow(deprecated)] - pub fn with_synthetics_browser_check_calls_count_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn synthetics_browser_check_calls_count_agg_sum(&mut self, value: i64) -> &mut Self { self.synthetics_browser_check_calls_count_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_synthetics_check_calls_count_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn synthetics_check_calls_count_agg_sum(&mut self, value: i64) -> &mut Self { self.synthetics_check_calls_count_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_synthetics_mobile_test_runs_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn synthetics_mobile_test_runs_agg_sum(&mut self, value: i64) -> &mut Self { self.synthetics_mobile_test_runs_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_synthetics_parallel_testing_max_slots_hwm_sum(&mut self, value: i64) -> &mut Self { + pub fn synthetics_parallel_testing_max_slots_hwm_sum(&mut self, value: i64) -> &mut Self { self.synthetics_parallel_testing_max_slots_hwm_sum = Some(value); self } #[allow(deprecated)] - pub fn with_trace_search_indexed_events_count_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn trace_search_indexed_events_count_agg_sum(&mut self, value: i64) -> &mut Self { self.trace_search_indexed_events_count_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_twol_ingested_events_bytes_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn twol_ingested_events_bytes_agg_sum(&mut self, value: i64) -> &mut Self { self.twol_ingested_events_bytes_agg_sum = Some(value); self } #[allow(deprecated)] - pub fn with_universal_service_monitoring_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn universal_service_monitoring_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.universal_service_monitoring_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_usage( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn usage(&mut self, value: Vec) -> &mut Self { self.usage = Some(value); self } #[allow(deprecated)] - pub fn with_vsphere_host_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn vsphere_host_top99p_sum(&mut self, value: i64) -> &mut Self { self.vsphere_host_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_vuln_management_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { + pub fn vuln_management_host_count_top99p_sum(&mut self, value: i64) -> &mut Self { self.vuln_management_host_count_top99p_sum = Some(value); self } #[allow(deprecated)] - pub fn with_workflow_executions_usage_agg_sum(&mut self, value: i64) -> &mut Self { + pub fn workflow_executions_usage_agg_sum(&mut self, value: i64) -> &mut Self { self.workflow_executions_usage_agg_sum = Some(value); self } } + impl Default for UsageSummaryResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_synthetics_api_hour.rs b/src/datadogV1/model/model_usage_synthetics_api_hour.rs index d5f372934..c61758b25 100644 --- a/src/datadogV1/model/model_usage_synthetics_api_hour.rs +++ b/src/datadogV1/model/model_usage_synthetics_api_hour.rs @@ -36,26 +36,27 @@ impl UsageSyntheticsAPIHour { } } - pub fn with_check_calls_count(&mut self, value: Option) -> &mut Self { + pub fn check_calls_count(&mut self, value: Option) -> &mut Self { self.check_calls_count = Some(value); self } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageSyntheticsAPIHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_synthetics_api_response.rs b/src/datadogV1/model/model_usage_synthetics_api_response.rs index ff4ee586d..e79761399 100644 --- a/src/datadogV1/model/model_usage_synthetics_api_response.rs +++ b/src/datadogV1/model/model_usage_synthetics_api_response.rs @@ -18,7 +18,7 @@ impl UsageSyntheticsAPIResponse { UsageSyntheticsAPIResponse { usage: None } } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl UsageSyntheticsAPIResponse { self } } + impl Default for UsageSyntheticsAPIResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_synthetics_browser_hour.rs b/src/datadogV1/model/model_usage_synthetics_browser_hour.rs index 7dd5d2de1..49e99ea76 100644 --- a/src/datadogV1/model/model_usage_synthetics_browser_hour.rs +++ b/src/datadogV1/model/model_usage_synthetics_browser_hour.rs @@ -36,26 +36,27 @@ impl UsageSyntheticsBrowserHour { } } - pub fn with_browser_check_calls_count(&mut self, value: Option) -> &mut Self { + pub fn browser_check_calls_count(&mut self, value: Option) -> &mut Self { self.browser_check_calls_count = Some(value); self } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageSyntheticsBrowserHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_synthetics_browser_response.rs b/src/datadogV1/model/model_usage_synthetics_browser_response.rs index 7fe082b78..5f720aae0 100644 --- a/src/datadogV1/model/model_usage_synthetics_browser_response.rs +++ b/src/datadogV1/model/model_usage_synthetics_browser_response.rs @@ -18,7 +18,7 @@ impl UsageSyntheticsBrowserResponse { UsageSyntheticsBrowserResponse { usage: None } } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl UsageSyntheticsBrowserResponse { self } } + impl Default for UsageSyntheticsBrowserResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_synthetics_hour.rs b/src/datadogV1/model/model_usage_synthetics_hour.rs index a4a9235ba..ec6dd99e2 100644 --- a/src/datadogV1/model/model_usage_synthetics_hour.rs +++ b/src/datadogV1/model/model_usage_synthetics_hour.rs @@ -32,26 +32,27 @@ impl UsageSyntheticsHour { } } - pub fn with_check_calls_count(&mut self, value: i64) -> &mut Self { + pub fn check_calls_count(&mut self, value: i64) -> &mut Self { self.check_calls_count = Some(value); self } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageSyntheticsHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_synthetics_response.rs b/src/datadogV1/model/model_usage_synthetics_response.rs index e02b4edf0..30e65a570 100644 --- a/src/datadogV1/model/model_usage_synthetics_response.rs +++ b/src/datadogV1/model/model_usage_synthetics_response.rs @@ -18,14 +18,12 @@ impl UsageSyntheticsResponse { UsageSyntheticsResponse { usage: None } } - pub fn with_usage( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn usage(&mut self, value: Vec) -> &mut Self { self.usage = Some(value); self } } + impl Default for UsageSyntheticsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_timeseries_hour.rs b/src/datadogV1/model/model_usage_timeseries_hour.rs index 4db35ab7c..e72f7f3a1 100644 --- a/src/datadogV1/model/model_usage_timeseries_hour.rs +++ b/src/datadogV1/model/model_usage_timeseries_hour.rs @@ -40,36 +40,37 @@ impl UsageTimeseriesHour { } } - pub fn with_hour(&mut self, value: String) -> &mut Self { + pub fn hour(&mut self, value: String) -> &mut Self { self.hour = Some(value); self } - pub fn with_num_custom_input_timeseries(&mut self, value: i64) -> &mut Self { + pub fn num_custom_input_timeseries(&mut self, value: i64) -> &mut Self { self.num_custom_input_timeseries = Some(value); self } - pub fn with_num_custom_output_timeseries(&mut self, value: i64) -> &mut Self { + pub fn num_custom_output_timeseries(&mut self, value: i64) -> &mut Self { self.num_custom_output_timeseries = Some(value); self } - pub fn with_num_custom_timeseries(&mut self, value: i64) -> &mut Self { + pub fn num_custom_timeseries(&mut self, value: i64) -> &mut Self { self.num_custom_timeseries = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } } + impl Default for UsageTimeseriesHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_timeseries_response.rs b/src/datadogV1/model/model_usage_timeseries_response.rs index 1bd6c89f8..641c4833a 100644 --- a/src/datadogV1/model/model_usage_timeseries_response.rs +++ b/src/datadogV1/model/model_usage_timeseries_response.rs @@ -18,14 +18,12 @@ impl UsageTimeseriesResponse { UsageTimeseriesResponse { usage: None } } - pub fn with_usage( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn usage(&mut self, value: Vec) -> &mut Self { self.usage = Some(value); self } } + impl Default for UsageTimeseriesResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_top_avg_metrics_hour.rs b/src/datadogV1/model/model_usage_top_avg_metrics_hour.rs index 1df7205c7..c46cb2a40 100644 --- a/src/datadogV1/model/model_usage_top_avg_metrics_hour.rs +++ b/src/datadogV1/model/model_usage_top_avg_metrics_hour.rs @@ -32,17 +32,17 @@ impl UsageTopAvgMetricsHour { } } - pub fn with_avg_metric_hour(&mut self, value: i64) -> &mut Self { + pub fn avg_metric_hour(&mut self, value: i64) -> &mut Self { self.avg_metric_hour = Some(value); self } - pub fn with_max_metric_hour(&mut self, value: i64) -> &mut Self { + pub fn max_metric_hour(&mut self, value: i64) -> &mut Self { self.max_metric_hour = Some(value); self } - pub fn with_metric_category( + pub fn metric_category( &mut self, value: crate::datadogV1::model::UsageMetricCategory, ) -> &mut Self { @@ -50,11 +50,12 @@ impl UsageTopAvgMetricsHour { self } - pub fn with_metric_name(&mut self, value: String) -> &mut Self { + pub fn metric_name(&mut self, value: String) -> &mut Self { self.metric_name = Some(value); self } } + impl Default for UsageTopAvgMetricsHour { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_top_avg_metrics_metadata.rs b/src/datadogV1/model/model_usage_top_avg_metrics_metadata.rs index a43597701..1edccf4f7 100644 --- a/src/datadogV1/model/model_usage_top_avg_metrics_metadata.rs +++ b/src/datadogV1/model/model_usage_top_avg_metrics_metadata.rs @@ -28,17 +28,17 @@ impl UsageTopAvgMetricsMetadata { } } - pub fn with_day(&mut self, value: String) -> &mut Self { + pub fn day(&mut self, value: String) -> &mut Self { self.day = Some(value); self } - pub fn with_month(&mut self, value: String) -> &mut Self { + pub fn month(&mut self, value: String) -> &mut Self { self.month = Some(value); self } - pub fn with_pagination( + pub fn pagination( &mut self, value: crate::datadogV1::model::UsageTopAvgMetricsPagination, ) -> &mut Self { @@ -46,6 +46,7 @@ impl UsageTopAvgMetricsMetadata { self } } + impl Default for UsageTopAvgMetricsMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_top_avg_metrics_pagination.rs b/src/datadogV1/model/model_usage_top_avg_metrics_pagination.rs index ba116d792..53fb8bf06 100644 --- a/src/datadogV1/model/model_usage_top_avg_metrics_pagination.rs +++ b/src/datadogV1/model/model_usage_top_avg_metrics_pagination.rs @@ -36,21 +36,22 @@ impl UsageTopAvgMetricsPagination { } } - pub fn with_limit(&mut self, value: i64) -> &mut Self { + pub fn limit(&mut self, value: i64) -> &mut Self { self.limit = Some(value); self } - pub fn with_next_record_id(&mut self, value: Option) -> &mut Self { + pub fn next_record_id(&mut self, value: Option) -> &mut Self { self.next_record_id = Some(value); self } - pub fn with_total_number_of_records(&mut self, value: Option) -> &mut Self { + pub fn total_number_of_records(&mut self, value: Option) -> &mut Self { self.total_number_of_records = Some(value); self } } + impl Default for UsageTopAvgMetricsPagination { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_usage_top_avg_metrics_response.rs b/src/datadogV1/model/model_usage_top_avg_metrics_response.rs index bdff412ea..b63b25ac9 100644 --- a/src/datadogV1/model/model_usage_top_avg_metrics_response.rs +++ b/src/datadogV1/model/model_usage_top_avg_metrics_response.rs @@ -24,7 +24,7 @@ impl UsageTopAvgMetricsResponse { } } - pub fn with_metadata( + pub fn metadata( &mut self, value: crate::datadogV1::model::UsageTopAvgMetricsMetadata, ) -> &mut Self { @@ -32,7 +32,7 @@ impl UsageTopAvgMetricsResponse { self } - pub fn with_usage( + pub fn usage( &mut self, value: Vec, ) -> &mut Self { @@ -40,6 +40,7 @@ impl UsageTopAvgMetricsResponse { self } } + impl Default for UsageTopAvgMetricsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_user.rs b/src/datadogV1/model/model_user.rs index 372c4d96f..24fc6e8da 100644 --- a/src/datadogV1/model/model_user.rs +++ b/src/datadogV1/model/model_user.rs @@ -48,44 +48,42 @@ impl User { } } - pub fn with_access_role( - &mut self, - value: Option, - ) -> &mut Self { + pub fn access_role(&mut self, value: Option) -> &mut Self { self.access_role = Some(value); self } - pub fn with_disabled(&mut self, value: bool) -> &mut Self { + pub fn disabled(&mut self, value: bool) -> &mut Self { self.disabled = Some(value); self } - pub fn with_email(&mut self, value: String) -> &mut Self { + pub fn email(&mut self, value: String) -> &mut Self { self.email = Some(value); self } - pub fn with_handle(&mut self, value: String) -> &mut Self { + pub fn handle(&mut self, value: String) -> &mut Self { self.handle = Some(value); self } - pub fn with_icon(&mut self, value: String) -> &mut Self { + pub fn icon(&mut self, value: String) -> &mut Self { self.icon = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_verified(&mut self, value: bool) -> &mut Self { + pub fn verified(&mut self, value: bool) -> &mut Self { self.verified = Some(value); self } } + impl Default for User { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_user_disable_response.rs b/src/datadogV1/model/model_user_disable_response.rs index 06ff2237a..337465b64 100644 --- a/src/datadogV1/model/model_user_disable_response.rs +++ b/src/datadogV1/model/model_user_disable_response.rs @@ -18,11 +18,12 @@ impl UserDisableResponse { UserDisableResponse { message: None } } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } } + impl Default for UserDisableResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_user_list_response.rs b/src/datadogV1/model/model_user_list_response.rs index e292b65ee..64a2479f3 100644 --- a/src/datadogV1/model/model_user_list_response.rs +++ b/src/datadogV1/model/model_user_list_response.rs @@ -18,11 +18,12 @@ impl UserListResponse { UserListResponse { users: None } } - pub fn with_users(&mut self, value: Vec) -> &mut Self { + pub fn users(&mut self, value: Vec) -> &mut Self { self.users = Some(value); self } } + impl Default for UserListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_user_response.rs b/src/datadogV1/model/model_user_response.rs index a9eaeca46..e2e4f0738 100644 --- a/src/datadogV1/model/model_user_response.rs +++ b/src/datadogV1/model/model_user_response.rs @@ -18,11 +18,12 @@ impl UserResponse { UserResponse { user: None } } - pub fn with_user(&mut self, value: crate::datadogV1::model::User) -> &mut Self { + pub fn user(&mut self, value: crate::datadogV1::model::User) -> &mut Self { self.user = Some(value); self } } + impl Default for UserResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_webhooks_integration.rs b/src/datadogV1/model/model_webhooks_integration.rs index 87fe0430b..435734de3 100644 --- a/src/datadogV1/model/model_webhooks_integration.rs +++ b/src/datadogV1/model/model_webhooks_integration.rs @@ -50,12 +50,12 @@ impl WebhooksIntegration { } } - pub fn with_custom_headers(&mut self, value: Option) -> &mut Self { + pub fn custom_headers(&mut self, value: Option) -> &mut Self { self.custom_headers = Some(value); self } - pub fn with_encode_as( + pub fn encode_as( &mut self, value: crate::datadogV1::model::WebhooksIntegrationEncoding, ) -> &mut Self { @@ -63,7 +63,7 @@ impl WebhooksIntegration { self } - pub fn with_payload(&mut self, value: Option) -> &mut Self { + pub fn payload(&mut self, value: Option) -> &mut Self { self.payload = Some(value); self } diff --git a/src/datadogV1/model/model_webhooks_integration_custom_variable_response.rs b/src/datadogV1/model/model_webhooks_integration_custom_variable_response.rs index 0d0385128..e38de78fd 100644 --- a/src/datadogV1/model/model_webhooks_integration_custom_variable_response.rs +++ b/src/datadogV1/model/model_webhooks_integration_custom_variable_response.rs @@ -29,7 +29,7 @@ impl WebhooksIntegrationCustomVariableResponse { } } - pub fn with_value(&mut self, value: String) -> &mut Self { + pub fn value(&mut self, value: String) -> &mut Self { self.value = Some(value); self } diff --git a/src/datadogV1/model/model_webhooks_integration_custom_variable_update_request.rs b/src/datadogV1/model/model_webhooks_integration_custom_variable_update_request.rs index 7162a5368..159096eb3 100644 --- a/src/datadogV1/model/model_webhooks_integration_custom_variable_update_request.rs +++ b/src/datadogV1/model/model_webhooks_integration_custom_variable_update_request.rs @@ -31,21 +31,22 @@ impl WebhooksIntegrationCustomVariableUpdateRequest { } } - pub fn with_is_secret(&mut self, value: bool) -> &mut Self { + pub fn is_secret(&mut self, value: bool) -> &mut Self { self.is_secret = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_value(&mut self, value: String) -> &mut Self { + pub fn value(&mut self, value: String) -> &mut Self { self.value = Some(value); self } } + impl Default for WebhooksIntegrationCustomVariableUpdateRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_webhooks_integration_update_request.rs b/src/datadogV1/model/model_webhooks_integration_update_request.rs index 7030d931d..d6a51a6e4 100644 --- a/src/datadogV1/model/model_webhooks_integration_update_request.rs +++ b/src/datadogV1/model/model_webhooks_integration_update_request.rs @@ -48,12 +48,12 @@ impl WebhooksIntegrationUpdateRequest { } } - pub fn with_custom_headers(&mut self, value: String) -> &mut Self { + pub fn custom_headers(&mut self, value: String) -> &mut Self { self.custom_headers = Some(value); self } - pub fn with_encode_as( + pub fn encode_as( &mut self, value: crate::datadogV1::model::WebhooksIntegrationEncoding, ) -> &mut Self { @@ -61,21 +61,22 @@ impl WebhooksIntegrationUpdateRequest { self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_payload(&mut self, value: Option) -> &mut Self { + pub fn payload(&mut self, value: Option) -> &mut Self { self.payload = Some(value); self } - pub fn with_url(&mut self, value: String) -> &mut Self { + pub fn url(&mut self, value: String) -> &mut Self { self.url = Some(value); self } } + impl Default for WebhooksIntegrationUpdateRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_widget.rs b/src/datadogV1/model/model_widget.rs index 2b52b1522..c53a109ae 100644 --- a/src/datadogV1/model/model_widget.rs +++ b/src/datadogV1/model/model_widget.rs @@ -33,12 +33,12 @@ impl Widget { } } - pub fn with_id(&mut self, value: i64) -> &mut Self { + pub fn id(&mut self, value: i64) -> &mut Self { self.id = Some(value); self } - pub fn with_layout(&mut self, value: crate::datadogV1::model::WidgetLayout) -> &mut Self { + pub fn layout(&mut self, value: crate::datadogV1::model::WidgetLayout) -> &mut Self { self.layout = Some(value); self } diff --git a/src/datadogV1/model/model_widget_axis.rs b/src/datadogV1/model/model_widget_axis.rs index 9f1cf952c..112a3231b 100644 --- a/src/datadogV1/model/model_widget_axis.rs +++ b/src/datadogV1/model/model_widget_axis.rs @@ -36,31 +36,32 @@ impl WidgetAxis { } } - pub fn with_include_zero(&mut self, value: bool) -> &mut Self { + pub fn include_zero(&mut self, value: bool) -> &mut Self { self.include_zero = Some(value); self } - pub fn with_label(&mut self, value: String) -> &mut Self { + pub fn label(&mut self, value: String) -> &mut Self { self.label = Some(value); self } - pub fn with_max(&mut self, value: String) -> &mut Self { + pub fn max(&mut self, value: String) -> &mut Self { self.max = Some(value); self } - pub fn with_min(&mut self, value: String) -> &mut Self { + pub fn min(&mut self, value: String) -> &mut Self { self.min = Some(value); self } - pub fn with_scale(&mut self, value: String) -> &mut Self { + pub fn scale(&mut self, value: String) -> &mut Self { self.scale = Some(value); self } } + impl Default for WidgetAxis { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_widget_conditional_format.rs b/src/datadogV1/model/model_widget_conditional_format.rs index dc89e4c52..a40d2d817 100644 --- a/src/datadogV1/model/model_widget_conditional_format.rs +++ b/src/datadogV1/model/model_widget_conditional_format.rs @@ -56,32 +56,32 @@ impl WidgetConditionalFormat { } } - pub fn with_custom_bg_color(&mut self, value: String) -> &mut Self { + pub fn custom_bg_color(&mut self, value: String) -> &mut Self { self.custom_bg_color = Some(value); self } - pub fn with_custom_fg_color(&mut self, value: String) -> &mut Self { + pub fn custom_fg_color(&mut self, value: String) -> &mut Self { self.custom_fg_color = Some(value); self } - pub fn with_hide_value(&mut self, value: bool) -> &mut Self { + pub fn hide_value(&mut self, value: bool) -> &mut Self { self.hide_value = Some(value); self } - pub fn with_image_url(&mut self, value: String) -> &mut Self { + pub fn image_url(&mut self, value: String) -> &mut Self { self.image_url = Some(value); self } - pub fn with_metric(&mut self, value: String) -> &mut Self { + pub fn metric(&mut self, value: String) -> &mut Self { self.metric = Some(value); self } - pub fn with_timeframe(&mut self, value: String) -> &mut Self { + pub fn timeframe(&mut self, value: String) -> &mut Self { self.timeframe = Some(value); self } diff --git a/src/datadogV1/model/model_widget_custom_link.rs b/src/datadogV1/model/model_widget_custom_link.rs index 6099705ed..3f9126a47 100644 --- a/src/datadogV1/model/model_widget_custom_link.rs +++ b/src/datadogV1/model/model_widget_custom_link.rs @@ -32,26 +32,27 @@ impl WidgetCustomLink { } } - pub fn with_is_hidden(&mut self, value: bool) -> &mut Self { + pub fn is_hidden(&mut self, value: bool) -> &mut Self { self.is_hidden = Some(value); self } - pub fn with_label(&mut self, value: String) -> &mut Self { + pub fn label(&mut self, value: String) -> &mut Self { self.label = Some(value); self } - pub fn with_link(&mut self, value: String) -> &mut Self { + pub fn link(&mut self, value: String) -> &mut Self { self.link = Some(value); self } - pub fn with_override_label(&mut self, value: String) -> &mut Self { + pub fn override_label(&mut self, value: String) -> &mut Self { self.override_label = Some(value); self } } + impl Default for WidgetCustomLink { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_widget_definition.rs b/src/datadogV1/model/model_widget_definition.rs index bf211fb8c..4b0a7e77f 100644 --- a/src/datadogV1/model/model_widget_definition.rs +++ b/src/datadogV1/model/model_widget_definition.rs @@ -7,38 +7,38 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum WidgetDefinition { - AlertGraphWidgetDefinition(crate::datadogV1::model::AlertGraphWidgetDefinition), - AlertValueWidgetDefinition(crate::datadogV1::model::AlertValueWidgetDefinition), - ChangeWidgetDefinition(crate::datadogV1::model::ChangeWidgetDefinition), - CheckStatusWidgetDefinition(crate::datadogV1::model::CheckStatusWidgetDefinition), - DistributionWidgetDefinition(crate::datadogV1::model::DistributionWidgetDefinition), - EventStreamWidgetDefinition(crate::datadogV1::model::EventStreamWidgetDefinition), - EventTimelineWidgetDefinition(crate::datadogV1::model::EventTimelineWidgetDefinition), - FreeTextWidgetDefinition(crate::datadogV1::model::FreeTextWidgetDefinition), - FunnelWidgetDefinition(crate::datadogV1::model::FunnelWidgetDefinition), - GeomapWidgetDefinition(crate::datadogV1::model::GeomapWidgetDefinition), - GroupWidgetDefinition(crate::datadogV1::model::GroupWidgetDefinition), - HeatMapWidgetDefinition(crate::datadogV1::model::HeatMapWidgetDefinition), - HostMapWidgetDefinition(crate::datadogV1::model::HostMapWidgetDefinition), - IFrameWidgetDefinition(crate::datadogV1::model::IFrameWidgetDefinition), - ImageWidgetDefinition(crate::datadogV1::model::ImageWidgetDefinition), - ListStreamWidgetDefinition(crate::datadogV1::model::ListStreamWidgetDefinition), - LogStreamWidgetDefinition(crate::datadogV1::model::LogStreamWidgetDefinition), - MonitorSummaryWidgetDefinition(crate::datadogV1::model::MonitorSummaryWidgetDefinition), - NoteWidgetDefinition(crate::datadogV1::model::NoteWidgetDefinition), - PowerpackWidgetDefinition(crate::datadogV1::model::PowerpackWidgetDefinition), - QueryValueWidgetDefinition(crate::datadogV1::model::QueryValueWidgetDefinition), - RunWorkflowWidgetDefinition(crate::datadogV1::model::RunWorkflowWidgetDefinition), - SLOListWidgetDefinition(crate::datadogV1::model::SLOListWidgetDefinition), - SLOWidgetDefinition(crate::datadogV1::model::SLOWidgetDefinition), - ScatterPlotWidgetDefinition(crate::datadogV1::model::ScatterPlotWidgetDefinition), - ServiceMapWidgetDefinition(crate::datadogV1::model::ServiceMapWidgetDefinition), - ServiceSummaryWidgetDefinition(crate::datadogV1::model::ServiceSummaryWidgetDefinition), - SplitGraphWidgetDefinition(crate::datadogV1::model::SplitGraphWidgetDefinition), - SunburstWidgetDefinition(crate::datadogV1::model::SunburstWidgetDefinition), - TableWidgetDefinition(crate::datadogV1::model::TableWidgetDefinition), - TimeseriesWidgetDefinition(crate::datadogV1::model::TimeseriesWidgetDefinition), - ToplistWidgetDefinition(crate::datadogV1::model::ToplistWidgetDefinition), - TopologyMapWidgetDefinition(crate::datadogV1::model::TopologyMapWidgetDefinition), - TreeMapWidgetDefinition(crate::datadogV1::model::TreeMapWidgetDefinition), + AlertGraphWidgetDefinition(Box), + AlertValueWidgetDefinition(Box), + ChangeWidgetDefinition(Box), + CheckStatusWidgetDefinition(Box), + DistributionWidgetDefinition(Box), + EventStreamWidgetDefinition(Box), + EventTimelineWidgetDefinition(Box), + FreeTextWidgetDefinition(Box), + FunnelWidgetDefinition(Box), + GeomapWidgetDefinition(Box), + GroupWidgetDefinition(Box), + HeatMapWidgetDefinition(Box), + HostMapWidgetDefinition(Box), + IFrameWidgetDefinition(Box), + ImageWidgetDefinition(Box), + ListStreamWidgetDefinition(Box), + LogStreamWidgetDefinition(Box), + MonitorSummaryWidgetDefinition(Box), + NoteWidgetDefinition(Box), + PowerpackWidgetDefinition(Box), + QueryValueWidgetDefinition(Box), + RunWorkflowWidgetDefinition(Box), + SLOListWidgetDefinition(Box), + SLOWidgetDefinition(Box), + ScatterPlotWidgetDefinition(Box), + ServiceMapWidgetDefinition(Box), + ServiceSummaryWidgetDefinition(Box), + SplitGraphWidgetDefinition(Box), + SunburstWidgetDefinition(Box), + TableWidgetDefinition(Box), + TimeseriesWidgetDefinition(Box), + ToplistWidgetDefinition(Box), + TopologyMapWidgetDefinition(Box), + TreeMapWidgetDefinition(Box), } diff --git a/src/datadogV1/model/model_widget_event.rs b/src/datadogV1/model/model_widget_event.rs index ae987a259..729e1ecc0 100644 --- a/src/datadogV1/model/model_widget_event.rs +++ b/src/datadogV1/model/model_widget_event.rs @@ -27,7 +27,7 @@ impl WidgetEvent { } } - pub fn with_tags_execution(&mut self, value: String) -> &mut Self { + pub fn tags_execution(&mut self, value: String) -> &mut Self { self.tags_execution = Some(value); self } diff --git a/src/datadogV1/model/model_widget_formula.rs b/src/datadogV1/model/model_widget_formula.rs index 0cb776e35..c4ba59d03 100644 --- a/src/datadogV1/model/model_widget_formula.rs +++ b/src/datadogV1/model/model_widget_formula.rs @@ -40,12 +40,12 @@ impl WidgetFormula { } } - pub fn with_alias(&mut self, value: String) -> &mut Self { + pub fn alias(&mut self, value: String) -> &mut Self { self.alias = Some(value); self } - pub fn with_cell_display_mode( + pub fn cell_display_mode( &mut self, value: crate::datadogV1::model::TableWidgetCellDisplayMode, ) -> &mut Self { @@ -53,7 +53,7 @@ impl WidgetFormula { self } - pub fn with_conditional_formats( + pub fn conditional_formats( &mut self, value: Vec, ) -> &mut Self { @@ -61,12 +61,12 @@ impl WidgetFormula { self } - pub fn with_limit(&mut self, value: crate::datadogV1::model::WidgetFormulaLimit) -> &mut Self { + pub fn limit(&mut self, value: crate::datadogV1::model::WidgetFormulaLimit) -> &mut Self { self.limit = Some(value); self } - pub fn with_style(&mut self, value: crate::datadogV1::model::WidgetFormulaStyle) -> &mut Self { + pub fn style(&mut self, value: crate::datadogV1::model::WidgetFormulaStyle) -> &mut Self { self.style = Some(value); self } diff --git a/src/datadogV1/model/model_widget_formula_limit.rs b/src/datadogV1/model/model_widget_formula_limit.rs index b90752971..5ce562e4a 100644 --- a/src/datadogV1/model/model_widget_formula_limit.rs +++ b/src/datadogV1/model/model_widget_formula_limit.rs @@ -24,16 +24,17 @@ impl WidgetFormulaLimit { } } - pub fn with_count(&mut self, value: i64) -> &mut Self { + pub fn count(&mut self, value: i64) -> &mut Self { self.count = Some(value); self } - pub fn with_order(&mut self, value: crate::datadogV1::model::QuerySortOrder) -> &mut Self { + pub fn order(&mut self, value: crate::datadogV1::model::QuerySortOrder) -> &mut Self { self.order = Some(value); self } } + impl Default for WidgetFormulaLimit { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_widget_formula_style.rs b/src/datadogV1/model/model_widget_formula_style.rs index da2c947cc..5c62ec973 100644 --- a/src/datadogV1/model/model_widget_formula_style.rs +++ b/src/datadogV1/model/model_widget_formula_style.rs @@ -24,16 +24,17 @@ impl WidgetFormulaStyle { } } - pub fn with_palette(&mut self, value: String) -> &mut Self { + pub fn palette(&mut self, value: String) -> &mut Self { self.palette = Some(value); self } - pub fn with_palette_index(&mut self, value: i64) -> &mut Self { + pub fn palette_index(&mut self, value: i64) -> &mut Self { self.palette_index = Some(value); self } } + impl Default for WidgetFormulaStyle { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_widget_layout.rs b/src/datadogV1/model/model_widget_layout.rs index 74b5d1655..97b86c3b1 100644 --- a/src/datadogV1/model/model_widget_layout.rs +++ b/src/datadogV1/model/model_widget_layout.rs @@ -37,7 +37,7 @@ impl WidgetLayout { } } - pub fn with_is_column_break(&mut self, value: bool) -> &mut Self { + pub fn is_column_break(&mut self, value: bool) -> &mut Self { self.is_column_break = Some(value); self } diff --git a/src/datadogV1/model/model_widget_marker.rs b/src/datadogV1/model/model_widget_marker.rs index 01a4114bf..4b18fc18a 100644 --- a/src/datadogV1/model/model_widget_marker.rs +++ b/src/datadogV1/model/model_widget_marker.rs @@ -36,17 +36,17 @@ impl WidgetMarker { } } - pub fn with_display_type(&mut self, value: String) -> &mut Self { + pub fn display_type(&mut self, value: String) -> &mut Self { self.display_type = Some(value); self } - pub fn with_label(&mut self, value: String) -> &mut Self { + pub fn label(&mut self, value: String) -> &mut Self { self.label = Some(value); self } - pub fn with_time(&mut self, value: String) -> &mut Self { + pub fn time(&mut self, value: String) -> &mut Self { self.time = Some(value); self } diff --git a/src/datadogV1/model/model_widget_request_style.rs b/src/datadogV1/model/model_widget_request_style.rs index 54e0be234..493d2af6c 100644 --- a/src/datadogV1/model/model_widget_request_style.rs +++ b/src/datadogV1/model/model_widget_request_style.rs @@ -28,24 +28,22 @@ impl WidgetRequestStyle { } } - pub fn with_line_type(&mut self, value: crate::datadogV1::model::WidgetLineType) -> &mut Self { + pub fn line_type(&mut self, value: crate::datadogV1::model::WidgetLineType) -> &mut Self { self.line_type = Some(value); self } - pub fn with_line_width( - &mut self, - value: crate::datadogV1::model::WidgetLineWidth, - ) -> &mut Self { + pub fn line_width(&mut self, value: crate::datadogV1::model::WidgetLineWidth) -> &mut Self { self.line_width = Some(value); self } - pub fn with_palette(&mut self, value: String) -> &mut Self { + pub fn palette(&mut self, value: String) -> &mut Self { self.palette = Some(value); self } } + impl Default for WidgetRequestStyle { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_widget_style.rs b/src/datadogV1/model/model_widget_style.rs index 221834e31..0a2d53d1b 100644 --- a/src/datadogV1/model/model_widget_style.rs +++ b/src/datadogV1/model/model_widget_style.rs @@ -18,11 +18,12 @@ impl WidgetStyle { WidgetStyle { palette: None } } - pub fn with_palette(&mut self, value: String) -> &mut Self { + pub fn palette(&mut self, value: String) -> &mut Self { self.palette = Some(value); self } } + impl Default for WidgetStyle { fn default() -> Self { Self::new() diff --git a/src/datadogV1/model/model_widget_time.rs b/src/datadogV1/model/model_widget_time.rs index c4a9592c9..6c1ceff1f 100644 --- a/src/datadogV1/model/model_widget_time.rs +++ b/src/datadogV1/model/model_widget_time.rs @@ -18,11 +18,12 @@ impl WidgetTime { WidgetTime { live_span: None } } - pub fn with_live_span(&mut self, value: crate::datadogV1::model::WidgetLiveSpan) -> &mut Self { + pub fn live_span(&mut self, value: crate::datadogV1::model::WidgetLiveSpan) -> &mut Self { self.live_span = Some(value); self } } + impl Default for WidgetTime { fn default() -> Self { Self::new() diff --git a/src/datadogV2/api/api_audit.rs b/src/datadogV2/api/api_audit.rs index 173c280c7..dcdf5e818 100644 --- a/src/datadogV2/api/api_audit.rs +++ b/src/datadogV2/api/api_audit.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListAuditLogsOptionalParams is a struct for passing parameters to the method [`AuditAPI::list_audit_logs`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListAuditLogsOptionalParams { /// Search query following Audit Logs syntax. pub filter_query: Option, @@ -22,12 +22,55 @@ pub struct ListAuditLogsOptionalParams { pub page_limit: Option, } +impl ListAuditLogsOptionalParams { + /// Search query following Audit Logs syntax. + pub fn filter_query(&mut self, value: String) -> &mut Self { + self.filter_query = Some(value); + self + } + /// Minimum timestamp for requested events. + pub fn filter_from(&mut self, value: String) -> &mut Self { + self.filter_from = Some(value); + self + } + /// Maximum timestamp for requested events. + pub fn filter_to(&mut self, value: String) -> &mut Self { + self.filter_to = Some(value); + self + } + /// Order of events in results. + pub fn sort(&mut self, value: crate::datadogV2::model::AuditLogsSort) -> &mut Self { + self.sort = Some(value); + self + } + /// List following results with a cursor provided in the previous query. + pub fn page_cursor(&mut self, value: String) -> &mut Self { + self.page_cursor = Some(value); + self + } + /// Maximum number of events in the response. + pub fn page_limit(&mut self, value: i32) -> &mut Self { + self.page_limit = Some(value); + self + } +} + /// SearchAuditLogsOptionalParams is a struct for passing parameters to the method [`AuditAPI::search_audit_logs`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct SearchAuditLogsOptionalParams { pub body: Option, } +impl SearchAuditLogsOptionalParams { + pub fn body( + &mut self, + value: crate::datadogV2::model::AuditLogsSearchEventsRequest, + ) -> &mut Self { + self.body = Some(value); + self + } +} + /// ListAuditLogsError is a struct for typed errors of method [`AuditAPI::list_audit_logs`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_auth_n_mappings.rs b/src/datadogV2/api/api_auth_n_mappings.rs index f40c953b7..69bc3d29e 100644 --- a/src/datadogV2/api/api_auth_n_mappings.rs +++ b/src/datadogV2/api/api_auth_n_mappings.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListAuthNMappingsOptionalParams is a struct for passing parameters to the method [`AuthNMappingsAPI::list_auth_n_mappings`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListAuthNMappingsOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, @@ -18,6 +18,29 @@ pub struct ListAuthNMappingsOptionalParams { pub filter: Option, } +impl ListAuthNMappingsOptionalParams { + /// Size for a given page. The maximum allowed value is 100. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// Specific page number to return. + pub fn page_number(&mut self, value: i64) -> &mut Self { + self.page_number = Some(value); + self + } + /// Sort AuthN Mappings depending on the given field. + pub fn sort(&mut self, value: crate::datadogV2::model::AuthNMappingsSort) -> &mut Self { + self.sort = Some(value); + self + } + /// Filter all mappings by the given string. + pub fn filter(&mut self, value: String) -> &mut Self { + self.filter = Some(value); + self + } +} + /// CreateAuthNMappingError is a struct for typed errors of method [`AuthNMappingsAPI::create_auth_n_mapping`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_ci_visibility_pipelines.rs b/src/datadogV2/api/api_ci_visibility_pipelines.rs index 369c79001..223da8e52 100644 --- a/src/datadogV2/api/api_ci_visibility_pipelines.rs +++ b/src/datadogV2/api/api_ci_visibility_pipelines.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListCIAppPipelineEventsOptionalParams is a struct for passing parameters to the method [`CIVisibilityPipelinesAPI::list_ci_app_pipeline_events`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListCIAppPipelineEventsOptionalParams { /// Search query following log syntax. pub filter_query: Option, @@ -22,12 +22,55 @@ pub struct ListCIAppPipelineEventsOptionalParams { pub page_limit: Option, } +impl ListCIAppPipelineEventsOptionalParams { + /// Search query following log syntax. + pub fn filter_query(&mut self, value: String) -> &mut Self { + self.filter_query = Some(value); + self + } + /// Minimum timestamp for requested events. + pub fn filter_from(&mut self, value: String) -> &mut Self { + self.filter_from = Some(value); + self + } + /// Maximum timestamp for requested events. + pub fn filter_to(&mut self, value: String) -> &mut Self { + self.filter_to = Some(value); + self + } + /// Order of events in results. + pub fn sort(&mut self, value: crate::datadogV2::model::CIAppSort) -> &mut Self { + self.sort = Some(value); + self + } + /// List following results with a cursor provided in the previous query. + pub fn page_cursor(&mut self, value: String) -> &mut Self { + self.page_cursor = Some(value); + self + } + /// Maximum number of events in the response. + pub fn page_limit(&mut self, value: i32) -> &mut Self { + self.page_limit = Some(value); + self + } +} + /// SearchCIAppPipelineEventsOptionalParams is a struct for passing parameters to the method [`CIVisibilityPipelinesAPI::search_ci_app_pipeline_events`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct SearchCIAppPipelineEventsOptionalParams { pub body: Option, } +impl SearchCIAppPipelineEventsOptionalParams { + pub fn body( + &mut self, + value: crate::datadogV2::model::CIAppPipelineEventsRequest, + ) -> &mut Self { + self.body = Some(value); + self + } +} + /// AggregateCIAppPipelineEventsError is a struct for typed errors of method [`CIVisibilityPipelinesAPI::aggregate_ci_app_pipeline_events`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_ci_visibility_tests.rs b/src/datadogV2/api/api_ci_visibility_tests.rs index 5f73a54d1..71dc0b27c 100644 --- a/src/datadogV2/api/api_ci_visibility_tests.rs +++ b/src/datadogV2/api/api_ci_visibility_tests.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListCIAppTestEventsOptionalParams is a struct for passing parameters to the method [`CIVisibilityTestsAPI::list_ci_app_test_events`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListCIAppTestEventsOptionalParams { /// Search query following log syntax. pub filter_query: Option, @@ -22,12 +22,52 @@ pub struct ListCIAppTestEventsOptionalParams { pub page_limit: Option, } +impl ListCIAppTestEventsOptionalParams { + /// Search query following log syntax. + pub fn filter_query(&mut self, value: String) -> &mut Self { + self.filter_query = Some(value); + self + } + /// Minimum timestamp for requested events. + pub fn filter_from(&mut self, value: String) -> &mut Self { + self.filter_from = Some(value); + self + } + /// Maximum timestamp for requested events. + pub fn filter_to(&mut self, value: String) -> &mut Self { + self.filter_to = Some(value); + self + } + /// Order of events in results. + pub fn sort(&mut self, value: crate::datadogV2::model::CIAppSort) -> &mut Self { + self.sort = Some(value); + self + } + /// List following results with a cursor provided in the previous query. + pub fn page_cursor(&mut self, value: String) -> &mut Self { + self.page_cursor = Some(value); + self + } + /// Maximum number of events in the response. + pub fn page_limit(&mut self, value: i32) -> &mut Self { + self.page_limit = Some(value); + self + } +} + /// SearchCIAppTestEventsOptionalParams is a struct for passing parameters to the method [`CIVisibilityTestsAPI::search_ci_app_test_events`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct SearchCIAppTestEventsOptionalParams { pub body: Option, } +impl SearchCIAppTestEventsOptionalParams { + pub fn body(&mut self, value: crate::datadogV2::model::CIAppTestEventsRequest) -> &mut Self { + self.body = Some(value); + self + } +} + /// AggregateCIAppTestEventsError is a struct for typed errors of method [`CIVisibilityTestsAPI::aggregate_ci_app_test_events`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_container_images.rs b/src/datadogV2/api/api_container_images.rs index f123a967c..7fbe6c939 100644 --- a/src/datadogV2/api/api_container_images.rs +++ b/src/datadogV2/api/api_container_images.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListContainerImagesOptionalParams is a struct for passing parameters to the method [`ContainerImagesAPI::list_container_images`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListContainerImagesOptionalParams { /// Comma-separated list of tags to filter Container Images by. pub filter_tags: Option, @@ -21,6 +21,35 @@ pub struct ListContainerImagesOptionalParams { pub page_cursor: Option, } +impl ListContainerImagesOptionalParams { + /// Comma-separated list of tags to filter Container Images by. + pub fn filter_tags(&mut self, value: String) -> &mut Self { + self.filter_tags = Some(value); + self + } + /// Comma-separated list of tags to group Container Images by. + pub fn group_by(&mut self, value: String) -> &mut Self { + self.group_by = Some(value); + self + } + /// Attribute to sort Container Images by. + pub fn sort(&mut self, value: String) -> &mut Self { + self.sort = Some(value); + self + } + /// Maximum number of results returned. + pub fn page_size(&mut self, value: i32) -> &mut Self { + self.page_size = Some(value); + self + } + /// String to query the next page of results. + /// This key is provided with each valid response from the API in `meta.pagination.next_cursor`. + pub fn page_cursor(&mut self, value: String) -> &mut Self { + self.page_cursor = Some(value); + self + } +} + /// ListContainerImagesError is a struct for typed errors of method [`ContainerImagesAPI::list_container_images`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_containers.rs b/src/datadogV2/api/api_containers.rs index a2ca0f8cf..4f6c735b6 100644 --- a/src/datadogV2/api/api_containers.rs +++ b/src/datadogV2/api/api_containers.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListContainersOptionalParams is a struct for passing parameters to the method [`ContainersAPI::list_containers`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListContainersOptionalParams { /// Comma-separated list of tags to filter containers by. pub filter_tags: Option, @@ -21,6 +21,35 @@ pub struct ListContainersOptionalParams { pub page_cursor: Option, } +impl ListContainersOptionalParams { + /// Comma-separated list of tags to filter containers by. + pub fn filter_tags(&mut self, value: String) -> &mut Self { + self.filter_tags = Some(value); + self + } + /// Comma-separated list of tags to group containers by. + pub fn group_by(&mut self, value: String) -> &mut Self { + self.group_by = Some(value); + self + } + /// Attribute to sort containers by. + pub fn sort(&mut self, value: String) -> &mut Self { + self.sort = Some(value); + self + } + /// Maximum number of results returned. + pub fn page_size(&mut self, value: i32) -> &mut Self { + self.page_size = Some(value); + self + } + /// String to query the next page of results. + /// This key is provided with each valid response from the API in `meta.pagination.next_cursor`. + pub fn page_cursor(&mut self, value: String) -> &mut Self { + self.page_cursor = Some(value); + self + } +} + /// ListContainersError is a struct for typed errors of method [`ContainersAPI::list_containers`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_downtimes.rs b/src/datadogV2/api/api_downtimes.rs index b774c6f1f..6d6166ca7 100644 --- a/src/datadogV2/api/api_downtimes.rs +++ b/src/datadogV2/api/api_downtimes.rs @@ -6,15 +6,24 @@ use reqwest; use serde::{Deserialize, Serialize}; /// GetDowntimeOptionalParams is a struct for passing parameters to the method [`DowntimesAPI::get_downtime`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetDowntimeOptionalParams { /// Comma-separated list of resource paths for related resources to include in the response. Supported resource /// paths are `created_by` and `monitor`. pub include: Option, } +impl GetDowntimeOptionalParams { + /// Comma-separated list of resource paths for related resources to include in the response. Supported resource + /// paths are `created_by` and `monitor`. + pub fn include(&mut self, value: String) -> &mut Self { + self.include = Some(value); + self + } +} + /// ListDowntimesOptionalParams is a struct for passing parameters to the method [`DowntimesAPI::list_downtimes`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListDowntimesOptionalParams { /// Only return downtimes that are active when the request is made. pub current_only: Option, @@ -27,8 +36,32 @@ pub struct ListDowntimesOptionalParams { pub page_limit: Option, } +impl ListDowntimesOptionalParams { + /// Only return downtimes that are active when the request is made. + pub fn current_only(&mut self, value: bool) -> &mut Self { + self.current_only = Some(value); + self + } + /// Comma-separated list of resource paths for related resources to include in the response. Supported resource + /// paths are `created_by` and `monitor`. + pub fn include(&mut self, value: String) -> &mut Self { + self.include = Some(value); + self + } + /// Specific offset to use as the beginning of the returned page. + pub fn page_offset(&mut self, value: i64) -> &mut Self { + self.page_offset = Some(value); + self + } + /// Maximum number of downtimes in the response. + pub fn page_limit(&mut self, value: i64) -> &mut Self { + self.page_limit = Some(value); + self + } +} + /// ListMonitorDowntimesOptionalParams is a struct for passing parameters to the method [`DowntimesAPI::list_monitor_downtimes`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListMonitorDowntimesOptionalParams { /// Specific offset to use as the beginning of the returned page. pub page_offset: Option, @@ -36,6 +69,19 @@ pub struct ListMonitorDowntimesOptionalParams { pub page_limit: Option, } +impl ListMonitorDowntimesOptionalParams { + /// Specific offset to use as the beginning of the returned page. + pub fn page_offset(&mut self, value: i64) -> &mut Self { + self.page_offset = Some(value); + self + } + /// Maximum number of downtimes in the response. + pub fn page_limit(&mut self, value: i64) -> &mut Self { + self.page_limit = Some(value); + self + } +} + /// CancelDowntimeError is a struct for typed errors of method [`DowntimesAPI::cancel_downtime`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_events.rs b/src/datadogV2/api/api_events.rs index 32f2e7a6e..7da890bbd 100644 --- a/src/datadogV2/api/api_events.rs +++ b/src/datadogV2/api/api_events.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListEventsOptionalParams is a struct for passing parameters to the method [`EventsAPI::list_events`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListEventsOptionalParams { /// Search query following events syntax. pub filter_query: Option, @@ -22,12 +22,52 @@ pub struct ListEventsOptionalParams { pub page_limit: Option, } +impl ListEventsOptionalParams { + /// Search query following events syntax. + pub fn filter_query(&mut self, value: String) -> &mut Self { + self.filter_query = Some(value); + self + } + /// Minimum timestamp for requested events. + pub fn filter_from(&mut self, value: String) -> &mut Self { + self.filter_from = Some(value); + self + } + /// Maximum timestamp for requested events. + pub fn filter_to(&mut self, value: String) -> &mut Self { + self.filter_to = Some(value); + self + } + /// Order of events in results. + pub fn sort(&mut self, value: crate::datadogV2::model::EventsSort) -> &mut Self { + self.sort = Some(value); + self + } + /// List following results with a cursor provided in the previous query. + pub fn page_cursor(&mut self, value: String) -> &mut Self { + self.page_cursor = Some(value); + self + } + /// Maximum number of events in the response. + pub fn page_limit(&mut self, value: i32) -> &mut Self { + self.page_limit = Some(value); + self + } +} + /// SearchEventsOptionalParams is a struct for passing parameters to the method [`EventsAPI::search_events`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct SearchEventsOptionalParams { pub body: Option, } +impl SearchEventsOptionalParams { + pub fn body(&mut self, value: crate::datadogV2::model::EventsListRequest) -> &mut Self { + self.body = Some(value); + self + } +} + /// ListEventsError is a struct for typed errors of method [`EventsAPI::list_events`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_gcp_integration.rs b/src/datadogV2/api/api_gcp_integration.rs index a4281c7ea..b7709bc21 100644 --- a/src/datadogV2/api/api_gcp_integration.rs +++ b/src/datadogV2/api/api_gcp_integration.rs @@ -6,12 +6,23 @@ use reqwest; use serde::{Deserialize, Serialize}; /// MakeGCPSTSDelegateOptionalParams is a struct for passing parameters to the method [`GCPIntegrationAPI::make_gcpsts_delegate`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct MakeGCPSTSDelegateOptionalParams { /// Create a delegate service account within Datadog. pub body: Option>, } +impl MakeGCPSTSDelegateOptionalParams { + /// Create a delegate service account within Datadog. + pub fn body( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.body = Some(value); + self + } +} + /// CreateGCPSTSAccountError is a struct for typed errors of method [`GCPIntegrationAPI::create_gcpsts_account`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_incident_services.rs b/src/datadogV2/api/api_incident_services.rs index c23a3a493..4490ffbcb 100644 --- a/src/datadogV2/api/api_incident_services.rs +++ b/src/datadogV2/api/api_incident_services.rs @@ -6,14 +6,22 @@ use reqwest; use serde::{Deserialize, Serialize}; /// GetIncidentServiceOptionalParams is a struct for passing parameters to the method [`IncidentServicesAPI::get_incident_service`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetIncidentServiceOptionalParams { /// Specifies which types of related objects should be included in the response. pub include: Option, } +impl GetIncidentServiceOptionalParams { + /// Specifies which types of related objects should be included in the response. + pub fn include(&mut self, value: crate::datadogV2::model::IncidentRelatedObject) -> &mut Self { + self.include = Some(value); + self + } +} + /// ListIncidentServicesOptionalParams is a struct for passing parameters to the method [`IncidentServicesAPI::list_incident_services`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListIncidentServicesOptionalParams { /// Specifies which types of related objects should be included in the response. pub include: Option, @@ -25,6 +33,29 @@ pub struct ListIncidentServicesOptionalParams { pub filter: Option, } +impl ListIncidentServicesOptionalParams { + /// Specifies which types of related objects should be included in the response. + pub fn include(&mut self, value: crate::datadogV2::model::IncidentRelatedObject) -> &mut Self { + self.include = Some(value); + self + } + /// Size for a given page. The maximum allowed value is 100. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// Specific offset to use as the beginning of the returned page. + pub fn page_offset(&mut self, value: i64) -> &mut Self { + self.page_offset = Some(value); + self + } + /// A search query that filters services by name. + pub fn filter(&mut self, value: String) -> &mut Self { + self.filter = Some(value); + self + } +} + /// CreateIncidentServiceError is a struct for typed errors of method [`IncidentServicesAPI::create_incident_service`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_incident_teams.rs b/src/datadogV2/api/api_incident_teams.rs index d58911c67..d88f0fbf5 100644 --- a/src/datadogV2/api/api_incident_teams.rs +++ b/src/datadogV2/api/api_incident_teams.rs @@ -6,14 +6,22 @@ use reqwest; use serde::{Deserialize, Serialize}; /// GetIncidentTeamOptionalParams is a struct for passing parameters to the method [`IncidentTeamsAPI::get_incident_team`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetIncidentTeamOptionalParams { /// Specifies which types of related objects should be included in the response. pub include: Option, } +impl GetIncidentTeamOptionalParams { + /// Specifies which types of related objects should be included in the response. + pub fn include(&mut self, value: crate::datadogV2::model::IncidentRelatedObject) -> &mut Self { + self.include = Some(value); + self + } +} + /// ListIncidentTeamsOptionalParams is a struct for passing parameters to the method [`IncidentTeamsAPI::list_incident_teams`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListIncidentTeamsOptionalParams { /// Specifies which types of related objects should be included in the response. pub include: Option, @@ -25,6 +33,29 @@ pub struct ListIncidentTeamsOptionalParams { pub filter: Option, } +impl ListIncidentTeamsOptionalParams { + /// Specifies which types of related objects should be included in the response. + pub fn include(&mut self, value: crate::datadogV2::model::IncidentRelatedObject) -> &mut Self { + self.include = Some(value); + self + } + /// Size for a given page. The maximum allowed value is 100. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// Specific offset to use as the beginning of the returned page. + pub fn page_offset(&mut self, value: i64) -> &mut Self { + self.page_offset = Some(value); + self + } + /// A search query that filters teams by name. + pub fn filter(&mut self, value: String) -> &mut Self { + self.filter = Some(value); + self + } +} + /// CreateIncidentTeamError is a struct for typed errors of method [`IncidentTeamsAPI::create_incident_team`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_incidents.rs b/src/datadogV2/api/api_incidents.rs index c7f5cf35a..9289b61ae 100644 --- a/src/datadogV2/api/api_incidents.rs +++ b/src/datadogV2/api/api_incidents.rs @@ -6,14 +6,25 @@ use reqwest; use serde::{Deserialize, Serialize}; /// GetIncidentOptionalParams is a struct for passing parameters to the method [`IncidentsAPI::get_incident`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetIncidentOptionalParams { /// Specifies which types of related objects should be included in the response. pub include: Option>, } +impl GetIncidentOptionalParams { + /// Specifies which types of related objects should be included in the response. + pub fn include( + &mut self, + value: Vec, + ) -> &mut Self { + self.include = Some(value); + self + } +} + /// ListIncidentAttachmentsOptionalParams is a struct for passing parameters to the method [`IncidentsAPI::list_incident_attachments`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListIncidentAttachmentsOptionalParams { /// Specifies which types of related objects are included in the response. pub include: Option>, @@ -22,8 +33,27 @@ pub struct ListIncidentAttachmentsOptionalParams { Option>, } +impl ListIncidentAttachmentsOptionalParams { + /// Specifies which types of related objects are included in the response. + pub fn include( + &mut self, + value: Vec, + ) -> &mut Self { + self.include = Some(value); + self + } + /// Specifies which types of attachments are included in the response. + pub fn filter_attachment_type( + &mut self, + value: Vec, + ) -> &mut Self { + self.filter_attachment_type = Some(value); + self + } +} + /// ListIncidentsOptionalParams is a struct for passing parameters to the method [`IncidentsAPI::list_incidents`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListIncidentsOptionalParams { /// Specifies which types of related objects should be included in the response. pub include: Option>, @@ -33,8 +63,29 @@ pub struct ListIncidentsOptionalParams { pub page_offset: Option, } +impl ListIncidentsOptionalParams { + /// Specifies which types of related objects should be included in the response. + pub fn include( + &mut self, + value: Vec, + ) -> &mut Self { + self.include = Some(value); + self + } + /// Size for a given page. The maximum allowed value is 100. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// Specific offset to use as the beginning of the returned page. + pub fn page_offset(&mut self, value: i64) -> &mut Self { + self.page_offset = Some(value); + self + } +} + /// SearchIncidentsOptionalParams is a struct for passing parameters to the method [`IncidentsAPI::search_incidents`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct SearchIncidentsOptionalParams { /// Specifies which types of related objects should be included in the response. pub include: Option, @@ -46,20 +97,65 @@ pub struct SearchIncidentsOptionalParams { pub page_offset: Option, } +impl SearchIncidentsOptionalParams { + /// Specifies which types of related objects should be included in the response. + pub fn include(&mut self, value: crate::datadogV2::model::IncidentRelatedObject) -> &mut Self { + self.include = Some(value); + self + } + /// Specifies the order of returned incidents. + pub fn sort(&mut self, value: crate::datadogV2::model::IncidentSearchSortOrder) -> &mut Self { + self.sort = Some(value); + self + } + /// Size for a given page. The maximum allowed value is 100. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// Specific offset to use as the beginning of the returned page. + pub fn page_offset(&mut self, value: i64) -> &mut Self { + self.page_offset = Some(value); + self + } +} + /// UpdateIncidentOptionalParams is a struct for passing parameters to the method [`IncidentsAPI::update_incident`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct UpdateIncidentOptionalParams { /// Specifies which types of related objects should be included in the response. pub include: Option>, } +impl UpdateIncidentOptionalParams { + /// Specifies which types of related objects should be included in the response. + pub fn include( + &mut self, + value: Vec, + ) -> &mut Self { + self.include = Some(value); + self + } +} + /// UpdateIncidentAttachmentsOptionalParams is a struct for passing parameters to the method [`IncidentsAPI::update_incident_attachments`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct UpdateIncidentAttachmentsOptionalParams { /// Specifies which types of related objects are included in the response. pub include: Option>, } +impl UpdateIncidentAttachmentsOptionalParams { + /// Specifies which types of related objects are included in the response. + pub fn include( + &mut self, + value: Vec, + ) -> &mut Self { + self.include = Some(value); + self + } +} + /// CreateIncidentError is a struct for typed errors of method [`IncidentsAPI::create_incident`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_key_management.rs b/src/datadogV2/api/api_key_management.rs index 5059461e4..115837e08 100644 --- a/src/datadogV2/api/api_key_management.rs +++ b/src/datadogV2/api/api_key_management.rs @@ -6,21 +6,37 @@ use reqwest; use serde::{Deserialize, Serialize}; /// GetAPIKeyOptionalParams is a struct for passing parameters to the method [`KeyManagementAPI::get_api_key`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetAPIKeyOptionalParams { /// Comma separated list of resource paths for related resources to include in the response. Supported resource paths are `created_by` and `modified_by`. pub include: Option, } +impl GetAPIKeyOptionalParams { + /// Comma separated list of resource paths for related resources to include in the response. Supported resource paths are `created_by` and `modified_by`. + pub fn include(&mut self, value: String) -> &mut Self { + self.include = Some(value); + self + } +} + /// GetApplicationKeyOptionalParams is a struct for passing parameters to the method [`KeyManagementAPI::get_application_key`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetApplicationKeyOptionalParams { /// Resource path for related resources to include in the response. Only `owned_by` is supported. pub include: Option, } +impl GetApplicationKeyOptionalParams { + /// Resource path for related resources to include in the response. Only `owned_by` is supported. + pub fn include(&mut self, value: String) -> &mut Self { + self.include = Some(value); + self + } +} + /// ListAPIKeysOptionalParams is a struct for passing parameters to the method [`KeyManagementAPI::list_api_keys`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListAPIKeysOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, @@ -48,8 +64,68 @@ pub struct ListAPIKeysOptionalParams { pub filter_category: Option, } +impl ListAPIKeysOptionalParams { + /// Size for a given page. The maximum allowed value is 100. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// Specific page number to return. + pub fn page_number(&mut self, value: i64) -> &mut Self { + self.page_number = Some(value); + self + } + /// API key attribute used to sort results. Sort order is ascending + /// by default. In order to specify a descending sort, prefix the + /// attribute with a minus sign. + pub fn sort(&mut self, value: crate::datadogV2::model::APIKeysSort) -> &mut Self { + self.sort = Some(value); + self + } + /// Filter API keys by the specified string. + pub fn filter(&mut self, value: String) -> &mut Self { + self.filter = Some(value); + self + } + /// Only include API keys created on or after the specified date. + pub fn filter_created_at_start(&mut self, value: String) -> &mut Self { + self.filter_created_at_start = Some(value); + self + } + /// Only include API keys created on or before the specified date. + pub fn filter_created_at_end(&mut self, value: String) -> &mut Self { + self.filter_created_at_end = Some(value); + self + } + /// Only include API keys modified on or after the specified date. + pub fn filter_modified_at_start(&mut self, value: String) -> &mut Self { + self.filter_modified_at_start = Some(value); + self + } + /// Only include API keys modified on or before the specified date. + pub fn filter_modified_at_end(&mut self, value: String) -> &mut Self { + self.filter_modified_at_end = Some(value); + self + } + /// Comma separated list of resource paths for related resources to include in the response. Supported resource paths are `created_by` and `modified_by`. + pub fn include(&mut self, value: String) -> &mut Self { + self.include = Some(value); + self + } + /// Filter API keys by remote config read enabled status. + pub fn filter_remote_config_read_enabled(&mut self, value: bool) -> &mut Self { + self.filter_remote_config_read_enabled = Some(value); + self + } + /// Filter API keys by category. + pub fn filter_category(&mut self, value: String) -> &mut Self { + self.filter_category = Some(value); + self + } +} + /// ListApplicationKeysOptionalParams is a struct for passing parameters to the method [`KeyManagementAPI::list_application_keys`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListApplicationKeysOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, @@ -69,8 +145,48 @@ pub struct ListApplicationKeysOptionalParams { pub include: Option, } +impl ListApplicationKeysOptionalParams { + /// Size for a given page. The maximum allowed value is 100. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// Specific page number to return. + pub fn page_number(&mut self, value: i64) -> &mut Self { + self.page_number = Some(value); + self + } + /// Application key attribute used to sort results. Sort order is ascending + /// by default. In order to specify a descending sort, prefix the + /// attribute with a minus sign. + pub fn sort(&mut self, value: crate::datadogV2::model::ApplicationKeysSort) -> &mut Self { + self.sort = Some(value); + self + } + /// Filter application keys by the specified string. + pub fn filter(&mut self, value: String) -> &mut Self { + self.filter = Some(value); + self + } + /// Only include application keys created on or after the specified date. + pub fn filter_created_at_start(&mut self, value: String) -> &mut Self { + self.filter_created_at_start = Some(value); + self + } + /// Only include application keys created on or before the specified date. + pub fn filter_created_at_end(&mut self, value: String) -> &mut Self { + self.filter_created_at_end = Some(value); + self + } + /// Resource path for related resources to include in the response. Only `owned_by` is supported. + pub fn include(&mut self, value: String) -> &mut Self { + self.include = Some(value); + self + } +} + /// ListCurrentUserApplicationKeysOptionalParams is a struct for passing parameters to the method [`KeyManagementAPI::list_current_user_application_keys`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListCurrentUserApplicationKeysOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, @@ -90,6 +206,46 @@ pub struct ListCurrentUserApplicationKeysOptionalParams { pub include: Option, } +impl ListCurrentUserApplicationKeysOptionalParams { + /// Size for a given page. The maximum allowed value is 100. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// Specific page number to return. + pub fn page_number(&mut self, value: i64) -> &mut Self { + self.page_number = Some(value); + self + } + /// Application key attribute used to sort results. Sort order is ascending + /// by default. In order to specify a descending sort, prefix the + /// attribute with a minus sign. + pub fn sort(&mut self, value: crate::datadogV2::model::ApplicationKeysSort) -> &mut Self { + self.sort = Some(value); + self + } + /// Filter application keys by the specified string. + pub fn filter(&mut self, value: String) -> &mut Self { + self.filter = Some(value); + self + } + /// Only include application keys created on or after the specified date. + pub fn filter_created_at_start(&mut self, value: String) -> &mut Self { + self.filter_created_at_start = Some(value); + self + } + /// Only include application keys created on or before the specified date. + pub fn filter_created_at_end(&mut self, value: String) -> &mut Self { + self.filter_created_at_end = Some(value); + self + } + /// Resource path for related resources to include in the response. Only `owned_by` is supported. + pub fn include(&mut self, value: String) -> &mut Self { + self.include = Some(value); + self + } +} + /// CreateAPIKeyError is a struct for typed errors of method [`KeyManagementAPI::create_api_key`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_logs.rs b/src/datadogV2/api/api_logs.rs index cbf2af390..d4a663e46 100644 --- a/src/datadogV2/api/api_logs.rs +++ b/src/datadogV2/api/api_logs.rs @@ -6,13 +6,20 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListLogsOptionalParams is a struct for passing parameters to the method [`LogsAPI::list_logs`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListLogsOptionalParams { pub body: Option, } +impl ListLogsOptionalParams { + pub fn body(&mut self, value: crate::datadogV2::model::LogsListRequest) -> &mut Self { + self.body = Some(value); + self + } +} + /// ListLogsGetOptionalParams is a struct for passing parameters to the method [`LogsAPI::list_logs_get`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListLogsGetOptionalParams { /// Search query following logs syntax. pub filter_query: Option, @@ -33,8 +40,55 @@ pub struct ListLogsGetOptionalParams { pub page_limit: Option, } +impl ListLogsGetOptionalParams { + /// Search query following logs syntax. + pub fn filter_query(&mut self, value: String) -> &mut Self { + self.filter_query = Some(value); + self + } + /// For customers with multiple indexes, the indexes to search. + /// Defaults to '*' which means all indexes + pub fn filter_indexes(&mut self, value: Vec) -> &mut Self { + self.filter_indexes = Some(value); + self + } + /// Minimum timestamp for requested logs. + pub fn filter_from(&mut self, value: String) -> &mut Self { + self.filter_from = Some(value); + self + } + /// Maximum timestamp for requested logs. + pub fn filter_to(&mut self, value: String) -> &mut Self { + self.filter_to = Some(value); + self + } + /// Specifies the storage type to be used + pub fn filter_storage_tier( + &mut self, + value: crate::datadogV2::model::LogsStorageTier, + ) -> &mut Self { + self.filter_storage_tier = Some(value); + self + } + /// Order of logs in results. + pub fn sort(&mut self, value: crate::datadogV2::model::LogsSort) -> &mut Self { + self.sort = Some(value); + self + } + /// List following results with a cursor provided in the previous query. + pub fn page_cursor(&mut self, value: String) -> &mut Self { + self.page_cursor = Some(value); + self + } + /// Maximum number of logs in the response. + pub fn page_limit(&mut self, value: i32) -> &mut Self { + self.page_limit = Some(value); + self + } +} + /// SubmitLogOptionalParams is a struct for passing parameters to the method [`LogsAPI::submit_log`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct SubmitLogOptionalParams { /// HTTP header used to compress the media-type. pub content_encoding: Option, @@ -42,6 +96,22 @@ pub struct SubmitLogOptionalParams { pub ddtags: Option, } +impl SubmitLogOptionalParams { + /// HTTP header used to compress the media-type. + pub fn content_encoding( + &mut self, + value: crate::datadogV2::model::ContentEncoding, + ) -> &mut Self { + self.content_encoding = Some(value); + self + } + /// Log tags can be passed as query parameters with `text/plain` content type. + pub fn ddtags(&mut self, value: String) -> &mut Self { + self.ddtags = Some(value); + self + } +} + /// AggregateLogsError is a struct for typed errors of method [`LogsAPI::aggregate_logs`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_metrics.rs b/src/datadogV2/api/api_metrics.rs index 20c7d5056..e3c30d902 100644 --- a/src/datadogV2/api/api_metrics.rs +++ b/src/datadogV2/api/api_metrics.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// EstimateMetricsOutputSeriesOptionalParams is a struct for passing parameters to the method [`MetricsAPI::estimate_metrics_output_series`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct EstimateMetricsOutputSeriesOptionalParams { /// Filtered tag keys that the metric is configured to query with. pub filter_groups: Option, @@ -20,16 +20,53 @@ pub struct EstimateMetricsOutputSeriesOptionalParams { pub filter_timespan_h: Option, } +impl EstimateMetricsOutputSeriesOptionalParams { + /// Filtered tag keys that the metric is configured to query with. + pub fn filter_groups(&mut self, value: String) -> &mut Self { + self.filter_groups = Some(value); + self + } + /// The number of hours of look back (from now) to estimate cardinality with. + pub fn filter_hours_ago(&mut self, value: i32) -> &mut Self { + self.filter_hours_ago = Some(value); + self + } + /// The number of aggregations that a `count`, `rate`, or `gauge` metric is configured to use. Max number of aggregation combos is 9. + pub fn filter_num_aggregations(&mut self, value: i32) -> &mut Self { + self.filter_num_aggregations = Some(value); + self + } + /// A boolean, for distribution metrics only, to estimate cardinality if the metric includes additional percentile aggregators. + pub fn filter_pct(&mut self, value: bool) -> &mut Self { + self.filter_pct = Some(value); + self + } + /// A window, in hours, from the look back to estimate cardinality with. + pub fn filter_timespan_h(&mut self, value: i32) -> &mut Self { + self.filter_timespan_h = Some(value); + self + } +} + /// ListActiveMetricConfigurationsOptionalParams is a struct for passing parameters to the method [`MetricsAPI::list_active_metric_configurations`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListActiveMetricConfigurationsOptionalParams { /// The number of seconds of look back (from now). /// Default value is 604,800 (1 week), minimum value is 7200 (2 hours), maximum value is 2,630,000 (1 month). pub window_seconds: Option, } +impl ListActiveMetricConfigurationsOptionalParams { + /// The number of seconds of look back (from now). + /// Default value is 604,800 (1 week), minimum value is 7200 (2 hours), maximum value is 2,630,000 (1 month). + pub fn window_seconds(&mut self, value: i64) -> &mut Self { + self.window_seconds = Some(value); + self + } +} + /// ListTagConfigurationsOptionalParams is a struct for passing parameters to the method [`MetricsAPI::list_tag_configurations`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListTagConfigurationsOptionalParams { /// Filter custom metrics that have configured tags. pub filter_configured: Option, @@ -51,13 +88,69 @@ pub struct ListTagConfigurationsOptionalParams { pub window_seconds: Option, } +impl ListTagConfigurationsOptionalParams { + /// Filter custom metrics that have configured tags. + pub fn filter_configured(&mut self, value: bool) -> &mut Self { + self.filter_configured = Some(value); + self + } + /// Filter tag configurations by configured tags. + pub fn filter_tags_configured(&mut self, value: String) -> &mut Self { + self.filter_tags_configured = Some(value); + self + } + /// Filter metrics by metric type. + pub fn filter_metric_type( + &mut self, + value: crate::datadogV2::model::MetricTagConfigurationMetricTypes, + ) -> &mut Self { + self.filter_metric_type = Some(value); + self + } + /// Filter distributions with additional percentile + /// aggregations enabled or disabled. + pub fn filter_include_percentiles(&mut self, value: bool) -> &mut Self { + self.filter_include_percentiles = Some(value); + self + } + /// (Beta) Filter custom metrics that have or have not been queried in the specified window[seconds]. + /// If no window is provided or the window is less than 2 hours, a default of 2 hours will be applied. + pub fn filter_queried(&mut self, value: bool) -> &mut Self { + self.filter_queried = Some(value); + self + } + /// Filter metrics that have been submitted with the given tags. Supports boolean and wildcard expressions. + /// Can only be combined with the filter[queried] filter. + pub fn filter_tags(&mut self, value: String) -> &mut Self { + self.filter_tags = Some(value); + self + } + /// The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query. + /// Default value is 3600 (1 hour), maximum value is 2,592,000 (30 days). + pub fn window_seconds(&mut self, value: i64) -> &mut Self { + self.window_seconds = Some(value); + self + } +} + /// SubmitMetricsOptionalParams is a struct for passing parameters to the method [`MetricsAPI::submit_metrics`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct SubmitMetricsOptionalParams { /// HTTP header used to compress the media-type. pub content_encoding: Option, } +impl SubmitMetricsOptionalParams { + /// HTTP header used to compress the media-type. + pub fn content_encoding( + &mut self, + value: crate::datadogV2::model::MetricContentEncoding, + ) -> &mut Self { + self.content_encoding = Some(value); + self + } +} + /// CreateBulkTagsMetricsConfigurationError is a struct for typed errors of method [`MetricsAPI::create_bulk_tags_metrics_configuration`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_organizations.rs b/src/datadogV2/api/api_organizations.rs index 9397bbadd..eac89dd3a 100644 --- a/src/datadogV2/api/api_organizations.rs +++ b/src/datadogV2/api/api_organizations.rs @@ -6,12 +6,20 @@ use reqwest; use serde::{Deserialize, Serialize}; /// UploadIdPMetadataOptionalParams is a struct for passing parameters to the method [`OrganizationsAPI::upload_id_p_metadata`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct UploadIdPMetadataOptionalParams { /// The IdP metadata XML file pub idp_file: Option>, } +impl UploadIdPMetadataOptionalParams { + /// The IdP metadata XML file + pub fn idp_file(&mut self, value: Vec) -> &mut Self { + self.idp_file = Some(value); + self + } +} + /// UploadIdPMetadataError is a struct for typed errors of method [`OrganizationsAPI::upload_id_p_metadata`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_powerpack.rs b/src/datadogV2/api/api_powerpack.rs index fe45ecb67..52a7e5922 100644 --- a/src/datadogV2/api/api_powerpack.rs +++ b/src/datadogV2/api/api_powerpack.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListPowerpacksOptionalParams is a struct for passing parameters to the method [`PowerpackAPI::list_powerpacks`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListPowerpacksOptionalParams { /// Maximum number of powerpacks in the response. pub page_limit: Option, @@ -14,6 +14,19 @@ pub struct ListPowerpacksOptionalParams { pub page_offset: Option, } +impl ListPowerpacksOptionalParams { + /// Maximum number of powerpacks in the response. + pub fn page_limit(&mut self, value: i64) -> &mut Self { + self.page_limit = Some(value); + self + } + /// Specific offset to use as the beginning of the returned page. + pub fn page_offset(&mut self, value: i64) -> &mut Self { + self.page_offset = Some(value); + self + } +} + /// CreatePowerpackError is a struct for typed errors of method [`PowerpackAPI::create_powerpack`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_processes.rs b/src/datadogV2/api/api_processes.rs index 694c04921..0bbc07267 100644 --- a/src/datadogV2/api/api_processes.rs +++ b/src/datadogV2/api/api_processes.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListProcessesOptionalParams is a struct for passing parameters to the method [`ProcessesAPI::list_processes`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListProcessesOptionalParams { /// String to search processes by. pub search: Option, @@ -27,6 +27,44 @@ pub struct ListProcessesOptionalParams { pub page_cursor: Option, } +impl ListProcessesOptionalParams { + /// String to search processes by. + pub fn search(&mut self, value: String) -> &mut Self { + self.search = Some(value); + self + } + /// Comma-separated list of tags to filter processes by. + pub fn tags(&mut self, value: String) -> &mut Self { + self.tags = Some(value); + self + } + /// Unix timestamp (number of seconds since epoch) of the start of the query window. + /// If not provided, the start of the query window will be 15 minutes before the `to` timestamp. If neither + /// `from` nor `to` are provided, the query window will be `[now - 15m, now]`. + pub fn from(&mut self, value: i64) -> &mut Self { + self.from = Some(value); + self + } + /// Unix timestamp (number of seconds since epoch) of the end of the query window. + /// If not provided, the end of the query window will be 15 minutes after the `from` timestamp. If neither + /// `from` nor `to` are provided, the query window will be `[now - 15m, now]`. + pub fn to(&mut self, value: i64) -> &mut Self { + self.to = Some(value); + self + } + /// Maximum number of results returned. + pub fn page_limit(&mut self, value: i32) -> &mut Self { + self.page_limit = Some(value); + self + } + /// String to query the next page of results. + /// This key is provided with each valid response from the API in `meta.page.after`. + pub fn page_cursor(&mut self, value: String) -> &mut Self { + self.page_cursor = Some(value); + self + } +} + /// ListProcessesError is a struct for typed errors of method [`ProcessesAPI::list_processes`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_roles.rs b/src/datadogV2/api/api_roles.rs index 4b74434dd..498c2e798 100644 --- a/src/datadogV2/api/api_roles.rs +++ b/src/datadogV2/api/api_roles.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListRoleUsersOptionalParams is a struct for passing parameters to the method [`RolesAPI::list_role_users`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListRoleUsersOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, @@ -20,8 +20,33 @@ pub struct ListRoleUsersOptionalParams { pub filter: Option, } +impl ListRoleUsersOptionalParams { + /// Size for a given page. The maximum allowed value is 100. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// Specific page number to return. + pub fn page_number(&mut self, value: i64) -> &mut Self { + self.page_number = Some(value); + self + } + /// User attribute to order results by. Sort order is **ascending** by default. + /// Sort order is **descending** if the field is prefixed by a negative sign, + /// for example `sort=-name`. Options: `name`, `email`, `status`. + pub fn sort(&mut self, value: String) -> &mut Self { + self.sort = Some(value); + self + } + /// Filter all users by the given string. Defaults to no filtering. + pub fn filter(&mut self, value: String) -> &mut Self { + self.filter = Some(value); + self + } +} + /// ListRolesOptionalParams is a struct for passing parameters to the method [`RolesAPI::list_roles`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListRolesOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, @@ -37,6 +62,36 @@ pub struct ListRolesOptionalParams { pub filter_id: Option, } +impl ListRolesOptionalParams { + /// Size for a given page. The maximum allowed value is 100. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// Specific page number to return. + pub fn page_number(&mut self, value: i64) -> &mut Self { + self.page_number = Some(value); + self + } + /// Sort roles depending on the given field. Sort order is **ascending** by default. + /// Sort order is **descending** if the field is prefixed by a negative sign, for example: + /// `sort=-name`. + pub fn sort(&mut self, value: crate::datadogV2::model::RolesSort) -> &mut Self { + self.sort = Some(value); + self + } + /// Filter all roles by the given string. + pub fn filter(&mut self, value: String) -> &mut Self { + self.filter = Some(value); + self + } + /// Filter all roles by the given list of role IDs. + pub fn filter_id(&mut self, value: String) -> &mut Self { + self.filter_id = Some(value); + self + } +} + /// AddPermissionToRoleError is a struct for typed errors of method [`RolesAPI::add_permission_to_role`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_rum.rs b/src/datadogV2/api/api_rum.rs index c10239a55..b7d19d9c7 100644 --- a/src/datadogV2/api/api_rum.rs +++ b/src/datadogV2/api/api_rum.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListRUMEventsOptionalParams is a struct for passing parameters to the method [`RUMAPI::list_rum_events`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListRUMEventsOptionalParams { /// Search query following RUM syntax. pub filter_query: Option, @@ -22,6 +22,39 @@ pub struct ListRUMEventsOptionalParams { pub page_limit: Option, } +impl ListRUMEventsOptionalParams { + /// Search query following RUM syntax. + pub fn filter_query(&mut self, value: String) -> &mut Self { + self.filter_query = Some(value); + self + } + /// Minimum timestamp for requested events. + pub fn filter_from(&mut self, value: String) -> &mut Self { + self.filter_from = Some(value); + self + } + /// Maximum timestamp for requested events. + pub fn filter_to(&mut self, value: String) -> &mut Self { + self.filter_to = Some(value); + self + } + /// Order of events in results. + pub fn sort(&mut self, value: crate::datadogV2::model::RUMSort) -> &mut Self { + self.sort = Some(value); + self + } + /// List following results with a cursor provided in the previous query. + pub fn page_cursor(&mut self, value: String) -> &mut Self { + self.page_cursor = Some(value); + self + } + /// Maximum number of events in the response. + pub fn page_limit(&mut self, value: i32) -> &mut Self { + self.page_limit = Some(value); + self + } +} + /// AggregateRUMEventsError is a struct for typed errors of method [`RUMAPI::aggregate_rum_events`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_security_monitoring.rs b/src/datadogV2/api/api_security_monitoring.rs index 0a06053cc..515fbb037 100644 --- a/src/datadogV2/api/api_security_monitoring.rs +++ b/src/datadogV2/api/api_security_monitoring.rs @@ -6,14 +6,22 @@ use reqwest; use serde::{Deserialize, Serialize}; /// GetFindingOptionalParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::get_finding`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetFindingOptionalParams { /// Return the finding for a given snapshot of time (Unix ms). pub snapshot_timestamp: Option, } +impl GetFindingOptionalParams { + /// Return the finding for a given snapshot of time (Unix ms). + pub fn snapshot_timestamp(&mut self, value: i64) -> &mut Self { + self.snapshot_timestamp = Some(value); + self + } +} + /// ListFindingsOptionalParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::list_findings`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListFindingsOptionalParams { /// Limit the number of findings returned. Must be <= 1000. pub page_limit: Option, @@ -41,8 +49,74 @@ pub struct ListFindingsOptionalParams { pub filter_status: Option, } +impl ListFindingsOptionalParams { + /// Limit the number of findings returned. Must be <= 1000. + pub fn page_limit(&mut self, value: i64) -> &mut Self { + self.page_limit = Some(value); + self + } + /// Return findings for a given snapshot of time (Unix ms). + pub fn snapshot_timestamp(&mut self, value: i64) -> &mut Self { + self.snapshot_timestamp = Some(value); + self + } + /// Return the next page of findings pointed to by the cursor. + pub fn page_cursor(&mut self, value: String) -> &mut Self { + self.page_cursor = Some(value); + self + } + /// Return findings that have these associated tags (repeatable). + pub fn filter_tags(&mut self, value: String) -> &mut Self { + self.filter_tags = Some(value); + self + } + /// Return findings that have changed from pass to fail or vice versa on a specified date (Unix ms) or date range (using comparison operators). + pub fn filter_evaluation_changed_at(&mut self, value: String) -> &mut Self { + self.filter_evaluation_changed_at = Some(value); + self + } + /// Set to `true` to return findings that are muted. Set to `false` to return unmuted findings. + pub fn filter_muted(&mut self, value: bool) -> &mut Self { + self.filter_muted = Some(value); + self + } + /// Return findings for the specified rule ID. + pub fn filter_rule_id(&mut self, value: String) -> &mut Self { + self.filter_rule_id = Some(value); + self + } + /// Return findings for the specified rule. + pub fn filter_rule_name(&mut self, value: String) -> &mut Self { + self.filter_rule_name = Some(value); + self + } + /// Return only findings for the specified resource type. + pub fn filter_resource_type(&mut self, value: String) -> &mut Self { + self.filter_resource_type = Some(value); + self + } + /// Return findings that were found on a specified date (Unix ms) or date range (using comparison operators). + pub fn filter_discovery_timestamp(&mut self, value: String) -> &mut Self { + self.filter_discovery_timestamp = Some(value); + self + } + /// Return only `pass` or `fail` findings. + pub fn filter_evaluation( + &mut self, + value: crate::datadogV2::model::FindingEvaluation, + ) -> &mut Self { + self.filter_evaluation = Some(value); + self + } + /// Return only findings with the specified status. + pub fn filter_status(&mut self, value: crate::datadogV2::model::FindingStatus) -> &mut Self { + self.filter_status = Some(value); + self + } +} + /// ListSecurityMonitoringRulesOptionalParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::list_security_monitoring_rules`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListSecurityMonitoringRulesOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, @@ -50,8 +124,21 @@ pub struct ListSecurityMonitoringRulesOptionalParams { pub page_number: Option, } +impl ListSecurityMonitoringRulesOptionalParams { + /// Size for a given page. The maximum allowed value is 100. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// Specific page number to return. + pub fn page_number(&mut self, value: i64) -> &mut Self { + self.page_number = Some(value); + self + } +} + /// ListSecurityMonitoringSignalsOptionalParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::list_security_monitoring_signals`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListSecurityMonitoringSignalsOptionalParams { /// The search query for security signals. pub filter_query: Option, @@ -67,12 +154,58 @@ pub struct ListSecurityMonitoringSignalsOptionalParams { pub page_limit: Option, } +impl ListSecurityMonitoringSignalsOptionalParams { + /// The search query for security signals. + pub fn filter_query(&mut self, value: String) -> &mut Self { + self.filter_query = Some(value); + self + } + /// The minimum timestamp for requested security signals. + pub fn filter_from(&mut self, value: String) -> &mut Self { + self.filter_from = Some(value); + self + } + /// The maximum timestamp for requested security signals. + pub fn filter_to(&mut self, value: String) -> &mut Self { + self.filter_to = Some(value); + self + } + /// The order of the security signals in results. + pub fn sort( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalsSort, + ) -> &mut Self { + self.sort = Some(value); + self + } + /// A list of results using the cursor provided in the previous query. + pub fn page_cursor(&mut self, value: String) -> &mut Self { + self.page_cursor = Some(value); + self + } + /// The maximum number of security signals in the response. + pub fn page_limit(&mut self, value: i32) -> &mut Self { + self.page_limit = Some(value); + self + } +} + /// SearchSecurityMonitoringSignalsOptionalParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::search_security_monitoring_signals`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct SearchSecurityMonitoringSignalsOptionalParams { pub body: Option, } +impl SearchSecurityMonitoringSignalsOptionalParams { + pub fn body( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalListRequest, + ) -> &mut Self { + self.body = Some(value); + self + } +} + /// CreateSecurityFilterError is a struct for typed errors of method [`SecurityMonitoringAPI::create_security_filter`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_service_accounts.rs b/src/datadogV2/api/api_service_accounts.rs index 293247681..756459dfb 100644 --- a/src/datadogV2/api/api_service_accounts.rs +++ b/src/datadogV2/api/api_service_accounts.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListServiceAccountApplicationKeysOptionalParams is a struct for passing parameters to the method [`ServiceAccountsAPI::list_service_account_application_keys`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListServiceAccountApplicationKeysOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, @@ -24,6 +24,41 @@ pub struct ListServiceAccountApplicationKeysOptionalParams { pub filter_created_at_end: Option, } +impl ListServiceAccountApplicationKeysOptionalParams { + /// Size for a given page. The maximum allowed value is 100. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// Specific page number to return. + pub fn page_number(&mut self, value: i64) -> &mut Self { + self.page_number = Some(value); + self + } + /// Application key attribute used to sort results. Sort order is ascending + /// by default. In order to specify a descending sort, prefix the + /// attribute with a minus sign. + pub fn sort(&mut self, value: crate::datadogV2::model::ApplicationKeysSort) -> &mut Self { + self.sort = Some(value); + self + } + /// Filter application keys by the specified string. + pub fn filter(&mut self, value: String) -> &mut Self { + self.filter = Some(value); + self + } + /// Only include application keys created on or after the specified date. + pub fn filter_created_at_start(&mut self, value: String) -> &mut Self { + self.filter_created_at_start = Some(value); + self + } + /// Only include application keys created on or before the specified date. + pub fn filter_created_at_end(&mut self, value: String) -> &mut Self { + self.filter_created_at_end = Some(value); + self + } +} + /// CreateServiceAccountError is a struct for typed errors of method [`ServiceAccountsAPI::create_service_account`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_service_definition.rs b/src/datadogV2/api/api_service_definition.rs index 02e8d92ab..1a00f2e0f 100644 --- a/src/datadogV2/api/api_service_definition.rs +++ b/src/datadogV2/api/api_service_definition.rs @@ -6,14 +6,25 @@ use reqwest; use serde::{Deserialize, Serialize}; /// GetServiceDefinitionOptionalParams is a struct for passing parameters to the method [`ServiceDefinitionAPI::get_service_definition`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetServiceDefinitionOptionalParams { /// The schema version desired in the response. pub schema_version: Option, } +impl GetServiceDefinitionOptionalParams { + /// The schema version desired in the response. + pub fn schema_version( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionSchemaVersions, + ) -> &mut Self { + self.schema_version = Some(value); + self + } +} + /// ListServiceDefinitionsOptionalParams is a struct for passing parameters to the method [`ServiceDefinitionAPI::list_service_definitions`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListServiceDefinitionsOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, @@ -23,6 +34,27 @@ pub struct ListServiceDefinitionsOptionalParams { pub schema_version: Option, } +impl ListServiceDefinitionsOptionalParams { + /// Size for a given page. The maximum allowed value is 100. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// Specific page number to return. + pub fn page_number(&mut self, value: i64) -> &mut Self { + self.page_number = Some(value); + self + } + /// The schema version desired in the response. + pub fn schema_version( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionSchemaVersions, + ) -> &mut Self { + self.schema_version = Some(value); + self + } +} + /// CreateOrUpdateServiceDefinitionsError is a struct for typed errors of method [`ServiceDefinitionAPI::create_or_update_service_definitions`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_service_scorecards.rs b/src/datadogV2/api/api_service_scorecards.rs index 95956ac01..d020349cd 100644 --- a/src/datadogV2/api/api_service_scorecards.rs +++ b/src/datadogV2/api/api_service_scorecards.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListScorecardOutcomesOptionalParams is a struct for passing parameters to the method [`ServiceScorecardsAPI::list_scorecard_outcomes`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListScorecardOutcomesOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, @@ -30,8 +30,61 @@ pub struct ListScorecardOutcomesOptionalParams { pub filter_rule_name: Option, } +impl ListScorecardOutcomesOptionalParams { + /// Size for a given page. The maximum allowed value is 100. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// Specific offset to use as the beginning of the returned page. + pub fn page_offset(&mut self, value: i64) -> &mut Self { + self.page_offset = Some(value); + self + } + /// Include related rule details in the response. + pub fn include(&mut self, value: String) -> &mut Self { + self.include = Some(value); + self + } + /// Return only specified values in the outcome attributes. + pub fn fields_outcome(&mut self, value: String) -> &mut Self { + self.fields_outcome = Some(value); + self + } + /// Return only specified values in the included rule details. + pub fn fields_rule(&mut self, value: String) -> &mut Self { + self.fields_rule = Some(value); + self + } + /// Filter the outcomes on a specific service name. + pub fn filter_outcome_service_name(&mut self, value: String) -> &mut Self { + self.filter_outcome_service_name = Some(value); + self + } + /// Filter the outcomes by a specific state. + pub fn filter_outcome_state(&mut self, value: String) -> &mut Self { + self.filter_outcome_state = Some(value); + self + } + /// Filter outcomes on whether a rule is enabled/disabled. + pub fn filter_rule_enabled(&mut self, value: bool) -> &mut Self { + self.filter_rule_enabled = Some(value); + self + } + /// Filter outcomes based on rule ID. + pub fn filter_rule_id(&mut self, value: String) -> &mut Self { + self.filter_rule_id = Some(value); + self + } + /// Filter outcomes based on rule name. + pub fn filter_rule_name(&mut self, value: String) -> &mut Self { + self.filter_rule_name = Some(value); + self + } +} + /// ListScorecardRulesOptionalParams is a struct for passing parameters to the method [`ServiceScorecardsAPI::list_scorecard_rules`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListScorecardRulesOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, @@ -55,6 +108,59 @@ pub struct ListScorecardRulesOptionalParams { pub fields_scorecard: Option, } +impl ListScorecardRulesOptionalParams { + /// Size for a given page. The maximum allowed value is 100. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// Specific offset to use as the beginning of the returned page. + pub fn page_offset(&mut self, value: i64) -> &mut Self { + self.page_offset = Some(value); + self + } + /// Include related scorecard details in the response. + pub fn include(&mut self, value: String) -> &mut Self { + self.include = Some(value); + self + } + /// Filter the rules on a rule ID. + pub fn filter_rule_id(&mut self, value: String) -> &mut Self { + self.filter_rule_id = Some(value); + self + } + /// Filter for enabled rules only. + pub fn filter_rule_enabled(&mut self, value: bool) -> &mut Self { + self.filter_rule_enabled = Some(value); + self + } + /// Filter for custom rules only. + pub fn filter_rule_custom(&mut self, value: bool) -> &mut Self { + self.filter_rule_custom = Some(value); + self + } + /// Filter rules on the rule name. + pub fn filter_rule_name(&mut self, value: String) -> &mut Self { + self.filter_rule_name = Some(value); + self + } + /// Filter rules on the rule description. + pub fn filter_rule_description(&mut self, value: String) -> &mut Self { + self.filter_rule_description = Some(value); + self + } + /// Return only specific fields in the response for rule attributes. + pub fn fields_rule(&mut self, value: String) -> &mut Self { + self.fields_rule = Some(value); + self + } + /// Return only specific fields in the included response for scorecard attributes. + pub fn fields_scorecard(&mut self, value: String) -> &mut Self { + self.fields_scorecard = Some(value); + self + } +} + /// CreateScorecardOutcomesBatchError is a struct for typed errors of method [`ServiceScorecardsAPI::create_scorecard_outcomes_batch`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_spans.rs b/src/datadogV2/api/api_spans.rs index a58381d18..34e40f95f 100644 --- a/src/datadogV2/api/api_spans.rs +++ b/src/datadogV2/api/api_spans.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListSpansGetOptionalParams is a struct for passing parameters to the method [`SpansAPI::list_spans_get`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListSpansGetOptionalParams { /// Search query following spans syntax. pub filter_query: Option, @@ -22,6 +22,39 @@ pub struct ListSpansGetOptionalParams { pub page_limit: Option, } +impl ListSpansGetOptionalParams { + /// Search query following spans syntax. + pub fn filter_query(&mut self, value: String) -> &mut Self { + self.filter_query = Some(value); + self + } + /// Minimum timestamp for requested spans. Supports date-time ISO8601, date math, and regular timestamps (milliseconds). + pub fn filter_from(&mut self, value: String) -> &mut Self { + self.filter_from = Some(value); + self + } + /// Maximum timestamp for requested spans. Supports date-time ISO8601, date math, and regular timestamps (milliseconds). + pub fn filter_to(&mut self, value: String) -> &mut Self { + self.filter_to = Some(value); + self + } + /// Order of spans in results. + pub fn sort(&mut self, value: crate::datadogV2::model::SpansSort) -> &mut Self { + self.sort = Some(value); + self + } + /// List following results with a cursor provided in the previous query. + pub fn page_cursor(&mut self, value: String) -> &mut Self { + self.page_cursor = Some(value); + self + } + /// Maximum number of spans in the response. + pub fn page_limit(&mut self, value: i32) -> &mut Self { + self.page_limit = Some(value); + self + } +} + /// AggregateSpansError is a struct for typed errors of method [`SpansAPI::aggregate_spans`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_teams.rs b/src/datadogV2/api/api_teams.rs index 71f3877bb..b3f5d65ed 100644 --- a/src/datadogV2/api/api_teams.rs +++ b/src/datadogV2/api/api_teams.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// GetTeamMembershipsOptionalParams is a struct for passing parameters to the method [`TeamsAPI::get_team_memberships`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetTeamMembershipsOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, @@ -18,8 +18,31 @@ pub struct GetTeamMembershipsOptionalParams { pub filter_keyword: Option, } +impl GetTeamMembershipsOptionalParams { + /// Size for a given page. The maximum allowed value is 100. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// Specific page number to return. + pub fn page_number(&mut self, value: i64) -> &mut Self { + self.page_number = Some(value); + self + } + /// Specifies the order of returned team memberships + pub fn sort(&mut self, value: crate::datadogV2::model::GetTeamMembershipsSort) -> &mut Self { + self.sort = Some(value); + self + } + /// Search query, can be user email or name + pub fn filter_keyword(&mut self, value: String) -> &mut Self { + self.filter_keyword = Some(value); + self + } +} + /// ListTeamsOptionalParams is a struct for passing parameters to the method [`TeamsAPI::list_teams`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListTeamsOptionalParams { /// Specific page number to return. pub page_number: Option, @@ -37,6 +60,44 @@ pub struct ListTeamsOptionalParams { pub fields_team: Option>, } +impl ListTeamsOptionalParams { + /// Specific page number to return. + pub fn page_number(&mut self, value: i64) -> &mut Self { + self.page_number = Some(value); + self + } + /// Size for a given page. The maximum allowed value is 100. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// Specifies the order of the returned teams + pub fn sort(&mut self, value: crate::datadogV2::model::ListTeamsSort) -> &mut Self { + self.sort = Some(value); + self + } + /// Included related resources optionally requested. Allowed enum values: `team_links, user_team_permissions` + pub fn include(&mut self, value: Vec) -> &mut Self { + self.include = Some(value); + self + } + /// Search query. Can be team name, team handle, or email of team member + pub fn filter_keyword(&mut self, value: String) -> &mut Self { + self.filter_keyword = Some(value); + self + } + /// When true, only returns teams the current user belongs to + pub fn filter_me(&mut self, value: bool) -> &mut Self { + self.filter_me = Some(value); + self + } + /// List of fields that need to be fetched. + pub fn fields_team(&mut self, value: Vec) -> &mut Self { + self.fields_team = Some(value); + self + } +} + /// CreateTeamError is a struct for typed errors of method [`TeamsAPI::create_team`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_usage_metering.rs b/src/datadogV2/api/api_usage_metering.rs index f260378d6..c6fc3d827 100644 --- a/src/datadogV2/api/api_usage_metering.rs +++ b/src/datadogV2/api/api_usage_metering.rs @@ -6,14 +6,22 @@ use reqwest; use serde::{Deserialize, Serialize}; /// GetCostByOrgOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_cost_by_org`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetCostByOrgOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost ending this month. pub end_month: Option, } +impl GetCostByOrgOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost ending this month. + pub fn end_month(&mut self, value: String) -> &mut Self { + self.end_month = Some(value); + self + } +} + /// GetEstimatedCostByOrgOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_estimated_cost_by_org`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetEstimatedCostByOrgOptionalParams { /// String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are `summary` and `sub-org`. Defaults to `summary`. pub view: Option, @@ -27,8 +35,36 @@ pub struct GetEstimatedCostByOrgOptionalParams { pub end_date: Option, } +impl GetEstimatedCostByOrgOptionalParams { + /// String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are `summary` and `sub-org`. Defaults to `summary`. + pub fn view(&mut self, value: String) -> &mut Self { + self.view = Some(value); + self + } + /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost beginning this month. Either start_month or start_date should be specified, but not both. (start_month cannot go beyond two months in the past). Provide an `end_month` to view month-over-month cost. + pub fn start_month(&mut self, value: String) -> &mut Self { + self.start_month = Some(value); + self + } + /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost ending this month. + pub fn end_month(&mut self, value: String) -> &mut Self { + self.end_month = Some(value); + self + } + /// Datetime in ISO-8601 format, UTC, precise to day: `[YYYY-MM-DD]` for cost beginning this day. Either start_month or start_date should be specified, but not both. (start_date cannot go beyond two months in the past). Provide an `end_date` to view day-over-day cumulative cost. + pub fn start_date(&mut self, value: String) -> &mut Self { + self.start_date = Some(value); + self + } + /// Datetime in ISO-8601 format, UTC, precise to day: `[YYYY-MM-DD]` for cost ending this day. + pub fn end_date(&mut self, value: String) -> &mut Self { + self.end_date = Some(value); + self + } +} + /// GetHistoricalCostByOrgOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_historical_cost_by_org`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetHistoricalCostByOrgOptionalParams { /// String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are `summary` and `sub-org`. Defaults to `summary`. pub view: Option, @@ -36,8 +72,21 @@ pub struct GetHistoricalCostByOrgOptionalParams { pub end_month: Option, } +impl GetHistoricalCostByOrgOptionalParams { + /// String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are `summary` and `sub-org`. Defaults to `summary`. + pub fn view(&mut self, value: String) -> &mut Self { + self.view = Some(value); + self + } + /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost ending this month. + pub fn end_month(&mut self, value: String) -> &mut Self { + self.end_month = Some(value); + self + } +} + /// GetHourlyUsageOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_hourly_usage`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetHourlyUsageOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. pub filter_timestamp_end: Option, @@ -55,8 +104,43 @@ pub struct GetHourlyUsageOptionalParams { pub page_next_record_id: Option, } +impl GetHourlyUsageOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. + pub fn filter_timestamp_end(&mut self, value: String) -> &mut Self { + self.filter_timestamp_end = Some(value); + self + } + /// Include child org usage in the response. Defaults to false. + pub fn filter_include_descendants(&mut self, value: bool) -> &mut Self { + self.filter_include_descendants = Some(value); + self + } + /// Include breakdown of usage by subcategories where applicable (for product family logs only). Defaults to false. + pub fn filter_include_breakdown(&mut self, value: bool) -> &mut Self { + self.filter_include_breakdown = Some(value); + self + } + /// Comma separated list of product family versions to use in the format `product_family:version`. For example, + /// `infra_hosts:1.0.0`. If this parameter is not used, the API will use the latest version of each requested + /// product family. Currently all families have one version `1.0.0`. + pub fn filter_versions(&mut self, value: String) -> &mut Self { + self.filter_versions = Some(value); + self + } + /// Maximum number of results to return (between 1 and 500) - defaults to 500 if limit not specified. + pub fn page_limit(&mut self, value: i32) -> &mut Self { + self.page_limit = Some(value); + self + } + /// List following results with a next_record_id provided in the previous query. + pub fn page_next_record_id(&mut self, value: String) -> &mut Self { + self.page_next_record_id = Some(value); + self + } +} + /// GetMonthlyCostAttributionOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_monthly_cost_attribution`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetMonthlyCostAttributionOptionalParams { /// The direction to sort by: `[desc, asc]`. pub sort_direction: Option, @@ -71,37 +155,101 @@ pub struct GetMonthlyCostAttributionOptionalParams { pub include_descendants: Option, } +impl GetMonthlyCostAttributionOptionalParams { + /// The direction to sort by: `[desc, asc]`. + pub fn sort_direction(&mut self, value: crate::datadogV2::model::SortDirection) -> &mut Self { + self.sort_direction = Some(value); + self + } + /// The billing dimension to sort by. Always sorted by total cost. Example: `infra_host`. + pub fn sort_name(&mut self, value: String) -> &mut Self { + self.sort_name = Some(value); + self + } + /// Comma separated list of tag keys used to group cost. If no value is provided the cost will not be broken down by tags. + /// To see which tags are available, look for the value of `tag_config_source` in the API response. + pub fn tag_breakdown_keys(&mut self, value: String) -> &mut Self { + self.tag_breakdown_keys = Some(value); + self + } + /// List following results with a next_record_id provided in the previous query. + pub fn next_record_id(&mut self, value: String) -> &mut Self { + self.next_record_id = Some(value); + self + } + /// Include child org cost in the response. Defaults to `true`. + pub fn include_descendants(&mut self, value: bool) -> &mut Self { + self.include_descendants = Some(value); + self + } +} + /// GetProjectedCostOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_projected_cost`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetProjectedCostOptionalParams { /// String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are `summary` and `sub-org`. Defaults to `summary`. pub view: Option, } +impl GetProjectedCostOptionalParams { + /// String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are `summary` and `sub-org`. Defaults to `summary`. + pub fn view(&mut self, value: String) -> &mut Self { + self.view = Some(value); + self + } +} + /// GetUsageApplicationSecurityMonitoringOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_application_security_monitoring`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageApplicationSecurityMonitoringOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } +impl GetUsageApplicationSecurityMonitoringOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + /// **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageLambdaTracedInvocationsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_lambda_traced_invocations`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageLambdaTracedInvocationsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } +impl GetUsageLambdaTracedInvocationsOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + /// **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetUsageObservabilityPipelinesOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_observability_pipelines`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct GetUsageObservabilityPipelinesOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. pub end_hr: Option, } +impl GetUsageObservabilityPipelinesOptionalParams { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + /// **before** this hour. + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } +} + /// GetActiveBillingDimensionsError is a struct for typed errors of method [`UsageMeteringAPI::get_active_billing_dimensions`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/api/api_users.rs b/src/datadogV2/api/api_users.rs index fd80eae91..5252084d6 100644 --- a/src/datadogV2/api/api_users.rs +++ b/src/datadogV2/api/api_users.rs @@ -6,7 +6,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListUsersOptionalParams is a struct for passing parameters to the method [`UsersAPI::list_users`] -#[derive(Clone, Debug)] +#[derive(Clone, Default, Debug)] pub struct ListUsersOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, @@ -27,6 +27,44 @@ pub struct ListUsersOptionalParams { pub filter_status: Option, } +impl ListUsersOptionalParams { + /// Size for a given page. The maximum allowed value is 100. + pub fn page_size(&mut self, value: i64) -> &mut Self { + self.page_size = Some(value); + self + } + /// Specific page number to return. + pub fn page_number(&mut self, value: i64) -> &mut Self { + self.page_number = Some(value); + self + } + /// User attribute to order results by. Sort order is ascending by default. + /// Sort order is descending if the field + /// is prefixed by a negative sign, for example `sort=-name`. Options: `name`, + /// `modified_at`, `user_count`. + pub fn sort(&mut self, value: String) -> &mut Self { + self.sort = Some(value); + self + } + /// Direction of sort. Options: `asc`, `desc`. + pub fn sort_dir(&mut self, value: crate::datadogV2::model::QuerySortOrder) -> &mut Self { + self.sort_dir = Some(value); + self + } + /// Filter all users by the given string. Defaults to no filtering. + pub fn filter(&mut self, value: String) -> &mut Self { + self.filter = Some(value); + self + } + /// Filter on status attribute. + /// Comma separated list, with possible values `Active`, `Pending`, and `Disabled`. + /// Defaults to no filtering. + pub fn filter_status(&mut self, value: String) -> &mut Self { + self.filter_status = Some(value); + self + } +} + /// CreateUserError is a struct for typed errors of method [`UsersAPI::create_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] diff --git a/src/datadogV2/model/model_active_billing_dimensions_attributes.rs b/src/datadogV2/model/model_active_billing_dimensions_attributes.rs index 20ac12252..443c465b3 100644 --- a/src/datadogV2/model/model_active_billing_dimensions_attributes.rs +++ b/src/datadogV2/model/model_active_billing_dimensions_attributes.rs @@ -24,16 +24,17 @@ impl ActiveBillingDimensionsAttributes { } } - pub fn with_month(&mut self, value: String) -> &mut Self { + pub fn month(&mut self, value: String) -> &mut Self { self.month = Some(value); self } - pub fn with_values(&mut self, value: Vec) -> &mut Self { + pub fn values(&mut self, value: Vec) -> &mut Self { self.values = Some(value); self } } + impl Default for ActiveBillingDimensionsAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_active_billing_dimensions_body.rs b/src/datadogV2/model/model_active_billing_dimensions_body.rs index 7aa2bdcde..7c8a9caee 100644 --- a/src/datadogV2/model/model_active_billing_dimensions_body.rs +++ b/src/datadogV2/model/model_active_billing_dimensions_body.rs @@ -28,7 +28,7 @@ impl ActiveBillingDimensionsBody { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::ActiveBillingDimensionsAttributes, ) -> &mut Self { @@ -36,12 +36,12 @@ impl ActiveBillingDimensionsBody { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::ActiveBillingDimensionsType, ) -> &mut Self { @@ -49,6 +49,7 @@ impl ActiveBillingDimensionsBody { self } } + impl Default for ActiveBillingDimensionsBody { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_active_billing_dimensions_response.rs b/src/datadogV2/model/model_active_billing_dimensions_response.rs index 82a335056..9906caba3 100644 --- a/src/datadogV2/model/model_active_billing_dimensions_response.rs +++ b/src/datadogV2/model/model_active_billing_dimensions_response.rs @@ -18,7 +18,7 @@ impl ActiveBillingDimensionsResponse { ActiveBillingDimensionsResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::ActiveBillingDimensionsBody, ) -> &mut Self { @@ -26,6 +26,7 @@ impl ActiveBillingDimensionsResponse { self } } + impl Default for ActiveBillingDimensionsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_api_key_relationships.rs b/src/datadogV2/model/model_api_key_relationships.rs index fef5267e1..0fbee7a77 100644 --- a/src/datadogV2/model/model_api_key_relationships.rs +++ b/src/datadogV2/model/model_api_key_relationships.rs @@ -24,22 +24,17 @@ impl APIKeyRelationships { } } - pub fn with_created_by( - &mut self, - value: crate::datadogV2::model::RelationshipToUser, - ) -> &mut Self { + pub fn created_by(&mut self, value: crate::datadogV2::model::RelationshipToUser) -> &mut Self { self.created_by = Some(value); self } - pub fn with_modified_by( - &mut self, - value: crate::datadogV2::model::RelationshipToUser, - ) -> &mut Self { + pub fn modified_by(&mut self, value: crate::datadogV2::model::RelationshipToUser) -> &mut Self { self.modified_by = Some(value); self } } + impl Default for APIKeyRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_api_key_response.rs b/src/datadogV2/model/model_api_key_response.rs index 9391e64bc..fccc96500 100644 --- a/src/datadogV2/model/model_api_key_response.rs +++ b/src/datadogV2/model/model_api_key_response.rs @@ -24,12 +24,12 @@ impl APIKeyResponse { } } - pub fn with_data(&mut self, value: crate::datadogV2::model::FullAPIKey) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::FullAPIKey) -> &mut Self { self.data = Some(value); self } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { @@ -37,6 +37,7 @@ impl APIKeyResponse { self } } + impl Default for APIKeyResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_api_key_response_included_item.rs b/src/datadogV2/model/model_api_key_response_included_item.rs index af5c50091..b283968d2 100644 --- a/src/datadogV2/model/model_api_key_response_included_item.rs +++ b/src/datadogV2/model/model_api_key_response_included_item.rs @@ -7,5 +7,5 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum APIKeyResponseIncludedItem { - User(crate::datadogV2::model::User), + User(Box), } diff --git a/src/datadogV2/model/model_api_keys_response.rs b/src/datadogV2/model/model_api_keys_response.rs index 753297a1b..6302648d0 100644 --- a/src/datadogV2/model/model_api_keys_response.rs +++ b/src/datadogV2/model/model_api_keys_response.rs @@ -28,12 +28,12 @@ impl APIKeysResponse { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { @@ -41,11 +41,12 @@ impl APIKeysResponse { self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::APIKeysResponseMeta) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::APIKeysResponseMeta) -> &mut Self { self.meta = Some(value); self } } + impl Default for APIKeysResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_api_keys_response_meta.rs b/src/datadogV2/model/model_api_keys_response_meta.rs index 332e14a3c..f5f56a450 100644 --- a/src/datadogV2/model/model_api_keys_response_meta.rs +++ b/src/datadogV2/model/model_api_keys_response_meta.rs @@ -24,19 +24,17 @@ impl APIKeysResponseMeta { } } - pub fn with_max_allowed(&mut self, value: i64) -> &mut Self { + pub fn max_allowed(&mut self, value: i64) -> &mut Self { self.max_allowed = Some(value); self } - pub fn with_page( - &mut self, - value: crate::datadogV2::model::APIKeysResponseMetaPage, - ) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV2::model::APIKeysResponseMetaPage) -> &mut Self { self.page = Some(value); self } } + impl Default for APIKeysResponseMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_api_keys_response_meta_page.rs b/src/datadogV2/model/model_api_keys_response_meta_page.rs index 167e52408..22badee92 100644 --- a/src/datadogV2/model/model_api_keys_response_meta_page.rs +++ b/src/datadogV2/model/model_api_keys_response_meta_page.rs @@ -20,11 +20,12 @@ impl APIKeysResponseMetaPage { } } - pub fn with_total_filtered_count(&mut self, value: i64) -> &mut Self { + pub fn total_filtered_count(&mut self, value: i64) -> &mut Self { self.total_filtered_count = Some(value); self } } + impl Default for APIKeysResponseMetaPage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_application_key_create_attributes.rs b/src/datadogV2/model/model_application_key_create_attributes.rs index 669be8ca5..b04bd8ac4 100644 --- a/src/datadogV2/model/model_application_key_create_attributes.rs +++ b/src/datadogV2/model/model_application_key_create_attributes.rs @@ -21,7 +21,7 @@ impl ApplicationKeyCreateAttributes { ApplicationKeyCreateAttributes { name, scopes: None } } - pub fn with_scopes(&mut self, value: Option>) -> &mut Self { + pub fn scopes(&mut self, value: Option>) -> &mut Self { self.scopes = Some(value); self } diff --git a/src/datadogV2/model/model_application_key_relationships.rs b/src/datadogV2/model/model_application_key_relationships.rs index e0a352bbe..84812089e 100644 --- a/src/datadogV2/model/model_application_key_relationships.rs +++ b/src/datadogV2/model/model_application_key_relationships.rs @@ -18,14 +18,12 @@ impl ApplicationKeyRelationships { ApplicationKeyRelationships { owned_by: None } } - pub fn with_owned_by( - &mut self, - value: crate::datadogV2::model::RelationshipToUser, - ) -> &mut Self { + pub fn owned_by(&mut self, value: crate::datadogV2::model::RelationshipToUser) -> &mut Self { self.owned_by = Some(value); self } } + impl Default for ApplicationKeyRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_application_key_response.rs b/src/datadogV2/model/model_application_key_response.rs index 104919236..96ddaf4c4 100644 --- a/src/datadogV2/model/model_application_key_response.rs +++ b/src/datadogV2/model/model_application_key_response.rs @@ -24,12 +24,12 @@ impl ApplicationKeyResponse { } } - pub fn with_data(&mut self, value: crate::datadogV2::model::FullApplicationKey) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::FullApplicationKey) -> &mut Self { self.data = Some(value); self } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { @@ -37,6 +37,7 @@ impl ApplicationKeyResponse { self } } + impl Default for ApplicationKeyResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_application_key_response_included_item.rs b/src/datadogV2/model/model_application_key_response_included_item.rs index 611c0002a..32020e49d 100644 --- a/src/datadogV2/model/model_application_key_response_included_item.rs +++ b/src/datadogV2/model/model_application_key_response_included_item.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ApplicationKeyResponseIncludedItem { - User(crate::datadogV2::model::User), - Role(crate::datadogV2::model::Role), + User(Box), + Role(Box), } diff --git a/src/datadogV2/model/model_application_key_response_meta.rs b/src/datadogV2/model/model_application_key_response_meta.rs index 56de665f3..d2f9bcd29 100644 --- a/src/datadogV2/model/model_application_key_response_meta.rs +++ b/src/datadogV2/model/model_application_key_response_meta.rs @@ -24,12 +24,12 @@ impl ApplicationKeyResponseMeta { } } - pub fn with_max_allowed_per_user(&mut self, value: i64) -> &mut Self { + pub fn max_allowed_per_user(&mut self, value: i64) -> &mut Self { self.max_allowed_per_user = Some(value); self } - pub fn with_page( + pub fn page( &mut self, value: crate::datadogV2::model::ApplicationKeyResponseMetaPage, ) -> &mut Self { @@ -37,6 +37,7 @@ impl ApplicationKeyResponseMeta { self } } + impl Default for ApplicationKeyResponseMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_application_key_response_meta_page.rs b/src/datadogV2/model/model_application_key_response_meta_page.rs index 14ac697cd..c38cfe7cb 100644 --- a/src/datadogV2/model/model_application_key_response_meta_page.rs +++ b/src/datadogV2/model/model_application_key_response_meta_page.rs @@ -20,11 +20,12 @@ impl ApplicationKeyResponseMetaPage { } } - pub fn with_total_filtered_count(&mut self, value: i64) -> &mut Self { + pub fn total_filtered_count(&mut self, value: i64) -> &mut Self { self.total_filtered_count = Some(value); self } } + impl Default for ApplicationKeyResponseMetaPage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_application_key_update_attributes.rs b/src/datadogV2/model/model_application_key_update_attributes.rs index ddcdd5bc7..fe9c12217 100644 --- a/src/datadogV2/model/model_application_key_update_attributes.rs +++ b/src/datadogV2/model/model_application_key_update_attributes.rs @@ -24,16 +24,17 @@ impl ApplicationKeyUpdateAttributes { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_scopes(&mut self, value: Option>) -> &mut Self { + pub fn scopes(&mut self, value: Option>) -> &mut Self { self.scopes = Some(value); self } } + impl Default for ApplicationKeyUpdateAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_audit_logs_event.rs b/src/datadogV2/model/model_audit_logs_event.rs index 41eb522e7..e48fad30f 100644 --- a/src/datadogV2/model/model_audit_logs_event.rs +++ b/src/datadogV2/model/model_audit_logs_event.rs @@ -28,7 +28,7 @@ impl AuditLogsEvent { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::AuditLogsEventAttributes, ) -> &mut Self { @@ -36,16 +36,17 @@ impl AuditLogsEvent { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::AuditLogsEventType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::AuditLogsEventType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for AuditLogsEvent { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_audit_logs_event_attributes.rs b/src/datadogV2/model/model_audit_logs_event_attributes.rs index b80827368..0f98c8a67 100644 --- a/src/datadogV2/model/model_audit_logs_event_attributes.rs +++ b/src/datadogV2/model/model_audit_logs_event_attributes.rs @@ -38,7 +38,7 @@ impl AuditLogsEventAttributes { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -46,26 +46,27 @@ impl AuditLogsEventAttributes { self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } - pub fn with_service(&mut self, value: String) -> &mut Self { + pub fn service(&mut self, value: String) -> &mut Self { self.service = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_timestamp(&mut self, value: String) -> &mut Self { + pub fn timestamp(&mut self, value: String) -> &mut Self { self.timestamp = Some(value); self } } + impl Default for AuditLogsEventAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_audit_logs_events_response.rs b/src/datadogV2/model/model_audit_logs_events_response.rs index 75d02ba38..29446550b 100644 --- a/src/datadogV2/model/model_audit_logs_events_response.rs +++ b/src/datadogV2/model/model_audit_logs_events_response.rs @@ -28,27 +28,22 @@ impl AuditLogsEventsResponse { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_links( - &mut self, - value: crate::datadogV2::model::AuditLogsResponseLinks, - ) -> &mut Self { + pub fn links(&mut self, value: crate::datadogV2::model::AuditLogsResponseLinks) -> &mut Self { self.links = Some(value); self } - pub fn with_meta( - &mut self, - value: crate::datadogV2::model::AuditLogsResponseMetadata, - ) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::AuditLogsResponseMetadata) -> &mut Self { self.meta = Some(value); self } } + impl Default for AuditLogsEventsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_audit_logs_query_filter.rs b/src/datadogV2/model/model_audit_logs_query_filter.rs index d658913f0..1f98fb34f 100644 --- a/src/datadogV2/model/model_audit_logs_query_filter.rs +++ b/src/datadogV2/model/model_audit_logs_query_filter.rs @@ -28,21 +28,22 @@ impl AuditLogsQueryFilter { } } - pub fn with_from(&mut self, value: String) -> &mut Self { + pub fn from(&mut self, value: String) -> &mut Self { self.from = Some(value); self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } - pub fn with_to(&mut self, value: String) -> &mut Self { + pub fn to(&mut self, value: String) -> &mut Self { self.to = Some(value); self } } + impl Default for AuditLogsQueryFilter { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_audit_logs_query_options.rs b/src/datadogV2/model/model_audit_logs_query_options.rs index a6000d363..6bc4cc045 100644 --- a/src/datadogV2/model/model_audit_logs_query_options.rs +++ b/src/datadogV2/model/model_audit_logs_query_options.rs @@ -25,16 +25,17 @@ impl AuditLogsQueryOptions { } } - pub fn with_time_offset(&mut self, value: i64) -> &mut Self { + pub fn time_offset(&mut self, value: i64) -> &mut Self { self.time_offset = Some(value); self } - pub fn with_timezone(&mut self, value: String) -> &mut Self { + pub fn timezone(&mut self, value: String) -> &mut Self { self.timezone = Some(value); self } } + impl Default for AuditLogsQueryOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_audit_logs_query_page_options.rs b/src/datadogV2/model/model_audit_logs_query_page_options.rs index 46b65ef9f..923a0235d 100644 --- a/src/datadogV2/model/model_audit_logs_query_page_options.rs +++ b/src/datadogV2/model/model_audit_logs_query_page_options.rs @@ -24,16 +24,17 @@ impl AuditLogsQueryPageOptions { } } - pub fn with_cursor(&mut self, value: String) -> &mut Self { + pub fn cursor(&mut self, value: String) -> &mut Self { self.cursor = Some(value); self } - pub fn with_limit(&mut self, value: i32) -> &mut Self { + pub fn limit(&mut self, value: i32) -> &mut Self { self.limit = Some(value); self } } + impl Default for AuditLogsQueryPageOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_audit_logs_response_links.rs b/src/datadogV2/model/model_audit_logs_response_links.rs index c786a169a..89851f999 100644 --- a/src/datadogV2/model/model_audit_logs_response_links.rs +++ b/src/datadogV2/model/model_audit_logs_response_links.rs @@ -19,11 +19,12 @@ impl AuditLogsResponseLinks { AuditLogsResponseLinks { next: None } } - pub fn with_next(&mut self, value: String) -> &mut Self { + pub fn next(&mut self, value: String) -> &mut Self { self.next = Some(value); self } } + impl Default for AuditLogsResponseLinks { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_audit_logs_response_metadata.rs b/src/datadogV2/model/model_audit_logs_response_metadata.rs index ad703a1fd..50746a782 100644 --- a/src/datadogV2/model/model_audit_logs_response_metadata.rs +++ b/src/datadogV2/model/model_audit_logs_response_metadata.rs @@ -37,40 +37,32 @@ impl AuditLogsResponseMetadata { } } - pub fn with_elapsed(&mut self, value: i64) -> &mut Self { + pub fn elapsed(&mut self, value: i64) -> &mut Self { self.elapsed = Some(value); self } - pub fn with_page( - &mut self, - value: crate::datadogV2::model::AuditLogsResponsePage, - ) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV2::model::AuditLogsResponsePage) -> &mut Self { self.page = Some(value); self } - pub fn with_request_id(&mut self, value: String) -> &mut Self { + pub fn request_id(&mut self, value: String) -> &mut Self { self.request_id = Some(value); self } - pub fn with_status( - &mut self, - value: crate::datadogV2::model::AuditLogsResponseStatus, - ) -> &mut Self { + pub fn status(&mut self, value: crate::datadogV2::model::AuditLogsResponseStatus) -> &mut Self { self.status = Some(value); self } - pub fn with_warnings( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn warnings(&mut self, value: Vec) -> &mut Self { self.warnings = Some(value); self } } + impl Default for AuditLogsResponseMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_audit_logs_response_page.rs b/src/datadogV2/model/model_audit_logs_response_page.rs index 1b44d6c77..7b96847b5 100644 --- a/src/datadogV2/model/model_audit_logs_response_page.rs +++ b/src/datadogV2/model/model_audit_logs_response_page.rs @@ -18,11 +18,12 @@ impl AuditLogsResponsePage { AuditLogsResponsePage { after: None } } - pub fn with_after(&mut self, value: String) -> &mut Self { + pub fn after(&mut self, value: String) -> &mut Self { self.after = Some(value); self } } + impl Default for AuditLogsResponsePage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_audit_logs_search_events_request.rs b/src/datadogV2/model/model_audit_logs_search_events_request.rs index 0149149c8..7fe5fd000 100644 --- a/src/datadogV2/model/model_audit_logs_search_events_request.rs +++ b/src/datadogV2/model/model_audit_logs_search_events_request.rs @@ -33,35 +33,27 @@ impl AuditLogsSearchEventsRequest { } } - pub fn with_filter( - &mut self, - value: crate::datadogV2::model::AuditLogsQueryFilter, - ) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV2::model::AuditLogsQueryFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_options( - &mut self, - value: crate::datadogV2::model::AuditLogsQueryOptions, - ) -> &mut Self { + pub fn options(&mut self, value: crate::datadogV2::model::AuditLogsQueryOptions) -> &mut Self { self.options = Some(value); self } - pub fn with_page( - &mut self, - value: crate::datadogV2::model::AuditLogsQueryPageOptions, - ) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV2::model::AuditLogsQueryPageOptions) -> &mut Self { self.page = Some(value); self } - pub fn with_sort(&mut self, value: crate::datadogV2::model::AuditLogsSort) -> &mut Self { + pub fn sort(&mut self, value: crate::datadogV2::model::AuditLogsSort) -> &mut Self { self.sort = Some(value); self } } + impl Default for AuditLogsSearchEventsRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_audit_logs_warning.rs b/src/datadogV2/model/model_audit_logs_warning.rs index 8e8b46c66..78e609300 100644 --- a/src/datadogV2/model/model_audit_logs_warning.rs +++ b/src/datadogV2/model/model_audit_logs_warning.rs @@ -28,21 +28,22 @@ impl AuditLogsWarning { } } - pub fn with_code(&mut self, value: String) -> &mut Self { + pub fn code(&mut self, value: String) -> &mut Self { self.code = Some(value); self } - pub fn with_detail(&mut self, value: String) -> &mut Self { + pub fn detail(&mut self, value: String) -> &mut Self { self.detail = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } } + impl Default for AuditLogsWarning { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_auth_n_mapping.rs b/src/datadogV2/model/model_auth_n_mapping.rs index 96f2e6bdc..86704108c 100644 --- a/src/datadogV2/model/model_auth_n_mapping.rs +++ b/src/datadogV2/model/model_auth_n_mapping.rs @@ -32,7 +32,7 @@ impl AuthNMapping { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::AuthNMappingAttributes, ) -> &mut Self { @@ -40,7 +40,7 @@ impl AuthNMapping { self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::AuthNMappingRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_auth_n_mapping_attributes.rs b/src/datadogV2/model/model_auth_n_mapping_attributes.rs index 1022b3d6e..582fa6051 100644 --- a/src/datadogV2/model/model_auth_n_mapping_attributes.rs +++ b/src/datadogV2/model/model_auth_n_mapping_attributes.rs @@ -36,31 +36,32 @@ impl AuthNMappingAttributes { } } - pub fn with_attribute_key(&mut self, value: String) -> &mut Self { + pub fn attribute_key(&mut self, value: String) -> &mut Self { self.attribute_key = Some(value); self } - pub fn with_attribute_value(&mut self, value: String) -> &mut Self { + pub fn attribute_value(&mut self, value: String) -> &mut Self { self.attribute_value = Some(value); self } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_modified_at(&mut self, value: String) -> &mut Self { + pub fn modified_at(&mut self, value: String) -> &mut Self { self.modified_at = Some(value); self } - pub fn with_saml_assertion_attribute_id(&mut self, value: String) -> &mut Self { + pub fn saml_assertion_attribute_id(&mut self, value: String) -> &mut Self { self.saml_assertion_attribute_id = Some(value); self } } + impl Default for AuthNMappingAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_auth_n_mapping_create_attributes.rs b/src/datadogV2/model/model_auth_n_mapping_create_attributes.rs index 1681dd556..ccc6116ef 100644 --- a/src/datadogV2/model/model_auth_n_mapping_create_attributes.rs +++ b/src/datadogV2/model/model_auth_n_mapping_create_attributes.rs @@ -24,16 +24,17 @@ impl AuthNMappingCreateAttributes { } } - pub fn with_attribute_key(&mut self, value: String) -> &mut Self { + pub fn attribute_key(&mut self, value: String) -> &mut Self { self.attribute_key = Some(value); self } - pub fn with_attribute_value(&mut self, value: String) -> &mut Self { + pub fn attribute_value(&mut self, value: String) -> &mut Self { self.attribute_value = Some(value); self } } + impl Default for AuthNMappingCreateAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_auth_n_mapping_create_data.rs b/src/datadogV2/model/model_auth_n_mapping_create_data.rs index 86a9523fd..6fdbac364 100644 --- a/src/datadogV2/model/model_auth_n_mapping_create_data.rs +++ b/src/datadogV2/model/model_auth_n_mapping_create_data.rs @@ -28,7 +28,7 @@ impl AuthNMappingCreateData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::AuthNMappingCreateAttributes, ) -> &mut Self { @@ -36,7 +36,7 @@ impl AuthNMappingCreateData { self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::AuthNMappingCreateRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_auth_n_mapping_create_relationships.rs b/src/datadogV2/model/model_auth_n_mapping_create_relationships.rs index 04ee0f628..e03902cef 100644 --- a/src/datadogV2/model/model_auth_n_mapping_create_relationships.rs +++ b/src/datadogV2/model/model_auth_n_mapping_create_relationships.rs @@ -18,11 +18,12 @@ impl AuthNMappingCreateRelationships { AuthNMappingCreateRelationships { role: None } } - pub fn with_role(&mut self, value: crate::datadogV2::model::RelationshipToRole) -> &mut Self { + pub fn role(&mut self, value: crate::datadogV2::model::RelationshipToRole) -> &mut Self { self.role = Some(value); self } } + impl Default for AuthNMappingCreateRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_auth_n_mapping_included.rs b/src/datadogV2/model/model_auth_n_mapping_included.rs index 0af4f5f17..2b42f34b1 100644 --- a/src/datadogV2/model/model_auth_n_mapping_included.rs +++ b/src/datadogV2/model/model_auth_n_mapping_included.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum AuthNMappingIncluded { - SAMLAssertionAttribute(crate::datadogV2::model::SAMLAssertionAttribute), - Role(crate::datadogV2::model::Role), + SAMLAssertionAttribute(Box), + Role(Box), } diff --git a/src/datadogV2/model/model_auth_n_mapping_relationships.rs b/src/datadogV2/model/model_auth_n_mapping_relationships.rs index b3afd05ac..057877d6a 100644 --- a/src/datadogV2/model/model_auth_n_mapping_relationships.rs +++ b/src/datadogV2/model/model_auth_n_mapping_relationships.rs @@ -25,12 +25,12 @@ impl AuthNMappingRelationships { } } - pub fn with_role(&mut self, value: crate::datadogV2::model::RelationshipToRole) -> &mut Self { + pub fn role(&mut self, value: crate::datadogV2::model::RelationshipToRole) -> &mut Self { self.role = Some(value); self } - pub fn with_saml_assertion_attribute( + pub fn saml_assertion_attribute( &mut self, value: crate::datadogV2::model::RelationshipToSAMLAssertionAttribute, ) -> &mut Self { @@ -38,6 +38,7 @@ impl AuthNMappingRelationships { self } } + impl Default for AuthNMappingRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_auth_n_mapping_response.rs b/src/datadogV2/model/model_auth_n_mapping_response.rs index e155cc470..b36548019 100644 --- a/src/datadogV2/model/model_auth_n_mapping_response.rs +++ b/src/datadogV2/model/model_auth_n_mapping_response.rs @@ -24,12 +24,12 @@ impl AuthNMappingResponse { } } - pub fn with_data(&mut self, value: crate::datadogV2::model::AuthNMapping) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::AuthNMapping) -> &mut Self { self.data = Some(value); self } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { @@ -37,6 +37,7 @@ impl AuthNMappingResponse { self } } + impl Default for AuthNMappingResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_auth_n_mapping_update_attributes.rs b/src/datadogV2/model/model_auth_n_mapping_update_attributes.rs index 023b172f6..7a920bb48 100644 --- a/src/datadogV2/model/model_auth_n_mapping_update_attributes.rs +++ b/src/datadogV2/model/model_auth_n_mapping_update_attributes.rs @@ -24,16 +24,17 @@ impl AuthNMappingUpdateAttributes { } } - pub fn with_attribute_key(&mut self, value: String) -> &mut Self { + pub fn attribute_key(&mut self, value: String) -> &mut Self { self.attribute_key = Some(value); self } - pub fn with_attribute_value(&mut self, value: String) -> &mut Self { + pub fn attribute_value(&mut self, value: String) -> &mut Self { self.attribute_value = Some(value); self } } + impl Default for AuthNMappingUpdateAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_auth_n_mapping_update_data.rs b/src/datadogV2/model/model_auth_n_mapping_update_data.rs index aeb3d9787..8d1b9f93b 100644 --- a/src/datadogV2/model/model_auth_n_mapping_update_data.rs +++ b/src/datadogV2/model/model_auth_n_mapping_update_data.rs @@ -35,7 +35,7 @@ impl AuthNMappingUpdateData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::AuthNMappingUpdateAttributes, ) -> &mut Self { @@ -43,7 +43,7 @@ impl AuthNMappingUpdateData { self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::AuthNMappingUpdateRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_auth_n_mapping_update_relationships.rs b/src/datadogV2/model/model_auth_n_mapping_update_relationships.rs index 66407a26b..c8eafa44a 100644 --- a/src/datadogV2/model/model_auth_n_mapping_update_relationships.rs +++ b/src/datadogV2/model/model_auth_n_mapping_update_relationships.rs @@ -18,11 +18,12 @@ impl AuthNMappingUpdateRelationships { AuthNMappingUpdateRelationships { role: None } } - pub fn with_role(&mut self, value: crate::datadogV2::model::RelationshipToRole) -> &mut Self { + pub fn role(&mut self, value: crate::datadogV2::model::RelationshipToRole) -> &mut Self { self.role = Some(value); self } } + impl Default for AuthNMappingUpdateRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_auth_n_mappings_response.rs b/src/datadogV2/model/model_auth_n_mappings_response.rs index 9d3921b89..408007966 100644 --- a/src/datadogV2/model/model_auth_n_mappings_response.rs +++ b/src/datadogV2/model/model_auth_n_mappings_response.rs @@ -28,12 +28,12 @@ impl AuthNMappingsResponse { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { @@ -41,14 +41,12 @@ impl AuthNMappingsResponse { self } - pub fn with_meta( - &mut self, - value: crate::datadogV2::model::ResponseMetaAttributes, - ) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::ResponseMetaAttributes) -> &mut Self { self.meta = Some(value); self } } + impl Default for AuthNMappingsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_aws_cur_config.rs b/src/datadogV2/model/model_aws_cur_config.rs index 7588e9004..dd5b7f669 100644 --- a/src/datadogV2/model/model_aws_cur_config.rs +++ b/src/datadogV2/model/model_aws_cur_config.rs @@ -31,7 +31,7 @@ impl AwsCURConfig { } } - pub fn with_id(&mut self, value: i64) -> &mut Self { + pub fn id(&mut self, value: i64) -> &mut Self { self.id = Some(value); self } diff --git a/src/datadogV2/model/model_aws_cur_config_attributes.rs b/src/datadogV2/model/model_aws_cur_config_attributes.rs index 1883329e2..be65ef076 100644 --- a/src/datadogV2/model/model_aws_cur_config_attributes.rs +++ b/src/datadogV2/model/model_aws_cur_config_attributes.rs @@ -70,31 +70,31 @@ impl AwsCURConfigAttributes { } #[allow(deprecated)] - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } #[allow(deprecated)] - pub fn with_error_messages(&mut self, value: Vec) -> &mut Self { + pub fn error_messages(&mut self, value: Vec) -> &mut Self { self.error_messages = Some(value); self } #[allow(deprecated)] - pub fn with_months(&mut self, value: i32) -> &mut Self { + pub fn months(&mut self, value: i32) -> &mut Self { self.months = Some(value); self } #[allow(deprecated)] - pub fn with_status_updated_at(&mut self, value: String) -> &mut Self { + pub fn status_updated_at(&mut self, value: String) -> &mut Self { self.status_updated_at = Some(value); self } #[allow(deprecated)] - pub fn with_updated_at(&mut self, value: String) -> &mut Self { + pub fn updated_at(&mut self, value: String) -> &mut Self { self.updated_at = Some(value); self } diff --git a/src/datadogV2/model/model_aws_cur_config_post_request_attributes.rs b/src/datadogV2/model/model_aws_cur_config_post_request_attributes.rs index f205bc957..0d4640ca1 100644 --- a/src/datadogV2/model/model_aws_cur_config_post_request_attributes.rs +++ b/src/datadogV2/model/model_aws_cur_config_post_request_attributes.rs @@ -49,17 +49,17 @@ impl AwsCURConfigPostRequestAttributes { } } - pub fn with_bucket_region(&mut self, value: String) -> &mut Self { + pub fn bucket_region(&mut self, value: String) -> &mut Self { self.bucket_region = Some(value); self } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_months(&mut self, value: i32) -> &mut Self { + pub fn months(&mut self, value: i32) -> &mut Self { self.months = Some(value); self } diff --git a/src/datadogV2/model/model_aws_cur_config_response.rs b/src/datadogV2/model/model_aws_cur_config_response.rs index 5487da009..13623fa48 100644 --- a/src/datadogV2/model/model_aws_cur_config_response.rs +++ b/src/datadogV2/model/model_aws_cur_config_response.rs @@ -18,11 +18,12 @@ impl AwsCURConfigResponse { AwsCURConfigResponse { data: None } } - pub fn with_data(&mut self, value: crate::datadogV2::model::AwsCURConfig) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::AwsCURConfig) -> &mut Self { self.data = Some(value); self } } + impl Default for AwsCURConfigResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_aws_cur_configs_response.rs b/src/datadogV2/model/model_aws_cur_configs_response.rs index ab79535fa..168095e5c 100644 --- a/src/datadogV2/model/model_aws_cur_configs_response.rs +++ b/src/datadogV2/model/model_aws_cur_configs_response.rs @@ -18,11 +18,12 @@ impl AwsCURConfigsResponse { AwsCURConfigsResponse { data: None } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } } + impl Default for AwsCURConfigsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_aws_related_account.rs b/src/datadogV2/model/model_aws_related_account.rs index 4fc88900b..19da2c97d 100644 --- a/src/datadogV2/model/model_aws_related_account.rs +++ b/src/datadogV2/model/model_aws_related_account.rs @@ -31,7 +31,7 @@ impl AWSRelatedAccount { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::AWSRelatedAccountAttributes, ) -> &mut Self { diff --git a/src/datadogV2/model/model_aws_related_account_attributes.rs b/src/datadogV2/model/model_aws_related_account_attributes.rs index d8b308e93..711bcfbb5 100644 --- a/src/datadogV2/model/model_aws_related_account_attributes.rs +++ b/src/datadogV2/model/model_aws_related_account_attributes.rs @@ -24,16 +24,17 @@ impl AWSRelatedAccountAttributes { } } - pub fn with_has_datadog_integration(&mut self, value: bool) -> &mut Self { + pub fn has_datadog_integration(&mut self, value: bool) -> &mut Self { self.has_datadog_integration = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } } + impl Default for AWSRelatedAccountAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_aws_related_accounts_response.rs b/src/datadogV2/model/model_aws_related_accounts_response.rs index 75a6faad8..6b80a16b0 100644 --- a/src/datadogV2/model/model_aws_related_accounts_response.rs +++ b/src/datadogV2/model/model_aws_related_accounts_response.rs @@ -18,14 +18,12 @@ impl AWSRelatedAccountsResponse { AWSRelatedAccountsResponse { data: None } } - pub fn with_data( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } } + impl Default for AWSRelatedAccountsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_azure_uc_config.rs b/src/datadogV2/model/model_azure_uc_config.rs index 7643eca23..eb43e5144 100644 --- a/src/datadogV2/model/model_azure_uc_config.rs +++ b/src/datadogV2/model/model_azure_uc_config.rs @@ -89,37 +89,37 @@ impl AzureUCConfig { } #[allow(deprecated)] - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } #[allow(deprecated)] - pub fn with_error_messages(&mut self, value: Vec) -> &mut Self { + pub fn error_messages(&mut self, value: Vec) -> &mut Self { self.error_messages = Some(value); self } #[allow(deprecated)] - pub fn with_id(&mut self, value: i64) -> &mut Self { + pub fn id(&mut self, value: i64) -> &mut Self { self.id = Some(value); self } #[allow(deprecated)] - pub fn with_months(&mut self, value: i32) -> &mut Self { + pub fn months(&mut self, value: i32) -> &mut Self { self.months = Some(value); self } #[allow(deprecated)] - pub fn with_status_updated_at(&mut self, value: String) -> &mut Self { + pub fn status_updated_at(&mut self, value: String) -> &mut Self { self.status_updated_at = Some(value); self } #[allow(deprecated)] - pub fn with_updated_at(&mut self, value: String) -> &mut Self { + pub fn updated_at(&mut self, value: String) -> &mut Self { self.updated_at = Some(value); self } diff --git a/src/datadogV2/model/model_azure_uc_config_pair.rs b/src/datadogV2/model/model_azure_uc_config_pair.rs index ea6f9dc91..2f2b2eef9 100644 --- a/src/datadogV2/model/model_azure_uc_config_pair.rs +++ b/src/datadogV2/model/model_azure_uc_config_pair.rs @@ -31,7 +31,7 @@ impl AzureUCConfigPair { } } - pub fn with_id(&mut self, value: i64) -> &mut Self { + pub fn id(&mut self, value: i64) -> &mut Self { self.id = Some(value); self } diff --git a/src/datadogV2/model/model_azure_uc_config_pair_attributes.rs b/src/datadogV2/model/model_azure_uc_config_pair_attributes.rs index 02828e05b..de35df5e3 100644 --- a/src/datadogV2/model/model_azure_uc_config_pair_attributes.rs +++ b/src/datadogV2/model/model_azure_uc_config_pair_attributes.rs @@ -23,7 +23,7 @@ impl AzureUCConfigPairAttributes { AzureUCConfigPairAttributes { configs, id: None } } - pub fn with_id(&mut self, value: i64) -> &mut Self { + pub fn id(&mut self, value: i64) -> &mut Self { self.id = Some(value); self } diff --git a/src/datadogV2/model/model_azure_uc_config_pairs_response.rs b/src/datadogV2/model/model_azure_uc_config_pairs_response.rs index 274b9cfef..f65f5cb76 100644 --- a/src/datadogV2/model/model_azure_uc_config_pairs_response.rs +++ b/src/datadogV2/model/model_azure_uc_config_pairs_response.rs @@ -18,11 +18,12 @@ impl AzureUCConfigPairsResponse { AzureUCConfigPairsResponse { data: None } } - pub fn with_data(&mut self, value: crate::datadogV2::model::AzureUCConfigPair) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::AzureUCConfigPair) -> &mut Self { self.data = Some(value); self } } + impl Default for AzureUCConfigPairsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_azure_uc_config_post_request_attributes.rs b/src/datadogV2/model/model_azure_uc_config_post_request_attributes.rs index b1268f989..262b625d1 100644 --- a/src/datadogV2/model/model_azure_uc_config_post_request_attributes.rs +++ b/src/datadogV2/model/model_azure_uc_config_post_request_attributes.rs @@ -46,7 +46,7 @@ impl AzureUCConfigPostRequestAttributes { } } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } diff --git a/src/datadogV2/model/model_azure_uc_configs_response.rs b/src/datadogV2/model/model_azure_uc_configs_response.rs index 9ab6a206f..9ca4bcd71 100644 --- a/src/datadogV2/model/model_azure_uc_configs_response.rs +++ b/src/datadogV2/model/model_azure_uc_configs_response.rs @@ -18,14 +18,12 @@ impl AzureUCConfigsResponse { AzureUCConfigsResponse { data: None } } - pub fn with_data( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } } + impl Default for AzureUCConfigsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_bulk_mute_findings_request_meta.rs b/src/datadogV2/model/model_bulk_mute_findings_request_meta.rs index 9dfd313d5..8c249aa9c 100644 --- a/src/datadogV2/model/model_bulk_mute_findings_request_meta.rs +++ b/src/datadogV2/model/model_bulk_mute_findings_request_meta.rs @@ -18,7 +18,7 @@ impl BulkMuteFindingsRequestMeta { BulkMuteFindingsRequestMeta { findings: None } } - pub fn with_findings( + pub fn findings( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl BulkMuteFindingsRequestMeta { self } } + impl Default for BulkMuteFindingsRequestMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_bulk_mute_findings_request_meta_findings.rs b/src/datadogV2/model/model_bulk_mute_findings_request_meta_findings.rs index 3690df1a8..e17d0583c 100644 --- a/src/datadogV2/model/model_bulk_mute_findings_request_meta_findings.rs +++ b/src/datadogV2/model/model_bulk_mute_findings_request_meta_findings.rs @@ -18,11 +18,12 @@ impl BulkMuteFindingsRequestMetaFindings { BulkMuteFindingsRequestMetaFindings { finding_id: None } } - pub fn with_finding_id(&mut self, value: String) -> &mut Self { + pub fn finding_id(&mut self, value: String) -> &mut Self { self.finding_id = Some(value); self } } + impl Default for BulkMuteFindingsRequestMetaFindings { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_bulk_mute_findings_request_properties.rs b/src/datadogV2/model/model_bulk_mute_findings_request_properties.rs index 98365c6c8..8b1a8cc84 100644 --- a/src/datadogV2/model/model_bulk_mute_findings_request_properties.rs +++ b/src/datadogV2/model/model_bulk_mute_findings_request_properties.rs @@ -37,12 +37,12 @@ impl BulkMuteFindingsRequestProperties { } } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_expiration_date(&mut self, value: i64) -> &mut Self { + pub fn expiration_date(&mut self, value: i64) -> &mut Self { self.expiration_date = Some(value); self } diff --git a/src/datadogV2/model/model_bulk_mute_findings_response_data.rs b/src/datadogV2/model/model_bulk_mute_findings_response_data.rs index 66f6a33bd..30dc409a0 100644 --- a/src/datadogV2/model/model_bulk_mute_findings_response_data.rs +++ b/src/datadogV2/model/model_bulk_mute_findings_response_data.rs @@ -24,16 +24,17 @@ impl BulkMuteFindingsResponseData { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::FindingType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::FindingType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for BulkMuteFindingsResponseData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_chargeback_breakdown.rs b/src/datadogV2/model/model_chargeback_breakdown.rs index 86282d4a1..d29cbb6ac 100644 --- a/src/datadogV2/model/model_chargeback_breakdown.rs +++ b/src/datadogV2/model/model_chargeback_breakdown.rs @@ -28,21 +28,22 @@ impl ChargebackBreakdown { } } - pub fn with_charge_type(&mut self, value: String) -> &mut Self { + pub fn charge_type(&mut self, value: String) -> &mut Self { self.charge_type = Some(value); self } - pub fn with_cost(&mut self, value: f64) -> &mut Self { + pub fn cost(&mut self, value: f64) -> &mut Self { self.cost = Some(value); self } - pub fn with_product_name(&mut self, value: String) -> &mut Self { + pub fn product_name(&mut self, value: String) -> &mut Self { self.product_name = Some(value); self } } + impl Default for ChargebackBreakdown { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_aggregate_bucket_value_timeseries.rs b/src/datadogV2/model/model_ci_app_aggregate_bucket_value_timeseries.rs index 5c173b963..6452e835a 100644 --- a/src/datadogV2/model/model_ci_app_aggregate_bucket_value_timeseries.rs +++ b/src/datadogV2/model/model_ci_app_aggregate_bucket_value_timeseries.rs @@ -14,6 +14,7 @@ impl CIAppAggregateBucketValueTimeseries { CIAppAggregateBucketValueTimeseries {} } } + impl Default for CIAppAggregateBucketValueTimeseries { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_aggregate_bucket_value_timeseries_point.rs b/src/datadogV2/model/model_ci_app_aggregate_bucket_value_timeseries_point.rs index 088baaa58..bf58002c3 100644 --- a/src/datadogV2/model/model_ci_app_aggregate_bucket_value_timeseries_point.rs +++ b/src/datadogV2/model/model_ci_app_aggregate_bucket_value_timeseries_point.rs @@ -24,16 +24,17 @@ impl CIAppAggregateBucketValueTimeseriesPoint { } } - pub fn with_time(&mut self, value: String) -> &mut Self { + pub fn time(&mut self, value: String) -> &mut Self { self.time = Some(value); self } - pub fn with_value(&mut self, value: f64) -> &mut Self { + pub fn value(&mut self, value: f64) -> &mut Self { self.value = Some(value); self } } + impl Default for CIAppAggregateBucketValueTimeseriesPoint { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_aggregate_sort.rs b/src/datadogV2/model/model_ci_app_aggregate_sort.rs index efbd911f8..e0507e723 100644 --- a/src/datadogV2/model/model_ci_app_aggregate_sort.rs +++ b/src/datadogV2/model/model_ci_app_aggregate_sort.rs @@ -32,7 +32,7 @@ impl CIAppAggregateSort { } } - pub fn with_aggregation( + pub fn aggregation( &mut self, value: crate::datadogV2::model::CIAppAggregationFunction, ) -> &mut Self { @@ -40,24 +40,22 @@ impl CIAppAggregateSort { self } - pub fn with_metric(&mut self, value: String) -> &mut Self { + pub fn metric(&mut self, value: String) -> &mut Self { self.metric = Some(value); self } - pub fn with_order(&mut self, value: crate::datadogV2::model::CIAppSortOrder) -> &mut Self { + pub fn order(&mut self, value: crate::datadogV2::model::CIAppSortOrder) -> &mut Self { self.order = Some(value); self } - pub fn with_type_( - &mut self, - value: crate::datadogV2::model::CIAppAggregateSortType, - ) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::CIAppAggregateSortType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for CIAppAggregateSort { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_ci_error.rs b/src/datadogV2/model/model_ci_app_ci_error.rs index 57b86ff30..eead5f0e3 100644 --- a/src/datadogV2/model/model_ci_app_ci_error.rs +++ b/src/datadogV2/model/model_ci_app_ci_error.rs @@ -36,26 +36,27 @@ impl CIAppCIError { } } - pub fn with_domain(&mut self, value: crate::datadogV2::model::CIAppCIErrorDomain) -> &mut Self { + pub fn domain(&mut self, value: crate::datadogV2::model::CIAppCIErrorDomain) -> &mut Self { self.domain = Some(value); self } - pub fn with_message(&mut self, value: Option) -> &mut Self { + pub fn message(&mut self, value: Option) -> &mut Self { self.message = Some(value); self } - pub fn with_stack(&mut self, value: Option) -> &mut Self { + pub fn stack(&mut self, value: Option) -> &mut Self { self.stack = Some(value); self } - pub fn with_type_(&mut self, value: Option) -> &mut Self { + pub fn type_(&mut self, value: Option) -> &mut Self { self.type_ = Some(value); self } } + impl Default for CIAppCIError { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_compute.rs b/src/datadogV2/model/model_ci_app_compute.rs index cfd1a8721..d0caec5de 100644 --- a/src/datadogV2/model/model_ci_app_compute.rs +++ b/src/datadogV2/model/model_ci_app_compute.rs @@ -33,17 +33,17 @@ impl CIAppCompute { } } - pub fn with_interval(&mut self, value: String) -> &mut Self { + pub fn interval(&mut self, value: String) -> &mut Self { self.interval = Some(value); self } - pub fn with_metric(&mut self, value: String) -> &mut Self { + pub fn metric(&mut self, value: String) -> &mut Self { self.metric = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::CIAppComputeType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::CIAppComputeType) -> &mut Self { self.type_ = Some(value); self } diff --git a/src/datadogV2/model/model_ci_app_create_pipeline_event_request.rs b/src/datadogV2/model/model_ci_app_create_pipeline_event_request.rs index 342e5632b..d16da3f02 100644 --- a/src/datadogV2/model/model_ci_app_create_pipeline_event_request.rs +++ b/src/datadogV2/model/model_ci_app_create_pipeline_event_request.rs @@ -18,7 +18,7 @@ impl CIAppCreatePipelineEventRequest { CIAppCreatePipelineEventRequest { data: None } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::CIAppCreatePipelineEventRequestData, ) -> &mut Self { @@ -26,6 +26,7 @@ impl CIAppCreatePipelineEventRequest { self } } + impl Default for CIAppCreatePipelineEventRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes.rs b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes.rs index 7a593a11c..8fc437479 100644 --- a/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes.rs +++ b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes.rs @@ -30,12 +30,12 @@ impl CIAppCreatePipelineEventRequestAttributes { } } - pub fn with_env(&mut self, value: String) -> &mut Self { + pub fn env(&mut self, value: String) -> &mut Self { self.env = Some(value); self } - pub fn with_service(&mut self, value: String) -> &mut Self { + pub fn service(&mut self, value: String) -> &mut Self { self.service = Some(value); self } diff --git a/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes_resource.rs b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes_resource.rs index f61fa0ca2..a9761cd1d 100644 --- a/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes_resource.rs +++ b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes_resource.rs @@ -7,8 +7,8 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum CIAppCreatePipelineEventRequestAttributesResource { - CIAppPipelineEventPipeline(crate::datadogV2::model::CIAppPipelineEventPipeline), - CIAppPipelineEventStage(crate::datadogV2::model::CIAppPipelineEventStage), - CIAppPipelineEventJob(crate::datadogV2::model::CIAppPipelineEventJob), - CIAppPipelineEventStep(crate::datadogV2::model::CIAppPipelineEventStep), + CIAppPipelineEventPipeline(Box), + CIAppPipelineEventStage(Box), + CIAppPipelineEventJob(Box), + CIAppPipelineEventStep(Box), } diff --git a/src/datadogV2/model/model_ci_app_create_pipeline_event_request_data.rs b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_data.rs index 4a1d757ea..80ad5d2f9 100644 --- a/src/datadogV2/model/model_ci_app_create_pipeline_event_request_data.rs +++ b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_data.rs @@ -24,7 +24,7 @@ impl CIAppCreatePipelineEventRequestData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::CIAppCreatePipelineEventRequestAttributes, ) -> &mut Self { @@ -32,7 +32,7 @@ impl CIAppCreatePipelineEventRequestData { self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::CIAppCreatePipelineEventRequestDataType, ) -> &mut Self { @@ -40,6 +40,7 @@ impl CIAppCreatePipelineEventRequestData { self } } + impl Default for CIAppCreatePipelineEventRequestData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_event_attributes.rs b/src/datadogV2/model/model_ci_app_event_attributes.rs index db2972ba8..eab7b0fb3 100644 --- a/src/datadogV2/model/model_ci_app_event_attributes.rs +++ b/src/datadogV2/model/model_ci_app_event_attributes.rs @@ -28,7 +28,7 @@ impl CIAppEventAttributes { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -36,16 +36,17 @@ impl CIAppEventAttributes { self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_test_level(&mut self, value: crate::datadogV2::model::CIAppTestLevel) -> &mut Self { + pub fn test_level(&mut self, value: crate::datadogV2::model::CIAppTestLevel) -> &mut Self { self.test_level = Some(value); self } } + impl Default for CIAppEventAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_git_info.rs b/src/datadogV2/model/model_ci_app_git_info.rs index ad250c258..acb685ba0 100644 --- a/src/datadogV2/model/model_ci_app_git_info.rs +++ b/src/datadogV2/model/model_ci_app_git_info.rs @@ -93,47 +93,47 @@ impl CIAppGitInfo { } } - pub fn with_author_name(&mut self, value: Option) -> &mut Self { + pub fn author_name(&mut self, value: Option) -> &mut Self { self.author_name = Some(value); self } - pub fn with_author_time(&mut self, value: Option) -> &mut Self { + pub fn author_time(&mut self, value: Option) -> &mut Self { self.author_time = Some(value); self } - pub fn with_branch(&mut self, value: Option) -> &mut Self { + pub fn branch(&mut self, value: Option) -> &mut Self { self.branch = Some(value); self } - pub fn with_commit_time(&mut self, value: Option) -> &mut Self { + pub fn commit_time(&mut self, value: Option) -> &mut Self { self.commit_time = Some(value); self } - pub fn with_committer_email(&mut self, value: Option) -> &mut Self { + pub fn committer_email(&mut self, value: Option) -> &mut Self { self.committer_email = Some(value); self } - pub fn with_committer_name(&mut self, value: Option) -> &mut Self { + pub fn committer_name(&mut self, value: Option) -> &mut Self { self.committer_name = Some(value); self } - pub fn with_default_branch(&mut self, value: Option) -> &mut Self { + pub fn default_branch(&mut self, value: Option) -> &mut Self { self.default_branch = Some(value); self } - pub fn with_message(&mut self, value: Option) -> &mut Self { + pub fn message(&mut self, value: Option) -> &mut Self { self.message = Some(value); self } - pub fn with_tag(&mut self, value: Option) -> &mut Self { + pub fn tag(&mut self, value: Option) -> &mut Self { self.tag = Some(value); self } diff --git a/src/datadogV2/model/model_ci_app_host_info.rs b/src/datadogV2/model/model_ci_app_host_info.rs index ab3a6a8e6..c8873da83 100644 --- a/src/datadogV2/model/model_ci_app_host_info.rs +++ b/src/datadogV2/model/model_ci_app_host_info.rs @@ -32,26 +32,27 @@ impl CIAppHostInfo { } } - pub fn with_hostname(&mut self, value: String) -> &mut Self { + pub fn hostname(&mut self, value: String) -> &mut Self { self.hostname = Some(value); self } - pub fn with_labels(&mut self, value: Vec) -> &mut Self { + pub fn labels(&mut self, value: Vec) -> &mut Self { self.labels = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_workspace(&mut self, value: String) -> &mut Self { + pub fn workspace(&mut self, value: String) -> &mut Self { self.workspace = Some(value); self } } + impl Default for CIAppHostInfo { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_pipeline_event.rs b/src/datadogV2/model/model_ci_app_pipeline_event.rs index 48f40de9e..b905f700c 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_event.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_event.rs @@ -28,7 +28,7 @@ impl CIAppPipelineEvent { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::CIAppPipelineEventAttributes, ) -> &mut Self { @@ -36,12 +36,12 @@ impl CIAppPipelineEvent { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::CIAppPipelineEventTypeName, ) -> &mut Self { @@ -49,6 +49,7 @@ impl CIAppPipelineEvent { self } } + impl Default for CIAppPipelineEvent { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_attributes.rs b/src/datadogV2/model/model_ci_app_pipeline_event_attributes.rs index 225b392e4..3191cd2ee 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_event_attributes.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_event_attributes.rs @@ -28,7 +28,7 @@ impl CIAppPipelineEventAttributes { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -36,19 +36,17 @@ impl CIAppPipelineEventAttributes { self } - pub fn with_ci_level( - &mut self, - value: crate::datadogV2::model::CIAppPipelineLevel, - ) -> &mut Self { + pub fn ci_level(&mut self, value: crate::datadogV2::model::CIAppPipelineLevel) -> &mut Self { self.ci_level = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } } + impl Default for CIAppPipelineEventAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_job.rs b/src/datadogV2/model/model_ci_app_pipeline_event_job.rs index cd223e9b0..41d273d82 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_event_job.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_event_job.rs @@ -127,38 +127,32 @@ impl CIAppPipelineEventJob { } } - pub fn with_dependencies(&mut self, value: Option>) -> &mut Self { + pub fn dependencies(&mut self, value: Option>) -> &mut Self { self.dependencies = Some(value); self } - pub fn with_error( - &mut self, - value: Option, - ) -> &mut Self { + pub fn error(&mut self, value: Option) -> &mut Self { self.error = Some(value); self } - pub fn with_git(&mut self, value: Option) -> &mut Self { + pub fn git(&mut self, value: Option) -> &mut Self { self.git = Some(value); self } - pub fn with_metrics(&mut self, value: Option>) -> &mut Self { + pub fn metrics(&mut self, value: Option>) -> &mut Self { self.metrics = Some(value); self } - pub fn with_node( - &mut self, - value: Option, - ) -> &mut Self { + pub fn node(&mut self, value: Option) -> &mut Self { self.node = Some(value); self } - pub fn with_parameters( + pub fn parameters( &mut self, value: Option>, ) -> &mut Self { @@ -166,22 +160,22 @@ impl CIAppPipelineEventJob { self } - pub fn with_queue_time(&mut self, value: Option) -> &mut Self { + pub fn queue_time(&mut self, value: Option) -> &mut Self { self.queue_time = Some(value); self } - pub fn with_stage_id(&mut self, value: Option) -> &mut Self { + pub fn stage_id(&mut self, value: Option) -> &mut Self { self.stage_id = Some(value); self } - pub fn with_stage_name(&mut self, value: Option) -> &mut Self { + pub fn stage_name(&mut self, value: Option) -> &mut Self { self.stage_name = Some(value); self } - pub fn with_tags(&mut self, value: Option>) -> &mut Self { + pub fn tags(&mut self, value: Option>) -> &mut Self { self.tags = Some(value); self } diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_parent_pipeline.rs b/src/datadogV2/model/model_ci_app_pipeline_event_parent_pipeline.rs index 367cc4567..dd1b108c6 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_event_parent_pipeline.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_event_parent_pipeline.rs @@ -21,7 +21,7 @@ impl CIAppPipelineEventParentPipeline { CIAppPipelineEventParentPipeline { id, url: None } } - pub fn with_url(&mut self, value: String) -> &mut Self { + pub fn url(&mut self, value: String) -> &mut Self { self.url = Some(value); self } diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_pipeline.rs b/src/datadogV2/model/model_ci_app_pipeline_event_pipeline.rs index bddb33b7e..e196235a8 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_event_pipeline.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_event_pipeline.rs @@ -138,43 +138,37 @@ impl CIAppPipelineEventPipeline { } } - pub fn with_error( - &mut self, - value: Option, - ) -> &mut Self { + pub fn error(&mut self, value: Option) -> &mut Self { self.error = Some(value); self } - pub fn with_git(&mut self, value: Option) -> &mut Self { + pub fn git(&mut self, value: Option) -> &mut Self { self.git = Some(value); self } - pub fn with_is_manual(&mut self, value: Option) -> &mut Self { + pub fn is_manual(&mut self, value: Option) -> &mut Self { self.is_manual = Some(value); self } - pub fn with_is_resumed(&mut self, value: Option) -> &mut Self { + pub fn is_resumed(&mut self, value: Option) -> &mut Self { self.is_resumed = Some(value); self } - pub fn with_metrics(&mut self, value: Option>) -> &mut Self { + pub fn metrics(&mut self, value: Option>) -> &mut Self { self.metrics = Some(value); self } - pub fn with_node( - &mut self, - value: Option, - ) -> &mut Self { + pub fn node(&mut self, value: Option) -> &mut Self { self.node = Some(value); self } - pub fn with_parameters( + pub fn parameters( &mut self, value: Option>, ) -> &mut Self { @@ -182,7 +176,7 @@ impl CIAppPipelineEventPipeline { self } - pub fn with_parent_pipeline( + pub fn parent_pipeline( &mut self, value: Option, ) -> &mut Self { @@ -190,12 +184,12 @@ impl CIAppPipelineEventPipeline { self } - pub fn with_pipeline_id(&mut self, value: String) -> &mut Self { + pub fn pipeline_id(&mut self, value: String) -> &mut Self { self.pipeline_id = Some(value); self } - pub fn with_previous_attempt( + pub fn previous_attempt( &mut self, value: Option, ) -> &mut Self { @@ -203,12 +197,12 @@ impl CIAppPipelineEventPipeline { self } - pub fn with_queue_time(&mut self, value: Option) -> &mut Self { + pub fn queue_time(&mut self, value: Option) -> &mut Self { self.queue_time = Some(value); self } - pub fn with_tags(&mut self, value: Option>) -> &mut Self { + pub fn tags(&mut self, value: Option>) -> &mut Self { self.tags = Some(value); self } diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_previous_pipeline.rs b/src/datadogV2/model/model_ci_app_pipeline_event_previous_pipeline.rs index 127649b4c..1db7fc9c0 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_event_previous_pipeline.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_event_previous_pipeline.rs @@ -21,7 +21,7 @@ impl CIAppPipelineEventPreviousPipeline { CIAppPipelineEventPreviousPipeline { id, url: None } } - pub fn with_url(&mut self, value: String) -> &mut Self { + pub fn url(&mut self, value: String) -> &mut Self { self.url = Some(value); self } diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_stage.rs b/src/datadogV2/model/model_ci_app_pipeline_event_stage.rs index c1cc9645b..4264a43a3 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_event_stage.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_event_stage.rs @@ -106,38 +106,32 @@ impl CIAppPipelineEventStage { } } - pub fn with_dependencies(&mut self, value: Option>) -> &mut Self { + pub fn dependencies(&mut self, value: Option>) -> &mut Self { self.dependencies = Some(value); self } - pub fn with_error( - &mut self, - value: Option, - ) -> &mut Self { + pub fn error(&mut self, value: Option) -> &mut Self { self.error = Some(value); self } - pub fn with_git(&mut self, value: Option) -> &mut Self { + pub fn git(&mut self, value: Option) -> &mut Self { self.git = Some(value); self } - pub fn with_metrics(&mut self, value: Option>) -> &mut Self { + pub fn metrics(&mut self, value: Option>) -> &mut Self { self.metrics = Some(value); self } - pub fn with_node( - &mut self, - value: Option, - ) -> &mut Self { + pub fn node(&mut self, value: Option) -> &mut Self { self.node = Some(value); self } - pub fn with_parameters( + pub fn parameters( &mut self, value: Option>, ) -> &mut Self { @@ -145,12 +139,12 @@ impl CIAppPipelineEventStage { self } - pub fn with_queue_time(&mut self, value: Option) -> &mut Self { + pub fn queue_time(&mut self, value: Option) -> &mut Self { self.queue_time = Some(value); self } - pub fn with_tags(&mut self, value: Option>) -> &mut Self { + pub fn tags(&mut self, value: Option>) -> &mut Self { self.tags = Some(value); self } diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_step.rs b/src/datadogV2/model/model_ci_app_pipeline_event_step.rs index d2ce212ec..7fdada414 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_event_step.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_event_step.rs @@ -122,43 +122,37 @@ impl CIAppPipelineEventStep { } } - pub fn with_error( - &mut self, - value: Option, - ) -> &mut Self { + pub fn error(&mut self, value: Option) -> &mut Self { self.error = Some(value); self } - pub fn with_git(&mut self, value: Option) -> &mut Self { + pub fn git(&mut self, value: Option) -> &mut Self { self.git = Some(value); self } - pub fn with_job_id(&mut self, value: Option) -> &mut Self { + pub fn job_id(&mut self, value: Option) -> &mut Self { self.job_id = Some(value); self } - pub fn with_job_name(&mut self, value: Option) -> &mut Self { + pub fn job_name(&mut self, value: Option) -> &mut Self { self.job_name = Some(value); self } - pub fn with_metrics(&mut self, value: Option>) -> &mut Self { + pub fn metrics(&mut self, value: Option>) -> &mut Self { self.metrics = Some(value); self } - pub fn with_node( - &mut self, - value: Option, - ) -> &mut Self { + pub fn node(&mut self, value: Option) -> &mut Self { self.node = Some(value); self } - pub fn with_parameters( + pub fn parameters( &mut self, value: Option>, ) -> &mut Self { @@ -166,22 +160,22 @@ impl CIAppPipelineEventStep { self } - pub fn with_stage_id(&mut self, value: Option) -> &mut Self { + pub fn stage_id(&mut self, value: Option) -> &mut Self { self.stage_id = Some(value); self } - pub fn with_stage_name(&mut self, value: Option) -> &mut Self { + pub fn stage_name(&mut self, value: Option) -> &mut Self { self.stage_name = Some(value); self } - pub fn with_tags(&mut self, value: Option>) -> &mut Self { + pub fn tags(&mut self, value: Option>) -> &mut Self { self.tags = Some(value); self } - pub fn with_url(&mut self, value: Option) -> &mut Self { + pub fn url(&mut self, value: Option) -> &mut Self { self.url = Some(value); self } diff --git a/src/datadogV2/model/model_ci_app_pipeline_events_request.rs b/src/datadogV2/model/model_ci_app_pipeline_events_request.rs index fd5d23004..d9a891331 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_events_request.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_events_request.rs @@ -33,7 +33,7 @@ impl CIAppPipelineEventsRequest { } } - pub fn with_filter( + pub fn filter( &mut self, value: crate::datadogV2::model::CIAppPipelinesQueryFilter, ) -> &mut Self { @@ -41,24 +41,22 @@ impl CIAppPipelineEventsRequest { self } - pub fn with_options(&mut self, value: crate::datadogV2::model::CIAppQueryOptions) -> &mut Self { + pub fn options(&mut self, value: crate::datadogV2::model::CIAppQueryOptions) -> &mut Self { self.options = Some(value); self } - pub fn with_page( - &mut self, - value: crate::datadogV2::model::CIAppQueryPageOptions, - ) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV2::model::CIAppQueryPageOptions) -> &mut Self { self.page = Some(value); self } - pub fn with_sort(&mut self, value: crate::datadogV2::model::CIAppSort) -> &mut Self { + pub fn sort(&mut self, value: crate::datadogV2::model::CIAppSort) -> &mut Self { self.sort = Some(value); self } } + impl Default for CIAppPipelineEventsRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_pipeline_events_response.rs b/src/datadogV2/model/model_ci_app_pipeline_events_response.rs index aea3e2287..0a005699c 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_events_response.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_events_response.rs @@ -28,20 +28,17 @@ impl CIAppPipelineEventsResponse { } } - pub fn with_data( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_links(&mut self, value: crate::datadogV2::model::CIAppResponseLinks) -> &mut Self { + pub fn links(&mut self, value: crate::datadogV2::model::CIAppResponseLinks) -> &mut Self { self.links = Some(value); self } - pub fn with_meta( + pub fn meta( &mut self, value: crate::datadogV2::model::CIAppResponseMetadataWithPagination, ) -> &mut Self { @@ -49,6 +46,7 @@ impl CIAppPipelineEventsResponse { self } } + impl Default for CIAppPipelineEventsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_pipelines_aggregate_request.rs b/src/datadogV2/model/model_ci_app_pipelines_aggregate_request.rs index bb42236cb..13547158b 100644 --- a/src/datadogV2/model/model_ci_app_pipelines_aggregate_request.rs +++ b/src/datadogV2/model/model_ci_app_pipelines_aggregate_request.rs @@ -33,12 +33,12 @@ impl CIAppPipelinesAggregateRequest { } } - pub fn with_compute(&mut self, value: Vec) -> &mut Self { + pub fn compute(&mut self, value: Vec) -> &mut Self { self.compute = Some(value); self } - pub fn with_filter( + pub fn filter( &mut self, value: crate::datadogV2::model::CIAppPipelinesQueryFilter, ) -> &mut Self { @@ -46,7 +46,7 @@ impl CIAppPipelinesAggregateRequest { self } - pub fn with_group_by( + pub fn group_by( &mut self, value: Vec, ) -> &mut Self { @@ -54,11 +54,12 @@ impl CIAppPipelinesAggregateRequest { self } - pub fn with_options(&mut self, value: crate::datadogV2::model::CIAppQueryOptions) -> &mut Self { + pub fn options(&mut self, value: crate::datadogV2::model::CIAppQueryOptions) -> &mut Self { self.options = Some(value); self } } + impl Default for CIAppPipelinesAggregateRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_pipelines_aggregation_buckets_response.rs b/src/datadogV2/model/model_ci_app_pipelines_aggregation_buckets_response.rs index 099f46465..96a141c8a 100644 --- a/src/datadogV2/model/model_ci_app_pipelines_aggregation_buckets_response.rs +++ b/src/datadogV2/model/model_ci_app_pipelines_aggregation_buckets_response.rs @@ -18,7 +18,7 @@ impl CIAppPipelinesAggregationBucketsResponse { CIAppPipelinesAggregationBucketsResponse { buckets: None } } - pub fn with_buckets( + pub fn buckets( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl CIAppPipelinesAggregationBucketsResponse { self } } + impl Default for CIAppPipelinesAggregationBucketsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_pipelines_analytics_aggregate_response.rs b/src/datadogV2/model/model_ci_app_pipelines_analytics_aggregate_response.rs index d70bcf959..0c3bdc0dc 100644 --- a/src/datadogV2/model/model_ci_app_pipelines_analytics_aggregate_response.rs +++ b/src/datadogV2/model/model_ci_app_pipelines_analytics_aggregate_response.rs @@ -28,7 +28,7 @@ impl CIAppPipelinesAnalyticsAggregateResponse { } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::CIAppPipelinesAggregationBucketsResponse, ) -> &mut Self { @@ -36,19 +36,17 @@ impl CIAppPipelinesAnalyticsAggregateResponse { self } - pub fn with_links(&mut self, value: crate::datadogV2::model::CIAppResponseLinks) -> &mut Self { + pub fn links(&mut self, value: crate::datadogV2::model::CIAppResponseLinks) -> &mut Self { self.links = Some(value); self } - pub fn with_meta( - &mut self, - value: crate::datadogV2::model::CIAppResponseMetadata, - ) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::CIAppResponseMetadata) -> &mut Self { self.meta = Some(value); self } } + impl Default for CIAppPipelinesAnalyticsAggregateResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_pipelines_bucket_response.rs b/src/datadogV2/model/model_ci_app_pipelines_bucket_response.rs index f536f8f0b..4d0ba4502 100644 --- a/src/datadogV2/model/model_ci_app_pipelines_bucket_response.rs +++ b/src/datadogV2/model/model_ci_app_pipelines_bucket_response.rs @@ -26,7 +26,7 @@ impl CIAppPipelinesBucketResponse { } } - pub fn with_by( + pub fn by( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -34,7 +34,7 @@ impl CIAppPipelinesBucketResponse { self } - pub fn with_computes( + pub fn computes( &mut self, value: std::collections::BTreeMap< String, @@ -45,6 +45,7 @@ impl CIAppPipelinesBucketResponse { self } } + impl Default for CIAppPipelinesBucketResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_pipelines_group_by.rs b/src/datadogV2/model/model_ci_app_pipelines_group_by.rs index ece378d43..8b04c24c4 100644 --- a/src/datadogV2/model/model_ci_app_pipelines_group_by.rs +++ b/src/datadogV2/model/model_ci_app_pipelines_group_by.rs @@ -41,7 +41,7 @@ impl CIAppPipelinesGroupBy { } } - pub fn with_histogram( + pub fn histogram( &mut self, value: crate::datadogV2::model::CIAppGroupByHistogram, ) -> &mut Self { @@ -49,25 +49,22 @@ impl CIAppPipelinesGroupBy { self } - pub fn with_limit(&mut self, value: i64) -> &mut Self { + pub fn limit(&mut self, value: i64) -> &mut Self { self.limit = Some(value); self } - pub fn with_missing( - &mut self, - value: crate::datadogV2::model::CIAppGroupByMissing, - ) -> &mut Self { + pub fn missing(&mut self, value: crate::datadogV2::model::CIAppGroupByMissing) -> &mut Self { self.missing = Some(value); self } - pub fn with_sort(&mut self, value: crate::datadogV2::model::CIAppAggregateSort) -> &mut Self { + pub fn sort(&mut self, value: crate::datadogV2::model::CIAppAggregateSort) -> &mut Self { self.sort = Some(value); self } - pub fn with_total(&mut self, value: crate::datadogV2::model::CIAppGroupByTotal) -> &mut Self { + pub fn total(&mut self, value: crate::datadogV2::model::CIAppGroupByTotal) -> &mut Self { self.total = Some(value); self } diff --git a/src/datadogV2/model/model_ci_app_pipelines_query_filter.rs b/src/datadogV2/model/model_ci_app_pipelines_query_filter.rs index c7e2c2e6a..782ae96e5 100644 --- a/src/datadogV2/model/model_ci_app_pipelines_query_filter.rs +++ b/src/datadogV2/model/model_ci_app_pipelines_query_filter.rs @@ -28,21 +28,22 @@ impl CIAppPipelinesQueryFilter { } } - pub fn with_from(&mut self, value: String) -> &mut Self { + pub fn from(&mut self, value: String) -> &mut Self { self.from = Some(value); self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } - pub fn with_to(&mut self, value: String) -> &mut Self { + pub fn to(&mut self, value: String) -> &mut Self { self.to = Some(value); self } } + impl Default for CIAppPipelinesQueryFilter { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_query_options.rs b/src/datadogV2/model/model_ci_app_query_options.rs index 742aea2c2..b64255fe3 100644 --- a/src/datadogV2/model/model_ci_app_query_options.rs +++ b/src/datadogV2/model/model_ci_app_query_options.rs @@ -25,16 +25,17 @@ impl CIAppQueryOptions { } } - pub fn with_time_offset(&mut self, value: i64) -> &mut Self { + pub fn time_offset(&mut self, value: i64) -> &mut Self { self.time_offset = Some(value); self } - pub fn with_timezone(&mut self, value: String) -> &mut Self { + pub fn timezone(&mut self, value: String) -> &mut Self { self.timezone = Some(value); self } } + impl Default for CIAppQueryOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_query_page_options.rs b/src/datadogV2/model/model_ci_app_query_page_options.rs index a4a63f868..e157741df 100644 --- a/src/datadogV2/model/model_ci_app_query_page_options.rs +++ b/src/datadogV2/model/model_ci_app_query_page_options.rs @@ -24,16 +24,17 @@ impl CIAppQueryPageOptions { } } - pub fn with_cursor(&mut self, value: String) -> &mut Self { + pub fn cursor(&mut self, value: String) -> &mut Self { self.cursor = Some(value); self } - pub fn with_limit(&mut self, value: i32) -> &mut Self { + pub fn limit(&mut self, value: i32) -> &mut Self { self.limit = Some(value); self } } + impl Default for CIAppQueryPageOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_response_links.rs b/src/datadogV2/model/model_ci_app_response_links.rs index 44e7f2573..dda4a4f78 100644 --- a/src/datadogV2/model/model_ci_app_response_links.rs +++ b/src/datadogV2/model/model_ci_app_response_links.rs @@ -19,11 +19,12 @@ impl CIAppResponseLinks { CIAppResponseLinks { next: None } } - pub fn with_next(&mut self, value: String) -> &mut Self { + pub fn next(&mut self, value: String) -> &mut Self { self.next = Some(value); self } } + impl Default for CIAppResponseLinks { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_response_metadata.rs b/src/datadogV2/model/model_ci_app_response_metadata.rs index 605e89d5e..c1e4520c2 100644 --- a/src/datadogV2/model/model_ci_app_response_metadata.rs +++ b/src/datadogV2/model/model_ci_app_response_metadata.rs @@ -33,32 +33,27 @@ impl CIAppResponseMetadata { } } - pub fn with_elapsed(&mut self, value: i64) -> &mut Self { + pub fn elapsed(&mut self, value: i64) -> &mut Self { self.elapsed = Some(value); self } - pub fn with_request_id(&mut self, value: String) -> &mut Self { + pub fn request_id(&mut self, value: String) -> &mut Self { self.request_id = Some(value); self } - pub fn with_status( - &mut self, - value: crate::datadogV2::model::CIAppResponseStatus, - ) -> &mut Self { + pub fn status(&mut self, value: crate::datadogV2::model::CIAppResponseStatus) -> &mut Self { self.status = Some(value); self } - pub fn with_warnings( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn warnings(&mut self, value: Vec) -> &mut Self { self.warnings = Some(value); self } } + impl Default for CIAppResponseMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_response_metadata_with_pagination.rs b/src/datadogV2/model/model_ci_app_response_metadata_with_pagination.rs index aa4f37baa..51123de81 100644 --- a/src/datadogV2/model/model_ci_app_response_metadata_with_pagination.rs +++ b/src/datadogV2/model/model_ci_app_response_metadata_with_pagination.rs @@ -37,37 +37,32 @@ impl CIAppResponseMetadataWithPagination { } } - pub fn with_elapsed(&mut self, value: i64) -> &mut Self { + pub fn elapsed(&mut self, value: i64) -> &mut Self { self.elapsed = Some(value); self } - pub fn with_page(&mut self, value: crate::datadogV2::model::CIAppResponsePage) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV2::model::CIAppResponsePage) -> &mut Self { self.page = Some(value); self } - pub fn with_request_id(&mut self, value: String) -> &mut Self { + pub fn request_id(&mut self, value: String) -> &mut Self { self.request_id = Some(value); self } - pub fn with_status( - &mut self, - value: crate::datadogV2::model::CIAppResponseStatus, - ) -> &mut Self { + pub fn status(&mut self, value: crate::datadogV2::model::CIAppResponseStatus) -> &mut Self { self.status = Some(value); self } - pub fn with_warnings( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn warnings(&mut self, value: Vec) -> &mut Self { self.warnings = Some(value); self } } + impl Default for CIAppResponseMetadataWithPagination { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_response_page.rs b/src/datadogV2/model/model_ci_app_response_page.rs index eda4b4755..d97b9cf18 100644 --- a/src/datadogV2/model/model_ci_app_response_page.rs +++ b/src/datadogV2/model/model_ci_app_response_page.rs @@ -18,11 +18,12 @@ impl CIAppResponsePage { CIAppResponsePage { after: None } } - pub fn with_after(&mut self, value: String) -> &mut Self { + pub fn after(&mut self, value: String) -> &mut Self { self.after = Some(value); self } } + impl Default for CIAppResponsePage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_test_event.rs b/src/datadogV2/model/model_ci_app_test_event.rs index 6329ae83f..c2cac6523 100644 --- a/src/datadogV2/model/model_ci_app_test_event.rs +++ b/src/datadogV2/model/model_ci_app_test_event.rs @@ -28,7 +28,7 @@ impl CIAppTestEvent { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::CIAppEventAttributes, ) -> &mut Self { @@ -36,19 +36,17 @@ impl CIAppTestEvent { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( - &mut self, - value: crate::datadogV2::model::CIAppTestEventTypeName, - ) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::CIAppTestEventTypeName) -> &mut Self { self.type_ = Some(value); self } } + impl Default for CIAppTestEvent { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_test_events_request.rs b/src/datadogV2/model/model_ci_app_test_events_request.rs index de9588a4f..4c18256b3 100644 --- a/src/datadogV2/model/model_ci_app_test_events_request.rs +++ b/src/datadogV2/model/model_ci_app_test_events_request.rs @@ -33,32 +33,27 @@ impl CIAppTestEventsRequest { } } - pub fn with_filter( - &mut self, - value: crate::datadogV2::model::CIAppTestsQueryFilter, - ) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV2::model::CIAppTestsQueryFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_options(&mut self, value: crate::datadogV2::model::CIAppQueryOptions) -> &mut Self { + pub fn options(&mut self, value: crate::datadogV2::model::CIAppQueryOptions) -> &mut Self { self.options = Some(value); self } - pub fn with_page( - &mut self, - value: crate::datadogV2::model::CIAppQueryPageOptions, - ) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV2::model::CIAppQueryPageOptions) -> &mut Self { self.page = Some(value); self } - pub fn with_sort(&mut self, value: crate::datadogV2::model::CIAppSort) -> &mut Self { + pub fn sort(&mut self, value: crate::datadogV2::model::CIAppSort) -> &mut Self { self.sort = Some(value); self } } + impl Default for CIAppTestEventsRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_test_events_response.rs b/src/datadogV2/model/model_ci_app_test_events_response.rs index a2dc492f7..a0b28f4ad 100644 --- a/src/datadogV2/model/model_ci_app_test_events_response.rs +++ b/src/datadogV2/model/model_ci_app_test_events_response.rs @@ -28,17 +28,17 @@ impl CIAppTestEventsResponse { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_links(&mut self, value: crate::datadogV2::model::CIAppResponseLinks) -> &mut Self { + pub fn links(&mut self, value: crate::datadogV2::model::CIAppResponseLinks) -> &mut Self { self.links = Some(value); self } - pub fn with_meta( + pub fn meta( &mut self, value: crate::datadogV2::model::CIAppResponseMetadataWithPagination, ) -> &mut Self { @@ -46,6 +46,7 @@ impl CIAppTestEventsResponse { self } } + impl Default for CIAppTestEventsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_tests_aggregate_request.rs b/src/datadogV2/model/model_ci_app_tests_aggregate_request.rs index 27bb48182..d4c62287f 100644 --- a/src/datadogV2/model/model_ci_app_tests_aggregate_request.rs +++ b/src/datadogV2/model/model_ci_app_tests_aggregate_request.rs @@ -33,20 +33,17 @@ impl CIAppTestsAggregateRequest { } } - pub fn with_compute(&mut self, value: Vec) -> &mut Self { + pub fn compute(&mut self, value: Vec) -> &mut Self { self.compute = Some(value); self } - pub fn with_filter( - &mut self, - value: crate::datadogV2::model::CIAppTestsQueryFilter, - ) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV2::model::CIAppTestsQueryFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_group_by( + pub fn group_by( &mut self, value: Vec, ) -> &mut Self { @@ -54,11 +51,12 @@ impl CIAppTestsAggregateRequest { self } - pub fn with_options(&mut self, value: crate::datadogV2::model::CIAppQueryOptions) -> &mut Self { + pub fn options(&mut self, value: crate::datadogV2::model::CIAppQueryOptions) -> &mut Self { self.options = Some(value); self } } + impl Default for CIAppTestsAggregateRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_tests_aggregation_buckets_response.rs b/src/datadogV2/model/model_ci_app_tests_aggregation_buckets_response.rs index 349035318..ba9ad6e46 100644 --- a/src/datadogV2/model/model_ci_app_tests_aggregation_buckets_response.rs +++ b/src/datadogV2/model/model_ci_app_tests_aggregation_buckets_response.rs @@ -18,7 +18,7 @@ impl CIAppTestsAggregationBucketsResponse { CIAppTestsAggregationBucketsResponse { buckets: None } } - pub fn with_buckets( + pub fn buckets( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl CIAppTestsAggregationBucketsResponse { self } } + impl Default for CIAppTestsAggregationBucketsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_tests_analytics_aggregate_response.rs b/src/datadogV2/model/model_ci_app_tests_analytics_aggregate_response.rs index 1bfe17775..c34a80116 100644 --- a/src/datadogV2/model/model_ci_app_tests_analytics_aggregate_response.rs +++ b/src/datadogV2/model/model_ci_app_tests_analytics_aggregate_response.rs @@ -28,7 +28,7 @@ impl CIAppTestsAnalyticsAggregateResponse { } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::CIAppTestsAggregationBucketsResponse, ) -> &mut Self { @@ -36,12 +36,12 @@ impl CIAppTestsAnalyticsAggregateResponse { self } - pub fn with_links(&mut self, value: crate::datadogV2::model::CIAppResponseLinks) -> &mut Self { + pub fn links(&mut self, value: crate::datadogV2::model::CIAppResponseLinks) -> &mut Self { self.links = Some(value); self } - pub fn with_meta( + pub fn meta( &mut self, value: crate::datadogV2::model::CIAppResponseMetadataWithPagination, ) -> &mut Self { @@ -49,6 +49,7 @@ impl CIAppTestsAnalyticsAggregateResponse { self } } + impl Default for CIAppTestsAnalyticsAggregateResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_tests_bucket_response.rs b/src/datadogV2/model/model_ci_app_tests_bucket_response.rs index 0e3a9518f..9c01007e5 100644 --- a/src/datadogV2/model/model_ci_app_tests_bucket_response.rs +++ b/src/datadogV2/model/model_ci_app_tests_bucket_response.rs @@ -26,7 +26,7 @@ impl CIAppTestsBucketResponse { } } - pub fn with_by( + pub fn by( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -34,7 +34,7 @@ impl CIAppTestsBucketResponse { self } - pub fn with_computes( + pub fn computes( &mut self, value: std::collections::BTreeMap< String, @@ -45,6 +45,7 @@ impl CIAppTestsBucketResponse { self } } + impl Default for CIAppTestsBucketResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_tests_group_by.rs b/src/datadogV2/model/model_ci_app_tests_group_by.rs index 9a3b629e3..643189adc 100644 --- a/src/datadogV2/model/model_ci_app_tests_group_by.rs +++ b/src/datadogV2/model/model_ci_app_tests_group_by.rs @@ -41,7 +41,7 @@ impl CIAppTestsGroupBy { } } - pub fn with_histogram( + pub fn histogram( &mut self, value: crate::datadogV2::model::CIAppGroupByHistogram, ) -> &mut Self { @@ -49,25 +49,22 @@ impl CIAppTestsGroupBy { self } - pub fn with_limit(&mut self, value: i64) -> &mut Self { + pub fn limit(&mut self, value: i64) -> &mut Self { self.limit = Some(value); self } - pub fn with_missing( - &mut self, - value: crate::datadogV2::model::CIAppGroupByMissing, - ) -> &mut Self { + pub fn missing(&mut self, value: crate::datadogV2::model::CIAppGroupByMissing) -> &mut Self { self.missing = Some(value); self } - pub fn with_sort(&mut self, value: crate::datadogV2::model::CIAppAggregateSort) -> &mut Self { + pub fn sort(&mut self, value: crate::datadogV2::model::CIAppAggregateSort) -> &mut Self { self.sort = Some(value); self } - pub fn with_total(&mut self, value: crate::datadogV2::model::CIAppGroupByTotal) -> &mut Self { + pub fn total(&mut self, value: crate::datadogV2::model::CIAppGroupByTotal) -> &mut Self { self.total = Some(value); self } diff --git a/src/datadogV2/model/model_ci_app_tests_query_filter.rs b/src/datadogV2/model/model_ci_app_tests_query_filter.rs index c3fe22a32..19f24ea2a 100644 --- a/src/datadogV2/model/model_ci_app_tests_query_filter.rs +++ b/src/datadogV2/model/model_ci_app_tests_query_filter.rs @@ -28,21 +28,22 @@ impl CIAppTestsQueryFilter { } } - pub fn with_from(&mut self, value: String) -> &mut Self { + pub fn from(&mut self, value: String) -> &mut Self { self.from = Some(value); self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } - pub fn with_to(&mut self, value: String) -> &mut Self { + pub fn to(&mut self, value: String) -> &mut Self { self.to = Some(value); self } } + impl Default for CIAppTestsQueryFilter { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ci_app_warning.rs b/src/datadogV2/model/model_ci_app_warning.rs index f64502bbc..423a1761f 100644 --- a/src/datadogV2/model/model_ci_app_warning.rs +++ b/src/datadogV2/model/model_ci_app_warning.rs @@ -28,21 +28,22 @@ impl CIAppWarning { } } - pub fn with_code(&mut self, value: String) -> &mut Self { + pub fn code(&mut self, value: String) -> &mut Self { self.code = Some(value); self } - pub fn with_detail(&mut self, value: String) -> &mut Self { + pub fn detail(&mut self, value: String) -> &mut Self { self.detail = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } } + impl Default for CIAppWarning { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_cloud_configuration_compliance_rule_options.rs b/src/datadogV2/model/model_cloud_configuration_compliance_rule_options.rs index 8c3822172..8845dabb7 100644 --- a/src/datadogV2/model/model_cloud_configuration_compliance_rule_options.rs +++ b/src/datadogV2/model/model_cloud_configuration_compliance_rule_options.rs @@ -36,12 +36,12 @@ impl CloudConfigurationComplianceRuleOptions { } } - pub fn with_complex_rule(&mut self, value: bool) -> &mut Self { + pub fn complex_rule(&mut self, value: bool) -> &mut Self { self.complex_rule = Some(value); self } - pub fn with_rego_rule( + pub fn rego_rule( &mut self, value: crate::datadogV2::model::CloudConfigurationRegoRule, ) -> &mut Self { @@ -49,11 +49,12 @@ impl CloudConfigurationComplianceRuleOptions { self } - pub fn with_resource_type(&mut self, value: String) -> &mut Self { + pub fn resource_type(&mut self, value: String) -> &mut Self { self.resource_type = Some(value); self } } + impl Default for CloudConfigurationComplianceRuleOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_cloud_configuration_rule_case_create.rs b/src/datadogV2/model/model_cloud_configuration_rule_case_create.rs index 1b270b4c5..b65aae8ab 100644 --- a/src/datadogV2/model/model_cloud_configuration_rule_case_create.rs +++ b/src/datadogV2/model/model_cloud_configuration_rule_case_create.rs @@ -26,7 +26,7 @@ impl CloudConfigurationRuleCaseCreate { } } - pub fn with_notifications(&mut self, value: Vec) -> &mut Self { + pub fn notifications(&mut self, value: Vec) -> &mut Self { self.notifications = Some(value); self } diff --git a/src/datadogV2/model/model_cloud_configuration_rule_compliance_signal_options.rs b/src/datadogV2/model/model_cloud_configuration_rule_compliance_signal_options.rs index dd5daafa2..c5be094a3 100644 --- a/src/datadogV2/model/model_cloud_configuration_rule_compliance_signal_options.rs +++ b/src/datadogV2/model/model_cloud_configuration_rule_compliance_signal_options.rs @@ -48,26 +48,27 @@ impl CloudConfigurationRuleComplianceSignalOptions { } } - pub fn with_default_activation_status(&mut self, value: Option) -> &mut Self { + pub fn default_activation_status(&mut self, value: Option) -> &mut Self { self.default_activation_status = Some(value); self } - pub fn with_default_group_by_fields(&mut self, value: Option>) -> &mut Self { + pub fn default_group_by_fields(&mut self, value: Option>) -> &mut Self { self.default_group_by_fields = Some(value); self } - pub fn with_user_activation_status(&mut self, value: Option) -> &mut Self { + pub fn user_activation_status(&mut self, value: Option) -> &mut Self { self.user_activation_status = Some(value); self } - pub fn with_user_group_by_fields(&mut self, value: Option>) -> &mut Self { + pub fn user_group_by_fields(&mut self, value: Option>) -> &mut Self { self.user_group_by_fields = Some(value); self } } + impl Default for CloudConfigurationRuleComplianceSignalOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_cloud_configuration_rule_create_payload.rs b/src/datadogV2/model/model_cloud_configuration_rule_create_payload.rs index 243b450df..bb131f9be 100644 --- a/src/datadogV2/model/model_cloud_configuration_rule_create_payload.rs +++ b/src/datadogV2/model/model_cloud_configuration_rule_create_payload.rs @@ -61,7 +61,7 @@ impl CloudConfigurationRuleCreatePayload { } } - pub fn with_filters( + pub fn filters( &mut self, value: Vec, ) -> &mut Self { @@ -69,12 +69,12 @@ impl CloudConfigurationRuleCreatePayload { self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::CloudConfigurationRuleType, ) -> &mut Self { diff --git a/src/datadogV2/model/model_cloud_cost_activity_response.rs b/src/datadogV2/model/model_cloud_cost_activity_response.rs index c66ea5df4..24327f13c 100644 --- a/src/datadogV2/model/model_cloud_cost_activity_response.rs +++ b/src/datadogV2/model/model_cloud_cost_activity_response.rs @@ -18,11 +18,12 @@ impl CloudCostActivityResponse { CloudCostActivityResponse { data: None } } - pub fn with_data(&mut self, value: crate::datadogV2::model::CloudCostActivity) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::CloudCostActivity) -> &mut Self { self.data = Some(value); self } } + impl Default for CloudCostActivityResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_attributes.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_attributes.rs index 4fbccb9d1..d6c4a0f0e 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_attributes.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_attributes.rs @@ -80,27 +80,27 @@ impl CloudWorkloadSecurityAgentRuleAttributes { } } - pub fn with_agent_constraint(&mut self, value: String) -> &mut Self { + pub fn agent_constraint(&mut self, value: String) -> &mut Self { self.agent_constraint = Some(value); self } - pub fn with_category(&mut self, value: String) -> &mut Self { + pub fn category(&mut self, value: String) -> &mut Self { self.category = Some(value); self } - pub fn with_creation_author_uu_id(&mut self, value: String) -> &mut Self { + pub fn creation_author_uu_id(&mut self, value: String) -> &mut Self { self.creation_author_uu_id = Some(value); self } - pub fn with_creation_date(&mut self, value: i64) -> &mut Self { + pub fn creation_date(&mut self, value: i64) -> &mut Self { self.creation_date = Some(value); self } - pub fn with_creator( + pub fn creator( &mut self, value: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleCreatorAttributes, ) -> &mut Self { @@ -108,52 +108,52 @@ impl CloudWorkloadSecurityAgentRuleAttributes { self } - pub fn with_default_rule(&mut self, value: bool) -> &mut Self { + pub fn default_rule(&mut self, value: bool) -> &mut Self { self.default_rule = Some(value); self } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_enabled(&mut self, value: bool) -> &mut Self { + pub fn enabled(&mut self, value: bool) -> &mut Self { self.enabled = Some(value); self } - pub fn with_expression(&mut self, value: String) -> &mut Self { + pub fn expression(&mut self, value: String) -> &mut Self { self.expression = Some(value); self } - pub fn with_filters(&mut self, value: Vec) -> &mut Self { + pub fn filters(&mut self, value: Vec) -> &mut Self { self.filters = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_update_author_uu_id(&mut self, value: String) -> &mut Self { + pub fn update_author_uu_id(&mut self, value: String) -> &mut Self { self.update_author_uu_id = Some(value); self } - pub fn with_update_date(&mut self, value: i64) -> &mut Self { + pub fn update_date(&mut self, value: i64) -> &mut Self { self.update_date = Some(value); self } - pub fn with_updated_at(&mut self, value: i64) -> &mut Self { + pub fn updated_at(&mut self, value: i64) -> &mut Self { self.updated_at = Some(value); self } - pub fn with_updater( + pub fn updater( &mut self, value: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleUpdaterAttributes, ) -> &mut Self { @@ -161,11 +161,12 @@ impl CloudWorkloadSecurityAgentRuleAttributes { self } - pub fn with_version(&mut self, value: i64) -> &mut Self { + pub fn version(&mut self, value: i64) -> &mut Self { self.version = Some(value); self } } + impl Default for CloudWorkloadSecurityAgentRuleAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_attributes.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_attributes.rs index 2d435e0a3..2884d8a8c 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_attributes.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_attributes.rs @@ -32,12 +32,12 @@ impl CloudWorkloadSecurityAgentRuleCreateAttributes { } } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_enabled(&mut self, value: bool) -> &mut Self { + pub fn enabled(&mut self, value: bool) -> &mut Self { self.enabled = Some(value); self } diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_creator_attributes.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_creator_attributes.rs index d375324e0..c742d5ed0 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_creator_attributes.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_creator_attributes.rs @@ -24,16 +24,17 @@ impl CloudWorkloadSecurityAgentRuleCreatorAttributes { } } - pub fn with_handle(&mut self, value: String) -> &mut Self { + pub fn handle(&mut self, value: String) -> &mut Self { self.handle = Some(value); self } - pub fn with_name(&mut self, value: Option) -> &mut Self { + pub fn name(&mut self, value: Option) -> &mut Self { self.name = Some(value); self } } + impl Default for CloudWorkloadSecurityAgentRuleCreatorAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_data.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_data.rs index 491a0785e..43483b15d 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_data.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_data.rs @@ -28,7 +28,7 @@ impl CloudWorkloadSecurityAgentRuleData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleAttributes, ) -> &mut Self { @@ -36,12 +36,12 @@ impl CloudWorkloadSecurityAgentRuleData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleType, ) -> &mut Self { @@ -49,6 +49,7 @@ impl CloudWorkloadSecurityAgentRuleData { self } } + impl Default for CloudWorkloadSecurityAgentRuleData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_response.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_response.rs index 62f58f748..1e1dac0b1 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_response.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_response.rs @@ -18,7 +18,7 @@ impl CloudWorkloadSecurityAgentRuleResponse { CloudWorkloadSecurityAgentRuleResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleData, ) -> &mut Self { @@ -26,6 +26,7 @@ impl CloudWorkloadSecurityAgentRuleResponse { self } } + impl Default for CloudWorkloadSecurityAgentRuleResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_attributes.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_attributes.rs index 294f70028..9781b7d05 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_attributes.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_attributes.rs @@ -28,21 +28,22 @@ impl CloudWorkloadSecurityAgentRuleUpdateAttributes { } } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_enabled(&mut self, value: bool) -> &mut Self { + pub fn enabled(&mut self, value: bool) -> &mut Self { self.enabled = Some(value); self } - pub fn with_expression(&mut self, value: String) -> &mut Self { + pub fn expression(&mut self, value: String) -> &mut Self { self.expression = Some(value); self } } + impl Default for CloudWorkloadSecurityAgentRuleUpdateAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_updater_attributes.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_updater_attributes.rs index 4e1c9bd06..949074c0e 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_updater_attributes.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_updater_attributes.rs @@ -24,16 +24,17 @@ impl CloudWorkloadSecurityAgentRuleUpdaterAttributes { } } - pub fn with_handle(&mut self, value: String) -> &mut Self { + pub fn handle(&mut self, value: String) -> &mut Self { self.handle = Some(value); self } - pub fn with_name(&mut self, value: Option) -> &mut Self { + pub fn name(&mut self, value: Option) -> &mut Self { self.name = Some(value); self } } + impl Default for CloudWorkloadSecurityAgentRuleUpdaterAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rules_list_response.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rules_list_response.rs index 1596612ba..740901adb 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rules_list_response.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rules_list_response.rs @@ -18,7 +18,7 @@ impl CloudWorkloadSecurityAgentRulesListResponse { CloudWorkloadSecurityAgentRulesListResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl CloudWorkloadSecurityAgentRulesListResponse { self } } + impl Default for CloudWorkloadSecurityAgentRulesListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_cloudflare_account_create_request_attributes.rs b/src/datadogV2/model/model_cloudflare_account_create_request_attributes.rs index a53ff021f..a944e0ed2 100644 --- a/src/datadogV2/model/model_cloudflare_account_create_request_attributes.rs +++ b/src/datadogV2/model/model_cloudflare_account_create_request_attributes.rs @@ -28,7 +28,7 @@ impl CloudflareAccountCreateRequestAttributes { } } - pub fn with_email(&mut self, value: String) -> &mut Self { + pub fn email(&mut self, value: String) -> &mut Self { self.email = Some(value); self } diff --git a/src/datadogV2/model/model_cloudflare_account_response.rs b/src/datadogV2/model/model_cloudflare_account_response.rs index 9b4476527..56be4a79a 100644 --- a/src/datadogV2/model/model_cloudflare_account_response.rs +++ b/src/datadogV2/model/model_cloudflare_account_response.rs @@ -18,7 +18,7 @@ impl CloudflareAccountResponse { CloudflareAccountResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::CloudflareAccountResponseData, ) -> &mut Self { @@ -26,6 +26,7 @@ impl CloudflareAccountResponse { self } } + impl Default for CloudflareAccountResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_cloudflare_account_response_attributes.rs b/src/datadogV2/model/model_cloudflare_account_response_attributes.rs index a5379378a..ee7aa26de 100644 --- a/src/datadogV2/model/model_cloudflare_account_response_attributes.rs +++ b/src/datadogV2/model/model_cloudflare_account_response_attributes.rs @@ -21,7 +21,7 @@ impl CloudflareAccountResponseAttributes { CloudflareAccountResponseAttributes { email: None, name } } - pub fn with_email(&mut self, value: String) -> &mut Self { + pub fn email(&mut self, value: String) -> &mut Self { self.email = Some(value); self } diff --git a/src/datadogV2/model/model_cloudflare_account_update_request_attributes.rs b/src/datadogV2/model/model_cloudflare_account_update_request_attributes.rs index 2a19a14f6..12a2002c4 100644 --- a/src/datadogV2/model/model_cloudflare_account_update_request_attributes.rs +++ b/src/datadogV2/model/model_cloudflare_account_update_request_attributes.rs @@ -24,7 +24,7 @@ impl CloudflareAccountUpdateRequestAttributes { } } - pub fn with_email(&mut self, value: String) -> &mut Self { + pub fn email(&mut self, value: String) -> &mut Self { self.email = Some(value); self } diff --git a/src/datadogV2/model/model_cloudflare_account_update_request_data.rs b/src/datadogV2/model/model_cloudflare_account_update_request_data.rs index 3fc105a38..e7bdc237a 100644 --- a/src/datadogV2/model/model_cloudflare_account_update_request_data.rs +++ b/src/datadogV2/model/model_cloudflare_account_update_request_data.rs @@ -24,7 +24,7 @@ impl CloudflareAccountUpdateRequestData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::CloudflareAccountUpdateRequestAttributes, ) -> &mut Self { @@ -32,14 +32,12 @@ impl CloudflareAccountUpdateRequestData { self } - pub fn with_type_( - &mut self, - value: crate::datadogV2::model::CloudflareAccountType, - ) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::CloudflareAccountType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for CloudflareAccountUpdateRequestData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_cloudflare_accounts_response.rs b/src/datadogV2/model/model_cloudflare_accounts_response.rs index e28a28654..be7e2964f 100644 --- a/src/datadogV2/model/model_cloudflare_accounts_response.rs +++ b/src/datadogV2/model/model_cloudflare_accounts_response.rs @@ -18,7 +18,7 @@ impl CloudflareAccountsResponse { CloudflareAccountsResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl CloudflareAccountsResponse { self } } + impl Default for CloudflareAccountsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_confluent_account_create_request_attributes.rs b/src/datadogV2/model/model_confluent_account_create_request_attributes.rs index d288ab4e1..254352dbf 100644 --- a/src/datadogV2/model/model_confluent_account_create_request_attributes.rs +++ b/src/datadogV2/model/model_confluent_account_create_request_attributes.rs @@ -32,7 +32,7 @@ impl ConfluentAccountCreateRequestAttributes { } } - pub fn with_resources( + pub fn resources( &mut self, value: Vec, ) -> &mut Self { @@ -40,7 +40,7 @@ impl ConfluentAccountCreateRequestAttributes { self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } diff --git a/src/datadogV2/model/model_confluent_account_resource_attributes.rs b/src/datadogV2/model/model_confluent_account_resource_attributes.rs index d0e4d9907..57dd3250b 100644 --- a/src/datadogV2/model/model_confluent_account_resource_attributes.rs +++ b/src/datadogV2/model/model_confluent_account_resource_attributes.rs @@ -32,17 +32,17 @@ impl ConfluentAccountResourceAttributes { } } - pub fn with_enable_custom_metrics(&mut self, value: bool) -> &mut Self { + pub fn enable_custom_metrics(&mut self, value: bool) -> &mut Self { self.enable_custom_metrics = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } diff --git a/src/datadogV2/model/model_confluent_account_response.rs b/src/datadogV2/model/model_confluent_account_response.rs index dc792cfc0..025c08c0a 100644 --- a/src/datadogV2/model/model_confluent_account_response.rs +++ b/src/datadogV2/model/model_confluent_account_response.rs @@ -18,7 +18,7 @@ impl ConfluentAccountResponse { ConfluentAccountResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::ConfluentAccountResponseData, ) -> &mut Self { @@ -26,6 +26,7 @@ impl ConfluentAccountResponse { self } } + impl Default for ConfluentAccountResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_confluent_account_response_attributes.rs b/src/datadogV2/model/model_confluent_account_response_attributes.rs index 0001da278..6f5a0ded2 100644 --- a/src/datadogV2/model/model_confluent_account_response_attributes.rs +++ b/src/datadogV2/model/model_confluent_account_response_attributes.rs @@ -28,7 +28,7 @@ impl ConfluentAccountResponseAttributes { } } - pub fn with_resources( + pub fn resources( &mut self, value: Vec, ) -> &mut Self { @@ -36,7 +36,7 @@ impl ConfluentAccountResponseAttributes { self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } diff --git a/src/datadogV2/model/model_confluent_account_update_request_attributes.rs b/src/datadogV2/model/model_confluent_account_update_request_attributes.rs index 68114e8f4..dbccd4473 100644 --- a/src/datadogV2/model/model_confluent_account_update_request_attributes.rs +++ b/src/datadogV2/model/model_confluent_account_update_request_attributes.rs @@ -28,7 +28,7 @@ impl ConfluentAccountUpdateRequestAttributes { } } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } diff --git a/src/datadogV2/model/model_confluent_accounts_response.rs b/src/datadogV2/model/model_confluent_accounts_response.rs index 79c520188..f74f24585 100644 --- a/src/datadogV2/model/model_confluent_accounts_response.rs +++ b/src/datadogV2/model/model_confluent_accounts_response.rs @@ -18,7 +18,7 @@ impl ConfluentAccountsResponse { ConfluentAccountsResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl ConfluentAccountsResponse { self } } + impl Default for ConfluentAccountsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_confluent_resource_request_attributes.rs b/src/datadogV2/model/model_confluent_resource_request_attributes.rs index 46b1f7b0e..b0c6969ed 100644 --- a/src/datadogV2/model/model_confluent_resource_request_attributes.rs +++ b/src/datadogV2/model/model_confluent_resource_request_attributes.rs @@ -28,12 +28,12 @@ impl ConfluentResourceRequestAttributes { } } - pub fn with_enable_custom_metrics(&mut self, value: bool) -> &mut Self { + pub fn enable_custom_metrics(&mut self, value: bool) -> &mut Self { self.enable_custom_metrics = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } diff --git a/src/datadogV2/model/model_confluent_resource_response.rs b/src/datadogV2/model/model_confluent_resource_response.rs index c4fc48559..f1b4f0b47 100644 --- a/src/datadogV2/model/model_confluent_resource_response.rs +++ b/src/datadogV2/model/model_confluent_resource_response.rs @@ -18,7 +18,7 @@ impl ConfluentResourceResponse { ConfluentResourceResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::ConfluentResourceResponseData, ) -> &mut Self { @@ -26,6 +26,7 @@ impl ConfluentResourceResponse { self } } + impl Default for ConfluentResourceResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_confluent_resource_response_attributes.rs b/src/datadogV2/model/model_confluent_resource_response_attributes.rs index 6ad2df1ea..ada75bebe 100644 --- a/src/datadogV2/model/model_confluent_resource_response_attributes.rs +++ b/src/datadogV2/model/model_confluent_resource_response_attributes.rs @@ -32,17 +32,17 @@ impl ConfluentResourceResponseAttributes { } } - pub fn with_enable_custom_metrics(&mut self, value: bool) -> &mut Self { + pub fn enable_custom_metrics(&mut self, value: bool) -> &mut Self { self.enable_custom_metrics = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } diff --git a/src/datadogV2/model/model_confluent_resources_response.rs b/src/datadogV2/model/model_confluent_resources_response.rs index 5db84aa9f..816a5cbb0 100644 --- a/src/datadogV2/model/model_confluent_resources_response.rs +++ b/src/datadogV2/model/model_confluent_resources_response.rs @@ -18,7 +18,7 @@ impl ConfluentResourcesResponse { ConfluentResourcesResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl ConfluentResourcesResponse { self } } + impl Default for ConfluentResourcesResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container.rs b/src/datadogV2/model/model_container.rs index 732864294..503fd4233 100644 --- a/src/datadogV2/model/model_container.rs +++ b/src/datadogV2/model/model_container.rs @@ -28,24 +28,22 @@ impl Container { } } - pub fn with_attributes( - &mut self, - value: crate::datadogV2::model::ContainerAttributes, - ) -> &mut Self { + pub fn attributes(&mut self, value: crate::datadogV2::model::ContainerAttributes) -> &mut Self { self.attributes = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::ContainerType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::ContainerType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for Container { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_attributes.rs b/src/datadogV2/model/model_container_attributes.rs index 66130e5a8..8162bf9a8 100644 --- a/src/datadogV2/model/model_container_attributes.rs +++ b/src/datadogV2/model/model_container_attributes.rs @@ -64,56 +64,57 @@ impl ContainerAttributes { } } - pub fn with_container_id(&mut self, value: String) -> &mut Self { + pub fn container_id(&mut self, value: String) -> &mut Self { self.container_id = Some(value); self } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_host(&mut self, value: String) -> &mut Self { + pub fn host(&mut self, value: String) -> &mut Self { self.host = Some(value); self } - pub fn with_image_digest(&mut self, value: Option) -> &mut Self { + pub fn image_digest(&mut self, value: Option) -> &mut Self { self.image_digest = Some(value); self } - pub fn with_image_name(&mut self, value: String) -> &mut Self { + pub fn image_name(&mut self, value: String) -> &mut Self { self.image_name = Some(value); self } - pub fn with_image_tags(&mut self, value: Option>) -> &mut Self { + pub fn image_tags(&mut self, value: Option>) -> &mut Self { self.image_tags = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_started_at(&mut self, value: String) -> &mut Self { + pub fn started_at(&mut self, value: String) -> &mut Self { self.started_at = Some(value); self } - pub fn with_state(&mut self, value: String) -> &mut Self { + pub fn state(&mut self, value: String) -> &mut Self { self.state = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } } + impl Default for ContainerAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_group.rs b/src/datadogV2/model/model_container_group.rs index 783eac1cf..48cf1a44e 100644 --- a/src/datadogV2/model/model_container_group.rs +++ b/src/datadogV2/model/model_container_group.rs @@ -32,7 +32,7 @@ impl ContainerGroup { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::ContainerGroupAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl ContainerGroup { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::ContainerGroupRelationships, ) -> &mut Self { @@ -53,11 +53,12 @@ impl ContainerGroup { self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::ContainerGroupType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::ContainerGroupType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for ContainerGroup { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_group_attributes.rs b/src/datadogV2/model/model_container_group_attributes.rs index 161d5b3ab..61fa3d8a4 100644 --- a/src/datadogV2/model/model_container_group_attributes.rs +++ b/src/datadogV2/model/model_container_group_attributes.rs @@ -24,12 +24,12 @@ impl ContainerGroupAttributes { } } - pub fn with_count(&mut self, value: i64) -> &mut Self { + pub fn count(&mut self, value: i64) -> &mut Self { self.count = Some(value); self } - pub fn with_tags( + pub fn tags( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -37,6 +37,7 @@ impl ContainerGroupAttributes { self } } + impl Default for ContainerGroupAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_group_relationships.rs b/src/datadogV2/model/model_container_group_relationships.rs index 2d7ea794a..89d4cd410 100644 --- a/src/datadogV2/model/model_container_group_relationships.rs +++ b/src/datadogV2/model/model_container_group_relationships.rs @@ -18,7 +18,7 @@ impl ContainerGroupRelationships { ContainerGroupRelationships { containers: None } } - pub fn with_containers( + pub fn containers( &mut self, value: crate::datadogV2::model::ContainerGroupRelationshipsLink, ) -> &mut Self { @@ -26,6 +26,7 @@ impl ContainerGroupRelationships { self } } + impl Default for ContainerGroupRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_group_relationships_link.rs b/src/datadogV2/model/model_container_group_relationships_link.rs index 236433e8e..c24fa5136 100644 --- a/src/datadogV2/model/model_container_group_relationships_link.rs +++ b/src/datadogV2/model/model_container_group_relationships_link.rs @@ -24,12 +24,12 @@ impl ContainerGroupRelationshipsLink { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_links( + pub fn links( &mut self, value: crate::datadogV2::model::ContainerGroupRelationshipsLinks, ) -> &mut Self { @@ -37,6 +37,7 @@ impl ContainerGroupRelationshipsLink { self } } + impl Default for ContainerGroupRelationshipsLink { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_group_relationships_links.rs b/src/datadogV2/model/model_container_group_relationships_links.rs index 6b212e0ff..b32494482 100644 --- a/src/datadogV2/model/model_container_group_relationships_links.rs +++ b/src/datadogV2/model/model_container_group_relationships_links.rs @@ -18,11 +18,12 @@ impl ContainerGroupRelationshipsLinks { ContainerGroupRelationshipsLinks { related: None } } - pub fn with_related(&mut self, value: String) -> &mut Self { + pub fn related(&mut self, value: String) -> &mut Self { self.related = Some(value); self } } + impl Default for ContainerGroupRelationshipsLinks { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_image.rs b/src/datadogV2/model/model_container_image.rs index 9846ce86a..638680e02 100644 --- a/src/datadogV2/model/model_container_image.rs +++ b/src/datadogV2/model/model_container_image.rs @@ -28,7 +28,7 @@ impl ContainerImage { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::ContainerImageAttributes, ) -> &mut Self { @@ -36,16 +36,17 @@ impl ContainerImage { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::ContainerImageType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::ContainerImageType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for ContainerImage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_image_attributes.rs b/src/datadogV2/model/model_container_image_attributes.rs index 14691a59d..be5d548a7 100644 --- a/src/datadogV2/model/model_container_image_attributes.rs +++ b/src/datadogV2/model/model_container_image_attributes.rs @@ -87,12 +87,12 @@ impl ContainerImageAttributes { } } - pub fn with_container_count(&mut self, value: i64) -> &mut Self { + pub fn container_count(&mut self, value: i64) -> &mut Self { self.container_count = Some(value); self } - pub fn with_image_flavors( + pub fn image_flavors( &mut self, value: Vec, ) -> &mut Self { @@ -100,77 +100,77 @@ impl ContainerImageAttributes { self } - pub fn with_image_tags(&mut self, value: Vec) -> &mut Self { + pub fn image_tags(&mut self, value: Vec) -> &mut Self { self.image_tags = Some(value); self } - pub fn with_images_built_at(&mut self, value: Vec) -> &mut Self { + pub fn images_built_at(&mut self, value: Vec) -> &mut Self { self.images_built_at = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_os_architectures(&mut self, value: Vec) -> &mut Self { + pub fn os_architectures(&mut self, value: Vec) -> &mut Self { self.os_architectures = Some(value); self } - pub fn with_os_names(&mut self, value: Vec) -> &mut Self { + pub fn os_names(&mut self, value: Vec) -> &mut Self { self.os_names = Some(value); self } - pub fn with_os_versions(&mut self, value: Vec) -> &mut Self { + pub fn os_versions(&mut self, value: Vec) -> &mut Self { self.os_versions = Some(value); self } - pub fn with_published_at(&mut self, value: String) -> &mut Self { + pub fn published_at(&mut self, value: String) -> &mut Self { self.published_at = Some(value); self } - pub fn with_registry(&mut self, value: String) -> &mut Self { + pub fn registry(&mut self, value: String) -> &mut Self { self.registry = Some(value); self } - pub fn with_repo_digest(&mut self, value: String) -> &mut Self { + pub fn repo_digest(&mut self, value: String) -> &mut Self { self.repo_digest = Some(value); self } - pub fn with_repository(&mut self, value: String) -> &mut Self { + pub fn repository(&mut self, value: String) -> &mut Self { self.repository = Some(value); self } - pub fn with_short_image(&mut self, value: String) -> &mut Self { + pub fn short_image(&mut self, value: String) -> &mut Self { self.short_image = Some(value); self } - pub fn with_sizes(&mut self, value: Vec) -> &mut Self { + pub fn sizes(&mut self, value: Vec) -> &mut Self { self.sizes = Some(value); self } - pub fn with_sources(&mut self, value: Vec) -> &mut Self { + pub fn sources(&mut self, value: Vec) -> &mut Self { self.sources = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_vulnerability_count( + pub fn vulnerability_count( &mut self, value: crate::datadogV2::model::ContainerImageVulnerabilities, ) -> &mut Self { @@ -178,6 +178,7 @@ impl ContainerImageAttributes { self } } + impl Default for ContainerImageAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_image_flavor.rs b/src/datadogV2/model/model_container_image_flavor.rs index 1217aef26..afba76958 100644 --- a/src/datadogV2/model/model_container_image_flavor.rs +++ b/src/datadogV2/model/model_container_image_flavor.rs @@ -36,31 +36,32 @@ impl ContainerImageFlavor { } } - pub fn with_built_at(&mut self, value: String) -> &mut Self { + pub fn built_at(&mut self, value: String) -> &mut Self { self.built_at = Some(value); self } - pub fn with_os_architecture(&mut self, value: String) -> &mut Self { + pub fn os_architecture(&mut self, value: String) -> &mut Self { self.os_architecture = Some(value); self } - pub fn with_os_name(&mut self, value: String) -> &mut Self { + pub fn os_name(&mut self, value: String) -> &mut Self { self.os_name = Some(value); self } - pub fn with_os_version(&mut self, value: String) -> &mut Self { + pub fn os_version(&mut self, value: String) -> &mut Self { self.os_version = Some(value); self } - pub fn with_size(&mut self, value: i64) -> &mut Self { + pub fn size(&mut self, value: i64) -> &mut Self { self.size = Some(value); self } } + impl Default for ContainerImageFlavor { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_image_group.rs b/src/datadogV2/model/model_container_image_group.rs index 759c13fd3..77abe07cb 100644 --- a/src/datadogV2/model/model_container_image_group.rs +++ b/src/datadogV2/model/model_container_image_group.rs @@ -32,7 +32,7 @@ impl ContainerImageGroup { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::ContainerImageGroupAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl ContainerImageGroup { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::ContainerImageGroupRelationships, ) -> &mut Self { @@ -53,14 +53,12 @@ impl ContainerImageGroup { self } - pub fn with_type_( - &mut self, - value: crate::datadogV2::model::ContainerImageGroupType, - ) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::ContainerImageGroupType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for ContainerImageGroup { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_image_group_attributes.rs b/src/datadogV2/model/model_container_image_group_attributes.rs index 064b98965..544c0919a 100644 --- a/src/datadogV2/model/model_container_image_group_attributes.rs +++ b/src/datadogV2/model/model_container_image_group_attributes.rs @@ -28,17 +28,17 @@ impl ContainerImageGroupAttributes { } } - pub fn with_count(&mut self, value: i64) -> &mut Self { + pub fn count(&mut self, value: i64) -> &mut Self { self.count = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_tags( + pub fn tags( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -46,6 +46,7 @@ impl ContainerImageGroupAttributes { self } } + impl Default for ContainerImageGroupAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_image_group_images_relationships_link.rs b/src/datadogV2/model/model_container_image_group_images_relationships_link.rs index 7dad3a961..6b3597dbb 100644 --- a/src/datadogV2/model/model_container_image_group_images_relationships_link.rs +++ b/src/datadogV2/model/model_container_image_group_images_relationships_link.rs @@ -24,12 +24,12 @@ impl ContainerImageGroupImagesRelationshipsLink { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_links( + pub fn links( &mut self, value: crate::datadogV2::model::ContainerImageGroupRelationshipsLinks, ) -> &mut Self { @@ -37,6 +37,7 @@ impl ContainerImageGroupImagesRelationshipsLink { self } } + impl Default for ContainerImageGroupImagesRelationshipsLink { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_image_group_relationships.rs b/src/datadogV2/model/model_container_image_group_relationships.rs index 817035737..55e288700 100644 --- a/src/datadogV2/model/model_container_image_group_relationships.rs +++ b/src/datadogV2/model/model_container_image_group_relationships.rs @@ -21,7 +21,7 @@ impl ContainerImageGroupRelationships { } } - pub fn with_container_images( + pub fn container_images( &mut self, value: crate::datadogV2::model::ContainerImageGroupImagesRelationshipsLink, ) -> &mut Self { @@ -29,6 +29,7 @@ impl ContainerImageGroupRelationships { self } } + impl Default for ContainerImageGroupRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_image_group_relationships_links.rs b/src/datadogV2/model/model_container_image_group_relationships_links.rs index ebfb0d4fc..19c011109 100644 --- a/src/datadogV2/model/model_container_image_group_relationships_links.rs +++ b/src/datadogV2/model/model_container_image_group_relationships_links.rs @@ -18,11 +18,12 @@ impl ContainerImageGroupRelationshipsLinks { ContainerImageGroupRelationshipsLinks { related: None } } - pub fn with_related(&mut self, value: String) -> &mut Self { + pub fn related(&mut self, value: String) -> &mut Self { self.related = Some(value); self } } + impl Default for ContainerImageGroupRelationshipsLinks { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_image_item.rs b/src/datadogV2/model/model_container_image_item.rs index 6fb11840c..1b1f75171 100644 --- a/src/datadogV2/model/model_container_image_item.rs +++ b/src/datadogV2/model/model_container_image_item.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ContainerImageItem { - ContainerImage(crate::datadogV2::model::ContainerImage), - ContainerImageGroup(crate::datadogV2::model::ContainerImageGroup), + ContainerImage(Box), + ContainerImageGroup(Box), } diff --git a/src/datadogV2/model/model_container_image_meta.rs b/src/datadogV2/model/model_container_image_meta.rs index 112c662c0..0479e5df0 100644 --- a/src/datadogV2/model/model_container_image_meta.rs +++ b/src/datadogV2/model/model_container_image_meta.rs @@ -18,7 +18,7 @@ impl ContainerImageMeta { ContainerImageMeta { pagination: None } } - pub fn with_pagination( + pub fn pagination( &mut self, value: crate::datadogV2::model::ContainerImageMetaPage, ) -> &mut Self { @@ -26,6 +26,7 @@ impl ContainerImageMeta { self } } + impl Default for ContainerImageMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_image_meta_page.rs b/src/datadogV2/model/model_container_image_meta_page.rs index 927612c67..d797725de 100644 --- a/src/datadogV2/model/model_container_image_meta_page.rs +++ b/src/datadogV2/model/model_container_image_meta_page.rs @@ -44,32 +44,32 @@ impl ContainerImageMetaPage { } } - pub fn with_cursor(&mut self, value: String) -> &mut Self { + pub fn cursor(&mut self, value: String) -> &mut Self { self.cursor = Some(value); self } - pub fn with_limit(&mut self, value: i32) -> &mut Self { + pub fn limit(&mut self, value: i32) -> &mut Self { self.limit = Some(value); self } - pub fn with_next_cursor(&mut self, value: String) -> &mut Self { + pub fn next_cursor(&mut self, value: String) -> &mut Self { self.next_cursor = Some(value); self } - pub fn with_prev_cursor(&mut self, value: Option) -> &mut Self { + pub fn prev_cursor(&mut self, value: Option) -> &mut Self { self.prev_cursor = Some(value); self } - pub fn with_total(&mut self, value: i64) -> &mut Self { + pub fn total(&mut self, value: i64) -> &mut Self { self.total = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::ContainerImageMetaPageType, ) -> &mut Self { @@ -77,6 +77,7 @@ impl ContainerImageMetaPage { self } } + impl Default for ContainerImageMetaPage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_image_vulnerabilities.rs b/src/datadogV2/model/model_container_image_vulnerabilities.rs index 2cfb89735..7b175bbff 100644 --- a/src/datadogV2/model/model_container_image_vulnerabilities.rs +++ b/src/datadogV2/model/model_container_image_vulnerabilities.rs @@ -44,41 +44,42 @@ impl ContainerImageVulnerabilities { } } - pub fn with_asset_id(&mut self, value: String) -> &mut Self { + pub fn asset_id(&mut self, value: String) -> &mut Self { self.asset_id = Some(value); self } - pub fn with_critical(&mut self, value: i64) -> &mut Self { + pub fn critical(&mut self, value: i64) -> &mut Self { self.critical = Some(value); self } - pub fn with_high(&mut self, value: i64) -> &mut Self { + pub fn high(&mut self, value: i64) -> &mut Self { self.high = Some(value); self } - pub fn with_low(&mut self, value: i64) -> &mut Self { + pub fn low(&mut self, value: i64) -> &mut Self { self.low = Some(value); self } - pub fn with_medium(&mut self, value: i64) -> &mut Self { + pub fn medium(&mut self, value: i64) -> &mut Self { self.medium = Some(value); self } - pub fn with_none(&mut self, value: i64) -> &mut Self { + pub fn none(&mut self, value: i64) -> &mut Self { self.none = Some(value); self } - pub fn with_unknown(&mut self, value: i64) -> &mut Self { + pub fn unknown(&mut self, value: i64) -> &mut Self { self.unknown = Some(value); self } } + impl Default for ContainerImageVulnerabilities { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_images_response.rs b/src/datadogV2/model/model_container_images_response.rs index b6c883f5b..43c4b138b 100644 --- a/src/datadogV2/model/model_container_images_response.rs +++ b/src/datadogV2/model/model_container_images_response.rs @@ -28,15 +28,12 @@ impl ContainerImagesResponse { } } - pub fn with_data( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_links( + pub fn links( &mut self, value: crate::datadogV2::model::ContainerImagesResponseLinks, ) -> &mut Self { @@ -44,11 +41,12 @@ impl ContainerImagesResponse { self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::ContainerImageMeta) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::ContainerImageMeta) -> &mut Self { self.meta = Some(value); self } } + impl Default for ContainerImagesResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_images_response_links.rs b/src/datadogV2/model/model_container_images_response_links.rs index 8737b7ca8..b87b6ddc1 100644 --- a/src/datadogV2/model/model_container_images_response_links.rs +++ b/src/datadogV2/model/model_container_images_response_links.rs @@ -36,31 +36,32 @@ impl ContainerImagesResponseLinks { } } - pub fn with_first(&mut self, value: String) -> &mut Self { + pub fn first(&mut self, value: String) -> &mut Self { self.first = Some(value); self } - pub fn with_last(&mut self, value: Option) -> &mut Self { + pub fn last(&mut self, value: Option) -> &mut Self { self.last = Some(value); self } - pub fn with_next(&mut self, value: Option) -> &mut Self { + pub fn next(&mut self, value: Option) -> &mut Self { self.next = Some(value); self } - pub fn with_prev(&mut self, value: Option) -> &mut Self { + pub fn prev(&mut self, value: Option) -> &mut Self { self.prev = Some(value); self } - pub fn with_self_(&mut self, value: String) -> &mut Self { + pub fn self_(&mut self, value: String) -> &mut Self { self.self_ = Some(value); self } } + impl Default for ContainerImagesResponseLinks { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_item.rs b/src/datadogV2/model/model_container_item.rs index d5f9cf971..11146742c 100644 --- a/src/datadogV2/model/model_container_item.rs +++ b/src/datadogV2/model/model_container_item.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ContainerItem { - Container(crate::datadogV2::model::Container), - ContainerGroup(crate::datadogV2::model::ContainerGroup), + Container(Box), + ContainerGroup(Box), } diff --git a/src/datadogV2/model/model_container_meta.rs b/src/datadogV2/model/model_container_meta.rs index bb5cd8d19..d029389d1 100644 --- a/src/datadogV2/model/model_container_meta.rs +++ b/src/datadogV2/model/model_container_meta.rs @@ -18,14 +18,12 @@ impl ContainerMeta { ContainerMeta { pagination: None } } - pub fn with_pagination( - &mut self, - value: crate::datadogV2::model::ContainerMetaPage, - ) -> &mut Self { + pub fn pagination(&mut self, value: crate::datadogV2::model::ContainerMetaPage) -> &mut Self { self.pagination = Some(value); self } } + impl Default for ContainerMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_container_meta_page.rs b/src/datadogV2/model/model_container_meta_page.rs index e251d6487..6216d1740 100644 --- a/src/datadogV2/model/model_container_meta_page.rs +++ b/src/datadogV2/model/model_container_meta_page.rs @@ -44,39 +44,37 @@ impl ContainerMetaPage { } } - pub fn with_cursor(&mut self, value: String) -> &mut Self { + pub fn cursor(&mut self, value: String) -> &mut Self { self.cursor = Some(value); self } - pub fn with_limit(&mut self, value: i32) -> &mut Self { + pub fn limit(&mut self, value: i32) -> &mut Self { self.limit = Some(value); self } - pub fn with_next_cursor(&mut self, value: String) -> &mut Self { + pub fn next_cursor(&mut self, value: String) -> &mut Self { self.next_cursor = Some(value); self } - pub fn with_prev_cursor(&mut self, value: Option) -> &mut Self { + pub fn prev_cursor(&mut self, value: Option) -> &mut Self { self.prev_cursor = Some(value); self } - pub fn with_total(&mut self, value: i64) -> &mut Self { + pub fn total(&mut self, value: i64) -> &mut Self { self.total = Some(value); self } - pub fn with_type_( - &mut self, - value: crate::datadogV2::model::ContainerMetaPageType, - ) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::ContainerMetaPageType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for ContainerMetaPage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_containers_response.rs b/src/datadogV2/model/model_containers_response.rs index 2ab96fef6..bb97768ba 100644 --- a/src/datadogV2/model/model_containers_response.rs +++ b/src/datadogV2/model/model_containers_response.rs @@ -28,24 +28,22 @@ impl ContainersResponse { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_links( - &mut self, - value: crate::datadogV2::model::ContainersResponseLinks, - ) -> &mut Self { + pub fn links(&mut self, value: crate::datadogV2::model::ContainersResponseLinks) -> &mut Self { self.links = Some(value); self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::ContainerMeta) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::ContainerMeta) -> &mut Self { self.meta = Some(value); self } } + impl Default for ContainersResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_containers_response_links.rs b/src/datadogV2/model/model_containers_response_links.rs index 96110005d..bab4554e6 100644 --- a/src/datadogV2/model/model_containers_response_links.rs +++ b/src/datadogV2/model/model_containers_response_links.rs @@ -36,31 +36,32 @@ impl ContainersResponseLinks { } } - pub fn with_first(&mut self, value: String) -> &mut Self { + pub fn first(&mut self, value: String) -> &mut Self { self.first = Some(value); self } - pub fn with_last(&mut self, value: Option) -> &mut Self { + pub fn last(&mut self, value: Option) -> &mut Self { self.last = Some(value); self } - pub fn with_next(&mut self, value: Option) -> &mut Self { + pub fn next(&mut self, value: Option) -> &mut Self { self.next = Some(value); self } - pub fn with_prev(&mut self, value: Option) -> &mut Self { + pub fn prev(&mut self, value: Option) -> &mut Self { self.prev = Some(value); self } - pub fn with_self_(&mut self, value: String) -> &mut Self { + pub fn self_(&mut self, value: String) -> &mut Self { self.self_ = Some(value); self } } + impl Default for ContainersResponseLinks { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_cost_attribution_aggregates_body.rs b/src/datadogV2/model/model_cost_attribution_aggregates_body.rs index b3beda72a..7c0a8aeba 100644 --- a/src/datadogV2/model/model_cost_attribution_aggregates_body.rs +++ b/src/datadogV2/model/model_cost_attribution_aggregates_body.rs @@ -28,21 +28,22 @@ impl CostAttributionAggregatesBody { } } - pub fn with_agg_type(&mut self, value: String) -> &mut Self { + pub fn agg_type(&mut self, value: String) -> &mut Self { self.agg_type = Some(value); self } - pub fn with_field(&mut self, value: String) -> &mut Self { + pub fn field(&mut self, value: String) -> &mut Self { self.field = Some(value); self } - pub fn with_value(&mut self, value: f64) -> &mut Self { + pub fn value(&mut self, value: f64) -> &mut Self { self.value = Some(value); self } } + impl Default for CostAttributionAggregatesBody { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_cost_by_org.rs b/src/datadogV2/model/model_cost_by_org.rs index c11afd998..29581ec37 100644 --- a/src/datadogV2/model/model_cost_by_org.rs +++ b/src/datadogV2/model/model_cost_by_org.rs @@ -28,24 +28,22 @@ impl CostByOrg { } } - pub fn with_attributes( - &mut self, - value: crate::datadogV2::model::CostByOrgAttributes, - ) -> &mut Self { + pub fn attributes(&mut self, value: crate::datadogV2::model::CostByOrgAttributes) -> &mut Self { self.attributes = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::CostByOrgType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::CostByOrgType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for CostByOrg { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_cost_by_org_attributes.rs b/src/datadogV2/model/model_cost_by_org_attributes.rs index 9d70f62d9..c40bb1504 100644 --- a/src/datadogV2/model/model_cost_by_org_attributes.rs +++ b/src/datadogV2/model/model_cost_by_org_attributes.rs @@ -40,7 +40,7 @@ impl CostByOrgAttributes { } } - pub fn with_charges( + pub fn charges( &mut self, value: Vec, ) -> &mut Self { @@ -48,31 +48,32 @@ impl CostByOrgAttributes { self } - pub fn with_date(&mut self, value: String) -> &mut Self { + pub fn date(&mut self, value: String) -> &mut Self { self.date = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_region(&mut self, value: String) -> &mut Self { + pub fn region(&mut self, value: String) -> &mut Self { self.region = Some(value); self } - pub fn with_total_cost(&mut self, value: f64) -> &mut Self { + pub fn total_cost(&mut self, value: f64) -> &mut Self { self.total_cost = Some(value); self } } + impl Default for CostByOrgAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_cost_by_org_response.rs b/src/datadogV2/model/model_cost_by_org_response.rs index ce4161049..45775b697 100644 --- a/src/datadogV2/model/model_cost_by_org_response.rs +++ b/src/datadogV2/model/model_cost_by_org_response.rs @@ -18,11 +18,12 @@ impl CostByOrgResponse { CostByOrgResponse { data: None } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } } + impl Default for CostByOrgResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_create_rule_request.rs b/src/datadogV2/model/model_create_rule_request.rs index abbc67c85..ab02c51d7 100644 --- a/src/datadogV2/model/model_create_rule_request.rs +++ b/src/datadogV2/model/model_create_rule_request.rs @@ -18,14 +18,12 @@ impl CreateRuleRequest { CreateRuleRequest { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::CreateRuleRequestData, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::CreateRuleRequestData) -> &mut Self { self.data = Some(value); self } } + impl Default for CreateRuleRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_create_rule_request_data.rs b/src/datadogV2/model/model_create_rule_request_data.rs index 827912a36..74e507cd9 100644 --- a/src/datadogV2/model/model_create_rule_request_data.rs +++ b/src/datadogV2/model/model_create_rule_request_data.rs @@ -24,16 +24,17 @@ impl CreateRuleRequestData { } } - pub fn with_attributes(&mut self, value: crate::datadogV2::model::RuleAttributes) -> &mut Self { + pub fn attributes(&mut self, value: crate::datadogV2::model::RuleAttributes) -> &mut Self { self.attributes = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::RuleType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::RuleType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for CreateRuleRequestData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_create_rule_response.rs b/src/datadogV2/model/model_create_rule_response.rs index 5a081b0ed..678ff80bd 100644 --- a/src/datadogV2/model/model_create_rule_response.rs +++ b/src/datadogV2/model/model_create_rule_response.rs @@ -18,14 +18,12 @@ impl CreateRuleResponse { CreateRuleResponse { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::CreateRuleResponseData, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::CreateRuleResponseData) -> &mut Self { self.data = Some(value); self } } + impl Default for CreateRuleResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_create_rule_response_data.rs b/src/datadogV2/model/model_create_rule_response_data.rs index 36f1767f9..7e7e22435 100644 --- a/src/datadogV2/model/model_create_rule_response_data.rs +++ b/src/datadogV2/model/model_create_rule_response_data.rs @@ -32,17 +32,17 @@ impl CreateRuleResponseData { } } - pub fn with_attributes(&mut self, value: crate::datadogV2::model::RuleAttributes) -> &mut Self { + pub fn attributes(&mut self, value: crate::datadogV2::model::RuleAttributes) -> &mut Self { self.attributes = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::RelationshipToRule, ) -> &mut Self { @@ -50,11 +50,12 @@ impl CreateRuleResponseData { self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::RuleType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::RuleType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for CreateRuleResponseData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_creator.rs b/src/datadogV2/model/model_creator.rs index 091b15e1e..40c4e07c3 100644 --- a/src/datadogV2/model/model_creator.rs +++ b/src/datadogV2/model/model_creator.rs @@ -28,21 +28,22 @@ impl Creator { } } - pub fn with_email(&mut self, value: String) -> &mut Self { + pub fn email(&mut self, value: String) -> &mut Self { self.email = Some(value); self } - pub fn with_handle(&mut self, value: String) -> &mut Self { + pub fn handle(&mut self, value: String) -> &mut Self { self.handle = Some(value); self } - pub fn with_name(&mut self, value: Option) -> &mut Self { + pub fn name(&mut self, value: Option) -> &mut Self { self.name = Some(value); self } } + impl Default for Creator { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_dashboard_list_add_items_request.rs b/src/datadogV2/model/model_dashboard_list_add_items_request.rs index 28861dc37..2ece2366b 100644 --- a/src/datadogV2/model/model_dashboard_list_add_items_request.rs +++ b/src/datadogV2/model/model_dashboard_list_add_items_request.rs @@ -18,7 +18,7 @@ impl DashboardListAddItemsRequest { DashboardListAddItemsRequest { dashboards: None } } - pub fn with_dashboards( + pub fn dashboards( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl DashboardListAddItemsRequest { self } } + impl Default for DashboardListAddItemsRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_dashboard_list_add_items_response.rs b/src/datadogV2/model/model_dashboard_list_add_items_response.rs index 76e1da1d0..d4aab1e87 100644 --- a/src/datadogV2/model/model_dashboard_list_add_items_response.rs +++ b/src/datadogV2/model/model_dashboard_list_add_items_response.rs @@ -20,7 +20,7 @@ impl DashboardListAddItemsResponse { } } - pub fn with_added_dashboards_to_list( + pub fn added_dashboards_to_list( &mut self, value: Vec, ) -> &mut Self { @@ -28,6 +28,7 @@ impl DashboardListAddItemsResponse { self } } + impl Default for DashboardListAddItemsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_dashboard_list_delete_items_request.rs b/src/datadogV2/model/model_dashboard_list_delete_items_request.rs index bfd730ed2..accd38326 100644 --- a/src/datadogV2/model/model_dashboard_list_delete_items_request.rs +++ b/src/datadogV2/model/model_dashboard_list_delete_items_request.rs @@ -18,7 +18,7 @@ impl DashboardListDeleteItemsRequest { DashboardListDeleteItemsRequest { dashboards: None } } - pub fn with_dashboards( + pub fn dashboards( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl DashboardListDeleteItemsRequest { self } } + impl Default for DashboardListDeleteItemsRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_dashboard_list_delete_items_response.rs b/src/datadogV2/model/model_dashboard_list_delete_items_response.rs index bef2f74d1..bc19d299c 100644 --- a/src/datadogV2/model/model_dashboard_list_delete_items_response.rs +++ b/src/datadogV2/model/model_dashboard_list_delete_items_response.rs @@ -21,7 +21,7 @@ impl DashboardListDeleteItemsResponse { } } - pub fn with_deleted_dashboards_from_list( + pub fn deleted_dashboards_from_list( &mut self, value: Vec, ) -> &mut Self { @@ -29,6 +29,7 @@ impl DashboardListDeleteItemsResponse { self } } + impl Default for DashboardListDeleteItemsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_dashboard_list_item.rs b/src/datadogV2/model/model_dashboard_list_item.rs index 1fd1636c4..6c731981e 100644 --- a/src/datadogV2/model/model_dashboard_list_item.rs +++ b/src/datadogV2/model/model_dashboard_list_item.rs @@ -76,62 +76,62 @@ impl DashboardListItem { } } - pub fn with_author(&mut self, value: crate::datadogV2::model::Creator) -> &mut Self { + pub fn author(&mut self, value: crate::datadogV2::model::Creator) -> &mut Self { self.author = Some(value); self } - pub fn with_created(&mut self, value: String) -> &mut Self { + pub fn created(&mut self, value: String) -> &mut Self { self.created = Some(value); self } - pub fn with_icon(&mut self, value: Option) -> &mut Self { + pub fn icon(&mut self, value: Option) -> &mut Self { self.icon = Some(value); self } - pub fn with_integration_id(&mut self, value: Option) -> &mut Self { + pub fn integration_id(&mut self, value: Option) -> &mut Self { self.integration_id = Some(value); self } - pub fn with_is_favorite(&mut self, value: bool) -> &mut Self { + pub fn is_favorite(&mut self, value: bool) -> &mut Self { self.is_favorite = Some(value); self } - pub fn with_is_read_only(&mut self, value: bool) -> &mut Self { + pub fn is_read_only(&mut self, value: bool) -> &mut Self { self.is_read_only = Some(value); self } - pub fn with_is_shared(&mut self, value: bool) -> &mut Self { + pub fn is_shared(&mut self, value: bool) -> &mut Self { self.is_shared = Some(value); self } - pub fn with_modified(&mut self, value: String) -> &mut Self { + pub fn modified(&mut self, value: String) -> &mut Self { self.modified = Some(value); self } - pub fn with_popularity(&mut self, value: i32) -> &mut Self { + pub fn popularity(&mut self, value: i32) -> &mut Self { self.popularity = Some(value); self } - pub fn with_tags(&mut self, value: Option>) -> &mut Self { + pub fn tags(&mut self, value: Option>) -> &mut Self { self.tags = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_url(&mut self, value: String) -> &mut Self { + pub fn url(&mut self, value: String) -> &mut Self { self.url = Some(value); self } diff --git a/src/datadogV2/model/model_dashboard_list_items.rs b/src/datadogV2/model/model_dashboard_list_items.rs index e0227e8cc..6c36bc394 100644 --- a/src/datadogV2/model/model_dashboard_list_items.rs +++ b/src/datadogV2/model/model_dashboard_list_items.rs @@ -24,7 +24,7 @@ impl DashboardListItems { } } - pub fn with_total(&mut self, value: i64) -> &mut Self { + pub fn total(&mut self, value: i64) -> &mut Self { self.total = Some(value); self } diff --git a/src/datadogV2/model/model_dashboard_list_update_items_request.rs b/src/datadogV2/model/model_dashboard_list_update_items_request.rs index f32ab6266..874de6821 100644 --- a/src/datadogV2/model/model_dashboard_list_update_items_request.rs +++ b/src/datadogV2/model/model_dashboard_list_update_items_request.rs @@ -18,7 +18,7 @@ impl DashboardListUpdateItemsRequest { DashboardListUpdateItemsRequest { dashboards: None } } - pub fn with_dashboards( + pub fn dashboards( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl DashboardListUpdateItemsRequest { self } } + impl Default for DashboardListUpdateItemsRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_dashboard_list_update_items_response.rs b/src/datadogV2/model/model_dashboard_list_update_items_response.rs index a1f846839..652b104ef 100644 --- a/src/datadogV2/model/model_dashboard_list_update_items_response.rs +++ b/src/datadogV2/model/model_dashboard_list_update_items_response.rs @@ -18,7 +18,7 @@ impl DashboardListUpdateItemsResponse { DashboardListUpdateItemsResponse { dashboards: None } } - pub fn with_dashboards( + pub fn dashboards( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl DashboardListUpdateItemsResponse { self } } + impl Default for DashboardListUpdateItemsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_data_scalar_column.rs b/src/datadogV2/model/model_data_scalar_column.rs index 65c0c1434..c92458a37 100644 --- a/src/datadogV2/model/model_data_scalar_column.rs +++ b/src/datadogV2/model/model_data_scalar_column.rs @@ -32,29 +32,27 @@ impl DataScalarColumn { } } - pub fn with_meta(&mut self, value: crate::datadogV2::model::ScalarMeta) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::ScalarMeta) -> &mut Self { self.meta = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_type_( - &mut self, - value: crate::datadogV2::model::ScalarColumnTypeNumber, - ) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::ScalarColumnTypeNumber) -> &mut Self { self.type_ = Some(value); self } - pub fn with_values(&mut self, value: Vec>) -> &mut Self { + pub fn values(&mut self, value: Vec>) -> &mut Self { self.values = Some(value); self } } + impl Default for DataScalarColumn { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_detailed_finding.rs b/src/datadogV2/model/model_detailed_finding.rs index 1b1d67ae1..4cdc0669d 100644 --- a/src/datadogV2/model/model_detailed_finding.rs +++ b/src/datadogV2/model/model_detailed_finding.rs @@ -28,7 +28,7 @@ impl DetailedFinding { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::DetailedFindingAttributes, ) -> &mut Self { @@ -36,16 +36,17 @@ impl DetailedFinding { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::DetailedFindingType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::DetailedFindingType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for DetailedFinding { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_detailed_finding_attributes.rs b/src/datadogV2/model/model_detailed_finding_attributes.rs index 8678c6143..c17ff9927 100644 --- a/src/datadogV2/model/model_detailed_finding_attributes.rs +++ b/src/datadogV2/model/model_detailed_finding_attributes.rs @@ -60,35 +60,32 @@ impl DetailedFindingAttributes { } } - pub fn with_evaluation( - &mut self, - value: crate::datadogV2::model::FindingEvaluation, - ) -> &mut Self { + pub fn evaluation(&mut self, value: crate::datadogV2::model::FindingEvaluation) -> &mut Self { self.evaluation = Some(value); self } - pub fn with_evaluation_changed_at(&mut self, value: i64) -> &mut Self { + pub fn evaluation_changed_at(&mut self, value: i64) -> &mut Self { self.evaluation_changed_at = Some(value); self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } - pub fn with_mute(&mut self, value: crate::datadogV2::model::FindingMute) -> &mut Self { + pub fn mute(&mut self, value: crate::datadogV2::model::FindingMute) -> &mut Self { self.mute = Some(value); self } - pub fn with_resource(&mut self, value: String) -> &mut Self { + pub fn resource(&mut self, value: String) -> &mut Self { self.resource = Some(value); self } - pub fn with_resource_configuration( + pub fn resource_configuration( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -96,31 +93,32 @@ impl DetailedFindingAttributes { self } - pub fn with_resource_discovery_date(&mut self, value: i64) -> &mut Self { + pub fn resource_discovery_date(&mut self, value: i64) -> &mut Self { self.resource_discovery_date = Some(value); self } - pub fn with_resource_type(&mut self, value: String) -> &mut Self { + pub fn resource_type(&mut self, value: String) -> &mut Self { self.resource_type = Some(value); self } - pub fn with_rule(&mut self, value: crate::datadogV2::model::FindingRule) -> &mut Self { + pub fn rule(&mut self, value: crate::datadogV2::model::FindingRule) -> &mut Self { self.rule = Some(value); self } - pub fn with_status(&mut self, value: crate::datadogV2::model::FindingStatus) -> &mut Self { + pub fn status(&mut self, value: crate::datadogV2::model::FindingStatus) -> &mut Self { self.status = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } } + impl Default for DetailedFindingAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_dora_deployment_request_attributes.rs b/src/datadogV2/model/model_dora_deployment_request_attributes.rs index 19f9aaaaa..cb9138dfd 100644 --- a/src/datadogV2/model/model_dora_deployment_request_attributes.rs +++ b/src/datadogV2/model/model_dora_deployment_request_attributes.rs @@ -44,17 +44,17 @@ impl DORADeploymentRequestAttributes { } } - pub fn with_git(&mut self, value: crate::datadogV2::model::DORAGitInfo) -> &mut Self { + pub fn git(&mut self, value: crate::datadogV2::model::DORAGitInfo) -> &mut Self { self.git = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_version(&mut self, value: String) -> &mut Self { + pub fn version(&mut self, value: String) -> &mut Self { self.version = Some(value); self } diff --git a/src/datadogV2/model/model_dora_deployment_response_data.rs b/src/datadogV2/model/model_dora_deployment_response_data.rs index 59a8f71a7..e24585e6a 100644 --- a/src/datadogV2/model/model_dora_deployment_response_data.rs +++ b/src/datadogV2/model/model_dora_deployment_response_data.rs @@ -21,7 +21,7 @@ impl DORADeploymentResponseData { DORADeploymentResponseData { id, type_: None } } - pub fn with_type_(&mut self, value: crate::datadogV2::model::DORADeploymentType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::DORADeploymentType) -> &mut Self { self.type_ = Some(value); self } diff --git a/src/datadogV2/model/model_dora_incident_request_attributes.rs b/src/datadogV2/model/model_dora_incident_request_attributes.rs index b7e89c4a4..542e86be7 100644 --- a/src/datadogV2/model/model_dora_incident_request_attributes.rs +++ b/src/datadogV2/model/model_dora_incident_request_attributes.rs @@ -48,32 +48,32 @@ impl DORAIncidentRequestAttributes { } } - pub fn with_finished_at(&mut self, value: i64) -> &mut Self { + pub fn finished_at(&mut self, value: i64) -> &mut Self { self.finished_at = Some(value); self } - pub fn with_git(&mut self, value: crate::datadogV2::model::DORAGitInfo) -> &mut Self { + pub fn git(&mut self, value: crate::datadogV2::model::DORAGitInfo) -> &mut Self { self.git = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_severity(&mut self, value: String) -> &mut Self { + pub fn severity(&mut self, value: String) -> &mut Self { self.severity = Some(value); self } - pub fn with_version(&mut self, value: String) -> &mut Self { + pub fn version(&mut self, value: String) -> &mut Self { self.version = Some(value); self } diff --git a/src/datadogV2/model/model_dora_incident_response_data.rs b/src/datadogV2/model/model_dora_incident_response_data.rs index f549f708c..efdf40a56 100644 --- a/src/datadogV2/model/model_dora_incident_response_data.rs +++ b/src/datadogV2/model/model_dora_incident_response_data.rs @@ -21,7 +21,7 @@ impl DORAIncidentResponseData { DORAIncidentResponseData { id, type_: None } } - pub fn with_type_(&mut self, value: crate::datadogV2::model::DORAIncidentType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::DORAIncidentType) -> &mut Self { self.type_ = Some(value); self } diff --git a/src/datadogV2/model/model_downtime_create_request_attributes.rs b/src/datadogV2/model/model_downtime_create_request_attributes.rs index 8495bdb2e..0087bb4b5 100644 --- a/src/datadogV2/model/model_downtime_create_request_attributes.rs +++ b/src/datadogV2/model/model_downtime_create_request_attributes.rs @@ -61,22 +61,22 @@ impl DowntimeCreateRequestAttributes { } } - pub fn with_display_timezone(&mut self, value: Option) -> &mut Self { + pub fn display_timezone(&mut self, value: Option) -> &mut Self { self.display_timezone = Some(value); self } - pub fn with_message(&mut self, value: Option) -> &mut Self { + pub fn message(&mut self, value: Option) -> &mut Self { self.message = Some(value); self } - pub fn with_mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { + pub fn mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { self.mute_first_recovery_notification = Some(value); self } - pub fn with_notify_end_states( + pub fn notify_end_states( &mut self, value: Vec, ) -> &mut Self { @@ -84,7 +84,7 @@ impl DowntimeCreateRequestAttributes { self } - pub fn with_notify_end_types( + pub fn notify_end_types( &mut self, value: Vec, ) -> &mut Self { @@ -92,7 +92,7 @@ impl DowntimeCreateRequestAttributes { self } - pub fn with_schedule( + pub fn schedule( &mut self, value: crate::datadogV2::model::DowntimeScheduleCreateRequest, ) -> &mut Self { diff --git a/src/datadogV2/model/model_downtime_meta.rs b/src/datadogV2/model/model_downtime_meta.rs index 4f9c32499..d2f6b6af2 100644 --- a/src/datadogV2/model/model_downtime_meta.rs +++ b/src/datadogV2/model/model_downtime_meta.rs @@ -18,11 +18,12 @@ impl DowntimeMeta { DowntimeMeta { page: None } } - pub fn with_page(&mut self, value: crate::datadogV2::model::DowntimeMetaPage) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV2::model::DowntimeMetaPage) -> &mut Self { self.page = Some(value); self } } + impl Default for DowntimeMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_downtime_meta_page.rs b/src/datadogV2/model/model_downtime_meta_page.rs index f9d866807..ef966df8e 100644 --- a/src/datadogV2/model/model_downtime_meta_page.rs +++ b/src/datadogV2/model/model_downtime_meta_page.rs @@ -20,11 +20,12 @@ impl DowntimeMetaPage { } } - pub fn with_total_filtered_count(&mut self, value: i64) -> &mut Self { + pub fn total_filtered_count(&mut self, value: i64) -> &mut Self { self.total_filtered_count = Some(value); self } } + impl Default for DowntimeMetaPage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_downtime_monitor_identifier.rs b/src/datadogV2/model/model_downtime_monitor_identifier.rs index 10532083a..590be8eb6 100644 --- a/src/datadogV2/model/model_downtime_monitor_identifier.rs +++ b/src/datadogV2/model/model_downtime_monitor_identifier.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum DowntimeMonitorIdentifier { - DowntimeMonitorIdentifierId(crate::datadogV2::model::DowntimeMonitorIdentifierId), - DowntimeMonitorIdentifierTags(crate::datadogV2::model::DowntimeMonitorIdentifierTags), + DowntimeMonitorIdentifierId(Box), + DowntimeMonitorIdentifierTags(Box), } diff --git a/src/datadogV2/model/model_downtime_monitor_included_attributes.rs b/src/datadogV2/model/model_downtime_monitor_included_attributes.rs index 3ce07c80f..ab87b362a 100644 --- a/src/datadogV2/model/model_downtime_monitor_included_attributes.rs +++ b/src/datadogV2/model/model_downtime_monitor_included_attributes.rs @@ -18,11 +18,12 @@ impl DowntimeMonitorIncludedAttributes { DowntimeMonitorIncludedAttributes { name: None } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } } + impl Default for DowntimeMonitorIncludedAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_downtime_monitor_included_item.rs b/src/datadogV2/model/model_downtime_monitor_included_item.rs index eadf4fbd8..4e1da30f3 100644 --- a/src/datadogV2/model/model_downtime_monitor_included_item.rs +++ b/src/datadogV2/model/model_downtime_monitor_included_item.rs @@ -28,7 +28,7 @@ impl DowntimeMonitorIncludedItem { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::DowntimeMonitorIncludedAttributes, ) -> &mut Self { @@ -36,12 +36,12 @@ impl DowntimeMonitorIncludedItem { self } - pub fn with_id(&mut self, value: i64) -> &mut Self { + pub fn id(&mut self, value: i64) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::DowntimeIncludedMonitorType, ) -> &mut Self { @@ -49,6 +49,7 @@ impl DowntimeMonitorIncludedItem { self } } + impl Default for DowntimeMonitorIncludedItem { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_downtime_relationships.rs b/src/datadogV2/model/model_downtime_relationships.rs index 327831b0f..8f3bbb179 100644 --- a/src/datadogV2/model/model_downtime_relationships.rs +++ b/src/datadogV2/model/model_downtime_relationships.rs @@ -24,7 +24,7 @@ impl DowntimeRelationships { } } - pub fn with_created_by( + pub fn created_by( &mut self, value: crate::datadogV2::model::DowntimeRelationshipsCreatedBy, ) -> &mut Self { @@ -32,7 +32,7 @@ impl DowntimeRelationships { self } - pub fn with_monitor( + pub fn monitor( &mut self, value: crate::datadogV2::model::DowntimeRelationshipsMonitor, ) -> &mut Self { @@ -40,6 +40,7 @@ impl DowntimeRelationships { self } } + impl Default for DowntimeRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_downtime_relationships_created_by.rs b/src/datadogV2/model/model_downtime_relationships_created_by.rs index 8cc18dece..d1b41d809 100644 --- a/src/datadogV2/model/model_downtime_relationships_created_by.rs +++ b/src/datadogV2/model/model_downtime_relationships_created_by.rs @@ -18,7 +18,7 @@ impl DowntimeRelationshipsCreatedBy { DowntimeRelationshipsCreatedBy { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Option, ) -> &mut Self { @@ -26,6 +26,7 @@ impl DowntimeRelationshipsCreatedBy { self } } + impl Default for DowntimeRelationshipsCreatedBy { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_downtime_relationships_created_by_data.rs b/src/datadogV2/model/model_downtime_relationships_created_by_data.rs index f270e6b58..cb72d3764 100644 --- a/src/datadogV2/model/model_downtime_relationships_created_by_data.rs +++ b/src/datadogV2/model/model_downtime_relationships_created_by_data.rs @@ -24,16 +24,17 @@ impl DowntimeRelationshipsCreatedByData { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::UsersType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::UsersType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for DowntimeRelationshipsCreatedByData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_downtime_relationships_monitor.rs b/src/datadogV2/model/model_downtime_relationships_monitor.rs index 1944e9f33..67e5d4b8c 100644 --- a/src/datadogV2/model/model_downtime_relationships_monitor.rs +++ b/src/datadogV2/model/model_downtime_relationships_monitor.rs @@ -18,7 +18,7 @@ impl DowntimeRelationshipsMonitor { DowntimeRelationshipsMonitor { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Option, ) -> &mut Self { @@ -26,6 +26,7 @@ impl DowntimeRelationshipsMonitor { self } } + impl Default for DowntimeRelationshipsMonitor { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_downtime_relationships_monitor_data.rs b/src/datadogV2/model/model_downtime_relationships_monitor_data.rs index c8834fc93..47d051884 100644 --- a/src/datadogV2/model/model_downtime_relationships_monitor_data.rs +++ b/src/datadogV2/model/model_downtime_relationships_monitor_data.rs @@ -24,12 +24,12 @@ impl DowntimeRelationshipsMonitorData { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::DowntimeIncludedMonitorType, ) -> &mut Self { @@ -37,6 +37,7 @@ impl DowntimeRelationshipsMonitorData { self } } + impl Default for DowntimeRelationshipsMonitorData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_downtime_response.rs b/src/datadogV2/model/model_downtime_response.rs index a60580018..908ff8940 100644 --- a/src/datadogV2/model/model_downtime_response.rs +++ b/src/datadogV2/model/model_downtime_response.rs @@ -27,12 +27,12 @@ impl DowntimeResponse { } } - pub fn with_data(&mut self, value: crate::datadogV2::model::DowntimeResponseData) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::DowntimeResponseData) -> &mut Self { self.data = Some(value); self } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { @@ -40,6 +40,7 @@ impl DowntimeResponse { self } } + impl Default for DowntimeResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_downtime_response_attributes.rs b/src/datadogV2/model/model_downtime_response_attributes.rs index cc9e86285..3d2db48e3 100644 --- a/src/datadogV2/model/model_downtime_response_attributes.rs +++ b/src/datadogV2/model/model_downtime_response_attributes.rs @@ -80,32 +80,32 @@ impl DowntimeResponseAttributes { } } - pub fn with_canceled(&mut self, value: Option) -> &mut Self { + pub fn canceled(&mut self, value: Option) -> &mut Self { self.canceled = Some(value); self } - pub fn with_created(&mut self, value: String) -> &mut Self { + pub fn created(&mut self, value: String) -> &mut Self { self.created = Some(value); self } - pub fn with_display_timezone(&mut self, value: Option) -> &mut Self { + pub fn display_timezone(&mut self, value: Option) -> &mut Self { self.display_timezone = Some(value); self } - pub fn with_message(&mut self, value: Option) -> &mut Self { + pub fn message(&mut self, value: Option) -> &mut Self { self.message = Some(value); self } - pub fn with_modified(&mut self, value: String) -> &mut Self { + pub fn modified(&mut self, value: String) -> &mut Self { self.modified = Some(value); self } - pub fn with_monitor_identifier( + pub fn monitor_identifier( &mut self, value: crate::datadogV2::model::DowntimeMonitorIdentifier, ) -> &mut Self { @@ -113,12 +113,12 @@ impl DowntimeResponseAttributes { self } - pub fn with_mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { + pub fn mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { self.mute_first_recovery_notification = Some(value); self } - pub fn with_notify_end_states( + pub fn notify_end_states( &mut self, value: Vec, ) -> &mut Self { @@ -126,7 +126,7 @@ impl DowntimeResponseAttributes { self } - pub fn with_notify_end_types( + pub fn notify_end_types( &mut self, value: Vec, ) -> &mut Self { @@ -134,7 +134,7 @@ impl DowntimeResponseAttributes { self } - pub fn with_schedule( + pub fn schedule( &mut self, value: crate::datadogV2::model::DowntimeScheduleResponse, ) -> &mut Self { @@ -142,16 +142,17 @@ impl DowntimeResponseAttributes { self } - pub fn with_scope(&mut self, value: String) -> &mut Self { + pub fn scope(&mut self, value: String) -> &mut Self { self.scope = Some(value); self } - pub fn with_status(&mut self, value: crate::datadogV2::model::DowntimeStatus) -> &mut Self { + pub fn status(&mut self, value: crate::datadogV2::model::DowntimeStatus) -> &mut Self { self.status = Some(value); self } } + impl Default for DowntimeResponseAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_downtime_response_data.rs b/src/datadogV2/model/model_downtime_response_data.rs index f81e5d2f6..381ef75ea 100644 --- a/src/datadogV2/model/model_downtime_response_data.rs +++ b/src/datadogV2/model/model_downtime_response_data.rs @@ -32,7 +32,7 @@ impl DowntimeResponseData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::DowntimeResponseAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl DowntimeResponseData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::DowntimeRelationships, ) -> &mut Self { @@ -53,14 +53,12 @@ impl DowntimeResponseData { self } - pub fn with_type_( - &mut self, - value: crate::datadogV2::model::DowntimeResourceType, - ) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::DowntimeResourceType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for DowntimeResponseData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_downtime_response_included_item.rs b/src/datadogV2/model/model_downtime_response_included_item.rs index d2381118e..65f88bdfc 100644 --- a/src/datadogV2/model/model_downtime_response_included_item.rs +++ b/src/datadogV2/model/model_downtime_response_included_item.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum DowntimeResponseIncludedItem { - User(crate::datadogV2::model::User), - DowntimeMonitorIncludedItem(crate::datadogV2::model::DowntimeMonitorIncludedItem), + User(Box), + DowntimeMonitorIncludedItem(Box), } diff --git a/src/datadogV2/model/model_downtime_schedule_create_request.rs b/src/datadogV2/model/model_downtime_schedule_create_request.rs index de317e188..bbb44600d 100644 --- a/src/datadogV2/model/model_downtime_schedule_create_request.rs +++ b/src/datadogV2/model/model_downtime_schedule_create_request.rs @@ -8,9 +8,9 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum DowntimeScheduleCreateRequest { DowntimeScheduleRecurrencesCreateRequest( - crate::datadogV2::model::DowntimeScheduleRecurrencesCreateRequest, + Box, ), DowntimeScheduleOneTimeCreateUpdateRequest( - crate::datadogV2::model::DowntimeScheduleOneTimeCreateUpdateRequest, + Box, ), } diff --git a/src/datadogV2/model/model_downtime_schedule_current_downtime_response.rs b/src/datadogV2/model/model_downtime_schedule_current_downtime_response.rs index 71ddbbd43..ae040d4e0 100644 --- a/src/datadogV2/model/model_downtime_schedule_current_downtime_response.rs +++ b/src/datadogV2/model/model_downtime_schedule_current_downtime_response.rs @@ -26,16 +26,17 @@ impl DowntimeScheduleCurrentDowntimeResponse { } } - pub fn with_end(&mut self, value: Option) -> &mut Self { + pub fn end(&mut self, value: Option) -> &mut Self { self.end = Some(value); self } - pub fn with_start(&mut self, value: String) -> &mut Self { + pub fn start(&mut self, value: String) -> &mut Self { self.start = Some(value); self } } + impl Default for DowntimeScheduleCurrentDowntimeResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_downtime_schedule_one_time_create_update_request.rs b/src/datadogV2/model/model_downtime_schedule_one_time_create_update_request.rs index e3ef92119..719cf1bbf 100644 --- a/src/datadogV2/model/model_downtime_schedule_one_time_create_update_request.rs +++ b/src/datadogV2/model/model_downtime_schedule_one_time_create_update_request.rs @@ -29,16 +29,17 @@ impl DowntimeScheduleOneTimeCreateUpdateRequest { } } - pub fn with_end(&mut self, value: Option) -> &mut Self { + pub fn end(&mut self, value: Option) -> &mut Self { self.end = Some(value); self } - pub fn with_start(&mut self, value: Option) -> &mut Self { + pub fn start(&mut self, value: Option) -> &mut Self { self.start = Some(value); self } } + impl Default for DowntimeScheduleOneTimeCreateUpdateRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_downtime_schedule_one_time_response.rs b/src/datadogV2/model/model_downtime_schedule_one_time_response.rs index ae0034049..1df84d724 100644 --- a/src/datadogV2/model/model_downtime_schedule_one_time_response.rs +++ b/src/datadogV2/model/model_downtime_schedule_one_time_response.rs @@ -21,7 +21,7 @@ impl DowntimeScheduleOneTimeResponse { DowntimeScheduleOneTimeResponse { end: None, start } } - pub fn with_end(&mut self, value: Option) -> &mut Self { + pub fn end(&mut self, value: Option) -> &mut Self { self.end = Some(value); self } diff --git a/src/datadogV2/model/model_downtime_schedule_recurrence_create_update_request.rs b/src/datadogV2/model/model_downtime_schedule_recurrence_create_update_request.rs index c023bf8e8..18ab6f533 100644 --- a/src/datadogV2/model/model_downtime_schedule_recurrence_create_update_request.rs +++ b/src/datadogV2/model/model_downtime_schedule_recurrence_create_update_request.rs @@ -37,7 +37,7 @@ impl DowntimeScheduleRecurrenceCreateUpdateRequest { } } - pub fn with_start(&mut self, value: Option) -> &mut Self { + pub fn start(&mut self, value: Option) -> &mut Self { self.start = Some(value); self } diff --git a/src/datadogV2/model/model_downtime_schedule_recurrence_response.rs b/src/datadogV2/model/model_downtime_schedule_recurrence_response.rs index 4293890b2..620680bc5 100644 --- a/src/datadogV2/model/model_downtime_schedule_recurrence_response.rs +++ b/src/datadogV2/model/model_downtime_schedule_recurrence_response.rs @@ -34,21 +34,22 @@ impl DowntimeScheduleRecurrenceResponse { } } - pub fn with_duration(&mut self, value: String) -> &mut Self { + pub fn duration(&mut self, value: String) -> &mut Self { self.duration = Some(value); self } - pub fn with_rrule(&mut self, value: String) -> &mut Self { + pub fn rrule(&mut self, value: String) -> &mut Self { self.rrule = Some(value); self } - pub fn with_start(&mut self, value: String) -> &mut Self { + pub fn start(&mut self, value: String) -> &mut Self { self.start = Some(value); self } } + impl Default for DowntimeScheduleRecurrenceResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_downtime_schedule_recurrences_create_request.rs b/src/datadogV2/model/model_downtime_schedule_recurrences_create_request.rs index 65c57a263..f0dd0bdab 100644 --- a/src/datadogV2/model/model_downtime_schedule_recurrences_create_request.rs +++ b/src/datadogV2/model/model_downtime_schedule_recurrences_create_request.rs @@ -26,7 +26,7 @@ impl DowntimeScheduleRecurrencesCreateRequest { } } - pub fn with_timezone(&mut self, value: String) -> &mut Self { + pub fn timezone(&mut self, value: String) -> &mut Self { self.timezone = Some(value); self } diff --git a/src/datadogV2/model/model_downtime_schedule_recurrences_response.rs b/src/datadogV2/model/model_downtime_schedule_recurrences_response.rs index 65cbb6909..f62abbf9a 100644 --- a/src/datadogV2/model/model_downtime_schedule_recurrences_response.rs +++ b/src/datadogV2/model/model_downtime_schedule_recurrences_response.rs @@ -33,7 +33,7 @@ impl DowntimeScheduleRecurrencesResponse { } } - pub fn with_current_downtime( + pub fn current_downtime( &mut self, value: crate::datadogV2::model::DowntimeScheduleCurrentDowntimeResponse, ) -> &mut Self { @@ -41,7 +41,7 @@ impl DowntimeScheduleRecurrencesResponse { self } - pub fn with_timezone(&mut self, value: String) -> &mut Self { + pub fn timezone(&mut self, value: String) -> &mut Self { self.timezone = Some(value); self } diff --git a/src/datadogV2/model/model_downtime_schedule_recurrences_update_request.rs b/src/datadogV2/model/model_downtime_schedule_recurrences_update_request.rs index 307b7fb93..657fb9d1e 100644 --- a/src/datadogV2/model/model_downtime_schedule_recurrences_update_request.rs +++ b/src/datadogV2/model/model_downtime_schedule_recurrences_update_request.rs @@ -25,7 +25,7 @@ impl DowntimeScheduleRecurrencesUpdateRequest { } } - pub fn with_recurrences( + pub fn recurrences( &mut self, value: Vec, ) -> &mut Self { @@ -33,11 +33,12 @@ impl DowntimeScheduleRecurrencesUpdateRequest { self } - pub fn with_timezone(&mut self, value: String) -> &mut Self { + pub fn timezone(&mut self, value: String) -> &mut Self { self.timezone = Some(value); self } } + impl Default for DowntimeScheduleRecurrencesUpdateRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_downtime_schedule_response.rs b/src/datadogV2/model/model_downtime_schedule_response.rs index d875e12fc..3044aa8e2 100644 --- a/src/datadogV2/model/model_downtime_schedule_response.rs +++ b/src/datadogV2/model/model_downtime_schedule_response.rs @@ -10,7 +10,7 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum DowntimeScheduleResponse { DowntimeScheduleRecurrencesResponse( - crate::datadogV2::model::DowntimeScheduleRecurrencesResponse, + Box, ), - DowntimeScheduleOneTimeResponse(crate::datadogV2::model::DowntimeScheduleOneTimeResponse), + DowntimeScheduleOneTimeResponse(Box), } diff --git a/src/datadogV2/model/model_downtime_schedule_update_request.rs b/src/datadogV2/model/model_downtime_schedule_update_request.rs index 68b1d8c95..327ee133e 100644 --- a/src/datadogV2/model/model_downtime_schedule_update_request.rs +++ b/src/datadogV2/model/model_downtime_schedule_update_request.rs @@ -8,9 +8,9 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum DowntimeScheduleUpdateRequest { DowntimeScheduleRecurrencesUpdateRequest( - crate::datadogV2::model::DowntimeScheduleRecurrencesUpdateRequest, + Box, ), DowntimeScheduleOneTimeCreateUpdateRequest( - crate::datadogV2::model::DowntimeScheduleOneTimeCreateUpdateRequest, + Box, ), } diff --git a/src/datadogV2/model/model_downtime_update_request_attributes.rs b/src/datadogV2/model/model_downtime_update_request_attributes.rs index f8d84933b..9d4e0d6fe 100644 --- a/src/datadogV2/model/model_downtime_update_request_attributes.rs +++ b/src/datadogV2/model/model_downtime_update_request_attributes.rs @@ -58,17 +58,17 @@ impl DowntimeUpdateRequestAttributes { } } - pub fn with_display_timezone(&mut self, value: Option) -> &mut Self { + pub fn display_timezone(&mut self, value: Option) -> &mut Self { self.display_timezone = Some(value); self } - pub fn with_message(&mut self, value: Option) -> &mut Self { + pub fn message(&mut self, value: Option) -> &mut Self { self.message = Some(value); self } - pub fn with_monitor_identifier( + pub fn monitor_identifier( &mut self, value: crate::datadogV2::model::DowntimeMonitorIdentifier, ) -> &mut Self { @@ -76,12 +76,12 @@ impl DowntimeUpdateRequestAttributes { self } - pub fn with_mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { + pub fn mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { self.mute_first_recovery_notification = Some(value); self } - pub fn with_notify_end_states( + pub fn notify_end_states( &mut self, value: Vec, ) -> &mut Self { @@ -89,7 +89,7 @@ impl DowntimeUpdateRequestAttributes { self } - pub fn with_notify_end_types( + pub fn notify_end_types( &mut self, value: Vec, ) -> &mut Self { @@ -97,7 +97,7 @@ impl DowntimeUpdateRequestAttributes { self } - pub fn with_schedule( + pub fn schedule( &mut self, value: crate::datadogV2::model::DowntimeScheduleUpdateRequest, ) -> &mut Self { @@ -105,11 +105,12 @@ impl DowntimeUpdateRequestAttributes { self } - pub fn with_scope(&mut self, value: String) -> &mut Self { + pub fn scope(&mut self, value: String) -> &mut Self { self.scope = Some(value); self } } + impl Default for DowntimeUpdateRequestAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_event.rs b/src/datadogV2/model/model_event.rs index c11106e86..27517b2c0 100644 --- a/src/datadogV2/model/model_event.rs +++ b/src/datadogV2/model/model_event.rs @@ -32,26 +32,27 @@ impl Event { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_source_id(&mut self, value: i64) -> &mut Self { + pub fn source_id(&mut self, value: i64) -> &mut Self { self.source_id = Some(value); self } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } } + impl Default for Event { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_event_attributes.rs b/src/datadogV2/model/model_event_attributes.rs index 7285b3054..ba3399a3b 100644 --- a/src/datadogV2/model/model_event_attributes.rs +++ b/src/datadogV2/model/model_event_attributes.rs @@ -114,107 +114,102 @@ impl EventAttributes { } } - pub fn with_aggregation_key(&mut self, value: String) -> &mut Self { + pub fn aggregation_key(&mut self, value: String) -> &mut Self { self.aggregation_key = Some(value); self } - pub fn with_date_happened(&mut self, value: i64) -> &mut Self { + pub fn date_happened(&mut self, value: i64) -> &mut Self { self.date_happened = Some(value); self } - pub fn with_device_name(&mut self, value: String) -> &mut Self { + pub fn device_name(&mut self, value: String) -> &mut Self { self.device_name = Some(value); self } - pub fn with_duration(&mut self, value: i64) -> &mut Self { + pub fn duration(&mut self, value: i64) -> &mut Self { self.duration = Some(value); self } - pub fn with_event_object(&mut self, value: String) -> &mut Self { + pub fn event_object(&mut self, value: String) -> &mut Self { self.event_object = Some(value); self } - pub fn with_evt(&mut self, value: crate::datadogV2::model::Event) -> &mut Self { + pub fn evt(&mut self, value: crate::datadogV2::model::Event) -> &mut Self { self.evt = Some(value); self } - pub fn with_hostname(&mut self, value: String) -> &mut Self { + pub fn hostname(&mut self, value: String) -> &mut Self { self.hostname = Some(value); self } - pub fn with_monitor( - &mut self, - value: Option, - ) -> &mut Self { + pub fn monitor(&mut self, value: Option) -> &mut Self { self.monitor = Some(value); self } - pub fn with_monitor_groups(&mut self, value: Option>) -> &mut Self { + pub fn monitor_groups(&mut self, value: Option>) -> &mut Self { self.monitor_groups = Some(value); self } - pub fn with_monitor_id(&mut self, value: Option) -> &mut Self { + pub fn monitor_id(&mut self, value: Option) -> &mut Self { self.monitor_id = Some(value); self } - pub fn with_priority( - &mut self, - value: Option, - ) -> &mut Self { + pub fn priority(&mut self, value: Option) -> &mut Self { self.priority = Some(value); self } - pub fn with_related_event_id(&mut self, value: i64) -> &mut Self { + pub fn related_event_id(&mut self, value: i64) -> &mut Self { self.related_event_id = Some(value); self } - pub fn with_service(&mut self, value: String) -> &mut Self { + pub fn service(&mut self, value: String) -> &mut Self { self.service = Some(value); self } - pub fn with_source_type_name(&mut self, value: String) -> &mut Self { + pub fn source_type_name(&mut self, value: String) -> &mut Self { self.source_type_name = Some(value); self } - pub fn with_sourcecategory(&mut self, value: String) -> &mut Self { + pub fn sourcecategory(&mut self, value: String) -> &mut Self { self.sourcecategory = Some(value); self } - pub fn with_status(&mut self, value: crate::datadogV2::model::EventStatusType) -> &mut Self { + pub fn status(&mut self, value: crate::datadogV2::model::EventStatusType) -> &mut Self { self.status = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_timestamp(&mut self, value: i64) -> &mut Self { + pub fn timestamp(&mut self, value: i64) -> &mut Self { self.timestamp = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } } + impl Default for EventAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_event_response.rs b/src/datadogV2/model/model_event_response.rs index b542b894d..ee0dc3199 100644 --- a/src/datadogV2/model/model_event_response.rs +++ b/src/datadogV2/model/model_event_response.rs @@ -28,7 +28,7 @@ impl EventResponse { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::EventResponseAttributes, ) -> &mut Self { @@ -36,16 +36,17 @@ impl EventResponse { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::EventType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::EventType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for EventResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_event_response_attributes.rs b/src/datadogV2/model/model_event_response_attributes.rs index f75838e83..c38e4c20b 100644 --- a/src/datadogV2/model/model_event_response_attributes.rs +++ b/src/datadogV2/model/model_event_response_attributes.rs @@ -32,29 +32,27 @@ impl EventResponseAttributes { } } - pub fn with_attributes( - &mut self, - value: crate::datadogV2::model::EventAttributes, - ) -> &mut Self { + pub fn attributes(&mut self, value: crate::datadogV2::model::EventAttributes) -> &mut Self { self.attributes = Some(value); self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_timestamp(&mut self, value: String) -> &mut Self { + pub fn timestamp(&mut self, value: String) -> &mut Self { self.timestamp = Some(value); self } } + impl Default for EventResponseAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_events_compute.rs b/src/datadogV2/model/model_events_compute.rs index eaac3dacf..496e6cb27 100644 --- a/src/datadogV2/model/model_events_compute.rs +++ b/src/datadogV2/model/model_events_compute.rs @@ -28,12 +28,12 @@ impl EventsCompute { } } - pub fn with_interval(&mut self, value: i64) -> &mut Self { + pub fn interval(&mut self, value: i64) -> &mut Self { self.interval = Some(value); self } - pub fn with_metric(&mut self, value: String) -> &mut Self { + pub fn metric(&mut self, value: String) -> &mut Self { self.metric = Some(value); self } diff --git a/src/datadogV2/model/model_events_group_by.rs b/src/datadogV2/model/model_events_group_by.rs index 89ab4fe98..6c80c58ef 100644 --- a/src/datadogV2/model/model_events_group_by.rs +++ b/src/datadogV2/model/model_events_group_by.rs @@ -28,12 +28,12 @@ impl EventsGroupBy { } } - pub fn with_limit(&mut self, value: i32) -> &mut Self { + pub fn limit(&mut self, value: i32) -> &mut Self { self.limit = Some(value); self } - pub fn with_sort(&mut self, value: crate::datadogV2::model::EventsGroupBySort) -> &mut Self { + pub fn sort(&mut self, value: crate::datadogV2::model::EventsGroupBySort) -> &mut Self { self.sort = Some(value); self } diff --git a/src/datadogV2/model/model_events_group_by_sort.rs b/src/datadogV2/model/model_events_group_by_sort.rs index c0c8d3e97..bd81949ab 100644 --- a/src/datadogV2/model/model_events_group_by_sort.rs +++ b/src/datadogV2/model/model_events_group_by_sort.rs @@ -32,17 +32,17 @@ impl EventsGroupBySort { } } - pub fn with_metric(&mut self, value: String) -> &mut Self { + pub fn metric(&mut self, value: String) -> &mut Self { self.metric = Some(value); self } - pub fn with_order(&mut self, value: crate::datadogV2::model::QuerySortOrder) -> &mut Self { + pub fn order(&mut self, value: crate::datadogV2::model::QuerySortOrder) -> &mut Self { self.order = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::EventsSortType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::EventsSortType) -> &mut Self { self.type_ = Some(value); self } diff --git a/src/datadogV2/model/model_events_list_request.rs b/src/datadogV2/model/model_events_list_request.rs index fc901514c..0f5299b34 100644 --- a/src/datadogV2/model/model_events_list_request.rs +++ b/src/datadogV2/model/model_events_list_request.rs @@ -33,29 +33,27 @@ impl EventsListRequest { } } - pub fn with_filter(&mut self, value: crate::datadogV2::model::EventsQueryFilter) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV2::model::EventsQueryFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_options( - &mut self, - value: crate::datadogV2::model::EventsQueryOptions, - ) -> &mut Self { + pub fn options(&mut self, value: crate::datadogV2::model::EventsQueryOptions) -> &mut Self { self.options = Some(value); self } - pub fn with_page(&mut self, value: crate::datadogV2::model::EventsRequestPage) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV2::model::EventsRequestPage) -> &mut Self { self.page = Some(value); self } - pub fn with_sort(&mut self, value: crate::datadogV2::model::EventsSort) -> &mut Self { + pub fn sort(&mut self, value: crate::datadogV2::model::EventsSort) -> &mut Self { self.sort = Some(value); self } } + impl Default for EventsListRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_events_list_response.rs b/src/datadogV2/model/model_events_list_response.rs index 2ff4402b1..afb229c96 100644 --- a/src/datadogV2/model/model_events_list_response.rs +++ b/src/datadogV2/model/model_events_list_response.rs @@ -28,27 +28,22 @@ impl EventsListResponse { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_links( - &mut self, - value: crate::datadogV2::model::EventsListResponseLinks, - ) -> &mut Self { + pub fn links(&mut self, value: crate::datadogV2::model::EventsListResponseLinks) -> &mut Self { self.links = Some(value); self } - pub fn with_meta( - &mut self, - value: crate::datadogV2::model::EventsResponseMetadata, - ) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::EventsResponseMetadata) -> &mut Self { self.meta = Some(value); self } } + impl Default for EventsListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_events_list_response_links.rs b/src/datadogV2/model/model_events_list_response_links.rs index b8b8187ac..a9f36977d 100644 --- a/src/datadogV2/model/model_events_list_response_links.rs +++ b/src/datadogV2/model/model_events_list_response_links.rs @@ -19,11 +19,12 @@ impl EventsListResponseLinks { EventsListResponseLinks { next: None } } - pub fn with_next(&mut self, value: String) -> &mut Self { + pub fn next(&mut self, value: String) -> &mut Self { self.next = Some(value); self } } + impl Default for EventsListResponseLinks { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_events_query_filter.rs b/src/datadogV2/model/model_events_query_filter.rs index 1ee48ed0f..54e840845 100644 --- a/src/datadogV2/model/model_events_query_filter.rs +++ b/src/datadogV2/model/model_events_query_filter.rs @@ -28,21 +28,22 @@ impl EventsQueryFilter { } } - pub fn with_from(&mut self, value: String) -> &mut Self { + pub fn from(&mut self, value: String) -> &mut Self { self.from = Some(value); self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } - pub fn with_to(&mut self, value: String) -> &mut Self { + pub fn to(&mut self, value: String) -> &mut Self { self.to = Some(value); self } } + impl Default for EventsQueryFilter { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_events_query_options.rs b/src/datadogV2/model/model_events_query_options.rs index f0e8ace36..a4f527e44 100644 --- a/src/datadogV2/model/model_events_query_options.rs +++ b/src/datadogV2/model/model_events_query_options.rs @@ -25,16 +25,17 @@ impl EventsQueryOptions { } } - pub fn with_time_offset(&mut self, value: i64) -> &mut Self { + pub fn time_offset(&mut self, value: i64) -> &mut Self { self.time_offset = Some(value); self } - pub fn with_timezone(&mut self, value: String) -> &mut Self { + pub fn timezone(&mut self, value: String) -> &mut Self { self.timezone = Some(value); self } } + impl Default for EventsQueryOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_events_request_page.rs b/src/datadogV2/model/model_events_request_page.rs index 38bbf4ce2..ffe361e45 100644 --- a/src/datadogV2/model/model_events_request_page.rs +++ b/src/datadogV2/model/model_events_request_page.rs @@ -24,16 +24,17 @@ impl EventsRequestPage { } } - pub fn with_cursor(&mut self, value: String) -> &mut Self { + pub fn cursor(&mut self, value: String) -> &mut Self { self.cursor = Some(value); self } - pub fn with_limit(&mut self, value: i32) -> &mut Self { + pub fn limit(&mut self, value: i32) -> &mut Self { self.limit = Some(value); self } } + impl Default for EventsRequestPage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_events_response_metadata.rs b/src/datadogV2/model/model_events_response_metadata.rs index d9d5614c2..dfcebce1e 100644 --- a/src/datadogV2/model/model_events_response_metadata.rs +++ b/src/datadogV2/model/model_events_response_metadata.rs @@ -37,12 +37,12 @@ impl EventsResponseMetadata { } } - pub fn with_elapsed(&mut self, value: i64) -> &mut Self { + pub fn elapsed(&mut self, value: i64) -> &mut Self { self.elapsed = Some(value); self } - pub fn with_page( + pub fn page( &mut self, value: crate::datadogV2::model::EventsResponseMetadataPage, ) -> &mut Self { @@ -50,24 +50,22 @@ impl EventsResponseMetadata { self } - pub fn with_request_id(&mut self, value: String) -> &mut Self { + pub fn request_id(&mut self, value: String) -> &mut Self { self.request_id = Some(value); self } - pub fn with_status(&mut self, value: String) -> &mut Self { + pub fn status(&mut self, value: String) -> &mut Self { self.status = Some(value); self } - pub fn with_warnings( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn warnings(&mut self, value: Vec) -> &mut Self { self.warnings = Some(value); self } } + impl Default for EventsResponseMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_events_response_metadata_page.rs b/src/datadogV2/model/model_events_response_metadata_page.rs index 47dcc4f80..d038cae27 100644 --- a/src/datadogV2/model/model_events_response_metadata_page.rs +++ b/src/datadogV2/model/model_events_response_metadata_page.rs @@ -19,11 +19,12 @@ impl EventsResponseMetadataPage { EventsResponseMetadataPage { after: None } } - pub fn with_after(&mut self, value: String) -> &mut Self { + pub fn after(&mut self, value: String) -> &mut Self { self.after = Some(value); self } } + impl Default for EventsResponseMetadataPage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_events_scalar_query.rs b/src/datadogV2/model/model_events_scalar_query.rs index 4b7220d91..ece2860dd 100644 --- a/src/datadogV2/model/model_events_scalar_query.rs +++ b/src/datadogV2/model/model_events_scalar_query.rs @@ -43,25 +43,22 @@ impl EventsScalarQuery { } } - pub fn with_group_by( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn group_by(&mut self, value: Vec) -> &mut Self { self.group_by = Some(value); self } - pub fn with_indexes(&mut self, value: Vec) -> &mut Self { + pub fn indexes(&mut self, value: Vec) -> &mut Self { self.indexes = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_search(&mut self, value: crate::datadogV2::model::EventsSearch) -> &mut Self { + pub fn search(&mut self, value: crate::datadogV2::model::EventsSearch) -> &mut Self { self.search = Some(value); self } diff --git a/src/datadogV2/model/model_events_search.rs b/src/datadogV2/model/model_events_search.rs index a10c4c4ff..20dfe683c 100644 --- a/src/datadogV2/model/model_events_search.rs +++ b/src/datadogV2/model/model_events_search.rs @@ -18,11 +18,12 @@ impl EventsSearch { EventsSearch { query: None } } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } } + impl Default for EventsSearch { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_events_timeseries_query.rs b/src/datadogV2/model/model_events_timeseries_query.rs index bed1ae783..0d94c06d7 100644 --- a/src/datadogV2/model/model_events_timeseries_query.rs +++ b/src/datadogV2/model/model_events_timeseries_query.rs @@ -43,25 +43,22 @@ impl EventsTimeseriesQuery { } } - pub fn with_group_by( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn group_by(&mut self, value: Vec) -> &mut Self { self.group_by = Some(value); self } - pub fn with_indexes(&mut self, value: Vec) -> &mut Self { + pub fn indexes(&mut self, value: Vec) -> &mut Self { self.indexes = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_search(&mut self, value: crate::datadogV2::model::EventsSearch) -> &mut Self { + pub fn search(&mut self, value: crate::datadogV2::model::EventsSearch) -> &mut Self { self.search = Some(value); self } diff --git a/src/datadogV2/model/model_events_warning.rs b/src/datadogV2/model/model_events_warning.rs index f9c9c0a50..fbe09f938 100644 --- a/src/datadogV2/model/model_events_warning.rs +++ b/src/datadogV2/model/model_events_warning.rs @@ -28,21 +28,22 @@ impl EventsWarning { } } - pub fn with_code(&mut self, value: String) -> &mut Self { + pub fn code(&mut self, value: String) -> &mut Self { self.code = Some(value); self } - pub fn with_detail(&mut self, value: String) -> &mut Self { + pub fn detail(&mut self, value: String) -> &mut Self { self.detail = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } } + impl Default for EventsWarning { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_fastly_accoun_response_attributes.rs b/src/datadogV2/model/model_fastly_accoun_response_attributes.rs index 95892264a..39ce27088 100644 --- a/src/datadogV2/model/model_fastly_accoun_response_attributes.rs +++ b/src/datadogV2/model/model_fastly_accoun_response_attributes.rs @@ -24,10 +24,7 @@ impl FastlyAccounResponseAttributes { } } - pub fn with_services( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn services(&mut self, value: Vec) -> &mut Self { self.services = Some(value); self } diff --git a/src/datadogV2/model/model_fastly_account_create_request_attributes.rs b/src/datadogV2/model/model_fastly_account_create_request_attributes.rs index b56230687..9dffa434e 100644 --- a/src/datadogV2/model/model_fastly_account_create_request_attributes.rs +++ b/src/datadogV2/model/model_fastly_account_create_request_attributes.rs @@ -28,10 +28,7 @@ impl FastlyAccountCreateRequestAttributes { } } - pub fn with_services( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn services(&mut self, value: Vec) -> &mut Self { self.services = Some(value); self } diff --git a/src/datadogV2/model/model_fastly_account_response.rs b/src/datadogV2/model/model_fastly_account_response.rs index 06355aeb4..e547f958f 100644 --- a/src/datadogV2/model/model_fastly_account_response.rs +++ b/src/datadogV2/model/model_fastly_account_response.rs @@ -18,14 +18,12 @@ impl FastlyAccountResponse { FastlyAccountResponse { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::FastlyAccountResponseData, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::FastlyAccountResponseData) -> &mut Self { self.data = Some(value); self } } + impl Default for FastlyAccountResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_fastly_account_update_request_attributes.rs b/src/datadogV2/model/model_fastly_account_update_request_attributes.rs index 3db08fe10..4a67a71f7 100644 --- a/src/datadogV2/model/model_fastly_account_update_request_attributes.rs +++ b/src/datadogV2/model/model_fastly_account_update_request_attributes.rs @@ -18,11 +18,12 @@ impl FastlyAccountUpdateRequestAttributes { FastlyAccountUpdateRequestAttributes { api_key: None } } - pub fn with_api_key(&mut self, value: String) -> &mut Self { + pub fn api_key(&mut self, value: String) -> &mut Self { self.api_key = Some(value); self } } + impl Default for FastlyAccountUpdateRequestAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_fastly_account_update_request_data.rs b/src/datadogV2/model/model_fastly_account_update_request_data.rs index 9c6bf7a02..4a9edda97 100644 --- a/src/datadogV2/model/model_fastly_account_update_request_data.rs +++ b/src/datadogV2/model/model_fastly_account_update_request_data.rs @@ -24,7 +24,7 @@ impl FastlyAccountUpdateRequestData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::FastlyAccountUpdateRequestAttributes, ) -> &mut Self { @@ -32,11 +32,12 @@ impl FastlyAccountUpdateRequestData { self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::FastlyAccountType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::FastlyAccountType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for FastlyAccountUpdateRequestData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_fastly_accounts_response.rs b/src/datadogV2/model/model_fastly_accounts_response.rs index 1fbe23674..bbc9ec70c 100644 --- a/src/datadogV2/model/model_fastly_accounts_response.rs +++ b/src/datadogV2/model/model_fastly_accounts_response.rs @@ -18,7 +18,7 @@ impl FastlyAccountsResponse { FastlyAccountsResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl FastlyAccountsResponse { self } } + impl Default for FastlyAccountsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_fastly_service.rs b/src/datadogV2/model/model_fastly_service.rs index b666e6f6c..5146cd3c7 100644 --- a/src/datadogV2/model/model_fastly_service.rs +++ b/src/datadogV2/model/model_fastly_service.rs @@ -21,7 +21,7 @@ impl FastlyService { FastlyService { id, tags: None } } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } diff --git a/src/datadogV2/model/model_fastly_service_attributes.rs b/src/datadogV2/model/model_fastly_service_attributes.rs index c45ab550a..832348614 100644 --- a/src/datadogV2/model/model_fastly_service_attributes.rs +++ b/src/datadogV2/model/model_fastly_service_attributes.rs @@ -18,11 +18,12 @@ impl FastlyServiceAttributes { FastlyServiceAttributes { tags: None } } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } } + impl Default for FastlyServiceAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_fastly_service_data.rs b/src/datadogV2/model/model_fastly_service_data.rs index e6b7b9519..57fc01dd3 100644 --- a/src/datadogV2/model/model_fastly_service_data.rs +++ b/src/datadogV2/model/model_fastly_service_data.rs @@ -28,7 +28,7 @@ impl FastlyServiceData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::FastlyServiceAttributes, ) -> &mut Self { diff --git a/src/datadogV2/model/model_fastly_service_response.rs b/src/datadogV2/model/model_fastly_service_response.rs index a8110c9eb..8cdfa2210 100644 --- a/src/datadogV2/model/model_fastly_service_response.rs +++ b/src/datadogV2/model/model_fastly_service_response.rs @@ -18,11 +18,12 @@ impl FastlyServiceResponse { FastlyServiceResponse { data: None } } - pub fn with_data(&mut self, value: crate::datadogV2::model::FastlyServiceData) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::FastlyServiceData) -> &mut Self { self.data = Some(value); self } } + impl Default for FastlyServiceResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_fastly_services_response.rs b/src/datadogV2/model/model_fastly_services_response.rs index 88172fc5d..0de4a57cf 100644 --- a/src/datadogV2/model/model_fastly_services_response.rs +++ b/src/datadogV2/model/model_fastly_services_response.rs @@ -18,7 +18,7 @@ impl FastlyServicesResponse { FastlyServicesResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl FastlyServicesResponse { self } } + impl Default for FastlyServicesResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_finding.rs b/src/datadogV2/model/model_finding.rs index 68e0de2fc..4a8e2f62e 100644 --- a/src/datadogV2/model/model_finding.rs +++ b/src/datadogV2/model/model_finding.rs @@ -28,24 +28,22 @@ impl Finding { } } - pub fn with_attributes( - &mut self, - value: crate::datadogV2::model::FindingAttributes, - ) -> &mut Self { + pub fn attributes(&mut self, value: crate::datadogV2::model::FindingAttributes) -> &mut Self { self.attributes = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::FindingType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::FindingType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for Finding { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_finding_attributes.rs b/src/datadogV2/model/model_finding_attributes.rs index 03420b755..a3359f2ab 100644 --- a/src/datadogV2/model/model_finding_attributes.rs +++ b/src/datadogV2/model/model_finding_attributes.rs @@ -52,54 +52,52 @@ impl FindingAttributes { } } - pub fn with_evaluation( - &mut self, - value: crate::datadogV2::model::FindingEvaluation, - ) -> &mut Self { + pub fn evaluation(&mut self, value: crate::datadogV2::model::FindingEvaluation) -> &mut Self { self.evaluation = Some(value); self } - pub fn with_evaluation_changed_at(&mut self, value: i64) -> &mut Self { + pub fn evaluation_changed_at(&mut self, value: i64) -> &mut Self { self.evaluation_changed_at = Some(value); self } - pub fn with_mute(&mut self, value: crate::datadogV2::model::FindingMute) -> &mut Self { + pub fn mute(&mut self, value: crate::datadogV2::model::FindingMute) -> &mut Self { self.mute = Some(value); self } - pub fn with_resource(&mut self, value: String) -> &mut Self { + pub fn resource(&mut self, value: String) -> &mut Self { self.resource = Some(value); self } - pub fn with_resource_discovery_date(&mut self, value: i64) -> &mut Self { + pub fn resource_discovery_date(&mut self, value: i64) -> &mut Self { self.resource_discovery_date = Some(value); self } - pub fn with_resource_type(&mut self, value: String) -> &mut Self { + pub fn resource_type(&mut self, value: String) -> &mut Self { self.resource_type = Some(value); self } - pub fn with_rule(&mut self, value: crate::datadogV2::model::FindingRule) -> &mut Self { + pub fn rule(&mut self, value: crate::datadogV2::model::FindingRule) -> &mut Self { self.rule = Some(value); self } - pub fn with_status(&mut self, value: crate::datadogV2::model::FindingStatus) -> &mut Self { + pub fn status(&mut self, value: crate::datadogV2::model::FindingStatus) -> &mut Self { self.status = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } } + impl Default for FindingAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_finding_mute.rs b/src/datadogV2/model/model_finding_mute.rs index 52e46255b..211821600 100644 --- a/src/datadogV2/model/model_finding_mute.rs +++ b/src/datadogV2/model/model_finding_mute.rs @@ -40,36 +40,37 @@ impl FindingMute { } } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_expiration_date(&mut self, value: i64) -> &mut Self { + pub fn expiration_date(&mut self, value: i64) -> &mut Self { self.expiration_date = Some(value); self } - pub fn with_muted(&mut self, value: bool) -> &mut Self { + pub fn muted(&mut self, value: bool) -> &mut Self { self.muted = Some(value); self } - pub fn with_reason(&mut self, value: crate::datadogV2::model::FindingMuteReason) -> &mut Self { + pub fn reason(&mut self, value: crate::datadogV2::model::FindingMuteReason) -> &mut Self { self.reason = Some(value); self } - pub fn with_start_date(&mut self, value: i64) -> &mut Self { + pub fn start_date(&mut self, value: i64) -> &mut Self { self.start_date = Some(value); self } - pub fn with_uuid(&mut self, value: String) -> &mut Self { + pub fn uuid(&mut self, value: String) -> &mut Self { self.uuid = Some(value); self } } + impl Default for FindingMute { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_finding_rule.rs b/src/datadogV2/model/model_finding_rule.rs index cedb0323a..7b4288a32 100644 --- a/src/datadogV2/model/model_finding_rule.rs +++ b/src/datadogV2/model/model_finding_rule.rs @@ -24,16 +24,17 @@ impl FindingRule { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } } + impl Default for FindingRule { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_formula_limit.rs b/src/datadogV2/model/model_formula_limit.rs index e77f49c6b..b30b4360e 100644 --- a/src/datadogV2/model/model_formula_limit.rs +++ b/src/datadogV2/model/model_formula_limit.rs @@ -25,16 +25,17 @@ impl FormulaLimit { } } - pub fn with_count(&mut self, value: i32) -> &mut Self { + pub fn count(&mut self, value: i32) -> &mut Self { self.count = Some(value); self } - pub fn with_order(&mut self, value: crate::datadogV2::model::QuerySortOrder) -> &mut Self { + pub fn order(&mut self, value: crate::datadogV2::model::QuerySortOrder) -> &mut Self { self.order = Some(value); self } } + impl Default for FormulaLimit { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_full_api_key.rs b/src/datadogV2/model/model_full_api_key.rs index 59ce84c6c..9523d23b6 100644 --- a/src/datadogV2/model/model_full_api_key.rs +++ b/src/datadogV2/model/model_full_api_key.rs @@ -32,7 +32,7 @@ impl FullAPIKey { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::FullAPIKeyAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl FullAPIKey { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::APIKeyRelationships, ) -> &mut Self { @@ -53,11 +53,12 @@ impl FullAPIKey { self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::APIKeysType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::APIKeysType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for FullAPIKey { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_full_api_key_attributes.rs b/src/datadogV2/model/model_full_api_key_attributes.rs index ff60e65ed..821892b9d 100644 --- a/src/datadogV2/model/model_full_api_key_attributes.rs +++ b/src/datadogV2/model/model_full_api_key_attributes.rs @@ -44,41 +44,42 @@ impl FullAPIKeyAttributes { } } - pub fn with_category(&mut self, value: String) -> &mut Self { + pub fn category(&mut self, value: String) -> &mut Self { self.category = Some(value); self } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_key(&mut self, value: String) -> &mut Self { + pub fn key(&mut self, value: String) -> &mut Self { self.key = Some(value); self } - pub fn with_last4(&mut self, value: String) -> &mut Self { + pub fn last4(&mut self, value: String) -> &mut Self { self.last4 = Some(value); self } - pub fn with_modified_at(&mut self, value: String) -> &mut Self { + pub fn modified_at(&mut self, value: String) -> &mut Self { self.modified_at = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_remote_config_read_enabled(&mut self, value: bool) -> &mut Self { + pub fn remote_config_read_enabled(&mut self, value: bool) -> &mut Self { self.remote_config_read_enabled = Some(value); self } } + impl Default for FullAPIKeyAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_full_application_key.rs b/src/datadogV2/model/model_full_application_key.rs index 79ff0c6f1..500579191 100644 --- a/src/datadogV2/model/model_full_application_key.rs +++ b/src/datadogV2/model/model_full_application_key.rs @@ -32,7 +32,7 @@ impl FullApplicationKey { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::FullApplicationKeyAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl FullApplicationKey { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::ApplicationKeyRelationships, ) -> &mut Self { @@ -53,11 +53,12 @@ impl FullApplicationKey { self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::ApplicationKeysType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::ApplicationKeysType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for FullApplicationKey { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_full_application_key_attributes.rs b/src/datadogV2/model/model_full_application_key_attributes.rs index c08eb4e61..4eb7f008b 100644 --- a/src/datadogV2/model/model_full_application_key_attributes.rs +++ b/src/datadogV2/model/model_full_application_key_attributes.rs @@ -36,31 +36,32 @@ impl FullApplicationKeyAttributes { } } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_key(&mut self, value: String) -> &mut Self { + pub fn key(&mut self, value: String) -> &mut Self { self.key = Some(value); self } - pub fn with_last4(&mut self, value: String) -> &mut Self { + pub fn last4(&mut self, value: String) -> &mut Self { self.last4 = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_scopes(&mut self, value: Option>) -> &mut Self { + pub fn scopes(&mut self, value: Option>) -> &mut Self { self.scopes = Some(value); self } } + impl Default for FullApplicationKeyAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_gcp_service_account_meta.rs b/src/datadogV2/model/model_gcp_service_account_meta.rs index 14ecd3208..af7a42887 100644 --- a/src/datadogV2/model/model_gcp_service_account_meta.rs +++ b/src/datadogV2/model/model_gcp_service_account_meta.rs @@ -20,11 +20,12 @@ impl GCPServiceAccountMeta { } } - pub fn with_accessible_projects(&mut self, value: Vec) -> &mut Self { + pub fn accessible_projects(&mut self, value: Vec) -> &mut Self { self.accessible_projects = Some(value); self } } + impl Default for GCPServiceAccountMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_gcpsts_delegate_account.rs b/src/datadogV2/model/model_gcpsts_delegate_account.rs index b846672a8..0847d25c0 100644 --- a/src/datadogV2/model/model_gcpsts_delegate_account.rs +++ b/src/datadogV2/model/model_gcpsts_delegate_account.rs @@ -28,7 +28,7 @@ impl GCPSTSDelegateAccount { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::GCPSTSDelegateAccountAttributes, ) -> &mut Self { @@ -36,12 +36,12 @@ impl GCPSTSDelegateAccount { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::GCPSTSDelegateAccountType, ) -> &mut Self { @@ -49,6 +49,7 @@ impl GCPSTSDelegateAccount { self } } + impl Default for GCPSTSDelegateAccount { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_gcpsts_delegate_account_attributes.rs b/src/datadogV2/model/model_gcpsts_delegate_account_attributes.rs index 78b33a642..bca10834f 100644 --- a/src/datadogV2/model/model_gcpsts_delegate_account_attributes.rs +++ b/src/datadogV2/model/model_gcpsts_delegate_account_attributes.rs @@ -20,11 +20,12 @@ impl GCPSTSDelegateAccountAttributes { } } - pub fn with_delegate_account_email(&mut self, value: String) -> &mut Self { + pub fn delegate_account_email(&mut self, value: String) -> &mut Self { self.delegate_account_email = Some(value); self } } + impl Default for GCPSTSDelegateAccountAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_gcpsts_delegate_account_response.rs b/src/datadogV2/model/model_gcpsts_delegate_account_response.rs index 7fc138f98..0b1070b8c 100644 --- a/src/datadogV2/model/model_gcpsts_delegate_account_response.rs +++ b/src/datadogV2/model/model_gcpsts_delegate_account_response.rs @@ -18,14 +18,12 @@ impl GCPSTSDelegateAccountResponse { GCPSTSDelegateAccountResponse { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::GCPSTSDelegateAccount, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::GCPSTSDelegateAccount) -> &mut Self { self.data = Some(value); self } } + impl Default for GCPSTSDelegateAccountResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_gcpsts_service_account.rs b/src/datadogV2/model/model_gcpsts_service_account.rs index 1b03e4f68..1ebeafa0c 100644 --- a/src/datadogV2/model/model_gcpsts_service_account.rs +++ b/src/datadogV2/model/model_gcpsts_service_account.rs @@ -32,7 +32,7 @@ impl GCPSTSServiceAccount { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::GCPSTSServiceAccountAttributes, ) -> &mut Self { @@ -40,27 +40,22 @@ impl GCPSTSServiceAccount { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_meta( - &mut self, - value: crate::datadogV2::model::GCPServiceAccountMeta, - ) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::GCPServiceAccountMeta) -> &mut Self { self.meta = Some(value); self } - pub fn with_type_( - &mut self, - value: crate::datadogV2::model::GCPServiceAccountType, - ) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::GCPServiceAccountType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for GCPSTSServiceAccount { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_gcpsts_service_account_attributes.rs b/src/datadogV2/model/model_gcpsts_service_account_attributes.rs index 387434d34..134a8af1c 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_attributes.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_attributes.rs @@ -44,41 +44,42 @@ impl GCPSTSServiceAccountAttributes { } } - pub fn with_account_tags(&mut self, value: Vec) -> &mut Self { + pub fn account_tags(&mut self, value: Vec) -> &mut Self { self.account_tags = Some(value); self } - pub fn with_automute(&mut self, value: bool) -> &mut Self { + pub fn automute(&mut self, value: bool) -> &mut Self { self.automute = Some(value); self } - pub fn with_client_email(&mut self, value: String) -> &mut Self { + pub fn client_email(&mut self, value: String) -> &mut Self { self.client_email = Some(value); self } - pub fn with_host_filters(&mut self, value: Vec) -> &mut Self { + pub fn host_filters(&mut self, value: Vec) -> &mut Self { self.host_filters = Some(value); self } - pub fn with_is_cspm_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_cspm_enabled(&mut self, value: bool) -> &mut Self { self.is_cspm_enabled = Some(value); self } - pub fn with_is_security_command_center_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_security_command_center_enabled(&mut self, value: bool) -> &mut Self { self.is_security_command_center_enabled = Some(value); self } - pub fn with_resource_collection_enabled(&mut self, value: bool) -> &mut Self { + pub fn resource_collection_enabled(&mut self, value: bool) -> &mut Self { self.resource_collection_enabled = Some(value); self } } + impl Default for GCPSTSServiceAccountAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_gcpsts_service_account_create_request.rs b/src/datadogV2/model/model_gcpsts_service_account_create_request.rs index c28a95411..016d1fe65 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_create_request.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_create_request.rs @@ -18,14 +18,12 @@ impl GCPSTSServiceAccountCreateRequest { GCPSTSServiceAccountCreateRequest { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::GCPSTSServiceAccountData, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::GCPSTSServiceAccountData) -> &mut Self { self.data = Some(value); self } } + impl Default for GCPSTSServiceAccountCreateRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_gcpsts_service_account_data.rs b/src/datadogV2/model/model_gcpsts_service_account_data.rs index 9f6b7722d..3f5b8edc6 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_data.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_data.rs @@ -24,7 +24,7 @@ impl GCPSTSServiceAccountData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::GCPSTSServiceAccountAttributes, ) -> &mut Self { @@ -32,14 +32,12 @@ impl GCPSTSServiceAccountData { self } - pub fn with_type_( - &mut self, - value: crate::datadogV2::model::GCPServiceAccountType, - ) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::GCPServiceAccountType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for GCPSTSServiceAccountData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_gcpsts_service_account_response.rs b/src/datadogV2/model/model_gcpsts_service_account_response.rs index e3b3357a7..bc6f046a7 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_response.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_response.rs @@ -18,11 +18,12 @@ impl GCPSTSServiceAccountResponse { GCPSTSServiceAccountResponse { data: None } } - pub fn with_data(&mut self, value: crate::datadogV2::model::GCPSTSServiceAccount) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::GCPSTSServiceAccount) -> &mut Self { self.data = Some(value); self } } + impl Default for GCPSTSServiceAccountResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_gcpsts_service_account_update_request.rs b/src/datadogV2/model/model_gcpsts_service_account_update_request.rs index c8290522a..c02b9cc98 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_update_request.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_update_request.rs @@ -18,7 +18,7 @@ impl GCPSTSServiceAccountUpdateRequest { GCPSTSServiceAccountUpdateRequest { data: None } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::GCPSTSServiceAccountUpdateRequestData, ) -> &mut Self { @@ -26,6 +26,7 @@ impl GCPSTSServiceAccountUpdateRequest { self } } + impl Default for GCPSTSServiceAccountUpdateRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_gcpsts_service_account_update_request_data.rs b/src/datadogV2/model/model_gcpsts_service_account_update_request_data.rs index daee0d481..1f4ec918a 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_update_request_data.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_update_request_data.rs @@ -28,7 +28,7 @@ impl GCPSTSServiceAccountUpdateRequestData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::GCPSTSServiceAccountAttributes, ) -> &mut Self { @@ -36,19 +36,17 @@ impl GCPSTSServiceAccountUpdateRequestData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( - &mut self, - value: crate::datadogV2::model::GCPServiceAccountType, - ) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::GCPServiceAccountType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for GCPSTSServiceAccountUpdateRequestData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_gcpsts_service_accounts_response.rs b/src/datadogV2/model/model_gcpsts_service_accounts_response.rs index 75917bda9..eb02d4ae6 100644 --- a/src/datadogV2/model/model_gcpsts_service_accounts_response.rs +++ b/src/datadogV2/model/model_gcpsts_service_accounts_response.rs @@ -18,14 +18,12 @@ impl GCPSTSServiceAccountsResponse { GCPSTSServiceAccountsResponse { data: None } } - pub fn with_data( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } } + impl Default for GCPSTSServiceAccountsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_group_scalar_column.rs b/src/datadogV2/model/model_group_scalar_column.rs index f8cf63d4d..2dfecd138 100644 --- a/src/datadogV2/model/model_group_scalar_column.rs +++ b/src/datadogV2/model/model_group_scalar_column.rs @@ -28,24 +28,22 @@ impl GroupScalarColumn { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_type_( - &mut self, - value: crate::datadogV2::model::ScalarColumnTypeGroup, - ) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::ScalarColumnTypeGroup) -> &mut Self { self.type_ = Some(value); self } - pub fn with_values(&mut self, value: Vec>) -> &mut Self { + pub fn values(&mut self, value: Vec>) -> &mut Self { self.values = Some(value); self } } + impl Default for GroupScalarColumn { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_hourly_usage.rs b/src/datadogV2/model/model_hourly_usage.rs index 25e40be45..7b12fff38 100644 --- a/src/datadogV2/model/model_hourly_usage.rs +++ b/src/datadogV2/model/model_hourly_usage.rs @@ -28,7 +28,7 @@ impl HourlyUsage { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::HourlyUsageAttributes, ) -> &mut Self { @@ -36,16 +36,17 @@ impl HourlyUsage { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::UsageTimeSeriesType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::UsageTimeSeriesType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for HourlyUsage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_hourly_usage_attributes.rs b/src/datadogV2/model/model_hourly_usage_attributes.rs index c71c9d89f..1739b80b9 100644 --- a/src/datadogV2/model/model_hourly_usage_attributes.rs +++ b/src/datadogV2/model/model_hourly_usage_attributes.rs @@ -40,7 +40,7 @@ impl HourlyUsageAttributes { } } - pub fn with_measurements( + pub fn measurements( &mut self, value: Vec, ) -> &mut Self { @@ -48,31 +48,32 @@ impl HourlyUsageAttributes { self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_product_family(&mut self, value: String) -> &mut Self { + pub fn product_family(&mut self, value: String) -> &mut Self { self.product_family = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_region(&mut self, value: String) -> &mut Self { + pub fn region(&mut self, value: String) -> &mut Self { self.region = Some(value); self } - pub fn with_timestamp(&mut self, value: String) -> &mut Self { + pub fn timestamp(&mut self, value: String) -> &mut Self { self.timestamp = Some(value); self } } + impl Default for HourlyUsageAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_hourly_usage_measurement.rs b/src/datadogV2/model/model_hourly_usage_measurement.rs index ed2f6b362..4d232f35b 100644 --- a/src/datadogV2/model/model_hourly_usage_measurement.rs +++ b/src/datadogV2/model/model_hourly_usage_measurement.rs @@ -24,16 +24,17 @@ impl HourlyUsageMeasurement { } } - pub fn with_usage_type(&mut self, value: String) -> &mut Self { + pub fn usage_type(&mut self, value: String) -> &mut Self { self.usage_type = Some(value); self } - pub fn with_value(&mut self, value: Option) -> &mut Self { + pub fn value(&mut self, value: Option) -> &mut Self { self.value = Some(value); self } } + impl Default for HourlyUsageMeasurement { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_hourly_usage_metadata.rs b/src/datadogV2/model/model_hourly_usage_metadata.rs index b2da8a23a..8995ae422 100644 --- a/src/datadogV2/model/model_hourly_usage_metadata.rs +++ b/src/datadogV2/model/model_hourly_usage_metadata.rs @@ -18,7 +18,7 @@ impl HourlyUsageMetadata { HourlyUsageMetadata { pagination: None } } - pub fn with_pagination( + pub fn pagination( &mut self, value: crate::datadogV2::model::HourlyUsagePagination, ) -> &mut Self { @@ -26,6 +26,7 @@ impl HourlyUsageMetadata { self } } + impl Default for HourlyUsageMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_hourly_usage_pagination.rs b/src/datadogV2/model/model_hourly_usage_pagination.rs index d65cb8328..a4a001cc9 100644 --- a/src/datadogV2/model/model_hourly_usage_pagination.rs +++ b/src/datadogV2/model/model_hourly_usage_pagination.rs @@ -24,11 +24,12 @@ impl HourlyUsagePagination { } } - pub fn with_next_record_id(&mut self, value: Option) -> &mut Self { + pub fn next_record_id(&mut self, value: Option) -> &mut Self { self.next_record_id = Some(value); self } } + impl Default for HourlyUsagePagination { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_hourly_usage_response.rs b/src/datadogV2/model/model_hourly_usage_response.rs index 42cc1c4d0..cd6ec837d 100644 --- a/src/datadogV2/model/model_hourly_usage_response.rs +++ b/src/datadogV2/model/model_hourly_usage_response.rs @@ -24,16 +24,17 @@ impl HourlyUsageResponse { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::HourlyUsageMetadata) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::HourlyUsageMetadata) -> &mut Self { self.meta = Some(value); self } } + impl Default for HourlyUsageResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_http_log_error.rs b/src/datadogV2/model/model_http_log_error.rs index 1bcae0ddd..42fa8ae1c 100644 --- a/src/datadogV2/model/model_http_log_error.rs +++ b/src/datadogV2/model/model_http_log_error.rs @@ -28,21 +28,22 @@ impl HTTPLogError { } } - pub fn with_detail(&mut self, value: String) -> &mut Self { + pub fn detail(&mut self, value: String) -> &mut Self { self.detail = Some(value); self } - pub fn with_status(&mut self, value: String) -> &mut Self { + pub fn status(&mut self, value: String) -> &mut Self { self.status = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } } + impl Default for HTTPLogError { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_http_log_errors.rs b/src/datadogV2/model/model_http_log_errors.rs index da8d0346e..2e311e3b8 100644 --- a/src/datadogV2/model/model_http_log_errors.rs +++ b/src/datadogV2/model/model_http_log_errors.rs @@ -18,11 +18,12 @@ impl HTTPLogErrors { HTTPLogErrors { errors: None } } - pub fn with_errors(&mut self, value: Vec) -> &mut Self { + pub fn errors(&mut self, value: Vec) -> &mut Self { self.errors = Some(value); self } } + impl Default for HTTPLogErrors { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_http_log_item.rs b/src/datadogV2/model/model_http_log_item.rs index 2d481c6fa..f6d16ec42 100644 --- a/src/datadogV2/model/model_http_log_item.rs +++ b/src/datadogV2/model/model_http_log_item.rs @@ -45,22 +45,22 @@ impl HTTPLogItem { } } - pub fn with_ddsource(&mut self, value: String) -> &mut Self { + pub fn ddsource(&mut self, value: String) -> &mut Self { self.ddsource = Some(value); self } - pub fn with_ddtags(&mut self, value: String) -> &mut Self { + pub fn ddtags(&mut self, value: String) -> &mut Self { self.ddtags = Some(value); self } - pub fn with_hostname(&mut self, value: String) -> &mut Self { + pub fn hostname(&mut self, value: String) -> &mut Self { self.hostname = Some(value); self } - pub fn with_service(&mut self, value: String) -> &mut Self { + pub fn service(&mut self, value: String) -> &mut Self { self.service = Some(value); self } diff --git a/src/datadogV2/model/model_httpci_app_error.rs b/src/datadogV2/model/model_httpci_app_error.rs index 6c905a46c..a2118f8cc 100644 --- a/src/datadogV2/model/model_httpci_app_error.rs +++ b/src/datadogV2/model/model_httpci_app_error.rs @@ -28,21 +28,22 @@ impl HTTPCIAppError { } } - pub fn with_detail(&mut self, value: String) -> &mut Self { + pub fn detail(&mut self, value: String) -> &mut Self { self.detail = Some(value); self } - pub fn with_status(&mut self, value: String) -> &mut Self { + pub fn status(&mut self, value: String) -> &mut Self { self.status = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } } + impl Default for HTTPCIAppError { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_httpci_app_errors.rs b/src/datadogV2/model/model_httpci_app_errors.rs index 3e4c8904f..5852e8542 100644 --- a/src/datadogV2/model/model_httpci_app_errors.rs +++ b/src/datadogV2/model/model_httpci_app_errors.rs @@ -18,14 +18,12 @@ impl HTTPCIAppErrors { HTTPCIAppErrors { errors: None } } - pub fn with_errors( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn errors(&mut self, value: Vec) -> &mut Self { self.errors = Some(value); self } } + impl Default for HTTPCIAppErrors { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_id_p_metadata_form_data.rs b/src/datadogV2/model/model_id_p_metadata_form_data.rs index efa91875c..ab205fe01 100644 --- a/src/datadogV2/model/model_id_p_metadata_form_data.rs +++ b/src/datadogV2/model/model_id_p_metadata_form_data.rs @@ -18,11 +18,12 @@ impl IdPMetadataFormData { IdPMetadataFormData { idp_file: None } } - pub fn with_idp_file(&mut self, value: Vec) -> &mut Self { + pub fn idp_file(&mut self, value: Vec) -> &mut Self { self.idp_file = Some(value); self } } + impl Default for IdPMetadataFormData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_attachment_attributes.rs b/src/datadogV2/model/model_incident_attachment_attributes.rs index cbb6431a0..6d42055e9 100644 --- a/src/datadogV2/model/model_incident_attachment_attributes.rs +++ b/src/datadogV2/model/model_incident_attachment_attributes.rs @@ -8,7 +8,9 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum IncidentAttachmentAttributes { IncidentAttachmentPostmortemAttributes( - crate::datadogV2::model::IncidentAttachmentPostmortemAttributes, + Box, + ), + IncidentAttachmentLinkAttributes( + Box, ), - IncidentAttachmentLinkAttributes(crate::datadogV2::model::IncidentAttachmentLinkAttributes), } diff --git a/src/datadogV2/model/model_incident_attachment_link_attributes.rs b/src/datadogV2/model/model_incident_attachment_link_attributes.rs index bed2f11da..c0dc6f864 100644 --- a/src/datadogV2/model/model_incident_attachment_link_attributes.rs +++ b/src/datadogV2/model/model_incident_attachment_link_attributes.rs @@ -31,7 +31,7 @@ impl IncidentAttachmentLinkAttributes { } } - pub fn with_modified(&mut self, value: String) -> &mut Self { + pub fn modified(&mut self, value: String) -> &mut Self { self.modified = Some(value); self } diff --git a/src/datadogV2/model/model_incident_attachment_relationships.rs b/src/datadogV2/model/model_incident_attachment_relationships.rs index dc2f9b131..149af271e 100644 --- a/src/datadogV2/model/model_incident_attachment_relationships.rs +++ b/src/datadogV2/model/model_incident_attachment_relationships.rs @@ -20,7 +20,7 @@ impl IncidentAttachmentRelationships { } } - pub fn with_last_modified_by_user( + pub fn last_modified_by_user( &mut self, value: crate::datadogV2::model::RelationshipToUser, ) -> &mut Self { @@ -28,6 +28,7 @@ impl IncidentAttachmentRelationships { self } } + impl Default for IncidentAttachmentRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_attachment_update_attributes.rs b/src/datadogV2/model/model_incident_attachment_update_attributes.rs index ff61ec8cd..45e8eb4ba 100644 --- a/src/datadogV2/model/model_incident_attachment_update_attributes.rs +++ b/src/datadogV2/model/model_incident_attachment_update_attributes.rs @@ -8,7 +8,9 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum IncidentAttachmentUpdateAttributes { IncidentAttachmentPostmortemAttributes( - crate::datadogV2::model::IncidentAttachmentPostmortemAttributes, + Box, + ), + IncidentAttachmentLinkAttributes( + Box, ), - IncidentAttachmentLinkAttributes(crate::datadogV2::model::IncidentAttachmentLinkAttributes), } diff --git a/src/datadogV2/model/model_incident_attachment_update_data.rs b/src/datadogV2/model/model_incident_attachment_update_data.rs index 988c2b073..a892b6b6e 100644 --- a/src/datadogV2/model/model_incident_attachment_update_data.rs +++ b/src/datadogV2/model/model_incident_attachment_update_data.rs @@ -30,7 +30,7 @@ impl IncidentAttachmentUpdateData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::IncidentAttachmentUpdateAttributes, ) -> &mut Self { @@ -38,7 +38,7 @@ impl IncidentAttachmentUpdateData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } diff --git a/src/datadogV2/model/model_incident_attachment_update_response.rs b/src/datadogV2/model/model_incident_attachment_update_response.rs index 140e6121a..f072c7327 100644 --- a/src/datadogV2/model/model_incident_attachment_update_response.rs +++ b/src/datadogV2/model/model_incident_attachment_update_response.rs @@ -27,7 +27,7 @@ impl IncidentAttachmentUpdateResponse { } } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_attachments_response.rs b/src/datadogV2/model/model_incident_attachments_response.rs index 8525d0d4d..ea4070cb2 100644 --- a/src/datadogV2/model/model_incident_attachments_response.rs +++ b/src/datadogV2/model/model_incident_attachments_response.rs @@ -26,7 +26,7 @@ impl IncidentAttachmentsResponse { } } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_attachments_response_included_item.rs b/src/datadogV2/model/model_incident_attachments_response_included_item.rs index d6b7eb8b9..2b6f5d5fb 100644 --- a/src/datadogV2/model/model_incident_attachments_response_included_item.rs +++ b/src/datadogV2/model/model_incident_attachments_response_included_item.rs @@ -7,5 +7,5 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum IncidentAttachmentsResponseIncludedItem { - User(crate::datadogV2::model::User), + User(Box), } diff --git a/src/datadogV2/model/model_incident_create_attributes.rs b/src/datadogV2/model/model_incident_create_attributes.rs index e4ecebab8..8425b045e 100644 --- a/src/datadogV2/model/model_incident_create_attributes.rs +++ b/src/datadogV2/model/model_incident_create_attributes.rs @@ -42,12 +42,12 @@ impl IncidentCreateAttributes { } } - pub fn with_customer_impact_scope(&mut self, value: String) -> &mut Self { + pub fn customer_impact_scope(&mut self, value: String) -> &mut Self { self.customer_impact_scope = Some(value); self } - pub fn with_fields( + pub fn fields( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -55,7 +55,7 @@ impl IncidentCreateAttributes { self } - pub fn with_initial_cells( + pub fn initial_cells( &mut self, value: Vec, ) -> &mut Self { @@ -63,7 +63,7 @@ impl IncidentCreateAttributes { self } - pub fn with_notification_handles( + pub fn notification_handles( &mut self, value: Vec, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_create_data.rs b/src/datadogV2/model/model_incident_create_data.rs index 5e427e916..18405b179 100644 --- a/src/datadogV2/model/model_incident_create_data.rs +++ b/src/datadogV2/model/model_incident_create_data.rs @@ -31,7 +31,7 @@ impl IncidentCreateData { } } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::IncidentCreateRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_field_attributes.rs b/src/datadogV2/model/model_incident_field_attributes.rs index 04c156de6..5371dde1b 100644 --- a/src/datadogV2/model/model_incident_field_attributes.rs +++ b/src/datadogV2/model/model_incident_field_attributes.rs @@ -7,8 +7,10 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum IncidentFieldAttributes { - IncidentFieldAttributesSingleValue(crate::datadogV2::model::IncidentFieldAttributesSingleValue), + IncidentFieldAttributesSingleValue( + Box, + ), IncidentFieldAttributesMultipleValue( - crate::datadogV2::model::IncidentFieldAttributesMultipleValue, + Box, ), } diff --git a/src/datadogV2/model/model_incident_field_attributes_multiple_value.rs b/src/datadogV2/model/model_incident_field_attributes_multiple_value.rs index 4f0926eb8..c20cf7f0b 100644 --- a/src/datadogV2/model/model_incident_field_attributes_multiple_value.rs +++ b/src/datadogV2/model/model_incident_field_attributes_multiple_value.rs @@ -24,7 +24,7 @@ impl IncidentFieldAttributesMultipleValue { } } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::IncidentFieldAttributesValueType, ) -> &mut Self { @@ -32,11 +32,12 @@ impl IncidentFieldAttributesMultipleValue { self } - pub fn with_value(&mut self, value: Option>) -> &mut Self { + pub fn value(&mut self, value: Option>) -> &mut Self { self.value = Some(value); self } } + impl Default for IncidentFieldAttributesMultipleValue { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_field_attributes_single_value.rs b/src/datadogV2/model/model_incident_field_attributes_single_value.rs index 56c6c220c..3b26022a9 100644 --- a/src/datadogV2/model/model_incident_field_attributes_single_value.rs +++ b/src/datadogV2/model/model_incident_field_attributes_single_value.rs @@ -24,7 +24,7 @@ impl IncidentFieldAttributesSingleValue { } } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::IncidentFieldAttributesSingleValueType, ) -> &mut Self { @@ -32,11 +32,12 @@ impl IncidentFieldAttributesSingleValue { self } - pub fn with_value(&mut self, value: Option) -> &mut Self { + pub fn value(&mut self, value: Option) -> &mut Self { self.value = Some(value); self } } + impl Default for IncidentFieldAttributesSingleValue { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_integration_metadata_attributes.rs b/src/datadogV2/model/model_incident_integration_metadata_attributes.rs index 66ef23030..e49daf0af 100644 --- a/src/datadogV2/model/model_incident_integration_metadata_attributes.rs +++ b/src/datadogV2/model/model_incident_integration_metadata_attributes.rs @@ -46,22 +46,22 @@ impl IncidentIntegrationMetadataAttributes { } } - pub fn with_created(&mut self, value: String) -> &mut Self { + pub fn created(&mut self, value: String) -> &mut Self { self.created = Some(value); self } - pub fn with_incident_id(&mut self, value: String) -> &mut Self { + pub fn incident_id(&mut self, value: String) -> &mut Self { self.incident_id = Some(value); self } - pub fn with_modified(&mut self, value: String) -> &mut Self { + pub fn modified(&mut self, value: String) -> &mut Self { self.modified = Some(value); self } - pub fn with_status(&mut self, value: i32) -> &mut Self { + pub fn status(&mut self, value: i32) -> &mut Self { self.status = Some(value); self } diff --git a/src/datadogV2/model/model_incident_integration_metadata_list_response.rs b/src/datadogV2/model/model_incident_integration_metadata_list_response.rs index b1655b703..92ae2dd12 100644 --- a/src/datadogV2/model/model_incident_integration_metadata_list_response.rs +++ b/src/datadogV2/model/model_incident_integration_metadata_list_response.rs @@ -31,7 +31,7 @@ impl IncidentIntegrationMetadataListResponse { } } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { @@ -39,7 +39,7 @@ impl IncidentIntegrationMetadataListResponse { self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::IncidentResponseMeta) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::IncidentResponseMeta) -> &mut Self { self.meta = Some(value); self } diff --git a/src/datadogV2/model/model_incident_integration_metadata_metadata.rs b/src/datadogV2/model/model_incident_integration_metadata_metadata.rs index 6af56b6c3..a2e33623d 100644 --- a/src/datadogV2/model/model_incident_integration_metadata_metadata.rs +++ b/src/datadogV2/model/model_incident_integration_metadata_metadata.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum IncidentIntegrationMetadataMetadata { - SlackIntegrationMetadata(crate::datadogV2::model::SlackIntegrationMetadata), - JiraIntegrationMetadata(crate::datadogV2::model::JiraIntegrationMetadata), + SlackIntegrationMetadata(Box), + JiraIntegrationMetadata(Box), } diff --git a/src/datadogV2/model/model_incident_integration_metadata_response.rs b/src/datadogV2/model/model_incident_integration_metadata_response.rs index dab11dc0e..051177f24 100644 --- a/src/datadogV2/model/model_incident_integration_metadata_response.rs +++ b/src/datadogV2/model/model_incident_integration_metadata_response.rs @@ -27,7 +27,7 @@ impl IncidentIntegrationMetadataResponse { } } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_integration_metadata_response_data.rs b/src/datadogV2/model/model_incident_integration_metadata_response_data.rs index 611692eca..050312f2b 100644 --- a/src/datadogV2/model/model_incident_integration_metadata_response_data.rs +++ b/src/datadogV2/model/model_incident_integration_metadata_response_data.rs @@ -35,7 +35,7 @@ impl IncidentIntegrationMetadataResponseData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::IncidentIntegrationMetadataAttributes, ) -> &mut Self { @@ -43,7 +43,7 @@ impl IncidentIntegrationMetadataResponseData { self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::IncidentIntegrationRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_integration_metadata_response_included_item.rs b/src/datadogV2/model/model_incident_integration_metadata_response_included_item.rs index 517037343..b0876bab3 100644 --- a/src/datadogV2/model/model_incident_integration_metadata_response_included_item.rs +++ b/src/datadogV2/model/model_incident_integration_metadata_response_included_item.rs @@ -7,5 +7,5 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum IncidentIntegrationMetadataResponseIncludedItem { - User(crate::datadogV2::model::User), + User(Box), } diff --git a/src/datadogV2/model/model_incident_integration_relationships.rs b/src/datadogV2/model/model_incident_integration_relationships.rs index 1a3292e8f..c81b0e80a 100644 --- a/src/datadogV2/model/model_incident_integration_relationships.rs +++ b/src/datadogV2/model/model_incident_integration_relationships.rs @@ -24,7 +24,7 @@ impl IncidentIntegrationRelationships { } } - pub fn with_created_by_user( + pub fn created_by_user( &mut self, value: crate::datadogV2::model::RelationshipToUser, ) -> &mut Self { @@ -32,7 +32,7 @@ impl IncidentIntegrationRelationships { self } - pub fn with_last_modified_by_user( + pub fn last_modified_by_user( &mut self, value: crate::datadogV2::model::RelationshipToUser, ) -> &mut Self { @@ -40,6 +40,7 @@ impl IncidentIntegrationRelationships { self } } + impl Default for IncidentIntegrationRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_non_datadog_creator.rs b/src/datadogV2/model/model_incident_non_datadog_creator.rs index ca08c5da5..36535d074 100644 --- a/src/datadogV2/model/model_incident_non_datadog_creator.rs +++ b/src/datadogV2/model/model_incident_non_datadog_creator.rs @@ -24,16 +24,17 @@ impl IncidentNonDatadogCreator { } } - pub fn with_image_48_px(&mut self, value: String) -> &mut Self { + pub fn image_48_px(&mut self, value: String) -> &mut Self { self.image_48_px = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } } + impl Default for IncidentNonDatadogCreator { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_notification_handle.rs b/src/datadogV2/model/model_incident_notification_handle.rs index c5b63e58a..b3abab04b 100644 --- a/src/datadogV2/model/model_incident_notification_handle.rs +++ b/src/datadogV2/model/model_incident_notification_handle.rs @@ -24,16 +24,17 @@ impl IncidentNotificationHandle { } } - pub fn with_display_name(&mut self, value: String) -> &mut Self { + pub fn display_name(&mut self, value: String) -> &mut Self { self.display_name = Some(value); self } - pub fn with_handle(&mut self, value: String) -> &mut Self { + pub fn handle(&mut self, value: String) -> &mut Self { self.handle = Some(value); self } } + impl Default for IncidentNotificationHandle { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_response.rs b/src/datadogV2/model/model_incident_response.rs index 8a79739c0..a8d1b8caa 100644 --- a/src/datadogV2/model/model_incident_response.rs +++ b/src/datadogV2/model/model_incident_response.rs @@ -24,7 +24,7 @@ impl IncidentResponse { } } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_response_attributes.rs b/src/datadogV2/model/model_incident_response_attributes.rs index 8b1062d9a..55cc1f24a 100644 --- a/src/datadogV2/model/model_incident_response_attributes.rs +++ b/src/datadogV2/model/model_incident_response_attributes.rs @@ -153,52 +153,52 @@ impl IncidentResponseAttributes { } } - pub fn with_archived(&mut self, value: Option) -> &mut Self { + pub fn archived(&mut self, value: Option) -> &mut Self { self.archived = Some(value); self } - pub fn with_case_id(&mut self, value: Option) -> &mut Self { + pub fn case_id(&mut self, value: Option) -> &mut Self { self.case_id = Some(value); self } - pub fn with_created(&mut self, value: String) -> &mut Self { + pub fn created(&mut self, value: String) -> &mut Self { self.created = Some(value); self } - pub fn with_customer_impact_duration(&mut self, value: i64) -> &mut Self { + pub fn customer_impact_duration(&mut self, value: i64) -> &mut Self { self.customer_impact_duration = Some(value); self } - pub fn with_customer_impact_end(&mut self, value: Option) -> &mut Self { + pub fn customer_impact_end(&mut self, value: Option) -> &mut Self { self.customer_impact_end = Some(value); self } - pub fn with_customer_impact_scope(&mut self, value: Option) -> &mut Self { + pub fn customer_impact_scope(&mut self, value: Option) -> &mut Self { self.customer_impact_scope = Some(value); self } - pub fn with_customer_impact_start(&mut self, value: Option) -> &mut Self { + pub fn customer_impact_start(&mut self, value: Option) -> &mut Self { self.customer_impact_start = Some(value); self } - pub fn with_customer_impacted(&mut self, value: bool) -> &mut Self { + pub fn customer_impacted(&mut self, value: bool) -> &mut Self { self.customer_impacted = Some(value); self } - pub fn with_detected(&mut self, value: Option) -> &mut Self { + pub fn detected(&mut self, value: Option) -> &mut Self { self.detected = Some(value); self } - pub fn with_fields( + pub fn fields( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -206,12 +206,12 @@ impl IncidentResponseAttributes { self } - pub fn with_modified(&mut self, value: String) -> &mut Self { + pub fn modified(&mut self, value: String) -> &mut Self { self.modified = Some(value); self } - pub fn with_non_datadog_creator( + pub fn non_datadog_creator( &mut self, value: Option, ) -> &mut Self { @@ -219,7 +219,7 @@ impl IncidentResponseAttributes { self } - pub fn with_notification_handles( + pub fn notification_handles( &mut self, value: Option>, ) -> &mut Self { @@ -227,47 +227,47 @@ impl IncidentResponseAttributes { self } - pub fn with_public_id(&mut self, value: i64) -> &mut Self { + pub fn public_id(&mut self, value: i64) -> &mut Self { self.public_id = Some(value); self } - pub fn with_resolved(&mut self, value: Option) -> &mut Self { + pub fn resolved(&mut self, value: Option) -> &mut Self { self.resolved = Some(value); self } - pub fn with_severity(&mut self, value: crate::datadogV2::model::IncidentSeverity) -> &mut Self { + pub fn severity(&mut self, value: crate::datadogV2::model::IncidentSeverity) -> &mut Self { self.severity = Some(value); self } - pub fn with_state(&mut self, value: Option) -> &mut Self { + pub fn state(&mut self, value: Option) -> &mut Self { self.state = Some(value); self } - pub fn with_time_to_detect(&mut self, value: i64) -> &mut Self { + pub fn time_to_detect(&mut self, value: i64) -> &mut Self { self.time_to_detect = Some(value); self } - pub fn with_time_to_internal_response(&mut self, value: i64) -> &mut Self { + pub fn time_to_internal_response(&mut self, value: i64) -> &mut Self { self.time_to_internal_response = Some(value); self } - pub fn with_time_to_repair(&mut self, value: i64) -> &mut Self { + pub fn time_to_repair(&mut self, value: i64) -> &mut Self { self.time_to_repair = Some(value); self } - pub fn with_time_to_resolve(&mut self, value: i64) -> &mut Self { + pub fn time_to_resolve(&mut self, value: i64) -> &mut Self { self.time_to_resolve = Some(value); self } - pub fn with_visibility(&mut self, value: Option) -> &mut Self { + pub fn visibility(&mut self, value: Option) -> &mut Self { self.visibility = Some(value); self } diff --git a/src/datadogV2/model/model_incident_response_data.rs b/src/datadogV2/model/model_incident_response_data.rs index 0f78cc13f..f5567069c 100644 --- a/src/datadogV2/model/model_incident_response_data.rs +++ b/src/datadogV2/model/model_incident_response_data.rs @@ -32,7 +32,7 @@ impl IncidentResponseData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::IncidentResponseAttributes, ) -> &mut Self { @@ -40,7 +40,7 @@ impl IncidentResponseData { self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::IncidentResponseRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_response_included_item.rs b/src/datadogV2/model/model_incident_response_included_item.rs index 54b679c2c..d8548196c 100644 --- a/src/datadogV2/model/model_incident_response_included_item.rs +++ b/src/datadogV2/model/model_incident_response_included_item.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum IncidentResponseIncludedItem { - User(crate::datadogV2::model::User), - IncidentAttachmentData(crate::datadogV2::model::IncidentAttachmentData), + User(Box), + IncidentAttachmentData(Box), } diff --git a/src/datadogV2/model/model_incident_response_meta.rs b/src/datadogV2/model/model_incident_response_meta.rs index 11ba5528d..b1fc09e3c 100644 --- a/src/datadogV2/model/model_incident_response_meta.rs +++ b/src/datadogV2/model/model_incident_response_meta.rs @@ -18,7 +18,7 @@ impl IncidentResponseMeta { IncidentResponseMeta { pagination: None } } - pub fn with_pagination( + pub fn pagination( &mut self, value: crate::datadogV2::model::IncidentResponseMetaPagination, ) -> &mut Self { @@ -26,6 +26,7 @@ impl IncidentResponseMeta { self } } + impl Default for IncidentResponseMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_response_meta_pagination.rs b/src/datadogV2/model/model_incident_response_meta_pagination.rs index 58dffbcf4..31f7236a1 100644 --- a/src/datadogV2/model/model_incident_response_meta_pagination.rs +++ b/src/datadogV2/model/model_incident_response_meta_pagination.rs @@ -28,21 +28,22 @@ impl IncidentResponseMetaPagination { } } - pub fn with_next_offset(&mut self, value: i64) -> &mut Self { + pub fn next_offset(&mut self, value: i64) -> &mut Self { self.next_offset = Some(value); self } - pub fn with_offset(&mut self, value: i64) -> &mut Self { + pub fn offset(&mut self, value: i64) -> &mut Self { self.offset = Some(value); self } - pub fn with_size(&mut self, value: i64) -> &mut Self { + pub fn size(&mut self, value: i64) -> &mut Self { self.size = Some(value); self } } + impl Default for IncidentResponseMetaPagination { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_response_relationships.rs b/src/datadogV2/model/model_incident_response_relationships.rs index 92cbfe50b..9414b3fda 100644 --- a/src/datadogV2/model/model_incident_response_relationships.rs +++ b/src/datadogV2/model/model_incident_response_relationships.rs @@ -53,7 +53,7 @@ impl IncidentResponseRelationships { } } - pub fn with_attachments( + pub fn attachments( &mut self, value: crate::datadogV2::model::RelationshipToIncidentAttachment, ) -> &mut Self { @@ -61,7 +61,7 @@ impl IncidentResponseRelationships { self } - pub fn with_commander_user( + pub fn commander_user( &mut self, value: Option, ) -> &mut Self { @@ -69,7 +69,7 @@ impl IncidentResponseRelationships { self } - pub fn with_created_by_user( + pub fn created_by_user( &mut self, value: crate::datadogV2::model::RelationshipToUser, ) -> &mut Self { @@ -77,7 +77,7 @@ impl IncidentResponseRelationships { self } - pub fn with_impacts( + pub fn impacts( &mut self, value: crate::datadogV2::model::RelationshipToIncidentImpacts, ) -> &mut Self { @@ -85,7 +85,7 @@ impl IncidentResponseRelationships { self } - pub fn with_integrations( + pub fn integrations( &mut self, value: crate::datadogV2::model::RelationshipToIncidentIntegrationMetadatas, ) -> &mut Self { @@ -93,7 +93,7 @@ impl IncidentResponseRelationships { self } - pub fn with_last_modified_by_user( + pub fn last_modified_by_user( &mut self, value: crate::datadogV2::model::RelationshipToUser, ) -> &mut Self { @@ -101,7 +101,7 @@ impl IncidentResponseRelationships { self } - pub fn with_responders( + pub fn responders( &mut self, value: crate::datadogV2::model::RelationshipToIncidentResponders, ) -> &mut Self { @@ -109,7 +109,7 @@ impl IncidentResponseRelationships { self } - pub fn with_user_defined_fields( + pub fn user_defined_fields( &mut self, value: crate::datadogV2::model::RelationshipToIncidentUserDefinedFields, ) -> &mut Self { @@ -117,6 +117,7 @@ impl IncidentResponseRelationships { self } } + impl Default for IncidentResponseRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_search_response.rs b/src/datadogV2/model/model_incident_search_response.rs index 0950cb9b6..10b73fe4a 100644 --- a/src/datadogV2/model/model_incident_search_response.rs +++ b/src/datadogV2/model/model_incident_search_response.rs @@ -30,7 +30,7 @@ impl IncidentSearchResponse { } } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { @@ -38,7 +38,7 @@ impl IncidentSearchResponse { self } - pub fn with_meta( + pub fn meta( &mut self, value: crate::datadogV2::model::IncidentSearchResponseMeta, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_search_response_data.rs b/src/datadogV2/model/model_incident_search_response_data.rs index 13df8b3db..9d513b03e 100644 --- a/src/datadogV2/model/model_incident_search_response_data.rs +++ b/src/datadogV2/model/model_incident_search_response_data.rs @@ -24,7 +24,7 @@ impl IncidentSearchResponseData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::IncidentSearchResponseAttributes, ) -> &mut Self { @@ -32,7 +32,7 @@ impl IncidentSearchResponseData { self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::IncidentSearchResultsType, ) -> &mut Self { @@ -40,6 +40,7 @@ impl IncidentSearchResponseData { self } } + impl Default for IncidentSearchResponseData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_search_response_facets_data.rs b/src/datadogV2/model/model_incident_search_response_facets_data.rs index 389ccfb1c..9c0133d50 100644 --- a/src/datadogV2/model/model_incident_search_response_facets_data.rs +++ b/src/datadogV2/model/model_incident_search_response_facets_data.rs @@ -62,7 +62,7 @@ impl IncidentSearchResponseFacetsData { } } - pub fn with_commander( + pub fn commander( &mut self, value: Vec, ) -> &mut Self { @@ -70,7 +70,7 @@ impl IncidentSearchResponseFacetsData { self } - pub fn with_created_by( + pub fn created_by( &mut self, value: Vec, ) -> &mut Self { @@ -78,7 +78,7 @@ impl IncidentSearchResponseFacetsData { self } - pub fn with_fields( + pub fn fields( &mut self, value: Vec, ) -> &mut Self { @@ -86,7 +86,7 @@ impl IncidentSearchResponseFacetsData { self } - pub fn with_impact( + pub fn impact( &mut self, value: Vec, ) -> &mut Self { @@ -94,7 +94,7 @@ impl IncidentSearchResponseFacetsData { self } - pub fn with_last_modified_by( + pub fn last_modified_by( &mut self, value: Vec, ) -> &mut Self { @@ -102,7 +102,7 @@ impl IncidentSearchResponseFacetsData { self } - pub fn with_postmortem( + pub fn postmortem( &mut self, value: Vec, ) -> &mut Self { @@ -110,7 +110,7 @@ impl IncidentSearchResponseFacetsData { self } - pub fn with_responder( + pub fn responder( &mut self, value: Vec, ) -> &mut Self { @@ -118,7 +118,7 @@ impl IncidentSearchResponseFacetsData { self } - pub fn with_severity( + pub fn severity( &mut self, value: Vec, ) -> &mut Self { @@ -126,7 +126,7 @@ impl IncidentSearchResponseFacetsData { self } - pub fn with_state( + pub fn state( &mut self, value: Vec, ) -> &mut Self { @@ -134,7 +134,7 @@ impl IncidentSearchResponseFacetsData { self } - pub fn with_time_to_repair( + pub fn time_to_repair( &mut self, value: Vec, ) -> &mut Self { @@ -142,7 +142,7 @@ impl IncidentSearchResponseFacetsData { self } - pub fn with_time_to_resolve( + pub fn time_to_resolve( &mut self, value: Vec, ) -> &mut Self { @@ -150,6 +150,7 @@ impl IncidentSearchResponseFacetsData { self } } + impl Default for IncidentSearchResponseFacetsData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_search_response_field_facet_data.rs b/src/datadogV2/model/model_incident_search_response_field_facet_data.rs index f0e334723..c9d3b5230 100644 --- a/src/datadogV2/model/model_incident_search_response_field_facet_data.rs +++ b/src/datadogV2/model/model_incident_search_response_field_facet_data.rs @@ -24,16 +24,17 @@ impl IncidentSearchResponseFieldFacetData { } } - pub fn with_count(&mut self, value: i32) -> &mut Self { + pub fn count(&mut self, value: i32) -> &mut Self { self.count = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } } + impl Default for IncidentSearchResponseFieldFacetData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_search_response_meta.rs b/src/datadogV2/model/model_incident_search_response_meta.rs index 2b0c21b81..b55b7efb0 100644 --- a/src/datadogV2/model/model_incident_search_response_meta.rs +++ b/src/datadogV2/model/model_incident_search_response_meta.rs @@ -18,7 +18,7 @@ impl IncidentSearchResponseMeta { IncidentSearchResponseMeta { pagination: None } } - pub fn with_pagination( + pub fn pagination( &mut self, value: crate::datadogV2::model::IncidentResponseMetaPagination, ) -> &mut Self { @@ -26,6 +26,7 @@ impl IncidentSearchResponseMeta { self } } + impl Default for IncidentSearchResponseMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_search_response_numeric_facet_data_aggregates.rs b/src/datadogV2/model/model_incident_search_response_numeric_facet_data_aggregates.rs index fda3cb12c..a561867fa 100644 --- a/src/datadogV2/model/model_incident_search_response_numeric_facet_data_aggregates.rs +++ b/src/datadogV2/model/model_incident_search_response_numeric_facet_data_aggregates.rs @@ -24,16 +24,17 @@ impl IncidentSearchResponseNumericFacetDataAggregates { } } - pub fn with_max(&mut self, value: Option) -> &mut Self { + pub fn max(&mut self, value: Option) -> &mut Self { self.max = Some(value); self } - pub fn with_min(&mut self, value: Option) -> &mut Self { + pub fn min(&mut self, value: Option) -> &mut Self { self.min = Some(value); self } } + impl Default for IncidentSearchResponseNumericFacetDataAggregates { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_search_response_property_field_facet_data.rs b/src/datadogV2/model/model_incident_search_response_property_field_facet_data.rs index 0e047e6e0..99f2e83d0 100644 --- a/src/datadogV2/model/model_incident_search_response_property_field_facet_data.rs +++ b/src/datadogV2/model/model_incident_search_response_property_field_facet_data.rs @@ -32,7 +32,7 @@ impl IncidentSearchResponsePropertyFieldFacetData { } } - pub fn with_aggregates( + pub fn aggregates( &mut self, value: crate::datadogV2::model::IncidentSearchResponseNumericFacetDataAggregates, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_search_response_user_facet_data.rs b/src/datadogV2/model/model_incident_search_response_user_facet_data.rs index 3e60cf536..18a2d2e8e 100644 --- a/src/datadogV2/model/model_incident_search_response_user_facet_data.rs +++ b/src/datadogV2/model/model_incident_search_response_user_facet_data.rs @@ -36,31 +36,32 @@ impl IncidentSearchResponseUserFacetData { } } - pub fn with_count(&mut self, value: i32) -> &mut Self { + pub fn count(&mut self, value: i32) -> &mut Self { self.count = Some(value); self } - pub fn with_email(&mut self, value: String) -> &mut Self { + pub fn email(&mut self, value: String) -> &mut Self { self.email = Some(value); self } - pub fn with_handle(&mut self, value: String) -> &mut Self { + pub fn handle(&mut self, value: String) -> &mut Self { self.handle = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_uuid(&mut self, value: String) -> &mut Self { + pub fn uuid(&mut self, value: String) -> &mut Self { self.uuid = Some(value); self } } + impl Default for IncidentSearchResponseUserFacetData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_service_create_data.rs b/src/datadogV2/model/model_incident_service_create_data.rs index 3cb12b96d..0f1ddf255 100644 --- a/src/datadogV2/model/model_incident_service_create_data.rs +++ b/src/datadogV2/model/model_incident_service_create_data.rs @@ -28,7 +28,7 @@ impl IncidentServiceCreateData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::IncidentServiceCreateAttributes, ) -> &mut Self { @@ -36,7 +36,7 @@ impl IncidentServiceCreateData { self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::IncidentServiceRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_service_included_items.rs b/src/datadogV2/model/model_incident_service_included_items.rs index 22496f240..234742abb 100644 --- a/src/datadogV2/model/model_incident_service_included_items.rs +++ b/src/datadogV2/model/model_incident_service_included_items.rs @@ -7,5 +7,5 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum IncidentServiceIncludedItems { - User(crate::datadogV2::model::User), + User(Box), } diff --git a/src/datadogV2/model/model_incident_service_relationships.rs b/src/datadogV2/model/model_incident_service_relationships.rs index b19ddcbae..3ebebee02 100644 --- a/src/datadogV2/model/model_incident_service_relationships.rs +++ b/src/datadogV2/model/model_incident_service_relationships.rs @@ -24,15 +24,12 @@ impl IncidentServiceRelationships { } } - pub fn with_created_by( - &mut self, - value: crate::datadogV2::model::RelationshipToUser, - ) -> &mut Self { + pub fn created_by(&mut self, value: crate::datadogV2::model::RelationshipToUser) -> &mut Self { self.created_by = Some(value); self } - pub fn with_last_modified_by( + pub fn last_modified_by( &mut self, value: crate::datadogV2::model::RelationshipToUser, ) -> &mut Self { @@ -40,6 +37,7 @@ impl IncidentServiceRelationships { self } } + impl Default for IncidentServiceRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_service_response.rs b/src/datadogV2/model/model_incident_service_response.rs index ffeb7b822..b63991b89 100644 --- a/src/datadogV2/model/model_incident_service_response.rs +++ b/src/datadogV2/model/model_incident_service_response.rs @@ -26,7 +26,7 @@ impl IncidentServiceResponse { } } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_service_response_attributes.rs b/src/datadogV2/model/model_incident_service_response_attributes.rs index 14ba57a09..ccb6ba923 100644 --- a/src/datadogV2/model/model_incident_service_response_attributes.rs +++ b/src/datadogV2/model/model_incident_service_response_attributes.rs @@ -28,21 +28,22 @@ impl IncidentServiceResponseAttributes { } } - pub fn with_created(&mut self, value: String) -> &mut Self { + pub fn created(&mut self, value: String) -> &mut Self { self.created = Some(value); self } - pub fn with_modified(&mut self, value: String) -> &mut Self { + pub fn modified(&mut self, value: String) -> &mut Self { self.modified = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } } + impl Default for IncidentServiceResponseAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_service_response_data.rs b/src/datadogV2/model/model_incident_service_response_data.rs index d0ba92046..7eab5ced1 100644 --- a/src/datadogV2/model/model_incident_service_response_data.rs +++ b/src/datadogV2/model/model_incident_service_response_data.rs @@ -35,7 +35,7 @@ impl IncidentServiceResponseData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::IncidentServiceResponseAttributes, ) -> &mut Self { @@ -43,7 +43,7 @@ impl IncidentServiceResponseData { self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::IncidentServiceRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_service_update_data.rs b/src/datadogV2/model/model_incident_service_update_data.rs index 3eb93723d..cf423e109 100644 --- a/src/datadogV2/model/model_incident_service_update_data.rs +++ b/src/datadogV2/model/model_incident_service_update_data.rs @@ -32,7 +32,7 @@ impl IncidentServiceUpdateData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::IncidentServiceUpdateAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl IncidentServiceUpdateData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::IncidentServiceRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_services_response.rs b/src/datadogV2/model/model_incident_services_response.rs index aeace4753..33765540c 100644 --- a/src/datadogV2/model/model_incident_services_response.rs +++ b/src/datadogV2/model/model_incident_services_response.rs @@ -30,7 +30,7 @@ impl IncidentServicesResponse { } } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { @@ -38,7 +38,7 @@ impl IncidentServicesResponse { self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::IncidentResponseMeta) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::IncidentResponseMeta) -> &mut Self { self.meta = Some(value); self } diff --git a/src/datadogV2/model/model_incident_team_create_data.rs b/src/datadogV2/model/model_incident_team_create_data.rs index ae8855100..dcbaf24a6 100644 --- a/src/datadogV2/model/model_incident_team_create_data.rs +++ b/src/datadogV2/model/model_incident_team_create_data.rs @@ -28,7 +28,7 @@ impl IncidentTeamCreateData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::IncidentTeamCreateAttributes, ) -> &mut Self { @@ -36,7 +36,7 @@ impl IncidentTeamCreateData { self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::IncidentTeamRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_team_included_items.rs b/src/datadogV2/model/model_incident_team_included_items.rs index 5f5106e0c..e94d314e5 100644 --- a/src/datadogV2/model/model_incident_team_included_items.rs +++ b/src/datadogV2/model/model_incident_team_included_items.rs @@ -7,5 +7,5 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum IncidentTeamIncludedItems { - User(crate::datadogV2::model::User), + User(Box), } diff --git a/src/datadogV2/model/model_incident_team_relationships.rs b/src/datadogV2/model/model_incident_team_relationships.rs index 6c4a71135..6ec915ad4 100644 --- a/src/datadogV2/model/model_incident_team_relationships.rs +++ b/src/datadogV2/model/model_incident_team_relationships.rs @@ -24,15 +24,12 @@ impl IncidentTeamRelationships { } } - pub fn with_created_by( - &mut self, - value: crate::datadogV2::model::RelationshipToUser, - ) -> &mut Self { + pub fn created_by(&mut self, value: crate::datadogV2::model::RelationshipToUser) -> &mut Self { self.created_by = Some(value); self } - pub fn with_last_modified_by( + pub fn last_modified_by( &mut self, value: crate::datadogV2::model::RelationshipToUser, ) -> &mut Self { @@ -40,6 +37,7 @@ impl IncidentTeamRelationships { self } } + impl Default for IncidentTeamRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_team_response.rs b/src/datadogV2/model/model_incident_team_response.rs index 012170899..451936ac4 100644 --- a/src/datadogV2/model/model_incident_team_response.rs +++ b/src/datadogV2/model/model_incident_team_response.rs @@ -24,7 +24,7 @@ impl IncidentTeamResponse { } } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_team_response_attributes.rs b/src/datadogV2/model/model_incident_team_response_attributes.rs index adfc2150c..781e2ccc2 100644 --- a/src/datadogV2/model/model_incident_team_response_attributes.rs +++ b/src/datadogV2/model/model_incident_team_response_attributes.rs @@ -28,21 +28,22 @@ impl IncidentTeamResponseAttributes { } } - pub fn with_created(&mut self, value: String) -> &mut Self { + pub fn created(&mut self, value: String) -> &mut Self { self.created = Some(value); self } - pub fn with_modified(&mut self, value: String) -> &mut Self { + pub fn modified(&mut self, value: String) -> &mut Self { self.modified = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } } + impl Default for IncidentTeamResponseAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_team_response_data.rs b/src/datadogV2/model/model_incident_team_response_data.rs index 7932297ca..16a3755cf 100644 --- a/src/datadogV2/model/model_incident_team_response_data.rs +++ b/src/datadogV2/model/model_incident_team_response_data.rs @@ -32,7 +32,7 @@ impl IncidentTeamResponseData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::IncidentTeamResponseAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl IncidentTeamResponseData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::IncidentTeamRelationships, ) -> &mut Self { @@ -53,11 +53,12 @@ impl IncidentTeamResponseData { self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::IncidentTeamType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::IncidentTeamType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for IncidentTeamResponseData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_team_update_data.rs b/src/datadogV2/model/model_incident_team_update_data.rs index 75994706f..d6429da13 100644 --- a/src/datadogV2/model/model_incident_team_update_data.rs +++ b/src/datadogV2/model/model_incident_team_update_data.rs @@ -32,7 +32,7 @@ impl IncidentTeamUpdateData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::IncidentTeamUpdateAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl IncidentTeamUpdateData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::IncidentTeamRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_teams_response.rs b/src/datadogV2/model/model_incident_teams_response.rs index 16d144073..b4c30382e 100644 --- a/src/datadogV2/model/model_incident_teams_response.rs +++ b/src/datadogV2/model/model_incident_teams_response.rs @@ -30,7 +30,7 @@ impl IncidentTeamsResponse { } } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { @@ -38,7 +38,7 @@ impl IncidentTeamsResponse { self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::IncidentResponseMeta) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::IncidentResponseMeta) -> &mut Self { self.meta = Some(value); self } diff --git a/src/datadogV2/model/model_incident_timeline_cell_create_attributes.rs b/src/datadogV2/model/model_incident_timeline_cell_create_attributes.rs index 24b16d7e1..73af70e87 100644 --- a/src/datadogV2/model/model_incident_timeline_cell_create_attributes.rs +++ b/src/datadogV2/model/model_incident_timeline_cell_create_attributes.rs @@ -8,6 +8,6 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum IncidentTimelineCellCreateAttributes { IncidentTimelineCellMarkdownCreateAttributes( - crate::datadogV2::model::IncidentTimelineCellMarkdownCreateAttributes, + Box, ), } diff --git a/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes.rs b/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes.rs index 7b3246c11..baf85bfab 100644 --- a/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes.rs +++ b/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes.rs @@ -31,7 +31,7 @@ impl IncidentTimelineCellMarkdownCreateAttributes { } } - pub fn with_important(&mut self, value: bool) -> &mut Self { + pub fn important(&mut self, value: bool) -> &mut Self { self.important = Some(value); self } diff --git a/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes_content.rs b/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes_content.rs index b8572ae5a..baf4edbca 100644 --- a/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes_content.rs +++ b/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes_content.rs @@ -18,11 +18,12 @@ impl IncidentTimelineCellMarkdownCreateAttributesContent { IncidentTimelineCellMarkdownCreateAttributesContent { content: None } } - pub fn with_content(&mut self, value: String) -> &mut Self { + pub fn content(&mut self, value: String) -> &mut Self { self.content = Some(value); self } } + impl Default for IncidentTimelineCellMarkdownCreateAttributesContent { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_todo_assignee.rs b/src/datadogV2/model/model_incident_todo_assignee.rs index 80d646d79..d0056cef2 100644 --- a/src/datadogV2/model/model_incident_todo_assignee.rs +++ b/src/datadogV2/model/model_incident_todo_assignee.rs @@ -8,5 +8,5 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum IncidentTodoAssignee { IncidentTodoAssigneeHandle(String), - IncidentTodoAnonymousAssignee(crate::datadogV2::model::IncidentTodoAnonymousAssignee), + IncidentTodoAnonymousAssignee(Box), } diff --git a/src/datadogV2/model/model_incident_todo_attributes.rs b/src/datadogV2/model/model_incident_todo_attributes.rs index 6963f47e9..960943c80 100644 --- a/src/datadogV2/model/model_incident_todo_attributes.rs +++ b/src/datadogV2/model/model_incident_todo_attributes.rs @@ -55,27 +55,27 @@ impl IncidentTodoAttributes { } } - pub fn with_completed(&mut self, value: Option) -> &mut Self { + pub fn completed(&mut self, value: Option) -> &mut Self { self.completed = Some(value); self } - pub fn with_created(&mut self, value: String) -> &mut Self { + pub fn created(&mut self, value: String) -> &mut Self { self.created = Some(value); self } - pub fn with_due_date(&mut self, value: Option) -> &mut Self { + pub fn due_date(&mut self, value: Option) -> &mut Self { self.due_date = Some(value); self } - pub fn with_incident_id(&mut self, value: String) -> &mut Self { + pub fn incident_id(&mut self, value: String) -> &mut Self { self.incident_id = Some(value); self } - pub fn with_modified(&mut self, value: String) -> &mut Self { + pub fn modified(&mut self, value: String) -> &mut Self { self.modified = Some(value); self } diff --git a/src/datadogV2/model/model_incident_todo_list_response.rs b/src/datadogV2/model/model_incident_todo_list_response.rs index bc20b7f73..b6a1d0db0 100644 --- a/src/datadogV2/model/model_incident_todo_list_response.rs +++ b/src/datadogV2/model/model_incident_todo_list_response.rs @@ -30,7 +30,7 @@ impl IncidentTodoListResponse { } } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { @@ -38,7 +38,7 @@ impl IncidentTodoListResponse { self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::IncidentResponseMeta) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::IncidentResponseMeta) -> &mut Self { self.meta = Some(value); self } diff --git a/src/datadogV2/model/model_incident_todo_relationships.rs b/src/datadogV2/model/model_incident_todo_relationships.rs index 94427dc3d..1cea60424 100644 --- a/src/datadogV2/model/model_incident_todo_relationships.rs +++ b/src/datadogV2/model/model_incident_todo_relationships.rs @@ -24,7 +24,7 @@ impl IncidentTodoRelationships { } } - pub fn with_created_by_user( + pub fn created_by_user( &mut self, value: crate::datadogV2::model::RelationshipToUser, ) -> &mut Self { @@ -32,7 +32,7 @@ impl IncidentTodoRelationships { self } - pub fn with_last_modified_by_user( + pub fn last_modified_by_user( &mut self, value: crate::datadogV2::model::RelationshipToUser, ) -> &mut Self { @@ -40,6 +40,7 @@ impl IncidentTodoRelationships { self } } + impl Default for IncidentTodoRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_todo_response.rs b/src/datadogV2/model/model_incident_todo_response.rs index 5eaea7f3c..15b78fbf4 100644 --- a/src/datadogV2/model/model_incident_todo_response.rs +++ b/src/datadogV2/model/model_incident_todo_response.rs @@ -24,7 +24,7 @@ impl IncidentTodoResponse { } } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_todo_response_data.rs b/src/datadogV2/model/model_incident_todo_response_data.rs index 44e1a3808..464a04706 100644 --- a/src/datadogV2/model/model_incident_todo_response_data.rs +++ b/src/datadogV2/model/model_incident_todo_response_data.rs @@ -35,7 +35,7 @@ impl IncidentTodoResponseData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::IncidentTodoAttributes, ) -> &mut Self { @@ -43,7 +43,7 @@ impl IncidentTodoResponseData { self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::IncidentTodoRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_todo_response_included_item.rs b/src/datadogV2/model/model_incident_todo_response_included_item.rs index d1f284afb..b12e5eb84 100644 --- a/src/datadogV2/model/model_incident_todo_response_included_item.rs +++ b/src/datadogV2/model/model_incident_todo_response_included_item.rs @@ -7,5 +7,5 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum IncidentTodoResponseIncludedItem { - User(crate::datadogV2::model::User), + User(Box), } diff --git a/src/datadogV2/model/model_incident_update_attributes.rs b/src/datadogV2/model/model_incident_update_attributes.rs index a6a79a9b3..9b49680b7 100644 --- a/src/datadogV2/model/model_incident_update_attributes.rs +++ b/src/datadogV2/model/model_incident_update_attributes.rs @@ -62,32 +62,32 @@ impl IncidentUpdateAttributes { } } - pub fn with_customer_impact_end(&mut self, value: Option) -> &mut Self { + pub fn customer_impact_end(&mut self, value: Option) -> &mut Self { self.customer_impact_end = Some(value); self } - pub fn with_customer_impact_scope(&mut self, value: String) -> &mut Self { + pub fn customer_impact_scope(&mut self, value: String) -> &mut Self { self.customer_impact_scope = Some(value); self } - pub fn with_customer_impact_start(&mut self, value: Option) -> &mut Self { + pub fn customer_impact_start(&mut self, value: Option) -> &mut Self { self.customer_impact_start = Some(value); self } - pub fn with_customer_impacted(&mut self, value: bool) -> &mut Self { + pub fn customer_impacted(&mut self, value: bool) -> &mut Self { self.customer_impacted = Some(value); self } - pub fn with_detected(&mut self, value: Option) -> &mut Self { + pub fn detected(&mut self, value: Option) -> &mut Self { self.detected = Some(value); self } - pub fn with_fields( + pub fn fields( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -95,7 +95,7 @@ impl IncidentUpdateAttributes { self } - pub fn with_notification_handles( + pub fn notification_handles( &mut self, value: Vec, ) -> &mut Self { @@ -103,11 +103,12 @@ impl IncidentUpdateAttributes { self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } } + impl Default for IncidentUpdateAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incident_update_data.rs b/src/datadogV2/model/model_incident_update_data.rs index adfc95995..f1dc5f6b5 100644 --- a/src/datadogV2/model/model_incident_update_data.rs +++ b/src/datadogV2/model/model_incident_update_data.rs @@ -32,7 +32,7 @@ impl IncidentUpdateData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::IncidentUpdateAttributes, ) -> &mut Self { @@ -40,7 +40,7 @@ impl IncidentUpdateData { self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::IncidentUpdateRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_incident_update_relationships.rs b/src/datadogV2/model/model_incident_update_relationships.rs index b38be76f4..63b50a4be 100644 --- a/src/datadogV2/model/model_incident_update_relationships.rs +++ b/src/datadogV2/model/model_incident_update_relationships.rs @@ -32,7 +32,7 @@ impl IncidentUpdateRelationships { } } - pub fn with_commander_user( + pub fn commander_user( &mut self, value: Option, ) -> &mut Self { @@ -40,7 +40,7 @@ impl IncidentUpdateRelationships { self } - pub fn with_integrations( + pub fn integrations( &mut self, value: crate::datadogV2::model::RelationshipToIncidentIntegrationMetadatas, ) -> &mut Self { @@ -48,7 +48,7 @@ impl IncidentUpdateRelationships { self } - pub fn with_postmortem( + pub fn postmortem( &mut self, value: crate::datadogV2::model::RelationshipToIncidentPostmortem, ) -> &mut Self { @@ -56,6 +56,7 @@ impl IncidentUpdateRelationships { self } } + impl Default for IncidentUpdateRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_incidents_response.rs b/src/datadogV2/model/model_incidents_response.rs index b2ca4dd23..5cd066ce9 100644 --- a/src/datadogV2/model/model_incidents_response.rs +++ b/src/datadogV2/model/model_incidents_response.rs @@ -28,7 +28,7 @@ impl IncidentsResponse { } } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { @@ -36,7 +36,7 @@ impl IncidentsResponse { self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::IncidentResponseMeta) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::IncidentResponseMeta) -> &mut Self { self.meta = Some(value); self } diff --git a/src/datadogV2/model/model_intake_payload_accepted.rs b/src/datadogV2/model/model_intake_payload_accepted.rs index 473d740b7..853208118 100644 --- a/src/datadogV2/model/model_intake_payload_accepted.rs +++ b/src/datadogV2/model/model_intake_payload_accepted.rs @@ -18,11 +18,12 @@ impl IntakePayloadAccepted { IntakePayloadAccepted { errors: None } } - pub fn with_errors(&mut self, value: Vec) -> &mut Self { + pub fn errors(&mut self, value: Vec) -> &mut Self { self.errors = Some(value); self } } + impl Default for IntakePayloadAccepted { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ip_allowlist_attributes.rs b/src/datadogV2/model/model_ip_allowlist_attributes.rs index 447e879a7..f0932e8d2 100644 --- a/src/datadogV2/model/model_ip_allowlist_attributes.rs +++ b/src/datadogV2/model/model_ip_allowlist_attributes.rs @@ -24,19 +24,17 @@ impl IPAllowlistAttributes { } } - pub fn with_enabled(&mut self, value: bool) -> &mut Self { + pub fn enabled(&mut self, value: bool) -> &mut Self { self.enabled = Some(value); self } - pub fn with_entries( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn entries(&mut self, value: Vec) -> &mut Self { self.entries = Some(value); self } } + impl Default for IPAllowlistAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ip_allowlist_data.rs b/src/datadogV2/model/model_ip_allowlist_data.rs index 05a336dcd..f7f9291e2 100644 --- a/src/datadogV2/model/model_ip_allowlist_data.rs +++ b/src/datadogV2/model/model_ip_allowlist_data.rs @@ -28,7 +28,7 @@ impl IPAllowlistData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::IPAllowlistAttributes, ) -> &mut Self { @@ -36,7 +36,7 @@ impl IPAllowlistData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } diff --git a/src/datadogV2/model/model_ip_allowlist_entry_attributes.rs b/src/datadogV2/model/model_ip_allowlist_entry_attributes.rs index 1d4c35cc8..fe0d6f0ef 100644 --- a/src/datadogV2/model/model_ip_allowlist_entry_attributes.rs +++ b/src/datadogV2/model/model_ip_allowlist_entry_attributes.rs @@ -32,26 +32,27 @@ impl IPAllowlistEntryAttributes { } } - pub fn with_cidr_block(&mut self, value: String) -> &mut Self { + pub fn cidr_block(&mut self, value: String) -> &mut Self { self.cidr_block = Some(value); self } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_modified_at(&mut self, value: String) -> &mut Self { + pub fn modified_at(&mut self, value: String) -> &mut Self { self.modified_at = Some(value); self } - pub fn with_note(&mut self, value: String) -> &mut Self { + pub fn note(&mut self, value: String) -> &mut Self { self.note = Some(value); self } } + impl Default for IPAllowlistEntryAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_ip_allowlist_entry_data.rs b/src/datadogV2/model/model_ip_allowlist_entry_data.rs index caa5885bf..eb3bc2a4e 100644 --- a/src/datadogV2/model/model_ip_allowlist_entry_data.rs +++ b/src/datadogV2/model/model_ip_allowlist_entry_data.rs @@ -28,7 +28,7 @@ impl IPAllowlistEntryData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::IPAllowlistEntryAttributes, ) -> &mut Self { @@ -36,7 +36,7 @@ impl IPAllowlistEntryData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } diff --git a/src/datadogV2/model/model_ip_allowlist_response.rs b/src/datadogV2/model/model_ip_allowlist_response.rs index 53739a9e9..3c6ee6199 100644 --- a/src/datadogV2/model/model_ip_allowlist_response.rs +++ b/src/datadogV2/model/model_ip_allowlist_response.rs @@ -18,11 +18,12 @@ impl IPAllowlistResponse { IPAllowlistResponse { data: None } } - pub fn with_data(&mut self, value: crate::datadogV2::model::IPAllowlistData) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::IPAllowlistData) -> &mut Self { self.data = Some(value); self } } + impl Default for IPAllowlistResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_jira_integration_metadata_issues_item.rs b/src/datadogV2/model/model_jira_integration_metadata_issues_item.rs index a26cce301..08e882728 100644 --- a/src/datadogV2/model/model_jira_integration_metadata_issues_item.rs +++ b/src/datadogV2/model/model_jira_integration_metadata_issues_item.rs @@ -36,17 +36,17 @@ impl JiraIntegrationMetadataIssuesItem { } } - pub fn with_issue_key(&mut self, value: String) -> &mut Self { + pub fn issue_key(&mut self, value: String) -> &mut Self { self.issue_key = Some(value); self } - pub fn with_issuetype_id(&mut self, value: String) -> &mut Self { + pub fn issuetype_id(&mut self, value: String) -> &mut Self { self.issuetype_id = Some(value); self } - pub fn with_redirect_url(&mut self, value: String) -> &mut Self { + pub fn redirect_url(&mut self, value: String) -> &mut Self { self.redirect_url = Some(value); self } diff --git a/src/datadogV2/model/model_jsonapi_error_item.rs b/src/datadogV2/model/model_jsonapi_error_item.rs index b47909f15..604d2109f 100644 --- a/src/datadogV2/model/model_jsonapi_error_item.rs +++ b/src/datadogV2/model/model_jsonapi_error_item.rs @@ -28,21 +28,22 @@ impl JSONAPIErrorItem { } } - pub fn with_detail(&mut self, value: String) -> &mut Self { + pub fn detail(&mut self, value: String) -> &mut Self { self.detail = Some(value); self } - pub fn with_status(&mut self, value: String) -> &mut Self { + pub fn status(&mut self, value: String) -> &mut Self { self.status = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } } + impl Default for JSONAPIErrorItem { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_list_application_keys_response.rs b/src/datadogV2/model/model_list_application_keys_response.rs index 70de43b43..647ba50ba 100644 --- a/src/datadogV2/model/model_list_application_keys_response.rs +++ b/src/datadogV2/model/model_list_application_keys_response.rs @@ -28,7 +28,7 @@ impl ListApplicationKeysResponse { } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -36,7 +36,7 @@ impl ListApplicationKeysResponse { self } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { @@ -44,7 +44,7 @@ impl ListApplicationKeysResponse { self } - pub fn with_meta( + pub fn meta( &mut self, value: crate::datadogV2::model::ApplicationKeyResponseMeta, ) -> &mut Self { @@ -52,6 +52,7 @@ impl ListApplicationKeysResponse { self } } + impl Default for ListApplicationKeysResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_list_downtimes_response.rs b/src/datadogV2/model/model_list_downtimes_response.rs index 8708b338e..6a1d1ea83 100644 --- a/src/datadogV2/model/model_list_downtimes_response.rs +++ b/src/datadogV2/model/model_list_downtimes_response.rs @@ -28,15 +28,12 @@ impl ListDowntimesResponse { } } - pub fn with_data( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { @@ -44,11 +41,12 @@ impl ListDowntimesResponse { self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::DowntimeMeta) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::DowntimeMeta) -> &mut Self { self.meta = Some(value); self } } + impl Default for ListDowntimesResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_list_findings_meta.rs b/src/datadogV2/model/model_list_findings_meta.rs index 4f31f22a7..6fc186678 100644 --- a/src/datadogV2/model/model_list_findings_meta.rs +++ b/src/datadogV2/model/model_list_findings_meta.rs @@ -24,16 +24,17 @@ impl ListFindingsMeta { } } - pub fn with_page(&mut self, value: crate::datadogV2::model::ListFindingsPage) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV2::model::ListFindingsPage) -> &mut Self { self.page = Some(value); self } - pub fn with_snapshot_timestamp(&mut self, value: i64) -> &mut Self { + pub fn snapshot_timestamp(&mut self, value: i64) -> &mut Self { self.snapshot_timestamp = Some(value); self } } + impl Default for ListFindingsMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_list_findings_page.rs b/src/datadogV2/model/model_list_findings_page.rs index dfb40db7c..089dbd20f 100644 --- a/src/datadogV2/model/model_list_findings_page.rs +++ b/src/datadogV2/model/model_list_findings_page.rs @@ -24,16 +24,17 @@ impl ListFindingsPage { } } - pub fn with_cursor(&mut self, value: String) -> &mut Self { + pub fn cursor(&mut self, value: String) -> &mut Self { self.cursor = Some(value); self } - pub fn with_total_filtered_count(&mut self, value: i64) -> &mut Self { + pub fn total_filtered_count(&mut self, value: i64) -> &mut Self { self.total_filtered_count = Some(value); self } } + impl Default for ListFindingsPage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_list_powerpacks_response.rs b/src/datadogV2/model/model_list_powerpacks_response.rs index a9abb63c2..748aee2be 100644 --- a/src/datadogV2/model/model_list_powerpacks_response.rs +++ b/src/datadogV2/model/model_list_powerpacks_response.rs @@ -32,32 +32,27 @@ impl ListPowerpacksResponse { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_included(&mut self, value: Vec) -> &mut Self { + pub fn included(&mut self, value: Vec) -> &mut Self { self.included = Some(value); self } - pub fn with_links( - &mut self, - value: crate::datadogV2::model::PowerpackResponseLinks, - ) -> &mut Self { + pub fn links(&mut self, value: crate::datadogV2::model::PowerpackResponseLinks) -> &mut Self { self.links = Some(value); self } - pub fn with_meta( - &mut self, - value: crate::datadogV2::model::PowerpacksResponseMeta, - ) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::PowerpacksResponseMeta) -> &mut Self { self.meta = Some(value); self } } + impl Default for ListPowerpacksResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_list_rules_response.rs b/src/datadogV2/model/model_list_rules_response.rs index 148b26934..33e51f612 100644 --- a/src/datadogV2/model/model_list_rules_response.rs +++ b/src/datadogV2/model/model_list_rules_response.rs @@ -24,7 +24,7 @@ impl ListRulesResponse { } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -32,14 +32,12 @@ impl ListRulesResponse { self } - pub fn with_links( - &mut self, - value: crate::datadogV2::model::ListRulesResponseLinks, - ) -> &mut Self { + pub fn links(&mut self, value: crate::datadogV2::model::ListRulesResponseLinks) -> &mut Self { self.links = Some(value); self } } + impl Default for ListRulesResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_list_rules_response_data_item.rs b/src/datadogV2/model/model_list_rules_response_data_item.rs index 59ff2c1f3..b6217a8ea 100644 --- a/src/datadogV2/model/model_list_rules_response_data_item.rs +++ b/src/datadogV2/model/model_list_rules_response_data_item.rs @@ -32,17 +32,17 @@ impl ListRulesResponseDataItem { } } - pub fn with_attributes(&mut self, value: crate::datadogV2::model::RuleAttributes) -> &mut Self { + pub fn attributes(&mut self, value: crate::datadogV2::model::RuleAttributes) -> &mut Self { self.attributes = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::RelationshipToRule, ) -> &mut Self { @@ -50,11 +50,12 @@ impl ListRulesResponseDataItem { self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::RuleType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::RuleType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for ListRulesResponseDataItem { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_list_rules_response_links.rs b/src/datadogV2/model/model_list_rules_response_links.rs index c6a36f7f9..749e542c4 100644 --- a/src/datadogV2/model/model_list_rules_response_links.rs +++ b/src/datadogV2/model/model_list_rules_response_links.rs @@ -18,11 +18,12 @@ impl ListRulesResponseLinks { ListRulesResponseLinks { next: None } } - pub fn with_next(&mut self, value: String) -> &mut Self { + pub fn next(&mut self, value: String) -> &mut Self { self.next = Some(value); self } } + impl Default for ListRulesResponseLinks { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_log.rs b/src/datadogV2/model/model_log.rs index 4267602ed..d6df7a9ee 100644 --- a/src/datadogV2/model/model_log.rs +++ b/src/datadogV2/model/model_log.rs @@ -28,21 +28,22 @@ impl Log { } } - pub fn with_attributes(&mut self, value: crate::datadogV2::model::LogAttributes) -> &mut Self { + pub fn attributes(&mut self, value: crate::datadogV2::model::LogAttributes) -> &mut Self { self.attributes = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::LogType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::LogType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for Log { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_log_attributes.rs b/src/datadogV2/model/model_log_attributes.rs index 5a781bbc0..a1f25c557 100644 --- a/src/datadogV2/model/model_log_attributes.rs +++ b/src/datadogV2/model/model_log_attributes.rs @@ -48,7 +48,7 @@ impl LogAttributes { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -56,36 +56,37 @@ impl LogAttributes { self } - pub fn with_host(&mut self, value: String) -> &mut Self { + pub fn host(&mut self, value: String) -> &mut Self { self.host = Some(value); self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } - pub fn with_service(&mut self, value: String) -> &mut Self { + pub fn service(&mut self, value: String) -> &mut Self { self.service = Some(value); self } - pub fn with_status(&mut self, value: String) -> &mut Self { + pub fn status(&mut self, value: String) -> &mut Self { self.status = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_timestamp(&mut self, value: String) -> &mut Self { + pub fn timestamp(&mut self, value: String) -> &mut Self { self.timestamp = Some(value); self } } + impl Default for LogAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_aggregate_bucket.rs b/src/datadogV2/model/model_logs_aggregate_bucket.rs index d6d5d3a9d..6f57f3f4d 100644 --- a/src/datadogV2/model/model_logs_aggregate_bucket.rs +++ b/src/datadogV2/model/model_logs_aggregate_bucket.rs @@ -26,7 +26,7 @@ impl LogsAggregateBucket { } } - pub fn with_by( + pub fn by( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -34,7 +34,7 @@ impl LogsAggregateBucket { self } - pub fn with_computes( + pub fn computes( &mut self, value: std::collections::BTreeMap< String, @@ -45,6 +45,7 @@ impl LogsAggregateBucket { self } } + impl Default for LogsAggregateBucket { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_aggregate_bucket_value_timeseries.rs b/src/datadogV2/model/model_logs_aggregate_bucket_value_timeseries.rs index 3b82ff9cf..c2bd914fe 100644 --- a/src/datadogV2/model/model_logs_aggregate_bucket_value_timeseries.rs +++ b/src/datadogV2/model/model_logs_aggregate_bucket_value_timeseries.rs @@ -14,6 +14,7 @@ impl LogsAggregateBucketValueTimeseries { LogsAggregateBucketValueTimeseries {} } } + impl Default for LogsAggregateBucketValueTimeseries { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_aggregate_bucket_value_timeseries_point.rs b/src/datadogV2/model/model_logs_aggregate_bucket_value_timeseries_point.rs index 389fed47c..58e3fd939 100644 --- a/src/datadogV2/model/model_logs_aggregate_bucket_value_timeseries_point.rs +++ b/src/datadogV2/model/model_logs_aggregate_bucket_value_timeseries_point.rs @@ -24,16 +24,17 @@ impl LogsAggregateBucketValueTimeseriesPoint { } } - pub fn with_time(&mut self, value: String) -> &mut Self { + pub fn time(&mut self, value: String) -> &mut Self { self.time = Some(value); self } - pub fn with_value(&mut self, value: f64) -> &mut Self { + pub fn value(&mut self, value: f64) -> &mut Self { self.value = Some(value); self } } + impl Default for LogsAggregateBucketValueTimeseriesPoint { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_aggregate_request.rs b/src/datadogV2/model/model_logs_aggregate_request.rs index d834f2ea6..c8fd463d4 100644 --- a/src/datadogV2/model/model_logs_aggregate_request.rs +++ b/src/datadogV2/model/model_logs_aggregate_request.rs @@ -37,34 +37,32 @@ impl LogsAggregateRequest { } } - pub fn with_compute(&mut self, value: Vec) -> &mut Self { + pub fn compute(&mut self, value: Vec) -> &mut Self { self.compute = Some(value); self } - pub fn with_filter(&mut self, value: crate::datadogV2::model::LogsQueryFilter) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV2::model::LogsQueryFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_group_by(&mut self, value: Vec) -> &mut Self { + pub fn group_by(&mut self, value: Vec) -> &mut Self { self.group_by = Some(value); self } - pub fn with_options(&mut self, value: crate::datadogV2::model::LogsQueryOptions) -> &mut Self { + pub fn options(&mut self, value: crate::datadogV2::model::LogsQueryOptions) -> &mut Self { self.options = Some(value); self } - pub fn with_page( - &mut self, - value: crate::datadogV2::model::LogsAggregateRequestPage, - ) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV2::model::LogsAggregateRequestPage) -> &mut Self { self.page = Some(value); self } } + impl Default for LogsAggregateRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_aggregate_request_page.rs b/src/datadogV2/model/model_logs_aggregate_request_page.rs index f0f54cf87..d9375582f 100644 --- a/src/datadogV2/model/model_logs_aggregate_request_page.rs +++ b/src/datadogV2/model/model_logs_aggregate_request_page.rs @@ -18,11 +18,12 @@ impl LogsAggregateRequestPage { LogsAggregateRequestPage { cursor: None } } - pub fn with_cursor(&mut self, value: String) -> &mut Self { + pub fn cursor(&mut self, value: String) -> &mut Self { self.cursor = Some(value); self } } + impl Default for LogsAggregateRequestPage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_aggregate_response.rs b/src/datadogV2/model/model_logs_aggregate_response.rs index ec011f37a..4bdf48e21 100644 --- a/src/datadogV2/model/model_logs_aggregate_response.rs +++ b/src/datadogV2/model/model_logs_aggregate_response.rs @@ -24,19 +24,17 @@ impl LogsAggregateResponse { } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::LogsAggregateResponseData, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::LogsAggregateResponseData) -> &mut Self { self.data = Some(value); self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::LogsResponseMetadata) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::LogsResponseMetadata) -> &mut Self { self.meta = Some(value); self } } + impl Default for LogsAggregateResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_aggregate_response_data.rs b/src/datadogV2/model/model_logs_aggregate_response_data.rs index a5d5861b7..edd0671da 100644 --- a/src/datadogV2/model/model_logs_aggregate_response_data.rs +++ b/src/datadogV2/model/model_logs_aggregate_response_data.rs @@ -18,7 +18,7 @@ impl LogsAggregateResponseData { LogsAggregateResponseData { buckets: None } } - pub fn with_buckets( + pub fn buckets( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl LogsAggregateResponseData { self } } + impl Default for LogsAggregateResponseData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_aggregate_sort.rs b/src/datadogV2/model/model_logs_aggregate_sort.rs index 1f50559e0..1dcc16ff6 100644 --- a/src/datadogV2/model/model_logs_aggregate_sort.rs +++ b/src/datadogV2/model/model_logs_aggregate_sort.rs @@ -32,7 +32,7 @@ impl LogsAggregateSort { } } - pub fn with_aggregation( + pub fn aggregation( &mut self, value: crate::datadogV2::model::LogsAggregationFunction, ) -> &mut Self { @@ -40,24 +40,22 @@ impl LogsAggregateSort { self } - pub fn with_metric(&mut self, value: String) -> &mut Self { + pub fn metric(&mut self, value: String) -> &mut Self { self.metric = Some(value); self } - pub fn with_order(&mut self, value: crate::datadogV2::model::LogsSortOrder) -> &mut Self { + pub fn order(&mut self, value: crate::datadogV2::model::LogsSortOrder) -> &mut Self { self.order = Some(value); self } - pub fn with_type_( - &mut self, - value: crate::datadogV2::model::LogsAggregateSortType, - ) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::LogsAggregateSortType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for LogsAggregateSort { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_archive.rs b/src/datadogV2/model/model_logs_archive.rs index 89fcc2711..c1aee32be 100644 --- a/src/datadogV2/model/model_logs_archive.rs +++ b/src/datadogV2/model/model_logs_archive.rs @@ -18,14 +18,12 @@ impl LogsArchive { LogsArchive { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::LogsArchiveDefinition, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::LogsArchiveDefinition) -> &mut Self { self.data = Some(value); self } } + impl Default for LogsArchive { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_archive_attributes.rs b/src/datadogV2/model/model_logs_archive_attributes.rs index bd6525710..862eec8f3 100644 --- a/src/datadogV2/model/model_logs_archive_attributes.rs +++ b/src/datadogV2/model/model_logs_archive_attributes.rs @@ -53,22 +53,22 @@ impl LogsArchiveAttributes { } } - pub fn with_include_tags(&mut self, value: bool) -> &mut Self { + pub fn include_tags(&mut self, value: bool) -> &mut Self { self.include_tags = Some(value); self } - pub fn with_rehydration_max_scan_size_in_gb(&mut self, value: Option) -> &mut Self { + pub fn rehydration_max_scan_size_in_gb(&mut self, value: Option) -> &mut Self { self.rehydration_max_scan_size_in_gb = Some(value); self } - pub fn with_rehydration_tags(&mut self, value: Vec) -> &mut Self { + pub fn rehydration_tags(&mut self, value: Vec) -> &mut Self { self.rehydration_tags = Some(value); self } - pub fn with_state(&mut self, value: crate::datadogV2::model::LogsArchiveState) -> &mut Self { + pub fn state(&mut self, value: crate::datadogV2::model::LogsArchiveState) -> &mut Self { self.state = Some(value); self } diff --git a/src/datadogV2/model/model_logs_archive_create_request.rs b/src/datadogV2/model/model_logs_archive_create_request.rs index 1d3a1bef4..eaf93ad5c 100644 --- a/src/datadogV2/model/model_logs_archive_create_request.rs +++ b/src/datadogV2/model/model_logs_archive_create_request.rs @@ -18,7 +18,7 @@ impl LogsArchiveCreateRequest { LogsArchiveCreateRequest { data: None } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::LogsArchiveCreateRequestDefinition, ) -> &mut Self { @@ -26,6 +26,7 @@ impl LogsArchiveCreateRequest { self } } + impl Default for LogsArchiveCreateRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_archive_create_request_attributes.rs b/src/datadogV2/model/model_logs_archive_create_request_attributes.rs index 78726a612..807299875 100644 --- a/src/datadogV2/model/model_logs_archive_create_request_attributes.rs +++ b/src/datadogV2/model/model_logs_archive_create_request_attributes.rs @@ -49,17 +49,17 @@ impl LogsArchiveCreateRequestAttributes { } } - pub fn with_include_tags(&mut self, value: bool) -> &mut Self { + pub fn include_tags(&mut self, value: bool) -> &mut Self { self.include_tags = Some(value); self } - pub fn with_rehydration_max_scan_size_in_gb(&mut self, value: Option) -> &mut Self { + pub fn rehydration_max_scan_size_in_gb(&mut self, value: Option) -> &mut Self { self.rehydration_max_scan_size_in_gb = Some(value); self } - pub fn with_rehydration_tags(&mut self, value: Vec) -> &mut Self { + pub fn rehydration_tags(&mut self, value: Vec) -> &mut Self { self.rehydration_tags = Some(value); self } diff --git a/src/datadogV2/model/model_logs_archive_create_request_definition.rs b/src/datadogV2/model/model_logs_archive_create_request_definition.rs index 6ef80653f..1e9a5373b 100644 --- a/src/datadogV2/model/model_logs_archive_create_request_definition.rs +++ b/src/datadogV2/model/model_logs_archive_create_request_definition.rs @@ -24,7 +24,7 @@ impl LogsArchiveCreateRequestDefinition { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::LogsArchiveCreateRequestAttributes, ) -> &mut Self { diff --git a/src/datadogV2/model/model_logs_archive_create_request_destination.rs b/src/datadogV2/model/model_logs_archive_create_request_destination.rs index ebc69c037..847efce87 100644 --- a/src/datadogV2/model/model_logs_archive_create_request_destination.rs +++ b/src/datadogV2/model/model_logs_archive_create_request_destination.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum LogsArchiveCreateRequestDestination { - LogsArchiveDestinationAzure(crate::datadogV2::model::LogsArchiveDestinationAzure), - LogsArchiveDestinationGCS(crate::datadogV2::model::LogsArchiveDestinationGCS), - LogsArchiveDestinationS3(crate::datadogV2::model::LogsArchiveDestinationS3), + LogsArchiveDestinationAzure(Box), + LogsArchiveDestinationGCS(Box), + LogsArchiveDestinationS3(Box), } diff --git a/src/datadogV2/model/model_logs_archive_definition.rs b/src/datadogV2/model/model_logs_archive_definition.rs index 3b2063233..1609b4f1d 100644 --- a/src/datadogV2/model/model_logs_archive_definition.rs +++ b/src/datadogV2/model/model_logs_archive_definition.rs @@ -28,7 +28,7 @@ impl LogsArchiveDefinition { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::LogsArchiveAttributes, ) -> &mut Self { @@ -36,7 +36,7 @@ impl LogsArchiveDefinition { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } diff --git a/src/datadogV2/model/model_logs_archive_destination.rs b/src/datadogV2/model/model_logs_archive_destination.rs index f0e5406fb..0d175ae7d 100644 --- a/src/datadogV2/model/model_logs_archive_destination.rs +++ b/src/datadogV2/model/model_logs_archive_destination.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum LogsArchiveDestination { - LogsArchiveDestinationAzure(crate::datadogV2::model::LogsArchiveDestinationAzure), - LogsArchiveDestinationGCS(crate::datadogV2::model::LogsArchiveDestinationGCS), - LogsArchiveDestinationS3(crate::datadogV2::model::LogsArchiveDestinationS3), + LogsArchiveDestinationAzure(Box), + LogsArchiveDestinationGCS(Box), + LogsArchiveDestinationS3(Box), } diff --git a/src/datadogV2/model/model_logs_archive_destination_azure.rs b/src/datadogV2/model/model_logs_archive_destination_azure.rs index 8b216d1a5..37bcc99db 100644 --- a/src/datadogV2/model/model_logs_archive_destination_azure.rs +++ b/src/datadogV2/model/model_logs_archive_destination_azure.rs @@ -45,12 +45,12 @@ impl LogsArchiveDestinationAzure { } } - pub fn with_path(&mut self, value: String) -> &mut Self { + pub fn path(&mut self, value: String) -> &mut Self { self.path = Some(value); self } - pub fn with_region(&mut self, value: String) -> &mut Self { + pub fn region(&mut self, value: String) -> &mut Self { self.region = Some(value); self } diff --git a/src/datadogV2/model/model_logs_archive_destination_gcs.rs b/src/datadogV2/model/model_logs_archive_destination_gcs.rs index 816220415..2d8ab9939 100644 --- a/src/datadogV2/model/model_logs_archive_destination_gcs.rs +++ b/src/datadogV2/model/model_logs_archive_destination_gcs.rs @@ -36,7 +36,7 @@ impl LogsArchiveDestinationGCS { } } - pub fn with_path(&mut self, value: String) -> &mut Self { + pub fn path(&mut self, value: String) -> &mut Self { self.path = Some(value); self } diff --git a/src/datadogV2/model/model_logs_archive_destination_s3.rs b/src/datadogV2/model/model_logs_archive_destination_s3.rs index d476e970e..0f9470872 100644 --- a/src/datadogV2/model/model_logs_archive_destination_s3.rs +++ b/src/datadogV2/model/model_logs_archive_destination_s3.rs @@ -36,7 +36,7 @@ impl LogsArchiveDestinationS3 { } } - pub fn with_path(&mut self, value: String) -> &mut Self { + pub fn path(&mut self, value: String) -> &mut Self { self.path = Some(value); self } diff --git a/src/datadogV2/model/model_logs_archive_order.rs b/src/datadogV2/model/model_logs_archive_order.rs index 3e598b06c..8471db525 100644 --- a/src/datadogV2/model/model_logs_archive_order.rs +++ b/src/datadogV2/model/model_logs_archive_order.rs @@ -18,7 +18,7 @@ impl LogsArchiveOrder { LogsArchiveOrder { data: None } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::LogsArchiveOrderDefinition, ) -> &mut Self { @@ -26,6 +26,7 @@ impl LogsArchiveOrder { self } } + impl Default for LogsArchiveOrder { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_archives.rs b/src/datadogV2/model/model_logs_archives.rs index 99e115799..c89b0f429 100644 --- a/src/datadogV2/model/model_logs_archives.rs +++ b/src/datadogV2/model/model_logs_archives.rs @@ -18,7 +18,7 @@ impl LogsArchives { LogsArchives { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl LogsArchives { self } } + impl Default for LogsArchives { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_compute.rs b/src/datadogV2/model/model_logs_compute.rs index 941412667..b93cb0604 100644 --- a/src/datadogV2/model/model_logs_compute.rs +++ b/src/datadogV2/model/model_logs_compute.rs @@ -33,17 +33,17 @@ impl LogsCompute { } } - pub fn with_interval(&mut self, value: String) -> &mut Self { + pub fn interval(&mut self, value: String) -> &mut Self { self.interval = Some(value); self } - pub fn with_metric(&mut self, value: String) -> &mut Self { + pub fn metric(&mut self, value: String) -> &mut Self { self.metric = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::LogsComputeType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::LogsComputeType) -> &mut Self { self.type_ = Some(value); self } diff --git a/src/datadogV2/model/model_logs_group_by.rs b/src/datadogV2/model/model_logs_group_by.rs index c615297d7..c31e51013 100644 --- a/src/datadogV2/model/model_logs_group_by.rs +++ b/src/datadogV2/model/model_logs_group_by.rs @@ -42,33 +42,27 @@ impl LogsGroupBy { } } - pub fn with_histogram( - &mut self, - value: crate::datadogV2::model::LogsGroupByHistogram, - ) -> &mut Self { + pub fn histogram(&mut self, value: crate::datadogV2::model::LogsGroupByHistogram) -> &mut Self { self.histogram = Some(value); self } - pub fn with_limit(&mut self, value: i64) -> &mut Self { + pub fn limit(&mut self, value: i64) -> &mut Self { self.limit = Some(value); self } - pub fn with_missing( - &mut self, - value: crate::datadogV2::model::LogsGroupByMissing, - ) -> &mut Self { + pub fn missing(&mut self, value: crate::datadogV2::model::LogsGroupByMissing) -> &mut Self { self.missing = Some(value); self } - pub fn with_sort(&mut self, value: crate::datadogV2::model::LogsAggregateSort) -> &mut Self { + pub fn sort(&mut self, value: crate::datadogV2::model::LogsAggregateSort) -> &mut Self { self.sort = Some(value); self } - pub fn with_total(&mut self, value: crate::datadogV2::model::LogsGroupByTotal) -> &mut Self { + pub fn total(&mut self, value: crate::datadogV2::model::LogsGroupByTotal) -> &mut Self { self.total = Some(value); self } diff --git a/src/datadogV2/model/model_logs_list_request.rs b/src/datadogV2/model/model_logs_list_request.rs index 63e0d761a..64dd7b373 100644 --- a/src/datadogV2/model/model_logs_list_request.rs +++ b/src/datadogV2/model/model_logs_list_request.rs @@ -33,26 +33,27 @@ impl LogsListRequest { } } - pub fn with_filter(&mut self, value: crate::datadogV2::model::LogsQueryFilter) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV2::model::LogsQueryFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_options(&mut self, value: crate::datadogV2::model::LogsQueryOptions) -> &mut Self { + pub fn options(&mut self, value: crate::datadogV2::model::LogsQueryOptions) -> &mut Self { self.options = Some(value); self } - pub fn with_page(&mut self, value: crate::datadogV2::model::LogsListRequestPage) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV2::model::LogsListRequestPage) -> &mut Self { self.page = Some(value); self } - pub fn with_sort(&mut self, value: crate::datadogV2::model::LogsSort) -> &mut Self { + pub fn sort(&mut self, value: crate::datadogV2::model::LogsSort) -> &mut Self { self.sort = Some(value); self } } + impl Default for LogsListRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_list_request_page.rs b/src/datadogV2/model/model_logs_list_request_page.rs index 806e58933..52732eb51 100644 --- a/src/datadogV2/model/model_logs_list_request_page.rs +++ b/src/datadogV2/model/model_logs_list_request_page.rs @@ -24,16 +24,17 @@ impl LogsListRequestPage { } } - pub fn with_cursor(&mut self, value: String) -> &mut Self { + pub fn cursor(&mut self, value: String) -> &mut Self { self.cursor = Some(value); self } - pub fn with_limit(&mut self, value: i32) -> &mut Self { + pub fn limit(&mut self, value: i32) -> &mut Self { self.limit = Some(value); self } } + impl Default for LogsListRequestPage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_list_response.rs b/src/datadogV2/model/model_logs_list_response.rs index 73f3c3dc3..1020936df 100644 --- a/src/datadogV2/model/model_logs_list_response.rs +++ b/src/datadogV2/model/model_logs_list_response.rs @@ -28,24 +28,22 @@ impl LogsListResponse { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_links( - &mut self, - value: crate::datadogV2::model::LogsListResponseLinks, - ) -> &mut Self { + pub fn links(&mut self, value: crate::datadogV2::model::LogsListResponseLinks) -> &mut Self { self.links = Some(value); self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::LogsResponseMetadata) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::LogsResponseMetadata) -> &mut Self { self.meta = Some(value); self } } + impl Default for LogsListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_list_response_links.rs b/src/datadogV2/model/model_logs_list_response_links.rs index d238dedb1..e9b1de979 100644 --- a/src/datadogV2/model/model_logs_list_response_links.rs +++ b/src/datadogV2/model/model_logs_list_response_links.rs @@ -19,11 +19,12 @@ impl LogsListResponseLinks { LogsListResponseLinks { next: None } } - pub fn with_next(&mut self, value: String) -> &mut Self { + pub fn next(&mut self, value: String) -> &mut Self { self.next = Some(value); self } } + impl Default for LogsListResponseLinks { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_metric_compute.rs b/src/datadogV2/model/model_logs_metric_compute.rs index 8f0cd22ea..e7fa75f76 100644 --- a/src/datadogV2/model/model_logs_metric_compute.rs +++ b/src/datadogV2/model/model_logs_metric_compute.rs @@ -31,12 +31,12 @@ impl LogsMetricCompute { } } - pub fn with_include_percentiles(&mut self, value: bool) -> &mut Self { + pub fn include_percentiles(&mut self, value: bool) -> &mut Self { self.include_percentiles = Some(value); self } - pub fn with_path(&mut self, value: String) -> &mut Self { + pub fn path(&mut self, value: String) -> &mut Self { self.path = Some(value); self } diff --git a/src/datadogV2/model/model_logs_metric_create_attributes.rs b/src/datadogV2/model/model_logs_metric_create_attributes.rs index ee1f40696..ec54b4cd9 100644 --- a/src/datadogV2/model/model_logs_metric_create_attributes.rs +++ b/src/datadogV2/model/model_logs_metric_create_attributes.rs @@ -28,12 +28,12 @@ impl LogsMetricCreateAttributes { } } - pub fn with_filter(&mut self, value: crate::datadogV2::model::LogsMetricFilter) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV2::model::LogsMetricFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_group_by( + pub fn group_by( &mut self, value: Vec, ) -> &mut Self { diff --git a/src/datadogV2/model/model_logs_metric_filter.rs b/src/datadogV2/model/model_logs_metric_filter.rs index ce03d88eb..11ea2b6fa 100644 --- a/src/datadogV2/model/model_logs_metric_filter.rs +++ b/src/datadogV2/model/model_logs_metric_filter.rs @@ -18,11 +18,12 @@ impl LogsMetricFilter { LogsMetricFilter { query: None } } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } } + impl Default for LogsMetricFilter { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_metric_group_by.rs b/src/datadogV2/model/model_logs_metric_group_by.rs index b03e077cf..d0a18aefb 100644 --- a/src/datadogV2/model/model_logs_metric_group_by.rs +++ b/src/datadogV2/model/model_logs_metric_group_by.rs @@ -24,7 +24,7 @@ impl LogsMetricGroupBy { } } - pub fn with_tag_name(&mut self, value: String) -> &mut Self { + pub fn tag_name(&mut self, value: String) -> &mut Self { self.tag_name = Some(value); self } diff --git a/src/datadogV2/model/model_logs_metric_response.rs b/src/datadogV2/model/model_logs_metric_response.rs index 642fb4ee1..81c4ec820 100644 --- a/src/datadogV2/model/model_logs_metric_response.rs +++ b/src/datadogV2/model/model_logs_metric_response.rs @@ -18,14 +18,12 @@ impl LogsMetricResponse { LogsMetricResponse { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::LogsMetricResponseData, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::LogsMetricResponseData) -> &mut Self { self.data = Some(value); self } } + impl Default for LogsMetricResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_metric_response_attributes.rs b/src/datadogV2/model/model_logs_metric_response_attributes.rs index 4f2946e58..403f987fc 100644 --- a/src/datadogV2/model/model_logs_metric_response_attributes.rs +++ b/src/datadogV2/model/model_logs_metric_response_attributes.rs @@ -28,7 +28,7 @@ impl LogsMetricResponseAttributes { } } - pub fn with_compute( + pub fn compute( &mut self, value: crate::datadogV2::model::LogsMetricResponseCompute, ) -> &mut Self { @@ -36,7 +36,7 @@ impl LogsMetricResponseAttributes { self } - pub fn with_filter( + pub fn filter( &mut self, value: crate::datadogV2::model::LogsMetricResponseFilter, ) -> &mut Self { @@ -44,7 +44,7 @@ impl LogsMetricResponseAttributes { self } - pub fn with_group_by( + pub fn group_by( &mut self, value: Vec, ) -> &mut Self { @@ -52,6 +52,7 @@ impl LogsMetricResponseAttributes { self } } + impl Default for LogsMetricResponseAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_metric_response_compute.rs b/src/datadogV2/model/model_logs_metric_response_compute.rs index 56231cd33..5d768e953 100644 --- a/src/datadogV2/model/model_logs_metric_response_compute.rs +++ b/src/datadogV2/model/model_logs_metric_response_compute.rs @@ -29,7 +29,7 @@ impl LogsMetricResponseCompute { } } - pub fn with_aggregation_type( + pub fn aggregation_type( &mut self, value: crate::datadogV2::model::LogsMetricResponseComputeAggregationType, ) -> &mut Self { @@ -37,16 +37,17 @@ impl LogsMetricResponseCompute { self } - pub fn with_include_percentiles(&mut self, value: bool) -> &mut Self { + pub fn include_percentiles(&mut self, value: bool) -> &mut Self { self.include_percentiles = Some(value); self } - pub fn with_path(&mut self, value: String) -> &mut Self { + pub fn path(&mut self, value: String) -> &mut Self { self.path = Some(value); self } } + impl Default for LogsMetricResponseCompute { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_metric_response_data.rs b/src/datadogV2/model/model_logs_metric_response_data.rs index b69ab058f..1e62689ce 100644 --- a/src/datadogV2/model/model_logs_metric_response_data.rs +++ b/src/datadogV2/model/model_logs_metric_response_data.rs @@ -28,7 +28,7 @@ impl LogsMetricResponseData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::LogsMetricResponseAttributes, ) -> &mut Self { @@ -36,16 +36,17 @@ impl LogsMetricResponseData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::LogsMetricType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::LogsMetricType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for LogsMetricResponseData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_metric_response_filter.rs b/src/datadogV2/model/model_logs_metric_response_filter.rs index ab9128e20..e71f62f56 100644 --- a/src/datadogV2/model/model_logs_metric_response_filter.rs +++ b/src/datadogV2/model/model_logs_metric_response_filter.rs @@ -18,11 +18,12 @@ impl LogsMetricResponseFilter { LogsMetricResponseFilter { query: None } } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } } + impl Default for LogsMetricResponseFilter { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_metric_response_group_by.rs b/src/datadogV2/model/model_logs_metric_response_group_by.rs index d38494aab..c02581478 100644 --- a/src/datadogV2/model/model_logs_metric_response_group_by.rs +++ b/src/datadogV2/model/model_logs_metric_response_group_by.rs @@ -24,16 +24,17 @@ impl LogsMetricResponseGroupBy { } } - pub fn with_path(&mut self, value: String) -> &mut Self { + pub fn path(&mut self, value: String) -> &mut Self { self.path = Some(value); self } - pub fn with_tag_name(&mut self, value: String) -> &mut Self { + pub fn tag_name(&mut self, value: String) -> &mut Self { self.tag_name = Some(value); self } } + impl Default for LogsMetricResponseGroupBy { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_metric_update_attributes.rs b/src/datadogV2/model/model_logs_metric_update_attributes.rs index 333b945ce..c15780dc3 100644 --- a/src/datadogV2/model/model_logs_metric_update_attributes.rs +++ b/src/datadogV2/model/model_logs_metric_update_attributes.rs @@ -28,7 +28,7 @@ impl LogsMetricUpdateAttributes { } } - pub fn with_compute( + pub fn compute( &mut self, value: crate::datadogV2::model::LogsMetricUpdateCompute, ) -> &mut Self { @@ -36,12 +36,12 @@ impl LogsMetricUpdateAttributes { self } - pub fn with_filter(&mut self, value: crate::datadogV2::model::LogsMetricFilter) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV2::model::LogsMetricFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_group_by( + pub fn group_by( &mut self, value: Vec, ) -> &mut Self { @@ -49,6 +49,7 @@ impl LogsMetricUpdateAttributes { self } } + impl Default for LogsMetricUpdateAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_metric_update_compute.rs b/src/datadogV2/model/model_logs_metric_update_compute.rs index 9bb482af0..905f245fc 100644 --- a/src/datadogV2/model/model_logs_metric_update_compute.rs +++ b/src/datadogV2/model/model_logs_metric_update_compute.rs @@ -21,11 +21,12 @@ impl LogsMetricUpdateCompute { } } - pub fn with_include_percentiles(&mut self, value: bool) -> &mut Self { + pub fn include_percentiles(&mut self, value: bool) -> &mut Self { self.include_percentiles = Some(value); self } } + impl Default for LogsMetricUpdateCompute { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_metrics_response.rs b/src/datadogV2/model/model_logs_metrics_response.rs index 9a151cf51..a7b0c2534 100644 --- a/src/datadogV2/model/model_logs_metrics_response.rs +++ b/src/datadogV2/model/model_logs_metrics_response.rs @@ -18,7 +18,7 @@ impl LogsMetricsResponse { LogsMetricsResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl LogsMetricsResponse { self } } + impl Default for LogsMetricsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_query_filter.rs b/src/datadogV2/model/model_logs_query_filter.rs index 00944c9f8..d56dc9886 100644 --- a/src/datadogV2/model/model_logs_query_filter.rs +++ b/src/datadogV2/model/model_logs_query_filter.rs @@ -36,34 +36,32 @@ impl LogsQueryFilter { } } - pub fn with_from(&mut self, value: String) -> &mut Self { + pub fn from(&mut self, value: String) -> &mut Self { self.from = Some(value); self } - pub fn with_indexes(&mut self, value: Vec) -> &mut Self { + pub fn indexes(&mut self, value: Vec) -> &mut Self { self.indexes = Some(value); self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } - pub fn with_storage_tier( - &mut self, - value: crate::datadogV2::model::LogsStorageTier, - ) -> &mut Self { + pub fn storage_tier(&mut self, value: crate::datadogV2::model::LogsStorageTier) -> &mut Self { self.storage_tier = Some(value); self } - pub fn with_to(&mut self, value: String) -> &mut Self { + pub fn to(&mut self, value: String) -> &mut Self { self.to = Some(value); self } } + impl Default for LogsQueryFilter { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_query_options.rs b/src/datadogV2/model/model_logs_query_options.rs index 6f14d58ea..f040a21e6 100644 --- a/src/datadogV2/model/model_logs_query_options.rs +++ b/src/datadogV2/model/model_logs_query_options.rs @@ -25,16 +25,17 @@ impl LogsQueryOptions { } } - pub fn with_time_offset(&mut self, value: i64) -> &mut Self { + pub fn time_offset(&mut self, value: i64) -> &mut Self { self.time_offset = Some(value); self } - pub fn with_timezone(&mut self, value: String) -> &mut Self { + pub fn timezone(&mut self, value: String) -> &mut Self { self.timezone = Some(value); self } } + impl Default for LogsQueryOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_response_metadata.rs b/src/datadogV2/model/model_logs_response_metadata.rs index e36958b3d..b8bc25e21 100644 --- a/src/datadogV2/model/model_logs_response_metadata.rs +++ b/src/datadogV2/model/model_logs_response_metadata.rs @@ -37,25 +37,22 @@ impl LogsResponseMetadata { } } - pub fn with_elapsed(&mut self, value: i64) -> &mut Self { + pub fn elapsed(&mut self, value: i64) -> &mut Self { self.elapsed = Some(value); self } - pub fn with_page( - &mut self, - value: crate::datadogV2::model::LogsResponseMetadataPage, - ) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV2::model::LogsResponseMetadataPage) -> &mut Self { self.page = Some(value); self } - pub fn with_request_id(&mut self, value: String) -> &mut Self { + pub fn request_id(&mut self, value: String) -> &mut Self { self.request_id = Some(value); self } - pub fn with_status( + pub fn status( &mut self, value: crate::datadogV2::model::LogsAggregateResponseStatus, ) -> &mut Self { @@ -63,11 +60,12 @@ impl LogsResponseMetadata { self } - pub fn with_warnings(&mut self, value: Vec) -> &mut Self { + pub fn warnings(&mut self, value: Vec) -> &mut Self { self.warnings = Some(value); self } } + impl Default for LogsResponseMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_response_metadata_page.rs b/src/datadogV2/model/model_logs_response_metadata_page.rs index 3d1c1c4c0..e34ccdbdf 100644 --- a/src/datadogV2/model/model_logs_response_metadata_page.rs +++ b/src/datadogV2/model/model_logs_response_metadata_page.rs @@ -19,11 +19,12 @@ impl LogsResponseMetadataPage { LogsResponseMetadataPage { after: None } } - pub fn with_after(&mut self, value: String) -> &mut Self { + pub fn after(&mut self, value: String) -> &mut Self { self.after = Some(value); self } } + impl Default for LogsResponseMetadataPage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_logs_warning.rs b/src/datadogV2/model/model_logs_warning.rs index d11937dbc..5a7cfc950 100644 --- a/src/datadogV2/model/model_logs_warning.rs +++ b/src/datadogV2/model/model_logs_warning.rs @@ -28,21 +28,22 @@ impl LogsWarning { } } - pub fn with_code(&mut self, value: String) -> &mut Self { + pub fn code(&mut self, value: String) -> &mut Self { self.code = Some(value); self } - pub fn with_detail(&mut self, value: String) -> &mut Self { + pub fn detail(&mut self, value: String) -> &mut Self { self.detail = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } } + impl Default for LogsWarning { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric.rs b/src/datadogV2/model/model_metric.rs index 3b126c088..c02fa2e1d 100644 --- a/src/datadogV2/model/model_metric.rs +++ b/src/datadogV2/model/model_metric.rs @@ -24,16 +24,17 @@ impl Metric { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::MetricType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::MetricType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for Metric { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_all_tags.rs b/src/datadogV2/model/model_metric_all_tags.rs index 88e829176..6c7110c4c 100644 --- a/src/datadogV2/model/model_metric_all_tags.rs +++ b/src/datadogV2/model/model_metric_all_tags.rs @@ -28,7 +28,7 @@ impl MetricAllTags { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::MetricAllTagsAttributes, ) -> &mut Self { @@ -36,16 +36,17 @@ impl MetricAllTags { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::MetricType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::MetricType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for MetricAllTags { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_all_tags_attributes.rs b/src/datadogV2/model/model_metric_all_tags_attributes.rs index 23647e9c9..db077926e 100644 --- a/src/datadogV2/model/model_metric_all_tags_attributes.rs +++ b/src/datadogV2/model/model_metric_all_tags_attributes.rs @@ -18,11 +18,12 @@ impl MetricAllTagsAttributes { MetricAllTagsAttributes { tags: None } } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } } + impl Default for MetricAllTagsAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_all_tags_response.rs b/src/datadogV2/model/model_metric_all_tags_response.rs index f11ee42f7..671031e6e 100644 --- a/src/datadogV2/model/model_metric_all_tags_response.rs +++ b/src/datadogV2/model/model_metric_all_tags_response.rs @@ -18,11 +18,12 @@ impl MetricAllTagsResponse { MetricAllTagsResponse { data: None } } - pub fn with_data(&mut self, value: crate::datadogV2::model::MetricAllTags) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::MetricAllTags) -> &mut Self { self.data = Some(value); self } } + impl Default for MetricAllTagsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_create.rs b/src/datadogV2/model/model_metric_bulk_tag_config_create.rs index 1bd76717c..2a357763c 100644 --- a/src/datadogV2/model/model_metric_bulk_tag_config_create.rs +++ b/src/datadogV2/model/model_metric_bulk_tag_config_create.rs @@ -31,7 +31,7 @@ impl MetricBulkTagConfigCreate { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::MetricBulkTagConfigCreateAttributes, ) -> &mut Self { diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_create_attributes.rs b/src/datadogV2/model/model_metric_bulk_tag_config_create_attributes.rs index ac6693083..ae24f3501 100644 --- a/src/datadogV2/model/model_metric_bulk_tag_config_create_attributes.rs +++ b/src/datadogV2/model/model_metric_bulk_tag_config_create_attributes.rs @@ -30,21 +30,22 @@ impl MetricBulkTagConfigCreateAttributes { } } - pub fn with_emails(&mut self, value: Vec) -> &mut Self { + pub fn emails(&mut self, value: Vec) -> &mut Self { self.emails = Some(value); self } - pub fn with_exclude_tags_mode(&mut self, value: bool) -> &mut Self { + pub fn exclude_tags_mode(&mut self, value: bool) -> &mut Self { self.exclude_tags_mode = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } } + impl Default for MetricBulkTagConfigCreateAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_delete.rs b/src/datadogV2/model/model_metric_bulk_tag_config_delete.rs index 2d334e8a0..cfc4cf46f 100644 --- a/src/datadogV2/model/model_metric_bulk_tag_config_delete.rs +++ b/src/datadogV2/model/model_metric_bulk_tag_config_delete.rs @@ -31,7 +31,7 @@ impl MetricBulkTagConfigDelete { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::MetricBulkTagConfigDeleteAttributes, ) -> &mut Self { diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_delete_attributes.rs b/src/datadogV2/model/model_metric_bulk_tag_config_delete_attributes.rs index 47ef5e393..e72ab80ae 100644 --- a/src/datadogV2/model/model_metric_bulk_tag_config_delete_attributes.rs +++ b/src/datadogV2/model/model_metric_bulk_tag_config_delete_attributes.rs @@ -18,11 +18,12 @@ impl MetricBulkTagConfigDeleteAttributes { MetricBulkTagConfigDeleteAttributes { emails: None } } - pub fn with_emails(&mut self, value: Vec) -> &mut Self { + pub fn emails(&mut self, value: Vec) -> &mut Self { self.emails = Some(value); self } } + impl Default for MetricBulkTagConfigDeleteAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_response.rs b/src/datadogV2/model/model_metric_bulk_tag_config_response.rs index 73db46d0c..aaf223af8 100644 --- a/src/datadogV2/model/model_metric_bulk_tag_config_response.rs +++ b/src/datadogV2/model/model_metric_bulk_tag_config_response.rs @@ -19,14 +19,12 @@ impl MetricBulkTagConfigResponse { MetricBulkTagConfigResponse { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::MetricBulkTagConfigStatus, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::MetricBulkTagConfigStatus) -> &mut Self { self.data = Some(value); self } } + impl Default for MetricBulkTagConfigResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_status.rs b/src/datadogV2/model/model_metric_bulk_tag_config_status.rs index 81b8b3def..2e85e60a3 100644 --- a/src/datadogV2/model/model_metric_bulk_tag_config_status.rs +++ b/src/datadogV2/model/model_metric_bulk_tag_config_status.rs @@ -32,7 +32,7 @@ impl MetricBulkTagConfigStatus { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::MetricBulkTagConfigStatusAttributes, ) -> &mut Self { diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_status_attributes.rs b/src/datadogV2/model/model_metric_bulk_tag_config_status_attributes.rs index 3a2fbbe9a..9830b117e 100644 --- a/src/datadogV2/model/model_metric_bulk_tag_config_status_attributes.rs +++ b/src/datadogV2/model/model_metric_bulk_tag_config_status_attributes.rs @@ -33,26 +33,27 @@ impl MetricBulkTagConfigStatusAttributes { } } - pub fn with_emails(&mut self, value: Vec) -> &mut Self { + pub fn emails(&mut self, value: Vec) -> &mut Self { self.emails = Some(value); self } - pub fn with_exclude_tags_mode(&mut self, value: bool) -> &mut Self { + pub fn exclude_tags_mode(&mut self, value: bool) -> &mut Self { self.exclude_tags_mode = Some(value); self } - pub fn with_status(&mut self, value: String) -> &mut Self { + pub fn status(&mut self, value: String) -> &mut Self { self.status = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } } + impl Default for MetricBulkTagConfigStatusAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_distinct_volume.rs b/src/datadogV2/model/model_metric_distinct_volume.rs index 0bfd7adf0..94ccb6e32 100644 --- a/src/datadogV2/model/model_metric_distinct_volume.rs +++ b/src/datadogV2/model/model_metric_distinct_volume.rs @@ -28,7 +28,7 @@ impl MetricDistinctVolume { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::MetricDistinctVolumeAttributes, ) -> &mut Self { @@ -36,19 +36,17 @@ impl MetricDistinctVolume { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( - &mut self, - value: crate::datadogV2::model::MetricDistinctVolumeType, - ) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::MetricDistinctVolumeType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for MetricDistinctVolume { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_distinct_volume_attributes.rs b/src/datadogV2/model/model_metric_distinct_volume_attributes.rs index be0443a74..783f29eef 100644 --- a/src/datadogV2/model/model_metric_distinct_volume_attributes.rs +++ b/src/datadogV2/model/model_metric_distinct_volume_attributes.rs @@ -20,11 +20,12 @@ impl MetricDistinctVolumeAttributes { } } - pub fn with_distinct_volume(&mut self, value: i64) -> &mut Self { + pub fn distinct_volume(&mut self, value: i64) -> &mut Self { self.distinct_volume = Some(value); self } } + impl Default for MetricDistinctVolumeAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_estimate.rs b/src/datadogV2/model/model_metric_estimate.rs index aa296f151..74d36b6ec 100644 --- a/src/datadogV2/model/model_metric_estimate.rs +++ b/src/datadogV2/model/model_metric_estimate.rs @@ -28,7 +28,7 @@ impl MetricEstimate { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::MetricEstimateAttributes, ) -> &mut Self { @@ -36,12 +36,12 @@ impl MetricEstimate { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::MetricEstimateResourceType, ) -> &mut Self { @@ -49,6 +49,7 @@ impl MetricEstimate { self } } + impl Default for MetricEstimate { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_estimate_attributes.rs b/src/datadogV2/model/model_metric_estimate_attributes.rs index 66809afc5..eb18bb0a0 100644 --- a/src/datadogV2/model/model_metric_estimate_attributes.rs +++ b/src/datadogV2/model/model_metric_estimate_attributes.rs @@ -28,7 +28,7 @@ impl MetricEstimateAttributes { } } - pub fn with_estimate_type( + pub fn estimate_type( &mut self, value: crate::datadogV2::model::MetricEstimateType, ) -> &mut Self { @@ -36,16 +36,17 @@ impl MetricEstimateAttributes { self } - pub fn with_estimated_at(&mut self, value: String) -> &mut Self { + pub fn estimated_at(&mut self, value: String) -> &mut Self { self.estimated_at = Some(value); self } - pub fn with_estimated_output_series(&mut self, value: i64) -> &mut Self { + pub fn estimated_output_series(&mut self, value: i64) -> &mut Self { self.estimated_output_series = Some(value); self } } + impl Default for MetricEstimateAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_estimate_response.rs b/src/datadogV2/model/model_metric_estimate_response.rs index dbfefa821..9d0553f0a 100644 --- a/src/datadogV2/model/model_metric_estimate_response.rs +++ b/src/datadogV2/model/model_metric_estimate_response.rs @@ -18,11 +18,12 @@ impl MetricEstimateResponse { MetricEstimateResponse { data: None } } - pub fn with_data(&mut self, value: crate::datadogV2::model::MetricEstimate) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::MetricEstimate) -> &mut Self { self.data = Some(value); self } } + impl Default for MetricEstimateResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_ingested_indexed_volume.rs b/src/datadogV2/model/model_metric_ingested_indexed_volume.rs index ab87a3744..89e14281e 100644 --- a/src/datadogV2/model/model_metric_ingested_indexed_volume.rs +++ b/src/datadogV2/model/model_metric_ingested_indexed_volume.rs @@ -28,7 +28,7 @@ impl MetricIngestedIndexedVolume { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::MetricIngestedIndexedVolumeAttributes, ) -> &mut Self { @@ -36,12 +36,12 @@ impl MetricIngestedIndexedVolume { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::MetricIngestedIndexedVolumeType, ) -> &mut Self { @@ -49,6 +49,7 @@ impl MetricIngestedIndexedVolume { self } } + impl Default for MetricIngestedIndexedVolume { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_ingested_indexed_volume_attributes.rs b/src/datadogV2/model/model_metric_ingested_indexed_volume_attributes.rs index fc4c49f89..07f913548 100644 --- a/src/datadogV2/model/model_metric_ingested_indexed_volume_attributes.rs +++ b/src/datadogV2/model/model_metric_ingested_indexed_volume_attributes.rs @@ -24,16 +24,17 @@ impl MetricIngestedIndexedVolumeAttributes { } } - pub fn with_indexed_volume(&mut self, value: i64) -> &mut Self { + pub fn indexed_volume(&mut self, value: i64) -> &mut Self { self.indexed_volume = Some(value); self } - pub fn with_ingested_volume(&mut self, value: i64) -> &mut Self { + pub fn ingested_volume(&mut self, value: i64) -> &mut Self { self.ingested_volume = Some(value); self } } + impl Default for MetricIngestedIndexedVolumeAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_metadata.rs b/src/datadogV2/model/model_metric_metadata.rs index c9d95823d..4dfb3d38b 100644 --- a/src/datadogV2/model/model_metric_metadata.rs +++ b/src/datadogV2/model/model_metric_metadata.rs @@ -18,11 +18,12 @@ impl MetricMetadata { MetricMetadata { origin: None } } - pub fn with_origin(&mut self, value: crate::datadogV2::model::MetricOrigin) -> &mut Self { + pub fn origin(&mut self, value: crate::datadogV2::model::MetricOrigin) -> &mut Self { self.origin = Some(value); self } } + impl Default for MetricMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_origin.rs b/src/datadogV2/model/model_metric_origin.rs index 1d62fc0b3..30d3bfcc2 100644 --- a/src/datadogV2/model/model_metric_origin.rs +++ b/src/datadogV2/model/model_metric_origin.rs @@ -28,21 +28,22 @@ impl MetricOrigin { } } - pub fn with_metric_type(&mut self, value: i32) -> &mut Self { + pub fn metric_type(&mut self, value: i32) -> &mut Self { self.metric_type = Some(value); self } - pub fn with_product(&mut self, value: i32) -> &mut Self { + pub fn product(&mut self, value: i32) -> &mut Self { self.product = Some(value); self } - pub fn with_service(&mut self, value: i32) -> &mut Self { + pub fn service(&mut self, value: i32) -> &mut Self { self.service = Some(value); self } } + impl Default for MetricOrigin { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_point.rs b/src/datadogV2/model/model_metric_point.rs index b51d03dbf..70aa452d7 100644 --- a/src/datadogV2/model/model_metric_point.rs +++ b/src/datadogV2/model/model_metric_point.rs @@ -25,16 +25,17 @@ impl MetricPoint { } } - pub fn with_timestamp(&mut self, value: i64) -> &mut Self { + pub fn timestamp(&mut self, value: i64) -> &mut Self { self.timestamp = Some(value); self } - pub fn with_value(&mut self, value: f64) -> &mut Self { + pub fn value(&mut self, value: f64) -> &mut Self { self.value = Some(value); self } } + impl Default for MetricPoint { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_resource.rs b/src/datadogV2/model/model_metric_resource.rs index 932ca9d07..c31785e4a 100644 --- a/src/datadogV2/model/model_metric_resource.rs +++ b/src/datadogV2/model/model_metric_resource.rs @@ -24,16 +24,17 @@ impl MetricResource { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } } + impl Default for MetricResource { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_series.rs b/src/datadogV2/model/model_metric_series.rs index 426af10da..9b9097a64 100644 --- a/src/datadogV2/model/model_metric_series.rs +++ b/src/datadogV2/model/model_metric_series.rs @@ -53,40 +53,37 @@ impl MetricSeries { } } - pub fn with_interval(&mut self, value: i64) -> &mut Self { + pub fn interval(&mut self, value: i64) -> &mut Self { self.interval = Some(value); self } - pub fn with_metadata(&mut self, value: crate::datadogV2::model::MetricMetadata) -> &mut Self { + pub fn metadata(&mut self, value: crate::datadogV2::model::MetricMetadata) -> &mut Self { self.metadata = Some(value); self } - pub fn with_resources( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn resources(&mut self, value: Vec) -> &mut Self { self.resources = Some(value); self } - pub fn with_source_type_name(&mut self, value: String) -> &mut Self { + pub fn source_type_name(&mut self, value: String) -> &mut Self { self.source_type_name = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::MetricIntakeType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::MetricIntakeType) -> &mut Self { self.type_ = Some(value); self } - pub fn with_unit(&mut self, value: String) -> &mut Self { + pub fn unit(&mut self, value: String) -> &mut Self { self.unit = Some(value); self } diff --git a/src/datadogV2/model/model_metric_suggested_tags_and_aggregations.rs b/src/datadogV2/model/model_metric_suggested_tags_and_aggregations.rs index 8f9998b88..e0344e2ae 100644 --- a/src/datadogV2/model/model_metric_suggested_tags_and_aggregations.rs +++ b/src/datadogV2/model/model_metric_suggested_tags_and_aggregations.rs @@ -28,7 +28,7 @@ impl MetricSuggestedTagsAndAggregations { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::MetricSuggestedTagsAttributes, ) -> &mut Self { @@ -36,12 +36,12 @@ impl MetricSuggestedTagsAndAggregations { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::MetricActiveConfigurationType, ) -> &mut Self { @@ -49,6 +49,7 @@ impl MetricSuggestedTagsAndAggregations { self } } + impl Default for MetricSuggestedTagsAndAggregations { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_suggested_tags_and_aggregations_response.rs b/src/datadogV2/model/model_metric_suggested_tags_and_aggregations_response.rs index 9bb854ba1..cdbcd083b 100644 --- a/src/datadogV2/model/model_metric_suggested_tags_and_aggregations_response.rs +++ b/src/datadogV2/model/model_metric_suggested_tags_and_aggregations_response.rs @@ -18,7 +18,7 @@ impl MetricSuggestedTagsAndAggregationsResponse { MetricSuggestedTagsAndAggregationsResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::MetricSuggestedTagsAndAggregations, ) -> &mut Self { @@ -26,6 +26,7 @@ impl MetricSuggestedTagsAndAggregationsResponse { self } } + impl Default for MetricSuggestedTagsAndAggregationsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_suggested_tags_attributes.rs b/src/datadogV2/model/model_metric_suggested_tags_attributes.rs index 67af6a24b..6274b56fb 100644 --- a/src/datadogV2/model/model_metric_suggested_tags_attributes.rs +++ b/src/datadogV2/model/model_metric_suggested_tags_attributes.rs @@ -24,7 +24,7 @@ impl MetricSuggestedTagsAttributes { } } - pub fn with_active_aggregations( + pub fn active_aggregations( &mut self, value: Vec, ) -> &mut Self { @@ -32,11 +32,12 @@ impl MetricSuggestedTagsAttributes { self } - pub fn with_active_tags(&mut self, value: Vec) -> &mut Self { + pub fn active_tags(&mut self, value: Vec) -> &mut Self { self.active_tags = Some(value); self } } + impl Default for MetricSuggestedTagsAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_tag_configuration.rs b/src/datadogV2/model/model_metric_tag_configuration.rs index 3a9c2b291..0b2574ab6 100644 --- a/src/datadogV2/model/model_metric_tag_configuration.rs +++ b/src/datadogV2/model/model_metric_tag_configuration.rs @@ -28,7 +28,7 @@ impl MetricTagConfiguration { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::MetricTagConfigurationAttributes, ) -> &mut Self { @@ -36,12 +36,12 @@ impl MetricTagConfiguration { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::MetricTagConfigurationType, ) -> &mut Self { @@ -49,6 +49,7 @@ impl MetricTagConfiguration { self } } + impl Default for MetricTagConfiguration { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_tag_configuration_attributes.rs b/src/datadogV2/model/model_metric_tag_configuration_attributes.rs index 102b168db..a26aafcb3 100644 --- a/src/datadogV2/model/model_metric_tag_configuration_attributes.rs +++ b/src/datadogV2/model/model_metric_tag_configuration_attributes.rs @@ -62,7 +62,7 @@ impl MetricTagConfigurationAttributes { } } - pub fn with_aggregations( + pub fn aggregations( &mut self, value: Vec, ) -> &mut Self { @@ -70,22 +70,22 @@ impl MetricTagConfigurationAttributes { self } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_exclude_tags_mode(&mut self, value: bool) -> &mut Self { + pub fn exclude_tags_mode(&mut self, value: bool) -> &mut Self { self.exclude_tags_mode = Some(value); self } - pub fn with_include_percentiles(&mut self, value: bool) -> &mut Self { + pub fn include_percentiles(&mut self, value: bool) -> &mut Self { self.include_percentiles = Some(value); self } - pub fn with_metric_type( + pub fn metric_type( &mut self, value: crate::datadogV2::model::MetricTagConfigurationMetricTypes, ) -> &mut Self { @@ -93,16 +93,17 @@ impl MetricTagConfigurationAttributes { self } - pub fn with_modified_at(&mut self, value: String) -> &mut Self { + pub fn modified_at(&mut self, value: String) -> &mut Self { self.modified_at = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } } + impl Default for MetricTagConfigurationAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_tag_configuration_create_attributes.rs b/src/datadogV2/model/model_metric_tag_configuration_create_attributes.rs index cfc05709e..15a7775af 100644 --- a/src/datadogV2/model/model_metric_tag_configuration_create_attributes.rs +++ b/src/datadogV2/model/model_metric_tag_configuration_create_attributes.rs @@ -57,7 +57,7 @@ impl MetricTagConfigurationCreateAttributes { } } - pub fn with_aggregations( + pub fn aggregations( &mut self, value: Vec, ) -> &mut Self { @@ -65,12 +65,12 @@ impl MetricTagConfigurationCreateAttributes { self } - pub fn with_exclude_tags_mode(&mut self, value: bool) -> &mut Self { + pub fn exclude_tags_mode(&mut self, value: bool) -> &mut Self { self.exclude_tags_mode = Some(value); self } - pub fn with_include_percentiles(&mut self, value: bool) -> &mut Self { + pub fn include_percentiles(&mut self, value: bool) -> &mut Self { self.include_percentiles = Some(value); self } diff --git a/src/datadogV2/model/model_metric_tag_configuration_create_data.rs b/src/datadogV2/model/model_metric_tag_configuration_create_data.rs index 31d6d0ed6..7b64dedb8 100644 --- a/src/datadogV2/model/model_metric_tag_configuration_create_data.rs +++ b/src/datadogV2/model/model_metric_tag_configuration_create_data.rs @@ -31,7 +31,7 @@ impl MetricTagConfigurationCreateData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::MetricTagConfigurationCreateAttributes, ) -> &mut Self { diff --git a/src/datadogV2/model/model_metric_tag_configuration_response.rs b/src/datadogV2/model/model_metric_tag_configuration_response.rs index 054515232..e4a458da8 100644 --- a/src/datadogV2/model/model_metric_tag_configuration_response.rs +++ b/src/datadogV2/model/model_metric_tag_configuration_response.rs @@ -18,14 +18,12 @@ impl MetricTagConfigurationResponse { MetricTagConfigurationResponse { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::MetricTagConfiguration, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::MetricTagConfiguration) -> &mut Self { self.data = Some(value); self } } + impl Default for MetricTagConfigurationResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_tag_configuration_update_attributes.rs b/src/datadogV2/model/model_metric_tag_configuration_update_attributes.rs index 63588896c..e9194599c 100644 --- a/src/datadogV2/model/model_metric_tag_configuration_update_attributes.rs +++ b/src/datadogV2/model/model_metric_tag_configuration_update_attributes.rs @@ -50,7 +50,7 @@ impl MetricTagConfigurationUpdateAttributes { } } - pub fn with_aggregations( + pub fn aggregations( &mut self, value: Vec, ) -> &mut Self { @@ -58,21 +58,22 @@ impl MetricTagConfigurationUpdateAttributes { self } - pub fn with_exclude_tags_mode(&mut self, value: bool) -> &mut Self { + pub fn exclude_tags_mode(&mut self, value: bool) -> &mut Self { self.exclude_tags_mode = Some(value); self } - pub fn with_include_percentiles(&mut self, value: bool) -> &mut Self { + pub fn include_percentiles(&mut self, value: bool) -> &mut Self { self.include_percentiles = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } } + impl Default for MetricTagConfigurationUpdateAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metric_tag_configuration_update_data.rs b/src/datadogV2/model/model_metric_tag_configuration_update_data.rs index 1c7209d56..7ce82125f 100644 --- a/src/datadogV2/model/model_metric_tag_configuration_update_data.rs +++ b/src/datadogV2/model/model_metric_tag_configuration_update_data.rs @@ -31,7 +31,7 @@ impl MetricTagConfigurationUpdateData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::MetricTagConfigurationUpdateAttributes, ) -> &mut Self { diff --git a/src/datadogV2/model/model_metric_volumes.rs b/src/datadogV2/model/model_metric_volumes.rs index f49c69340..10bf75ee6 100644 --- a/src/datadogV2/model/model_metric_volumes.rs +++ b/src/datadogV2/model/model_metric_volumes.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum MetricVolumes { - MetricDistinctVolume(crate::datadogV2::model::MetricDistinctVolume), - MetricIngestedIndexedVolume(crate::datadogV2::model::MetricIngestedIndexedVolume), + MetricDistinctVolume(Box), + MetricIngestedIndexedVolume(Box), } diff --git a/src/datadogV2/model/model_metric_volumes_response.rs b/src/datadogV2/model/model_metric_volumes_response.rs index 64a5e4e12..36b40cdff 100644 --- a/src/datadogV2/model/model_metric_volumes_response.rs +++ b/src/datadogV2/model/model_metric_volumes_response.rs @@ -18,11 +18,12 @@ impl MetricVolumesResponse { MetricVolumesResponse { data: None } } - pub fn with_data(&mut self, value: crate::datadogV2::model::MetricVolumes) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::MetricVolumes) -> &mut Self { self.data = Some(value); self } } + impl Default for MetricVolumesResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metrics_and_metric_tag_configurations.rs b/src/datadogV2/model/model_metrics_and_metric_tag_configurations.rs index bdee97ae2..68d4e9e68 100644 --- a/src/datadogV2/model/model_metrics_and_metric_tag_configurations.rs +++ b/src/datadogV2/model/model_metrics_and_metric_tag_configurations.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum MetricsAndMetricTagConfigurations { - Metric(crate::datadogV2::model::Metric), - MetricTagConfiguration(crate::datadogV2::model::MetricTagConfiguration), + Metric(Box), + MetricTagConfiguration(Box), } diff --git a/src/datadogV2/model/model_metrics_and_metric_tag_configurations_response.rs b/src/datadogV2/model/model_metrics_and_metric_tag_configurations_response.rs index 694d027cf..36e88d273 100644 --- a/src/datadogV2/model/model_metrics_and_metric_tag_configurations_response.rs +++ b/src/datadogV2/model/model_metrics_and_metric_tag_configurations_response.rs @@ -18,7 +18,7 @@ impl MetricsAndMetricTagConfigurationsResponse { MetricsAndMetricTagConfigurationsResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl MetricsAndMetricTagConfigurationsResponse { self } } + impl Default for MetricsAndMetricTagConfigurationsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_metrics_scalar_query.rs b/src/datadogV2/model/model_metrics_scalar_query.rs index 6ade753fa..6d7f7d717 100644 --- a/src/datadogV2/model/model_metrics_scalar_query.rs +++ b/src/datadogV2/model/model_metrics_scalar_query.rs @@ -36,7 +36,7 @@ impl MetricsScalarQuery { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV2/model/model_metrics_timeseries_query.rs b/src/datadogV2/model/model_metrics_timeseries_query.rs index afc6cbb96..36b8154d5 100644 --- a/src/datadogV2/model/model_metrics_timeseries_query.rs +++ b/src/datadogV2/model/model_metrics_timeseries_query.rs @@ -31,7 +31,7 @@ impl MetricsTimeseriesQuery { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV2/model/model_monitor_config_policy_attribute_response.rs b/src/datadogV2/model/model_monitor_config_policy_attribute_response.rs index d02f514e3..c6adcf251 100644 --- a/src/datadogV2/model/model_monitor_config_policy_attribute_response.rs +++ b/src/datadogV2/model/model_monitor_config_policy_attribute_response.rs @@ -24,7 +24,7 @@ impl MonitorConfigPolicyAttributeResponse { } } - pub fn with_policy( + pub fn policy( &mut self, value: crate::datadogV2::model::MonitorConfigPolicyPolicy, ) -> &mut Self { @@ -32,7 +32,7 @@ impl MonitorConfigPolicyAttributeResponse { self } - pub fn with_policy_type( + pub fn policy_type( &mut self, value: crate::datadogV2::model::MonitorConfigPolicyType, ) -> &mut Self { @@ -40,6 +40,7 @@ impl MonitorConfigPolicyAttributeResponse { self } } + impl Default for MonitorConfigPolicyAttributeResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_monitor_config_policy_list_response.rs b/src/datadogV2/model/model_monitor_config_policy_list_response.rs index 980caff43..6fc2364b2 100644 --- a/src/datadogV2/model/model_monitor_config_policy_list_response.rs +++ b/src/datadogV2/model/model_monitor_config_policy_list_response.rs @@ -18,7 +18,7 @@ impl MonitorConfigPolicyListResponse { MonitorConfigPolicyListResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl MonitorConfigPolicyListResponse { self } } + impl Default for MonitorConfigPolicyListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_monitor_config_policy_policy.rs b/src/datadogV2/model/model_monitor_config_policy_policy.rs index a66519074..0a0dc53a2 100644 --- a/src/datadogV2/model/model_monitor_config_policy_policy.rs +++ b/src/datadogV2/model/model_monitor_config_policy_policy.rs @@ -7,5 +7,5 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum MonitorConfigPolicyPolicy { - MonitorConfigPolicyTagPolicy(crate::datadogV2::model::MonitorConfigPolicyTagPolicy), + MonitorConfigPolicyTagPolicy(Box), } diff --git a/src/datadogV2/model/model_monitor_config_policy_policy_create_request.rs b/src/datadogV2/model/model_monitor_config_policy_policy_create_request.rs index b8e777a8a..c0624ff85 100644 --- a/src/datadogV2/model/model_monitor_config_policy_policy_create_request.rs +++ b/src/datadogV2/model/model_monitor_config_policy_policy_create_request.rs @@ -8,6 +8,6 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum MonitorConfigPolicyPolicyCreateRequest { MonitorConfigPolicyTagPolicyCreateRequest( - crate::datadogV2::model::MonitorConfigPolicyTagPolicyCreateRequest, + Box, ), } diff --git a/src/datadogV2/model/model_monitor_config_policy_response.rs b/src/datadogV2/model/model_monitor_config_policy_response.rs index 92052590b..52e195be3 100644 --- a/src/datadogV2/model/model_monitor_config_policy_response.rs +++ b/src/datadogV2/model/model_monitor_config_policy_response.rs @@ -18,7 +18,7 @@ impl MonitorConfigPolicyResponse { MonitorConfigPolicyResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::MonitorConfigPolicyResponseData, ) -> &mut Self { @@ -26,6 +26,7 @@ impl MonitorConfigPolicyResponse { self } } + impl Default for MonitorConfigPolicyResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_monitor_config_policy_response_data.rs b/src/datadogV2/model/model_monitor_config_policy_response_data.rs index b3e5882f2..92b137372 100644 --- a/src/datadogV2/model/model_monitor_config_policy_response_data.rs +++ b/src/datadogV2/model/model_monitor_config_policy_response_data.rs @@ -28,7 +28,7 @@ impl MonitorConfigPolicyResponseData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::MonitorConfigPolicyAttributeResponse, ) -> &mut Self { @@ -36,12 +36,12 @@ impl MonitorConfigPolicyResponseData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::MonitorConfigPolicyResourceType, ) -> &mut Self { @@ -49,6 +49,7 @@ impl MonitorConfigPolicyResponseData { self } } + impl Default for MonitorConfigPolicyResponseData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_monitor_config_policy_tag_policy.rs b/src/datadogV2/model/model_monitor_config_policy_tag_policy.rs index 49b83109e..48dceb74f 100644 --- a/src/datadogV2/model/model_monitor_config_policy_tag_policy.rs +++ b/src/datadogV2/model/model_monitor_config_policy_tag_policy.rs @@ -28,21 +28,22 @@ impl MonitorConfigPolicyTagPolicy { } } - pub fn with_tag_key(&mut self, value: String) -> &mut Self { + pub fn tag_key(&mut self, value: String) -> &mut Self { self.tag_key = Some(value); self } - pub fn with_tag_key_required(&mut self, value: bool) -> &mut Self { + pub fn tag_key_required(&mut self, value: bool) -> &mut Self { self.tag_key_required = Some(value); self } - pub fn with_valid_tag_values(&mut self, value: Vec) -> &mut Self { + pub fn valid_tag_values(&mut self, value: Vec) -> &mut Self { self.valid_tag_values = Some(value); self } } + impl Default for MonitorConfigPolicyTagPolicy { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_monitor_downtime_match_response.rs b/src/datadogV2/model/model_monitor_downtime_match_response.rs index b629a9ca7..8ca467ade 100644 --- a/src/datadogV2/model/model_monitor_downtime_match_response.rs +++ b/src/datadogV2/model/model_monitor_downtime_match_response.rs @@ -24,7 +24,7 @@ impl MonitorDowntimeMatchResponse { } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -32,11 +32,12 @@ impl MonitorDowntimeMatchResponse { self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::DowntimeMeta) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::DowntimeMeta) -> &mut Self { self.meta = Some(value); self } } + impl Default for MonitorDowntimeMatchResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_monitor_downtime_match_response_attributes.rs b/src/datadogV2/model/model_monitor_downtime_match_response_attributes.rs index 69654d245..4504b73d2 100644 --- a/src/datadogV2/model/model_monitor_downtime_match_response_attributes.rs +++ b/src/datadogV2/model/model_monitor_downtime_match_response_attributes.rs @@ -32,26 +32,27 @@ impl MonitorDowntimeMatchResponseAttributes { } } - pub fn with_end(&mut self, value: Option) -> &mut Self { + pub fn end(&mut self, value: Option) -> &mut Self { self.end = Some(value); self } - pub fn with_groups(&mut self, value: Vec) -> &mut Self { + pub fn groups(&mut self, value: Vec) -> &mut Self { self.groups = Some(value); self } - pub fn with_scope(&mut self, value: String) -> &mut Self { + pub fn scope(&mut self, value: String) -> &mut Self { self.scope = Some(value); self } - pub fn with_start(&mut self, value: String) -> &mut Self { + pub fn start(&mut self, value: String) -> &mut Self { self.start = Some(value); self } } + impl Default for MonitorDowntimeMatchResponseAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_monitor_downtime_match_response_data.rs b/src/datadogV2/model/model_monitor_downtime_match_response_data.rs index 953e8a3dd..9bea4e012 100644 --- a/src/datadogV2/model/model_monitor_downtime_match_response_data.rs +++ b/src/datadogV2/model/model_monitor_downtime_match_response_data.rs @@ -28,7 +28,7 @@ impl MonitorDowntimeMatchResponseData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::MonitorDowntimeMatchResponseAttributes, ) -> &mut Self { @@ -36,12 +36,12 @@ impl MonitorDowntimeMatchResponseData { self } - pub fn with_id(&mut self, value: Option) -> &mut Self { + pub fn id(&mut self, value: Option) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::MonitorDowntimeMatchResourceType, ) -> &mut Self { @@ -49,6 +49,7 @@ impl MonitorDowntimeMatchResponseData { self } } + impl Default for MonitorDowntimeMatchResponseData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_monitor_type.rs b/src/datadogV2/model/model_monitor_type.rs index f9079d329..83b063c3a 100644 --- a/src/datadogV2/model/model_monitor_type.rs +++ b/src/datadogV2/model/model_monitor_type.rs @@ -60,61 +60,62 @@ impl MonitorType { } } - pub fn with_created_at(&mut self, value: i64) -> &mut Self { + pub fn created_at(&mut self, value: i64) -> &mut Self { self.created_at = Some(value); self } - pub fn with_group_status(&mut self, value: i32) -> &mut Self { + pub fn group_status(&mut self, value: i32) -> &mut Self { self.group_status = Some(value); self } - pub fn with_groups(&mut self, value: Vec) -> &mut Self { + pub fn groups(&mut self, value: Vec) -> &mut Self { self.groups = Some(value); self } - pub fn with_id(&mut self, value: i64) -> &mut Self { + pub fn id(&mut self, value: i64) -> &mut Self { self.id = Some(value); self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } - pub fn with_modified(&mut self, value: i64) -> &mut Self { + pub fn modified(&mut self, value: i64) -> &mut Self { self.modified = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_templated_name(&mut self, value: String) -> &mut Self { + pub fn templated_name(&mut self, value: String) -> &mut Self { self.templated_name = Some(value); self } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } } + impl Default for MonitorType { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_monthly_cost_attribution_attributes.rs b/src/datadogV2/model/model_monthly_cost_attribution_attributes.rs index 010ad1491..4f06800b1 100644 --- a/src/datadogV2/model/model_monthly_cost_attribution_attributes.rs +++ b/src/datadogV2/model/model_monthly_cost_attribution_attributes.rs @@ -47,27 +47,27 @@ impl MonthlyCostAttributionAttributes { } } - pub fn with_month(&mut self, value: String) -> &mut Self { + pub fn month(&mut self, value: String) -> &mut Self { self.month = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_tag_config_source(&mut self, value: String) -> &mut Self { + pub fn tag_config_source(&mut self, value: String) -> &mut Self { self.tag_config_source = Some(value); self } - pub fn with_tags( + pub fn tags( &mut self, value: Option>>>, ) -> &mut Self { @@ -75,12 +75,12 @@ impl MonthlyCostAttributionAttributes { self } - pub fn with_updated_at(&mut self, value: String) -> &mut Self { + pub fn updated_at(&mut self, value: String) -> &mut Self { self.updated_at = Some(value); self } - pub fn with_values( + pub fn values( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -88,6 +88,7 @@ impl MonthlyCostAttributionAttributes { self } } + impl Default for MonthlyCostAttributionAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_monthly_cost_attribution_body.rs b/src/datadogV2/model/model_monthly_cost_attribution_body.rs index 8139c1ad3..1fe3a5e1f 100644 --- a/src/datadogV2/model/model_monthly_cost_attribution_body.rs +++ b/src/datadogV2/model/model_monthly_cost_attribution_body.rs @@ -28,7 +28,7 @@ impl MonthlyCostAttributionBody { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::MonthlyCostAttributionAttributes, ) -> &mut Self { @@ -36,16 +36,17 @@ impl MonthlyCostAttributionBody { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::CostAttributionType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::CostAttributionType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for MonthlyCostAttributionBody { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_monthly_cost_attribution_meta.rs b/src/datadogV2/model/model_monthly_cost_attribution_meta.rs index b0027a80b..6c11d4d63 100644 --- a/src/datadogV2/model/model_monthly_cost_attribution_meta.rs +++ b/src/datadogV2/model/model_monthly_cost_attribution_meta.rs @@ -24,7 +24,7 @@ impl MonthlyCostAttributionMeta { } } - pub fn with_aggregates( + pub fn aggregates( &mut self, value: Vec, ) -> &mut Self { @@ -32,7 +32,7 @@ impl MonthlyCostAttributionMeta { self } - pub fn with_pagination( + pub fn pagination( &mut self, value: crate::datadogV2::model::MonthlyCostAttributionPagination, ) -> &mut Self { @@ -40,6 +40,7 @@ impl MonthlyCostAttributionMeta { self } } + impl Default for MonthlyCostAttributionMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_monthly_cost_attribution_pagination.rs b/src/datadogV2/model/model_monthly_cost_attribution_pagination.rs index 5243bd7ee..607f37a50 100644 --- a/src/datadogV2/model/model_monthly_cost_attribution_pagination.rs +++ b/src/datadogV2/model/model_monthly_cost_attribution_pagination.rs @@ -24,11 +24,12 @@ impl MonthlyCostAttributionPagination { } } - pub fn with_next_record_id(&mut self, value: Option) -> &mut Self { + pub fn next_record_id(&mut self, value: Option) -> &mut Self { self.next_record_id = Some(value); self } } + impl Default for MonthlyCostAttributionPagination { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_monthly_cost_attribution_response.rs b/src/datadogV2/model/model_monthly_cost_attribution_response.rs index 8f915e40d..b30094732 100644 --- a/src/datadogV2/model/model_monthly_cost_attribution_response.rs +++ b/src/datadogV2/model/model_monthly_cost_attribution_response.rs @@ -24,7 +24,7 @@ impl MonthlyCostAttributionResponse { } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -32,7 +32,7 @@ impl MonthlyCostAttributionResponse { self } - pub fn with_meta( + pub fn meta( &mut self, value: crate::datadogV2::model::MonthlyCostAttributionMeta, ) -> &mut Self { @@ -40,6 +40,7 @@ impl MonthlyCostAttributionResponse { self } } + impl Default for MonthlyCostAttributionResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_okta_account.rs b/src/datadogV2/model/model_okta_account.rs index 2f31e6000..744a1caa8 100644 --- a/src/datadogV2/model/model_okta_account.rs +++ b/src/datadogV2/model/model_okta_account.rs @@ -31,7 +31,7 @@ impl OktaAccount { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } diff --git a/src/datadogV2/model/model_okta_account_attributes.rs b/src/datadogV2/model/model_okta_account_attributes.rs index 7dfdc1879..d497fb6ea 100644 --- a/src/datadogV2/model/model_okta_account_attributes.rs +++ b/src/datadogV2/model/model_okta_account_attributes.rs @@ -40,17 +40,17 @@ impl OktaAccountAttributes { } } - pub fn with_api_key(&mut self, value: String) -> &mut Self { + pub fn api_key(&mut self, value: String) -> &mut Self { self.api_key = Some(value); self } - pub fn with_client_id(&mut self, value: String) -> &mut Self { + pub fn client_id(&mut self, value: String) -> &mut Self { self.client_id = Some(value); self } - pub fn with_client_secret(&mut self, value: String) -> &mut Self { + pub fn client_secret(&mut self, value: String) -> &mut Self { self.client_secret = Some(value); self } diff --git a/src/datadogV2/model/model_okta_account_response.rs b/src/datadogV2/model/model_okta_account_response.rs index 60406afbb..b9594b990 100644 --- a/src/datadogV2/model/model_okta_account_response.rs +++ b/src/datadogV2/model/model_okta_account_response.rs @@ -18,11 +18,12 @@ impl OktaAccountResponse { OktaAccountResponse { data: None } } - pub fn with_data(&mut self, value: crate::datadogV2::model::OktaAccount) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::OktaAccount) -> &mut Self { self.data = Some(value); self } } + impl Default for OktaAccountResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_okta_account_update_request_attributes.rs b/src/datadogV2/model/model_okta_account_update_request_attributes.rs index 9642833c7..ad83fc340 100644 --- a/src/datadogV2/model/model_okta_account_update_request_attributes.rs +++ b/src/datadogV2/model/model_okta_account_update_request_attributes.rs @@ -36,17 +36,17 @@ impl OktaAccountUpdateRequestAttributes { } } - pub fn with_api_key(&mut self, value: String) -> &mut Self { + pub fn api_key(&mut self, value: String) -> &mut Self { self.api_key = Some(value); self } - pub fn with_client_id(&mut self, value: String) -> &mut Self { + pub fn client_id(&mut self, value: String) -> &mut Self { self.client_id = Some(value); self } - pub fn with_client_secret(&mut self, value: String) -> &mut Self { + pub fn client_secret(&mut self, value: String) -> &mut Self { self.client_secret = Some(value); self } diff --git a/src/datadogV2/model/model_okta_account_update_request_data.rs b/src/datadogV2/model/model_okta_account_update_request_data.rs index 9443feebb..b9e430b45 100644 --- a/src/datadogV2/model/model_okta_account_update_request_data.rs +++ b/src/datadogV2/model/model_okta_account_update_request_data.rs @@ -24,7 +24,7 @@ impl OktaAccountUpdateRequestData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::OktaAccountUpdateRequestAttributes, ) -> &mut Self { @@ -32,11 +32,12 @@ impl OktaAccountUpdateRequestData { self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::OktaAccountType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::OktaAccountType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for OktaAccountUpdateRequestData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_okta_accounts_response.rs b/src/datadogV2/model/model_okta_accounts_response.rs index ab99129b7..2153f7be9 100644 --- a/src/datadogV2/model/model_okta_accounts_response.rs +++ b/src/datadogV2/model/model_okta_accounts_response.rs @@ -18,7 +18,7 @@ impl OktaAccountsResponse { OktaAccountsResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl OktaAccountsResponse { self } } + impl Default for OktaAccountsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_on_demand_concurrency_cap.rs b/src/datadogV2/model/model_on_demand_concurrency_cap.rs index 2e39241c1..252a77704 100644 --- a/src/datadogV2/model/model_on_demand_concurrency_cap.rs +++ b/src/datadogV2/model/model_on_demand_concurrency_cap.rs @@ -24,7 +24,7 @@ impl OnDemandConcurrencyCap { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::OnDemandConcurrencyCapAttributes, ) -> &mut Self { @@ -32,7 +32,7 @@ impl OnDemandConcurrencyCap { self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::OnDemandConcurrencyCapType, ) -> &mut Self { @@ -40,6 +40,7 @@ impl OnDemandConcurrencyCap { self } } + impl Default for OnDemandConcurrencyCap { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_on_demand_concurrency_cap_attributes.rs b/src/datadogV2/model/model_on_demand_concurrency_cap_attributes.rs index bee482341..319a88aaa 100644 --- a/src/datadogV2/model/model_on_demand_concurrency_cap_attributes.rs +++ b/src/datadogV2/model/model_on_demand_concurrency_cap_attributes.rs @@ -20,11 +20,12 @@ impl OnDemandConcurrencyCapAttributes { } } - pub fn with_on_demand_concurrency_cap(&mut self, value: f64) -> &mut Self { + pub fn on_demand_concurrency_cap(&mut self, value: f64) -> &mut Self { self.on_demand_concurrency_cap = Some(value); self } } + impl Default for OnDemandConcurrencyCapAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_on_demand_concurrency_cap_response.rs b/src/datadogV2/model/model_on_demand_concurrency_cap_response.rs index 226b17cf6..6c581029d 100644 --- a/src/datadogV2/model/model_on_demand_concurrency_cap_response.rs +++ b/src/datadogV2/model/model_on_demand_concurrency_cap_response.rs @@ -18,14 +18,12 @@ impl OnDemandConcurrencyCapResponse { OnDemandConcurrencyCapResponse { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::OnDemandConcurrencyCap, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::OnDemandConcurrencyCap) -> &mut Self { self.data = Some(value); self } } + impl Default for OnDemandConcurrencyCapResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_opsgenie_service_create_attributes.rs b/src/datadogV2/model/model_opsgenie_service_create_attributes.rs index 00ed6cec1..339d5937f 100644 --- a/src/datadogV2/model/model_opsgenie_service_create_attributes.rs +++ b/src/datadogV2/model/model_opsgenie_service_create_attributes.rs @@ -36,7 +36,7 @@ impl OpsgenieServiceCreateAttributes { } } - pub fn with_custom_url(&mut self, value: String) -> &mut Self { + pub fn custom_url(&mut self, value: String) -> &mut Self { self.custom_url = Some(value); self } diff --git a/src/datadogV2/model/model_opsgenie_service_response_attributes.rs b/src/datadogV2/model/model_opsgenie_service_response_attributes.rs index dd99082ec..35f517191 100644 --- a/src/datadogV2/model/model_opsgenie_service_response_attributes.rs +++ b/src/datadogV2/model/model_opsgenie_service_response_attributes.rs @@ -32,17 +32,17 @@ impl OpsgenieServiceResponseAttributes { } } - pub fn with_custom_url(&mut self, value: Option) -> &mut Self { + pub fn custom_url(&mut self, value: Option) -> &mut Self { self.custom_url = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_region( + pub fn region( &mut self, value: crate::datadogV2::model::OpsgenieServiceRegionType, ) -> &mut Self { @@ -50,6 +50,7 @@ impl OpsgenieServiceResponseAttributes { self } } + impl Default for OpsgenieServiceResponseAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_opsgenie_service_update_attributes.rs b/src/datadogV2/model/model_opsgenie_service_update_attributes.rs index d45f2a218..062c4ed6e 100644 --- a/src/datadogV2/model/model_opsgenie_service_update_attributes.rs +++ b/src/datadogV2/model/model_opsgenie_service_update_attributes.rs @@ -36,22 +36,22 @@ impl OpsgenieServiceUpdateAttributes { } } - pub fn with_custom_url(&mut self, value: Option) -> &mut Self { + pub fn custom_url(&mut self, value: Option) -> &mut Self { self.custom_url = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_opsgenie_api_key(&mut self, value: String) -> &mut Self { + pub fn opsgenie_api_key(&mut self, value: String) -> &mut Self { self.opsgenie_api_key = Some(value); self } - pub fn with_region( + pub fn region( &mut self, value: crate::datadogV2::model::OpsgenieServiceRegionType, ) -> &mut Self { @@ -59,6 +59,7 @@ impl OpsgenieServiceUpdateAttributes { self } } + impl Default for OpsgenieServiceUpdateAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_organization.rs b/src/datadogV2/model/model_organization.rs index da6a3a402..dbce909ed 100644 --- a/src/datadogV2/model/model_organization.rs +++ b/src/datadogV2/model/model_organization.rs @@ -28,7 +28,7 @@ impl Organization { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::OrganizationAttributes, ) -> &mut Self { @@ -36,7 +36,7 @@ impl Organization { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } diff --git a/src/datadogV2/model/model_organization_attributes.rs b/src/datadogV2/model/model_organization_attributes.rs index 04d5402e3..ea90f1a69 100644 --- a/src/datadogV2/model/model_organization_attributes.rs +++ b/src/datadogV2/model/model_organization_attributes.rs @@ -48,46 +48,47 @@ impl OrganizationAttributes { } } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_disabled(&mut self, value: bool) -> &mut Self { + pub fn disabled(&mut self, value: bool) -> &mut Self { self.disabled = Some(value); self } - pub fn with_modified_at(&mut self, value: String) -> &mut Self { + pub fn modified_at(&mut self, value: String) -> &mut Self { self.modified_at = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_sharing(&mut self, value: String) -> &mut Self { + pub fn sharing(&mut self, value: String) -> &mut Self { self.sharing = Some(value); self } - pub fn with_url(&mut self, value: String) -> &mut Self { + pub fn url(&mut self, value: String) -> &mut Self { self.url = Some(value); self } } + impl Default for OrganizationAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_outcomes_batch_attributes.rs b/src/datadogV2/model/model_outcomes_batch_attributes.rs index 0696b2800..07da4c3c2 100644 --- a/src/datadogV2/model/model_outcomes_batch_attributes.rs +++ b/src/datadogV2/model/model_outcomes_batch_attributes.rs @@ -18,7 +18,7 @@ impl OutcomesBatchAttributes { OutcomesBatchAttributes { results: None } } - pub fn with_results( + pub fn results( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl OutcomesBatchAttributes { self } } + impl Default for OutcomesBatchAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_outcomes_batch_request.rs b/src/datadogV2/model/model_outcomes_batch_request.rs index 5f029b904..def0d0305 100644 --- a/src/datadogV2/model/model_outcomes_batch_request.rs +++ b/src/datadogV2/model/model_outcomes_batch_request.rs @@ -18,14 +18,12 @@ impl OutcomesBatchRequest { OutcomesBatchRequest { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::OutcomesBatchRequestData, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::OutcomesBatchRequestData) -> &mut Self { self.data = Some(value); self } } + impl Default for OutcomesBatchRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_outcomes_batch_request_data.rs b/src/datadogV2/model/model_outcomes_batch_request_data.rs index af54b2310..0fd1324ee 100644 --- a/src/datadogV2/model/model_outcomes_batch_request_data.rs +++ b/src/datadogV2/model/model_outcomes_batch_request_data.rs @@ -24,7 +24,7 @@ impl OutcomesBatchRequestData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::OutcomesBatchAttributes, ) -> &mut Self { @@ -32,11 +32,12 @@ impl OutcomesBatchRequestData { self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::OutcomesBatchType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::OutcomesBatchType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for OutcomesBatchRequestData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_outcomes_batch_request_item.rs b/src/datadogV2/model/model_outcomes_batch_request_item.rs index 6af8561f2..63426e84c 100644 --- a/src/datadogV2/model/model_outcomes_batch_request_item.rs +++ b/src/datadogV2/model/model_outcomes_batch_request_item.rs @@ -36,7 +36,7 @@ impl OutcomesBatchRequestItem { } } - pub fn with_remarks(&mut self, value: String) -> &mut Self { + pub fn remarks(&mut self, value: String) -> &mut Self { self.remarks = Some(value); self } diff --git a/src/datadogV2/model/model_outcomes_batch_response_attributes.rs b/src/datadogV2/model/model_outcomes_batch_response_attributes.rs index 8e982b3c1..cbe607ede 100644 --- a/src/datadogV2/model/model_outcomes_batch_response_attributes.rs +++ b/src/datadogV2/model/model_outcomes_batch_response_attributes.rs @@ -36,31 +36,32 @@ impl OutcomesBatchResponseAttributes { } } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_modified_at(&mut self, value: String) -> &mut Self { + pub fn modified_at(&mut self, value: String) -> &mut Self { self.modified_at = Some(value); self } - pub fn with_remarks(&mut self, value: String) -> &mut Self { + pub fn remarks(&mut self, value: String) -> &mut Self { self.remarks = Some(value); self } - pub fn with_service_name(&mut self, value: String) -> &mut Self { + pub fn service_name(&mut self, value: String) -> &mut Self { self.service_name = Some(value); self } - pub fn with_state(&mut self, value: crate::datadogV2::model::State) -> &mut Self { + pub fn state(&mut self, value: crate::datadogV2::model::State) -> &mut Self { self.state = Some(value); self } } + impl Default for OutcomesBatchResponseAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_outcomes_batch_response_meta.rs b/src/datadogV2/model/model_outcomes_batch_response_meta.rs index 025569d7f..22024009e 100644 --- a/src/datadogV2/model/model_outcomes_batch_response_meta.rs +++ b/src/datadogV2/model/model_outcomes_batch_response_meta.rs @@ -24,16 +24,17 @@ impl OutcomesBatchResponseMeta { } } - pub fn with_total_received(&mut self, value: i64) -> &mut Self { + pub fn total_received(&mut self, value: i64) -> &mut Self { self.total_received = Some(value); self } - pub fn with_total_updated(&mut self, value: i64) -> &mut Self { + pub fn total_updated(&mut self, value: i64) -> &mut Self { self.total_updated = Some(value); self } } + impl Default for OutcomesBatchResponseMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_outcomes_response.rs b/src/datadogV2/model/model_outcomes_response.rs index fe2c9539e..900786ac7 100644 --- a/src/datadogV2/model/model_outcomes_response.rs +++ b/src/datadogV2/model/model_outcomes_response.rs @@ -28,7 +28,7 @@ impl OutcomesResponse { } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -36,7 +36,7 @@ impl OutcomesResponse { self } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { @@ -44,14 +44,12 @@ impl OutcomesResponse { self } - pub fn with_links( - &mut self, - value: crate::datadogV2::model::OutcomesResponseLinks, - ) -> &mut Self { + pub fn links(&mut self, value: crate::datadogV2::model::OutcomesResponseLinks) -> &mut Self { self.links = Some(value); self } } + impl Default for OutcomesResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_outcomes_response_data_item.rs b/src/datadogV2/model/model_outcomes_response_data_item.rs index e62e6ddcf..0a8c63e3b 100644 --- a/src/datadogV2/model/model_outcomes_response_data_item.rs +++ b/src/datadogV2/model/model_outcomes_response_data_item.rs @@ -32,7 +32,7 @@ impl OutcomesResponseDataItem { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::OutcomesBatchResponseAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl OutcomesResponseDataItem { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::RuleOutcomeRelationships, ) -> &mut Self { @@ -53,11 +53,12 @@ impl OutcomesResponseDataItem { self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::OutcomeType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::OutcomeType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for OutcomesResponseDataItem { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_outcomes_response_included_item.rs b/src/datadogV2/model/model_outcomes_response_included_item.rs index eb3af6cbb..89780c7f2 100644 --- a/src/datadogV2/model/model_outcomes_response_included_item.rs +++ b/src/datadogV2/model/model_outcomes_response_included_item.rs @@ -28,7 +28,7 @@ impl OutcomesResponseIncludedItem { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::OutcomesResponseIncludedRuleAttributes, ) -> &mut Self { @@ -36,16 +36,17 @@ impl OutcomesResponseIncludedItem { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::RuleType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::RuleType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for OutcomesResponseIncludedItem { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_outcomes_response_included_rule_attributes.rs b/src/datadogV2/model/model_outcomes_response_included_rule_attributes.rs index 3fd6232a0..cc071e6aa 100644 --- a/src/datadogV2/model/model_outcomes_response_included_rule_attributes.rs +++ b/src/datadogV2/model/model_outcomes_response_included_rule_attributes.rs @@ -24,16 +24,17 @@ impl OutcomesResponseIncludedRuleAttributes { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_scorecard_name(&mut self, value: String) -> &mut Self { + pub fn scorecard_name(&mut self, value: String) -> &mut Self { self.scorecard_name = Some(value); self } } + impl Default for OutcomesResponseIncludedRuleAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_outcomes_response_links.rs b/src/datadogV2/model/model_outcomes_response_links.rs index 59d92ea94..e21358fcd 100644 --- a/src/datadogV2/model/model_outcomes_response_links.rs +++ b/src/datadogV2/model/model_outcomes_response_links.rs @@ -18,11 +18,12 @@ impl OutcomesResponseLinks { OutcomesResponseLinks { next: None } } - pub fn with_next(&mut self, value: String) -> &mut Self { + pub fn next(&mut self, value: String) -> &mut Self { self.next = Some(value); self } } + impl Default for OutcomesResponseLinks { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_pagination.rs b/src/datadogV2/model/model_pagination.rs index 70afe1080..e5e97e1e1 100644 --- a/src/datadogV2/model/model_pagination.rs +++ b/src/datadogV2/model/model_pagination.rs @@ -24,16 +24,17 @@ impl Pagination { } } - pub fn with_total_count(&mut self, value: i64) -> &mut Self { + pub fn total_count(&mut self, value: i64) -> &mut Self { self.total_count = Some(value); self } - pub fn with_total_filtered_count(&mut self, value: i64) -> &mut Self { + pub fn total_filtered_count(&mut self, value: i64) -> &mut Self { self.total_filtered_count = Some(value); self } } + impl Default for Pagination { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_partial_api_key.rs b/src/datadogV2/model/model_partial_api_key.rs index a1b53c63f..dad1ec708 100644 --- a/src/datadogV2/model/model_partial_api_key.rs +++ b/src/datadogV2/model/model_partial_api_key.rs @@ -32,7 +32,7 @@ impl PartialAPIKey { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::PartialAPIKeyAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl PartialAPIKey { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::APIKeyRelationships, ) -> &mut Self { @@ -53,11 +53,12 @@ impl PartialAPIKey { self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::APIKeysType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::APIKeysType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for PartialAPIKey { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_partial_api_key_attributes.rs b/src/datadogV2/model/model_partial_api_key_attributes.rs index 4519f7617..3f1860123 100644 --- a/src/datadogV2/model/model_partial_api_key_attributes.rs +++ b/src/datadogV2/model/model_partial_api_key_attributes.rs @@ -40,36 +40,37 @@ impl PartialAPIKeyAttributes { } } - pub fn with_category(&mut self, value: String) -> &mut Self { + pub fn category(&mut self, value: String) -> &mut Self { self.category = Some(value); self } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_last4(&mut self, value: String) -> &mut Self { + pub fn last4(&mut self, value: String) -> &mut Self { self.last4 = Some(value); self } - pub fn with_modified_at(&mut self, value: String) -> &mut Self { + pub fn modified_at(&mut self, value: String) -> &mut Self { self.modified_at = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_remote_config_read_enabled(&mut self, value: bool) -> &mut Self { + pub fn remote_config_read_enabled(&mut self, value: bool) -> &mut Self { self.remote_config_read_enabled = Some(value); self } } + impl Default for PartialAPIKeyAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_partial_application_key.rs b/src/datadogV2/model/model_partial_application_key.rs index 471e05295..5cc9c2541 100644 --- a/src/datadogV2/model/model_partial_application_key.rs +++ b/src/datadogV2/model/model_partial_application_key.rs @@ -32,7 +32,7 @@ impl PartialApplicationKey { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::PartialApplicationKeyAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl PartialApplicationKey { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::ApplicationKeyRelationships, ) -> &mut Self { @@ -53,11 +53,12 @@ impl PartialApplicationKey { self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::ApplicationKeysType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::ApplicationKeysType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for PartialApplicationKey { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_partial_application_key_attributes.rs b/src/datadogV2/model/model_partial_application_key_attributes.rs index a4fe16962..ad5e26e7e 100644 --- a/src/datadogV2/model/model_partial_application_key_attributes.rs +++ b/src/datadogV2/model/model_partial_application_key_attributes.rs @@ -32,26 +32,27 @@ impl PartialApplicationKeyAttributes { } } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_last4(&mut self, value: String) -> &mut Self { + pub fn last4(&mut self, value: String) -> &mut Self { self.last4 = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_scopes(&mut self, value: Option>) -> &mut Self { + pub fn scopes(&mut self, value: Option>) -> &mut Self { self.scopes = Some(value); self } } + impl Default for PartialApplicationKeyAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_partial_application_key_response.rs b/src/datadogV2/model/model_partial_application_key_response.rs index c4878bf0c..ba9092e7d 100644 --- a/src/datadogV2/model/model_partial_application_key_response.rs +++ b/src/datadogV2/model/model_partial_application_key_response.rs @@ -24,15 +24,12 @@ impl PartialApplicationKeyResponse { } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::PartialApplicationKey, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::PartialApplicationKey) -> &mut Self { self.data = Some(value); self } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { @@ -40,6 +37,7 @@ impl PartialApplicationKeyResponse { self } } + impl Default for PartialApplicationKeyResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_permission.rs b/src/datadogV2/model/model_permission.rs index 45cb795a6..40857eac2 100644 --- a/src/datadogV2/model/model_permission.rs +++ b/src/datadogV2/model/model_permission.rs @@ -28,7 +28,7 @@ impl Permission { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::PermissionAttributes, ) -> &mut Self { @@ -36,7 +36,7 @@ impl Permission { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } diff --git a/src/datadogV2/model/model_permission_attributes.rs b/src/datadogV2/model/model_permission_attributes.rs index 61afeadd4..b3bfa0f98 100644 --- a/src/datadogV2/model/model_permission_attributes.rs +++ b/src/datadogV2/model/model_permission_attributes.rs @@ -44,41 +44,42 @@ impl PermissionAttributes { } } - pub fn with_created(&mut self, value: String) -> &mut Self { + pub fn created(&mut self, value: String) -> &mut Self { self.created = Some(value); self } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_display_name(&mut self, value: String) -> &mut Self { + pub fn display_name(&mut self, value: String) -> &mut Self { self.display_name = Some(value); self } - pub fn with_display_type(&mut self, value: String) -> &mut Self { + pub fn display_type(&mut self, value: String) -> &mut Self { self.display_type = Some(value); self } - pub fn with_group_name(&mut self, value: String) -> &mut Self { + pub fn group_name(&mut self, value: String) -> &mut Self { self.group_name = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_restricted(&mut self, value: bool) -> &mut Self { + pub fn restricted(&mut self, value: bool) -> &mut Self { self.restricted = Some(value); self } } + impl Default for PermissionAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_permissions_response.rs b/src/datadogV2/model/model_permissions_response.rs index 709fa2c5b..6a2cd203e 100644 --- a/src/datadogV2/model/model_permissions_response.rs +++ b/src/datadogV2/model/model_permissions_response.rs @@ -18,11 +18,12 @@ impl PermissionsResponse { PermissionsResponse { data: None } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } } + impl Default for PermissionsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_powerpack.rs b/src/datadogV2/model/model_powerpack.rs index 0d8d0bd78..a58109ae6 100644 --- a/src/datadogV2/model/model_powerpack.rs +++ b/src/datadogV2/model/model_powerpack.rs @@ -18,11 +18,12 @@ impl Powerpack { Powerpack { data: None } } - pub fn with_data(&mut self, value: crate::datadogV2::model::PowerpackData) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::PowerpackData) -> &mut Self { self.data = Some(value); self } } + impl Default for Powerpack { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_powerpack_attributes.rs b/src/datadogV2/model/model_powerpack_attributes.rs index 52fb68958..ed740e51d 100644 --- a/src/datadogV2/model/model_powerpack_attributes.rs +++ b/src/datadogV2/model/model_powerpack_attributes.rs @@ -39,17 +39,17 @@ impl PowerpackAttributes { } } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_template_variables( + pub fn template_variables( &mut self, value: Vec, ) -> &mut Self { diff --git a/src/datadogV2/model/model_powerpack_data.rs b/src/datadogV2/model/model_powerpack_data.rs index 439a53a9b..ceb6e9a17 100644 --- a/src/datadogV2/model/model_powerpack_data.rs +++ b/src/datadogV2/model/model_powerpack_data.rs @@ -32,20 +32,17 @@ impl PowerpackData { } } - pub fn with_attributes( - &mut self, - value: crate::datadogV2::model::PowerpackAttributes, - ) -> &mut Self { + pub fn attributes(&mut self, value: crate::datadogV2::model::PowerpackAttributes) -> &mut Self { self.attributes = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::PowerpackRelationships, ) -> &mut Self { @@ -53,11 +50,12 @@ impl PowerpackData { self } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } } + impl Default for PowerpackData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_powerpack_group_widget.rs b/src/datadogV2/model/model_powerpack_group_widget.rs index 3975dd6d2..d273b7b51 100644 --- a/src/datadogV2/model/model_powerpack_group_widget.rs +++ b/src/datadogV2/model/model_powerpack_group_widget.rs @@ -30,7 +30,7 @@ impl PowerpackGroupWidget { } } - pub fn with_layout( + pub fn layout( &mut self, value: crate::datadogV2::model::PowerpackGroupWidgetLayout, ) -> &mut Self { @@ -38,7 +38,7 @@ impl PowerpackGroupWidget { self } - pub fn with_live_span(&mut self, value: crate::datadogV2::model::WidgetLiveSpan) -> &mut Self { + pub fn live_span(&mut self, value: crate::datadogV2::model::WidgetLiveSpan) -> &mut Self { self.live_span = Some(value); self } diff --git a/src/datadogV2/model/model_powerpack_group_widget_definition.rs b/src/datadogV2/model/model_powerpack_group_widget_definition.rs index 7a4b9c503..99ddddab1 100644 --- a/src/datadogV2/model/model_powerpack_group_widget_definition.rs +++ b/src/datadogV2/model/model_powerpack_group_widget_definition.rs @@ -40,12 +40,12 @@ impl PowerpackGroupWidgetDefinition { } } - pub fn with_show_title(&mut self, value: bool) -> &mut Self { + pub fn show_title(&mut self, value: bool) -> &mut Self { self.show_title = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } diff --git a/src/datadogV2/model/model_powerpack_inner_widgets.rs b/src/datadogV2/model/model_powerpack_inner_widgets.rs index f452295dd..70cf369d1 100644 --- a/src/datadogV2/model/model_powerpack_inner_widgets.rs +++ b/src/datadogV2/model/model_powerpack_inner_widgets.rs @@ -26,7 +26,7 @@ impl PowerpackInnerWidgets { } } - pub fn with_layout( + pub fn layout( &mut self, value: crate::datadogV2::model::PowerpackInnerWidgetLayout, ) -> &mut Self { diff --git a/src/datadogV2/model/model_powerpack_relationships.rs b/src/datadogV2/model/model_powerpack_relationships.rs index 894593d47..5084a27fc 100644 --- a/src/datadogV2/model/model_powerpack_relationships.rs +++ b/src/datadogV2/model/model_powerpack_relationships.rs @@ -18,11 +18,12 @@ impl PowerpackRelationships { PowerpackRelationships { author: None } } - pub fn with_author(&mut self, value: crate::datadogV2::model::RelationshipToUser) -> &mut Self { + pub fn author(&mut self, value: crate::datadogV2::model::RelationshipToUser) -> &mut Self { self.author = Some(value); self } } + impl Default for PowerpackRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_powerpack_response.rs b/src/datadogV2/model/model_powerpack_response.rs index 73cc85673..ae02b21dc 100644 --- a/src/datadogV2/model/model_powerpack_response.rs +++ b/src/datadogV2/model/model_powerpack_response.rs @@ -24,16 +24,17 @@ impl PowerpackResponse { } } - pub fn with_data(&mut self, value: crate::datadogV2::model::PowerpackData) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::PowerpackData) -> &mut Self { self.data = Some(value); self } - pub fn with_included(&mut self, value: Vec) -> &mut Self { + pub fn included(&mut self, value: Vec) -> &mut Self { self.included = Some(value); self } } + impl Default for PowerpackResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_powerpack_response_links.rs b/src/datadogV2/model/model_powerpack_response_links.rs index 18e78db3c..db421a265 100644 --- a/src/datadogV2/model/model_powerpack_response_links.rs +++ b/src/datadogV2/model/model_powerpack_response_links.rs @@ -36,31 +36,32 @@ impl PowerpackResponseLinks { } } - pub fn with_first(&mut self, value: String) -> &mut Self { + pub fn first(&mut self, value: String) -> &mut Self { self.first = Some(value); self } - pub fn with_last(&mut self, value: Option) -> &mut Self { + pub fn last(&mut self, value: Option) -> &mut Self { self.last = Some(value); self } - pub fn with_next(&mut self, value: String) -> &mut Self { + pub fn next(&mut self, value: String) -> &mut Self { self.next = Some(value); self } - pub fn with_prev(&mut self, value: Option) -> &mut Self { + pub fn prev(&mut self, value: Option) -> &mut Self { self.prev = Some(value); self } - pub fn with_self_(&mut self, value: String) -> &mut Self { + pub fn self_(&mut self, value: String) -> &mut Self { self.self_ = Some(value); self } } + impl Default for PowerpackResponseLinks { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_powerpack_template_variable.rs b/src/datadogV2/model/model_powerpack_template_variable.rs index 9310440b3..54e84334c 100644 --- a/src/datadogV2/model/model_powerpack_template_variable.rs +++ b/src/datadogV2/model/model_powerpack_template_variable.rs @@ -24,7 +24,7 @@ impl PowerpackTemplateVariable { } } - pub fn with_defaults(&mut self, value: Vec) -> &mut Self { + pub fn defaults(&mut self, value: Vec) -> &mut Self { self.defaults = Some(value); self } diff --git a/src/datadogV2/model/model_powerpacks_response_meta.rs b/src/datadogV2/model/model_powerpacks_response_meta.rs index e6ea7f625..bc77a670a 100644 --- a/src/datadogV2/model/model_powerpacks_response_meta.rs +++ b/src/datadogV2/model/model_powerpacks_response_meta.rs @@ -18,7 +18,7 @@ impl PowerpacksResponseMeta { PowerpacksResponseMeta { pagination: None } } - pub fn with_pagination( + pub fn pagination( &mut self, value: crate::datadogV2::model::PowerpacksResponseMetaPagination, ) -> &mut Self { @@ -26,6 +26,7 @@ impl PowerpacksResponseMeta { self } } + impl Default for PowerpacksResponseMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_powerpacks_response_meta_pagination.rs b/src/datadogV2/model/model_powerpacks_response_meta_pagination.rs index e452f7aac..4bc4aee03 100644 --- a/src/datadogV2/model/model_powerpacks_response_meta_pagination.rs +++ b/src/datadogV2/model/model_powerpacks_response_meta_pagination.rs @@ -52,46 +52,47 @@ impl PowerpacksResponseMetaPagination { } } - pub fn with_first_offset(&mut self, value: i64) -> &mut Self { + pub fn first_offset(&mut self, value: i64) -> &mut Self { self.first_offset = Some(value); self } - pub fn with_last_offset(&mut self, value: Option) -> &mut Self { + pub fn last_offset(&mut self, value: Option) -> &mut Self { self.last_offset = Some(value); self } - pub fn with_limit(&mut self, value: i64) -> &mut Self { + pub fn limit(&mut self, value: i64) -> &mut Self { self.limit = Some(value); self } - pub fn with_next_offset(&mut self, value: i64) -> &mut Self { + pub fn next_offset(&mut self, value: i64) -> &mut Self { self.next_offset = Some(value); self } - pub fn with_offset(&mut self, value: i64) -> &mut Self { + pub fn offset(&mut self, value: i64) -> &mut Self { self.offset = Some(value); self } - pub fn with_prev_offset(&mut self, value: i64) -> &mut Self { + pub fn prev_offset(&mut self, value: i64) -> &mut Self { self.prev_offset = Some(value); self } - pub fn with_total(&mut self, value: i64) -> &mut Self { + pub fn total(&mut self, value: i64) -> &mut Self { self.total = Some(value); self } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } } + impl Default for PowerpacksResponseMetaPagination { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_process_summaries_meta.rs b/src/datadogV2/model/model_process_summaries_meta.rs index 98feeccef..f2396b5aa 100644 --- a/src/datadogV2/model/model_process_summaries_meta.rs +++ b/src/datadogV2/model/model_process_summaries_meta.rs @@ -18,14 +18,12 @@ impl ProcessSummariesMeta { ProcessSummariesMeta { page: None } } - pub fn with_page( - &mut self, - value: crate::datadogV2::model::ProcessSummariesMetaPage, - ) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV2::model::ProcessSummariesMetaPage) -> &mut Self { self.page = Some(value); self } } + impl Default for ProcessSummariesMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_process_summaries_meta_page.rs b/src/datadogV2/model/model_process_summaries_meta_page.rs index 4f2527afe..b961d87bd 100644 --- a/src/datadogV2/model/model_process_summaries_meta_page.rs +++ b/src/datadogV2/model/model_process_summaries_meta_page.rs @@ -25,16 +25,17 @@ impl ProcessSummariesMetaPage { } } - pub fn with_after(&mut self, value: String) -> &mut Self { + pub fn after(&mut self, value: String) -> &mut Self { self.after = Some(value); self } - pub fn with_size(&mut self, value: i32) -> &mut Self { + pub fn size(&mut self, value: i32) -> &mut Self { self.size = Some(value); self } } + impl Default for ProcessSummariesMetaPage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_process_summaries_response.rs b/src/datadogV2/model/model_process_summaries_response.rs index 1773f8114..874cfa5f3 100644 --- a/src/datadogV2/model/model_process_summaries_response.rs +++ b/src/datadogV2/model/model_process_summaries_response.rs @@ -24,16 +24,17 @@ impl ProcessSummariesResponse { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::ProcessSummariesMeta) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::ProcessSummariesMeta) -> &mut Self { self.meta = Some(value); self } } + impl Default for ProcessSummariesResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_process_summary.rs b/src/datadogV2/model/model_process_summary.rs index 41280b471..b9da1ae78 100644 --- a/src/datadogV2/model/model_process_summary.rs +++ b/src/datadogV2/model/model_process_summary.rs @@ -28,7 +28,7 @@ impl ProcessSummary { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::ProcessSummaryAttributes, ) -> &mut Self { @@ -36,16 +36,17 @@ impl ProcessSummary { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::ProcessSummaryType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::ProcessSummaryType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for ProcessSummary { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_process_summary_attributes.rs b/src/datadogV2/model/model_process_summary_attributes.rs index 55d1eac28..acd68115a 100644 --- a/src/datadogV2/model/model_process_summary_attributes.rs +++ b/src/datadogV2/model/model_process_summary_attributes.rs @@ -48,46 +48,47 @@ impl ProcessSummaryAttributes { } } - pub fn with_cmdline(&mut self, value: String) -> &mut Self { + pub fn cmdline(&mut self, value: String) -> &mut Self { self.cmdline = Some(value); self } - pub fn with_host(&mut self, value: String) -> &mut Self { + pub fn host(&mut self, value: String) -> &mut Self { self.host = Some(value); self } - pub fn with_pid(&mut self, value: i64) -> &mut Self { + pub fn pid(&mut self, value: i64) -> &mut Self { self.pid = Some(value); self } - pub fn with_ppid(&mut self, value: i64) -> &mut Self { + pub fn ppid(&mut self, value: i64) -> &mut Self { self.ppid = Some(value); self } - pub fn with_start(&mut self, value: String) -> &mut Self { + pub fn start(&mut self, value: String) -> &mut Self { self.start = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_timestamp(&mut self, value: String) -> &mut Self { + pub fn timestamp(&mut self, value: String) -> &mut Self { self.timestamp = Some(value); self } - pub fn with_user(&mut self, value: String) -> &mut Self { + pub fn user(&mut self, value: String) -> &mut Self { self.user = Some(value); self } } + impl Default for ProcessSummaryAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_projected_cost.rs b/src/datadogV2/model/model_projected_cost.rs index 8f4071610..38f2d4483 100644 --- a/src/datadogV2/model/model_projected_cost.rs +++ b/src/datadogV2/model/model_projected_cost.rs @@ -28,7 +28,7 @@ impl ProjectedCost { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::ProjectedCostAttributes, ) -> &mut Self { @@ -36,16 +36,17 @@ impl ProjectedCost { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::ProjectedCostType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::ProjectedCostType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for ProjectedCost { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_projected_cost_attributes.rs b/src/datadogV2/model/model_projected_cost_attributes.rs index a8215f076..ae860cb5c 100644 --- a/src/datadogV2/model/model_projected_cost_attributes.rs +++ b/src/datadogV2/model/model_projected_cost_attributes.rs @@ -40,7 +40,7 @@ impl ProjectedCostAttributes { } } - pub fn with_charges( + pub fn charges( &mut self, value: Vec, ) -> &mut Self { @@ -48,31 +48,32 @@ impl ProjectedCostAttributes { self } - pub fn with_date(&mut self, value: String) -> &mut Self { + pub fn date(&mut self, value: String) -> &mut Self { self.date = Some(value); self } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_projected_total_cost(&mut self, value: f64) -> &mut Self { + pub fn projected_total_cost(&mut self, value: f64) -> &mut Self { self.projected_total_cost = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_region(&mut self, value: String) -> &mut Self { + pub fn region(&mut self, value: String) -> &mut Self { self.region = Some(value); self } } + impl Default for ProjectedCostAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_projected_cost_response.rs b/src/datadogV2/model/model_projected_cost_response.rs index 2ba5b1d35..f27c21aa6 100644 --- a/src/datadogV2/model/model_projected_cost_response.rs +++ b/src/datadogV2/model/model_projected_cost_response.rs @@ -18,11 +18,12 @@ impl ProjectedCostResponse { ProjectedCostResponse { data: None } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } } + impl Default for ProjectedCostResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_query_formula.rs b/src/datadogV2/model/model_query_formula.rs index 2fe2df9ec..fad77d8d2 100644 --- a/src/datadogV2/model/model_query_formula.rs +++ b/src/datadogV2/model/model_query_formula.rs @@ -25,7 +25,7 @@ impl QueryFormula { } } - pub fn with_limit(&mut self, value: crate::datadogV2::model::FormulaLimit) -> &mut Self { + pub fn limit(&mut self, value: crate::datadogV2::model::FormulaLimit) -> &mut Self { self.limit = Some(value); self } diff --git a/src/datadogV2/model/model_relationship_to_outcome.rs b/src/datadogV2/model/model_relationship_to_outcome.rs index a864358f3..028e13e59 100644 --- a/src/datadogV2/model/model_relationship_to_outcome.rs +++ b/src/datadogV2/model/model_relationship_to_outcome.rs @@ -18,14 +18,12 @@ impl RelationshipToOutcome { RelationshipToOutcome { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::RelationshipToOutcomeData, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::RelationshipToOutcomeData) -> &mut Self { self.data = Some(value); self } } + impl Default for RelationshipToOutcome { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_relationship_to_outcome_data.rs b/src/datadogV2/model/model_relationship_to_outcome_data.rs index 19625057c..980c32cc7 100644 --- a/src/datadogV2/model/model_relationship_to_outcome_data.rs +++ b/src/datadogV2/model/model_relationship_to_outcome_data.rs @@ -24,16 +24,17 @@ impl RelationshipToOutcomeData { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::RuleType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::RuleType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for RelationshipToOutcomeData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_relationship_to_permission.rs b/src/datadogV2/model/model_relationship_to_permission.rs index 3ee0ba008..7840b622a 100644 --- a/src/datadogV2/model/model_relationship_to_permission.rs +++ b/src/datadogV2/model/model_relationship_to_permission.rs @@ -18,7 +18,7 @@ impl RelationshipToPermission { RelationshipToPermission { data: None } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::RelationshipToPermissionData, ) -> &mut Self { @@ -26,6 +26,7 @@ impl RelationshipToPermission { self } } + impl Default for RelationshipToPermission { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_relationship_to_permission_data.rs b/src/datadogV2/model/model_relationship_to_permission_data.rs index 21a37e41d..045ce72a6 100644 --- a/src/datadogV2/model/model_relationship_to_permission_data.rs +++ b/src/datadogV2/model/model_relationship_to_permission_data.rs @@ -24,16 +24,17 @@ impl RelationshipToPermissionData { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::PermissionsType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::PermissionsType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for RelationshipToPermissionData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_relationship_to_permissions.rs b/src/datadogV2/model/model_relationship_to_permissions.rs index 5e796af5a..13bc81ea5 100644 --- a/src/datadogV2/model/model_relationship_to_permissions.rs +++ b/src/datadogV2/model/model_relationship_to_permissions.rs @@ -18,7 +18,7 @@ impl RelationshipToPermissions { RelationshipToPermissions { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl RelationshipToPermissions { self } } + impl Default for RelationshipToPermissions { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_relationship_to_role.rs b/src/datadogV2/model/model_relationship_to_role.rs index e3a622bf7..0e20aab55 100644 --- a/src/datadogV2/model/model_relationship_to_role.rs +++ b/src/datadogV2/model/model_relationship_to_role.rs @@ -18,14 +18,12 @@ impl RelationshipToRole { RelationshipToRole { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::RelationshipToRoleData, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::RelationshipToRoleData) -> &mut Self { self.data = Some(value); self } } + impl Default for RelationshipToRole { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_relationship_to_role_data.rs b/src/datadogV2/model/model_relationship_to_role_data.rs index c3134c5e6..080b75ec1 100644 --- a/src/datadogV2/model/model_relationship_to_role_data.rs +++ b/src/datadogV2/model/model_relationship_to_role_data.rs @@ -24,16 +24,17 @@ impl RelationshipToRoleData { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::RolesType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::RolesType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for RelationshipToRoleData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_relationship_to_roles.rs b/src/datadogV2/model/model_relationship_to_roles.rs index f1222bb33..f376cccd5 100644 --- a/src/datadogV2/model/model_relationship_to_roles.rs +++ b/src/datadogV2/model/model_relationship_to_roles.rs @@ -18,7 +18,7 @@ impl RelationshipToRoles { RelationshipToRoles { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl RelationshipToRoles { self } } + impl Default for RelationshipToRoles { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_relationship_to_rule.rs b/src/datadogV2/model/model_relationship_to_rule.rs index 1ce93786e..fd4d52182 100644 --- a/src/datadogV2/model/model_relationship_to_rule.rs +++ b/src/datadogV2/model/model_relationship_to_rule.rs @@ -18,7 +18,7 @@ impl RelationshipToRule { RelationshipToRule { scorecard: None } } - pub fn with_scorecard( + pub fn scorecard( &mut self, value: crate::datadogV2::model::RelationshipToRuleData, ) -> &mut Self { @@ -26,6 +26,7 @@ impl RelationshipToRule { self } } + impl Default for RelationshipToRule { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_relationship_to_rule_data.rs b/src/datadogV2/model/model_relationship_to_rule_data.rs index 532cdc29f..dff998650 100644 --- a/src/datadogV2/model/model_relationship_to_rule_data.rs +++ b/src/datadogV2/model/model_relationship_to_rule_data.rs @@ -18,7 +18,7 @@ impl RelationshipToRuleData { RelationshipToRuleData { data: None } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::RelationshipToRuleDataObject, ) -> &mut Self { @@ -26,6 +26,7 @@ impl RelationshipToRuleData { self } } + impl Default for RelationshipToRuleData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_relationship_to_rule_data_object.rs b/src/datadogV2/model/model_relationship_to_rule_data_object.rs index bf0fb49c3..190b0cd22 100644 --- a/src/datadogV2/model/model_relationship_to_rule_data_object.rs +++ b/src/datadogV2/model/model_relationship_to_rule_data_object.rs @@ -24,16 +24,17 @@ impl RelationshipToRuleDataObject { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::ScorecardType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::ScorecardType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for RelationshipToRuleDataObject { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_relationship_to_team_links.rs b/src/datadogV2/model/model_relationship_to_team_links.rs index e7397bb26..33a75d9bd 100644 --- a/src/datadogV2/model/model_relationship_to_team_links.rs +++ b/src/datadogV2/model/model_relationship_to_team_links.rs @@ -24,7 +24,7 @@ impl RelationshipToTeamLinks { } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -32,14 +32,12 @@ impl RelationshipToTeamLinks { self } - pub fn with_links( - &mut self, - value: crate::datadogV2::model::TeamRelationshipsLinks, - ) -> &mut Self { + pub fn links(&mut self, value: crate::datadogV2::model::TeamRelationshipsLinks) -> &mut Self { self.links = Some(value); self } } + impl Default for RelationshipToTeamLinks { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_relationship_to_user_team_permission.rs b/src/datadogV2/model/model_relationship_to_user_team_permission.rs index e36051e40..46141a644 100644 --- a/src/datadogV2/model/model_relationship_to_user_team_permission.rs +++ b/src/datadogV2/model/model_relationship_to_user_team_permission.rs @@ -24,7 +24,7 @@ impl RelationshipToUserTeamPermission { } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::RelationshipToUserTeamPermissionData, ) -> &mut Self { @@ -32,14 +32,12 @@ impl RelationshipToUserTeamPermission { self } - pub fn with_links( - &mut self, - value: crate::datadogV2::model::TeamRelationshipsLinks, - ) -> &mut Self { + pub fn links(&mut self, value: crate::datadogV2::model::TeamRelationshipsLinks) -> &mut Self { self.links = Some(value); self } } + impl Default for RelationshipToUserTeamPermission { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_response_meta_attributes.rs b/src/datadogV2/model/model_response_meta_attributes.rs index 0b8c77827..a5f973ce3 100644 --- a/src/datadogV2/model/model_response_meta_attributes.rs +++ b/src/datadogV2/model/model_response_meta_attributes.rs @@ -18,11 +18,12 @@ impl ResponseMetaAttributes { ResponseMetaAttributes { page: None } } - pub fn with_page(&mut self, value: crate::datadogV2::model::Pagination) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV2::model::Pagination) -> &mut Self { self.page = Some(value); self } } + impl Default for ResponseMetaAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_retention_filter_all_attributes.rs b/src/datadogV2/model/model_retention_filter_all_attributes.rs index be06262bc..eda0d62ac 100644 --- a/src/datadogV2/model/model_retention_filter_all_attributes.rs +++ b/src/datadogV2/model/model_retention_filter_all_attributes.rs @@ -61,37 +61,37 @@ impl RetentionFilterAllAttributes { } } - pub fn with_created_at(&mut self, value: i64) -> &mut Self { + pub fn created_at(&mut self, value: i64) -> &mut Self { self.created_at = Some(value); self } - pub fn with_created_by(&mut self, value: String) -> &mut Self { + pub fn created_by(&mut self, value: String) -> &mut Self { self.created_by = Some(value); self } - pub fn with_editable(&mut self, value: bool) -> &mut Self { + pub fn editable(&mut self, value: bool) -> &mut Self { self.editable = Some(value); self } - pub fn with_enabled(&mut self, value: bool) -> &mut Self { + pub fn enabled(&mut self, value: bool) -> &mut Self { self.enabled = Some(value); self } - pub fn with_execution_order(&mut self, value: i64) -> &mut Self { + pub fn execution_order(&mut self, value: i64) -> &mut Self { self.execution_order = Some(value); self } - pub fn with_filter(&mut self, value: crate::datadogV2::model::SpansFilter) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV2::model::SpansFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_filter_type( + pub fn filter_type( &mut self, value: crate::datadogV2::model::RetentionFilterAllType, ) -> &mut Self { @@ -99,26 +99,27 @@ impl RetentionFilterAllAttributes { self } - pub fn with_modified_at(&mut self, value: i64) -> &mut Self { + pub fn modified_at(&mut self, value: i64) -> &mut Self { self.modified_at = Some(value); self } - pub fn with_modified_by(&mut self, value: String) -> &mut Self { + pub fn modified_by(&mut self, value: String) -> &mut Self { self.modified_by = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_rate(&mut self, value: f64) -> &mut Self { + pub fn rate(&mut self, value: f64) -> &mut Self { self.rate = Some(value); self } } + impl Default for RetentionFilterAllAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_retention_filter_attributes.rs b/src/datadogV2/model/model_retention_filter_attributes.rs index ec771595b..aaabad3be 100644 --- a/src/datadogV2/model/model_retention_filter_attributes.rs +++ b/src/datadogV2/model/model_retention_filter_attributes.rs @@ -61,37 +61,37 @@ impl RetentionFilterAttributes { } } - pub fn with_created_at(&mut self, value: i64) -> &mut Self { + pub fn created_at(&mut self, value: i64) -> &mut Self { self.created_at = Some(value); self } - pub fn with_created_by(&mut self, value: String) -> &mut Self { + pub fn created_by(&mut self, value: String) -> &mut Self { self.created_by = Some(value); self } - pub fn with_editable(&mut self, value: bool) -> &mut Self { + pub fn editable(&mut self, value: bool) -> &mut Self { self.editable = Some(value); self } - pub fn with_enabled(&mut self, value: bool) -> &mut Self { + pub fn enabled(&mut self, value: bool) -> &mut Self { self.enabled = Some(value); self } - pub fn with_execution_order(&mut self, value: i64) -> &mut Self { + pub fn execution_order(&mut self, value: i64) -> &mut Self { self.execution_order = Some(value); self } - pub fn with_filter(&mut self, value: crate::datadogV2::model::SpansFilter) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV2::model::SpansFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_filter_type( + pub fn filter_type( &mut self, value: crate::datadogV2::model::RetentionFilterType, ) -> &mut Self { @@ -99,26 +99,27 @@ impl RetentionFilterAttributes { self } - pub fn with_modified_at(&mut self, value: i64) -> &mut Self { + pub fn modified_at(&mut self, value: i64) -> &mut Self { self.modified_at = Some(value); self } - pub fn with_modified_by(&mut self, value: String) -> &mut Self { + pub fn modified_by(&mut self, value: String) -> &mut Self { self.modified_by = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_rate(&mut self, value: f64) -> &mut Self { + pub fn rate(&mut self, value: f64) -> &mut Self { self.rate = Some(value); self } } + impl Default for RetentionFilterAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_retention_filter_response.rs b/src/datadogV2/model/model_retention_filter_response.rs index 03f44f67e..b93694ce1 100644 --- a/src/datadogV2/model/model_retention_filter_response.rs +++ b/src/datadogV2/model/model_retention_filter_response.rs @@ -18,11 +18,12 @@ impl RetentionFilterResponse { RetentionFilterResponse { data: None } } - pub fn with_data(&mut self, value: crate::datadogV2::model::RetentionFilter) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::RetentionFilter) -> &mut Self { self.data = Some(value); self } } + impl Default for RetentionFilterResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_role.rs b/src/datadogV2/model/model_role.rs index b334ad200..0142939fc 100644 --- a/src/datadogV2/model/model_role.rs +++ b/src/datadogV2/model/model_role.rs @@ -32,17 +32,17 @@ impl Role { } } - pub fn with_attributes(&mut self, value: crate::datadogV2::model::RoleAttributes) -> &mut Self { + pub fn attributes(&mut self, value: crate::datadogV2::model::RoleAttributes) -> &mut Self { self.attributes = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::RoleResponseRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_role_attributes.rs b/src/datadogV2/model/model_role_attributes.rs index 79c70aebe..319e9af03 100644 --- a/src/datadogV2/model/model_role_attributes.rs +++ b/src/datadogV2/model/model_role_attributes.rs @@ -32,26 +32,27 @@ impl RoleAttributes { } } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_modified_at(&mut self, value: String) -> &mut Self { + pub fn modified_at(&mut self, value: String) -> &mut Self { self.modified_at = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_user_count(&mut self, value: i64) -> &mut Self { + pub fn user_count(&mut self, value: i64) -> &mut Self { self.user_count = Some(value); self } } + impl Default for RoleAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_role_create_attributes.rs b/src/datadogV2/model/model_role_create_attributes.rs index 0ecbdee91..40c53156d 100644 --- a/src/datadogV2/model/model_role_create_attributes.rs +++ b/src/datadogV2/model/model_role_create_attributes.rs @@ -28,12 +28,12 @@ impl RoleCreateAttributes { } } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_modified_at(&mut self, value: String) -> &mut Self { + pub fn modified_at(&mut self, value: String) -> &mut Self { self.modified_at = Some(value); self } diff --git a/src/datadogV2/model/model_role_create_data.rs b/src/datadogV2/model/model_role_create_data.rs index e42dfb4d8..2576c1cab 100644 --- a/src/datadogV2/model/model_role_create_data.rs +++ b/src/datadogV2/model/model_role_create_data.rs @@ -28,7 +28,7 @@ impl RoleCreateData { } } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::RoleRelationships, ) -> &mut Self { @@ -36,7 +36,7 @@ impl RoleCreateData { self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::RolesType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::RolesType) -> &mut Self { self.type_ = Some(value); self } diff --git a/src/datadogV2/model/model_role_create_response.rs b/src/datadogV2/model/model_role_create_response.rs index 11ff3977d..70d0b2684 100644 --- a/src/datadogV2/model/model_role_create_response.rs +++ b/src/datadogV2/model/model_role_create_response.rs @@ -18,14 +18,12 @@ impl RoleCreateResponse { RoleCreateResponse { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::RoleCreateResponseData, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::RoleCreateResponseData) -> &mut Self { self.data = Some(value); self } } + impl Default for RoleCreateResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_role_create_response_data.rs b/src/datadogV2/model/model_role_create_response_data.rs index 410523c79..866c4e850 100644 --- a/src/datadogV2/model/model_role_create_response_data.rs +++ b/src/datadogV2/model/model_role_create_response_data.rs @@ -32,7 +32,7 @@ impl RoleCreateResponseData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::RoleCreateAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl RoleCreateResponseData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::RoleResponseRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_role_relationships.rs b/src/datadogV2/model/model_role_relationships.rs index f055b2f63..ab621caed 100644 --- a/src/datadogV2/model/model_role_relationships.rs +++ b/src/datadogV2/model/model_role_relationships.rs @@ -24,7 +24,7 @@ impl RoleRelationships { } } - pub fn with_permissions( + pub fn permissions( &mut self, value: crate::datadogV2::model::RelationshipToPermissions, ) -> &mut Self { @@ -32,11 +32,12 @@ impl RoleRelationships { self } - pub fn with_users(&mut self, value: crate::datadogV2::model::RelationshipToUsers) -> &mut Self { + pub fn users(&mut self, value: crate::datadogV2::model::RelationshipToUsers) -> &mut Self { self.users = Some(value); self } } + impl Default for RoleRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_role_response.rs b/src/datadogV2/model/model_role_response.rs index 26fd44d9c..cac75bd80 100644 --- a/src/datadogV2/model/model_role_response.rs +++ b/src/datadogV2/model/model_role_response.rs @@ -18,11 +18,12 @@ impl RoleResponse { RoleResponse { data: None } } - pub fn with_data(&mut self, value: crate::datadogV2::model::Role) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::Role) -> &mut Self { self.data = Some(value); self } } + impl Default for RoleResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_role_response_relationships.rs b/src/datadogV2/model/model_role_response_relationships.rs index 174d47023..f08734c53 100644 --- a/src/datadogV2/model/model_role_response_relationships.rs +++ b/src/datadogV2/model/model_role_response_relationships.rs @@ -18,7 +18,7 @@ impl RoleResponseRelationships { RoleResponseRelationships { permissions: None } } - pub fn with_permissions( + pub fn permissions( &mut self, value: crate::datadogV2::model::RelationshipToPermissions, ) -> &mut Self { @@ -26,6 +26,7 @@ impl RoleResponseRelationships { self } } + impl Default for RoleResponseRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_role_update_attributes.rs b/src/datadogV2/model/model_role_update_attributes.rs index 8ef0b9e41..45d72e704 100644 --- a/src/datadogV2/model/model_role_update_attributes.rs +++ b/src/datadogV2/model/model_role_update_attributes.rs @@ -28,21 +28,22 @@ impl RoleUpdateAttributes { } } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_modified_at(&mut self, value: String) -> &mut Self { + pub fn modified_at(&mut self, value: String) -> &mut Self { self.modified_at = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } } + impl Default for RoleUpdateAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_role_update_data.rs b/src/datadogV2/model/model_role_update_data.rs index 5a7a8f1ff..add78aa50 100644 --- a/src/datadogV2/model/model_role_update_data.rs +++ b/src/datadogV2/model/model_role_update_data.rs @@ -36,7 +36,7 @@ impl RoleUpdateData { } } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::RoleRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_role_update_response.rs b/src/datadogV2/model/model_role_update_response.rs index 795c1ea80..a71f6f37b 100644 --- a/src/datadogV2/model/model_role_update_response.rs +++ b/src/datadogV2/model/model_role_update_response.rs @@ -18,14 +18,12 @@ impl RoleUpdateResponse { RoleUpdateResponse { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::RoleUpdateResponseData, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::RoleUpdateResponseData) -> &mut Self { self.data = Some(value); self } } + impl Default for RoleUpdateResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_role_update_response_data.rs b/src/datadogV2/model/model_role_update_response_data.rs index bbdbdb4ff..7b98747a9 100644 --- a/src/datadogV2/model/model_role_update_response_data.rs +++ b/src/datadogV2/model/model_role_update_response_data.rs @@ -32,7 +32,7 @@ impl RoleUpdateResponseData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::RoleUpdateAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl RoleUpdateResponseData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::RoleResponseRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_roles_response.rs b/src/datadogV2/model/model_roles_response.rs index 9b003a223..9f5fa5e71 100644 --- a/src/datadogV2/model/model_roles_response.rs +++ b/src/datadogV2/model/model_roles_response.rs @@ -24,19 +24,17 @@ impl RolesResponse { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_meta( - &mut self, - value: crate::datadogV2::model::ResponseMetaAttributes, - ) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::ResponseMetaAttributes) -> &mut Self { self.meta = Some(value); self } } + impl Default for RolesResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rule_attributes.rs b/src/datadogV2/model/model_rule_attributes.rs index c15d1963d..f314efdf3 100644 --- a/src/datadogV2/model/model_rule_attributes.rs +++ b/src/datadogV2/model/model_rule_attributes.rs @@ -55,59 +55,60 @@ impl RuleAttributes { } #[allow(deprecated)] - pub fn with_category(&mut self, value: String) -> &mut Self { + pub fn category(&mut self, value: String) -> &mut Self { self.category = Some(value); self } #[allow(deprecated)] - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } #[allow(deprecated)] - pub fn with_custom(&mut self, value: bool) -> &mut Self { + pub fn custom(&mut self, value: bool) -> &mut Self { self.custom = Some(value); self } #[allow(deprecated)] - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } #[allow(deprecated)] - pub fn with_enabled(&mut self, value: bool) -> &mut Self { + pub fn enabled(&mut self, value: bool) -> &mut Self { self.enabled = Some(value); self } #[allow(deprecated)] - pub fn with_modified_at(&mut self, value: String) -> &mut Self { + pub fn modified_at(&mut self, value: String) -> &mut Self { self.modified_at = Some(value); self } #[allow(deprecated)] - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } #[allow(deprecated)] - pub fn with_owner(&mut self, value: String) -> &mut Self { + pub fn owner(&mut self, value: String) -> &mut Self { self.owner = Some(value); self } #[allow(deprecated)] - pub fn with_scorecard_name(&mut self, value: String) -> &mut Self { + pub fn scorecard_name(&mut self, value: String) -> &mut Self { self.scorecard_name = Some(value); self } } + impl Default for RuleAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rule_outcome_relationships.rs b/src/datadogV2/model/model_rule_outcome_relationships.rs index 1a4fa2367..d306719ae 100644 --- a/src/datadogV2/model/model_rule_outcome_relationships.rs +++ b/src/datadogV2/model/model_rule_outcome_relationships.rs @@ -18,14 +18,12 @@ impl RuleOutcomeRelationships { RuleOutcomeRelationships { rule: None } } - pub fn with_rule( - &mut self, - value: crate::datadogV2::model::RelationshipToOutcome, - ) -> &mut Self { + pub fn rule(&mut self, value: crate::datadogV2::model::RelationshipToOutcome) -> &mut Self { self.rule = Some(value); self } } + impl Default for RuleOutcomeRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_aggregate_bucket_value_timeseries.rs b/src/datadogV2/model/model_rum_aggregate_bucket_value_timeseries.rs index 8542f3883..1a8a7e58f 100644 --- a/src/datadogV2/model/model_rum_aggregate_bucket_value_timeseries.rs +++ b/src/datadogV2/model/model_rum_aggregate_bucket_value_timeseries.rs @@ -14,6 +14,7 @@ impl RUMAggregateBucketValueTimeseries { RUMAggregateBucketValueTimeseries {} } } + impl Default for RUMAggregateBucketValueTimeseries { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_aggregate_bucket_value_timeseries_point.rs b/src/datadogV2/model/model_rum_aggregate_bucket_value_timeseries_point.rs index 5f570dbf2..87fe48b64 100644 --- a/src/datadogV2/model/model_rum_aggregate_bucket_value_timeseries_point.rs +++ b/src/datadogV2/model/model_rum_aggregate_bucket_value_timeseries_point.rs @@ -24,16 +24,17 @@ impl RUMAggregateBucketValueTimeseriesPoint { } } - pub fn with_time(&mut self, value: String) -> &mut Self { + pub fn time(&mut self, value: String) -> &mut Self { self.time = Some(value); self } - pub fn with_value(&mut self, value: f64) -> &mut Self { + pub fn value(&mut self, value: f64) -> &mut Self { self.value = Some(value); self } } + impl Default for RUMAggregateBucketValueTimeseriesPoint { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_aggregate_request.rs b/src/datadogV2/model/model_rum_aggregate_request.rs index d087df5af..8ca93cb72 100644 --- a/src/datadogV2/model/model_rum_aggregate_request.rs +++ b/src/datadogV2/model/model_rum_aggregate_request.rs @@ -37,31 +37,32 @@ impl RUMAggregateRequest { } } - pub fn with_compute(&mut self, value: Vec) -> &mut Self { + pub fn compute(&mut self, value: Vec) -> &mut Self { self.compute = Some(value); self } - pub fn with_filter(&mut self, value: crate::datadogV2::model::RUMQueryFilter) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV2::model::RUMQueryFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_group_by(&mut self, value: Vec) -> &mut Self { + pub fn group_by(&mut self, value: Vec) -> &mut Self { self.group_by = Some(value); self } - pub fn with_options(&mut self, value: crate::datadogV2::model::RUMQueryOptions) -> &mut Self { + pub fn options(&mut self, value: crate::datadogV2::model::RUMQueryOptions) -> &mut Self { self.options = Some(value); self } - pub fn with_page(&mut self, value: crate::datadogV2::model::RUMQueryPageOptions) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV2::model::RUMQueryPageOptions) -> &mut Self { self.page = Some(value); self } } + impl Default for RUMAggregateRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_aggregate_sort.rs b/src/datadogV2/model/model_rum_aggregate_sort.rs index ddfa2c409..75623f39e 100644 --- a/src/datadogV2/model/model_rum_aggregate_sort.rs +++ b/src/datadogV2/model/model_rum_aggregate_sort.rs @@ -32,7 +32,7 @@ impl RUMAggregateSort { } } - pub fn with_aggregation( + pub fn aggregation( &mut self, value: crate::datadogV2::model::RUMAggregationFunction, ) -> &mut Self { @@ -40,24 +40,22 @@ impl RUMAggregateSort { self } - pub fn with_metric(&mut self, value: String) -> &mut Self { + pub fn metric(&mut self, value: String) -> &mut Self { self.metric = Some(value); self } - pub fn with_order(&mut self, value: crate::datadogV2::model::RUMSortOrder) -> &mut Self { + pub fn order(&mut self, value: crate::datadogV2::model::RUMSortOrder) -> &mut Self { self.order = Some(value); self } - pub fn with_type_( - &mut self, - value: crate::datadogV2::model::RUMAggregateSortType, - ) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::RUMAggregateSortType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for RUMAggregateSort { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_aggregation_buckets_response.rs b/src/datadogV2/model/model_rum_aggregation_buckets_response.rs index 2679c925b..64e91f129 100644 --- a/src/datadogV2/model/model_rum_aggregation_buckets_response.rs +++ b/src/datadogV2/model/model_rum_aggregation_buckets_response.rs @@ -18,14 +18,12 @@ impl RUMAggregationBucketsResponse { RUMAggregationBucketsResponse { buckets: None } } - pub fn with_buckets( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn buckets(&mut self, value: Vec) -> &mut Self { self.buckets = Some(value); self } } + impl Default for RUMAggregationBucketsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_analytics_aggregate_response.rs b/src/datadogV2/model/model_rum_analytics_aggregate_response.rs index 562c653e8..61356dd66 100644 --- a/src/datadogV2/model/model_rum_analytics_aggregate_response.rs +++ b/src/datadogV2/model/model_rum_analytics_aggregate_response.rs @@ -28,7 +28,7 @@ impl RUMAnalyticsAggregateResponse { } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::RUMAggregationBucketsResponse, ) -> &mut Self { @@ -36,16 +36,17 @@ impl RUMAnalyticsAggregateResponse { self } - pub fn with_links(&mut self, value: crate::datadogV2::model::RUMResponseLinks) -> &mut Self { + pub fn links(&mut self, value: crate::datadogV2::model::RUMResponseLinks) -> &mut Self { self.links = Some(value); self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::RUMResponseMetadata) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::RUMResponseMetadata) -> &mut Self { self.meta = Some(value); self } } + impl Default for RUMAnalyticsAggregateResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_application_attributes.rs b/src/datadogV2/model/model_rum_application_attributes.rs index 7c421bb0b..412eef8af 100644 --- a/src/datadogV2/model/model_rum_application_attributes.rs +++ b/src/datadogV2/model/model_rum_application_attributes.rs @@ -70,12 +70,12 @@ impl RUMApplicationAttributes { } } - pub fn with_hash(&mut self, value: String) -> &mut Self { + pub fn hash(&mut self, value: String) -> &mut Self { self.hash = Some(value); self } - pub fn with_is_active(&mut self, value: bool) -> &mut Self { + pub fn is_active(&mut self, value: bool) -> &mut Self { self.is_active = Some(value); self } diff --git a/src/datadogV2/model/model_rum_application_create_attributes.rs b/src/datadogV2/model/model_rum_application_create_attributes.rs index 7478b229c..fe2a1ac00 100644 --- a/src/datadogV2/model/model_rum_application_create_attributes.rs +++ b/src/datadogV2/model/model_rum_application_create_attributes.rs @@ -21,7 +21,7 @@ impl RUMApplicationCreateAttributes { RUMApplicationCreateAttributes { name, type_: None } } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } diff --git a/src/datadogV2/model/model_rum_application_list.rs b/src/datadogV2/model/model_rum_application_list.rs index db12d12ac..b49dd8cee 100644 --- a/src/datadogV2/model/model_rum_application_list.rs +++ b/src/datadogV2/model/model_rum_application_list.rs @@ -31,7 +31,7 @@ impl RUMApplicationList { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } diff --git a/src/datadogV2/model/model_rum_application_list_attributes.rs b/src/datadogV2/model/model_rum_application_list_attributes.rs index ec56c1d35..42383997a 100644 --- a/src/datadogV2/model/model_rum_application_list_attributes.rs +++ b/src/datadogV2/model/model_rum_application_list_attributes.rs @@ -65,12 +65,12 @@ impl RUMApplicationListAttributes { } } - pub fn with_hash(&mut self, value: String) -> &mut Self { + pub fn hash(&mut self, value: String) -> &mut Self { self.hash = Some(value); self } - pub fn with_is_active(&mut self, value: bool) -> &mut Self { + pub fn is_active(&mut self, value: bool) -> &mut Self { self.is_active = Some(value); self } diff --git a/src/datadogV2/model/model_rum_application_response.rs b/src/datadogV2/model/model_rum_application_response.rs index 1a07b0974..304d77839 100644 --- a/src/datadogV2/model/model_rum_application_response.rs +++ b/src/datadogV2/model/model_rum_application_response.rs @@ -18,11 +18,12 @@ impl RUMApplicationResponse { RUMApplicationResponse { data: None } } - pub fn with_data(&mut self, value: crate::datadogV2::model::RUMApplication) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::RUMApplication) -> &mut Self { self.data = Some(value); self } } + impl Default for RUMApplicationResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_application_update.rs b/src/datadogV2/model/model_rum_application_update.rs index 252620282..53e8e7167 100644 --- a/src/datadogV2/model/model_rum_application_update.rs +++ b/src/datadogV2/model/model_rum_application_update.rs @@ -31,7 +31,7 @@ impl RUMApplicationUpdate { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::RUMApplicationUpdateAttributes, ) -> &mut Self { diff --git a/src/datadogV2/model/model_rum_application_update_attributes.rs b/src/datadogV2/model/model_rum_application_update_attributes.rs index 5b6b54f32..4dc9b9928 100644 --- a/src/datadogV2/model/model_rum_application_update_attributes.rs +++ b/src/datadogV2/model/model_rum_application_update_attributes.rs @@ -24,16 +24,17 @@ impl RUMApplicationUpdateAttributes { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } } + impl Default for RUMApplicationUpdateAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_applications_response.rs b/src/datadogV2/model/model_rum_applications_response.rs index 248f2cb6b..7f303c2be 100644 --- a/src/datadogV2/model/model_rum_applications_response.rs +++ b/src/datadogV2/model/model_rum_applications_response.rs @@ -18,14 +18,12 @@ impl RUMApplicationsResponse { RUMApplicationsResponse { data: None } } - pub fn with_data( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } } + impl Default for RUMApplicationsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_bucket_response.rs b/src/datadogV2/model/model_rum_bucket_response.rs index 3a872e790..e0df78309 100644 --- a/src/datadogV2/model/model_rum_bucket_response.rs +++ b/src/datadogV2/model/model_rum_bucket_response.rs @@ -26,12 +26,12 @@ impl RUMBucketResponse { } } - pub fn with_by(&mut self, value: std::collections::BTreeMap) -> &mut Self { + pub fn by(&mut self, value: std::collections::BTreeMap) -> &mut Self { self.by = Some(value); self } - pub fn with_computes( + pub fn computes( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -39,6 +39,7 @@ impl RUMBucketResponse { self } } + impl Default for RUMBucketResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_compute.rs b/src/datadogV2/model/model_rum_compute.rs index ed80fa513..6def54019 100644 --- a/src/datadogV2/model/model_rum_compute.rs +++ b/src/datadogV2/model/model_rum_compute.rs @@ -33,17 +33,17 @@ impl RUMCompute { } } - pub fn with_interval(&mut self, value: String) -> &mut Self { + pub fn interval(&mut self, value: String) -> &mut Self { self.interval = Some(value); self } - pub fn with_metric(&mut self, value: String) -> &mut Self { + pub fn metric(&mut self, value: String) -> &mut Self { self.metric = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::RUMComputeType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::RUMComputeType) -> &mut Self { self.type_ = Some(value); self } diff --git a/src/datadogV2/model/model_rum_event.rs b/src/datadogV2/model/model_rum_event.rs index f151d29b2..da75ad45f 100644 --- a/src/datadogV2/model/model_rum_event.rs +++ b/src/datadogV2/model/model_rum_event.rs @@ -28,24 +28,22 @@ impl RUMEvent { } } - pub fn with_attributes( - &mut self, - value: crate::datadogV2::model::RUMEventAttributes, - ) -> &mut Self { + pub fn attributes(&mut self, value: crate::datadogV2::model::RUMEventAttributes) -> &mut Self { self.attributes = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::RUMEventType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::RUMEventType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for RUMEvent { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_event_attributes.rs b/src/datadogV2/model/model_rum_event_attributes.rs index 6bd06ff1e..8d8b0ae03 100644 --- a/src/datadogV2/model/model_rum_event_attributes.rs +++ b/src/datadogV2/model/model_rum_event_attributes.rs @@ -34,7 +34,7 @@ impl RUMEventAttributes { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -42,21 +42,22 @@ impl RUMEventAttributes { self } - pub fn with_service(&mut self, value: String) -> &mut Self { + pub fn service(&mut self, value: String) -> &mut Self { self.service = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_timestamp(&mut self, value: String) -> &mut Self { + pub fn timestamp(&mut self, value: String) -> &mut Self { self.timestamp = Some(value); self } } + impl Default for RUMEventAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_events_response.rs b/src/datadogV2/model/model_rum_events_response.rs index 4415d4937..3e3ad1ffe 100644 --- a/src/datadogV2/model/model_rum_events_response.rs +++ b/src/datadogV2/model/model_rum_events_response.rs @@ -28,21 +28,22 @@ impl RUMEventsResponse { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_links(&mut self, value: crate::datadogV2::model::RUMResponseLinks) -> &mut Self { + pub fn links(&mut self, value: crate::datadogV2::model::RUMResponseLinks) -> &mut Self { self.links = Some(value); self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::RUMResponseMetadata) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::RUMResponseMetadata) -> &mut Self { self.meta = Some(value); self } } + impl Default for RUMEventsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_group_by.rs b/src/datadogV2/model/model_rum_group_by.rs index b3e74b829..ec66cc68f 100644 --- a/src/datadogV2/model/model_rum_group_by.rs +++ b/src/datadogV2/model/model_rum_group_by.rs @@ -41,30 +41,27 @@ impl RUMGroupBy { } } - pub fn with_histogram( - &mut self, - value: crate::datadogV2::model::RUMGroupByHistogram, - ) -> &mut Self { + pub fn histogram(&mut self, value: crate::datadogV2::model::RUMGroupByHistogram) -> &mut Self { self.histogram = Some(value); self } - pub fn with_limit(&mut self, value: i64) -> &mut Self { + pub fn limit(&mut self, value: i64) -> &mut Self { self.limit = Some(value); self } - pub fn with_missing(&mut self, value: crate::datadogV2::model::RUMGroupByMissing) -> &mut Self { + pub fn missing(&mut self, value: crate::datadogV2::model::RUMGroupByMissing) -> &mut Self { self.missing = Some(value); self } - pub fn with_sort(&mut self, value: crate::datadogV2::model::RUMAggregateSort) -> &mut Self { + pub fn sort(&mut self, value: crate::datadogV2::model::RUMAggregateSort) -> &mut Self { self.sort = Some(value); self } - pub fn with_total(&mut self, value: crate::datadogV2::model::RUMGroupByTotal) -> &mut Self { + pub fn total(&mut self, value: crate::datadogV2::model::RUMGroupByTotal) -> &mut Self { self.total = Some(value); self } diff --git a/src/datadogV2/model/model_rum_query_filter.rs b/src/datadogV2/model/model_rum_query_filter.rs index b259a9615..958236814 100644 --- a/src/datadogV2/model/model_rum_query_filter.rs +++ b/src/datadogV2/model/model_rum_query_filter.rs @@ -28,21 +28,22 @@ impl RUMQueryFilter { } } - pub fn with_from(&mut self, value: String) -> &mut Self { + pub fn from(&mut self, value: String) -> &mut Self { self.from = Some(value); self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } - pub fn with_to(&mut self, value: String) -> &mut Self { + pub fn to(&mut self, value: String) -> &mut Self { self.to = Some(value); self } } + impl Default for RUMQueryFilter { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_query_options.rs b/src/datadogV2/model/model_rum_query_options.rs index aa77dc40f..52cd57d6e 100644 --- a/src/datadogV2/model/model_rum_query_options.rs +++ b/src/datadogV2/model/model_rum_query_options.rs @@ -25,16 +25,17 @@ impl RUMQueryOptions { } } - pub fn with_time_offset(&mut self, value: i64) -> &mut Self { + pub fn time_offset(&mut self, value: i64) -> &mut Self { self.time_offset = Some(value); self } - pub fn with_timezone(&mut self, value: String) -> &mut Self { + pub fn timezone(&mut self, value: String) -> &mut Self { self.timezone = Some(value); self } } + impl Default for RUMQueryOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_query_page_options.rs b/src/datadogV2/model/model_rum_query_page_options.rs index 5be3a3675..76a46cf29 100644 --- a/src/datadogV2/model/model_rum_query_page_options.rs +++ b/src/datadogV2/model/model_rum_query_page_options.rs @@ -24,16 +24,17 @@ impl RUMQueryPageOptions { } } - pub fn with_cursor(&mut self, value: String) -> &mut Self { + pub fn cursor(&mut self, value: String) -> &mut Self { self.cursor = Some(value); self } - pub fn with_limit(&mut self, value: i32) -> &mut Self { + pub fn limit(&mut self, value: i32) -> &mut Self { self.limit = Some(value); self } } + impl Default for RUMQueryPageOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_response_links.rs b/src/datadogV2/model/model_rum_response_links.rs index b53e2ff1b..a62a75d77 100644 --- a/src/datadogV2/model/model_rum_response_links.rs +++ b/src/datadogV2/model/model_rum_response_links.rs @@ -19,11 +19,12 @@ impl RUMResponseLinks { RUMResponseLinks { next: None } } - pub fn with_next(&mut self, value: String) -> &mut Self { + pub fn next(&mut self, value: String) -> &mut Self { self.next = Some(value); self } } + impl Default for RUMResponseLinks { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_response_metadata.rs b/src/datadogV2/model/model_rum_response_metadata.rs index 48d0e65b2..e4f8022d4 100644 --- a/src/datadogV2/model/model_rum_response_metadata.rs +++ b/src/datadogV2/model/model_rum_response_metadata.rs @@ -37,31 +37,32 @@ impl RUMResponseMetadata { } } - pub fn with_elapsed(&mut self, value: i64) -> &mut Self { + pub fn elapsed(&mut self, value: i64) -> &mut Self { self.elapsed = Some(value); self } - pub fn with_page(&mut self, value: crate::datadogV2::model::RUMResponsePage) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV2::model::RUMResponsePage) -> &mut Self { self.page = Some(value); self } - pub fn with_request_id(&mut self, value: String) -> &mut Self { + pub fn request_id(&mut self, value: String) -> &mut Self { self.request_id = Some(value); self } - pub fn with_status(&mut self, value: crate::datadogV2::model::RUMResponseStatus) -> &mut Self { + pub fn status(&mut self, value: crate::datadogV2::model::RUMResponseStatus) -> &mut Self { self.status = Some(value); self } - pub fn with_warnings(&mut self, value: Vec) -> &mut Self { + pub fn warnings(&mut self, value: Vec) -> &mut Self { self.warnings = Some(value); self } } + impl Default for RUMResponseMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_response_page.rs b/src/datadogV2/model/model_rum_response_page.rs index 7474f3dfa..3dedc328e 100644 --- a/src/datadogV2/model/model_rum_response_page.rs +++ b/src/datadogV2/model/model_rum_response_page.rs @@ -18,11 +18,12 @@ impl RUMResponsePage { RUMResponsePage { after: None } } - pub fn with_after(&mut self, value: String) -> &mut Self { + pub fn after(&mut self, value: String) -> &mut Self { self.after = Some(value); self } } + impl Default for RUMResponsePage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_search_events_request.rs b/src/datadogV2/model/model_rum_search_events_request.rs index b34411464..3a4aaa98d 100644 --- a/src/datadogV2/model/model_rum_search_events_request.rs +++ b/src/datadogV2/model/model_rum_search_events_request.rs @@ -33,26 +33,27 @@ impl RUMSearchEventsRequest { } } - pub fn with_filter(&mut self, value: crate::datadogV2::model::RUMQueryFilter) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV2::model::RUMQueryFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_options(&mut self, value: crate::datadogV2::model::RUMQueryOptions) -> &mut Self { + pub fn options(&mut self, value: crate::datadogV2::model::RUMQueryOptions) -> &mut Self { self.options = Some(value); self } - pub fn with_page(&mut self, value: crate::datadogV2::model::RUMQueryPageOptions) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV2::model::RUMQueryPageOptions) -> &mut Self { self.page = Some(value); self } - pub fn with_sort(&mut self, value: crate::datadogV2::model::RUMSort) -> &mut Self { + pub fn sort(&mut self, value: crate::datadogV2::model::RUMSort) -> &mut Self { self.sort = Some(value); self } } + impl Default for RUMSearchEventsRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_rum_warning.rs b/src/datadogV2/model/model_rum_warning.rs index c15cb6257..5df185c92 100644 --- a/src/datadogV2/model/model_rum_warning.rs +++ b/src/datadogV2/model/model_rum_warning.rs @@ -28,21 +28,22 @@ impl RUMWarning { } } - pub fn with_code(&mut self, value: String) -> &mut Self { + pub fn code(&mut self, value: String) -> &mut Self { self.code = Some(value); self } - pub fn with_detail(&mut self, value: String) -> &mut Self { + pub fn detail(&mut self, value: String) -> &mut Self { self.detail = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } } + impl Default for RUMWarning { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_saml_assertion_attribute.rs b/src/datadogV2/model/model_saml_assertion_attribute.rs index 99dcf9e98..8adc09d8c 100644 --- a/src/datadogV2/model/model_saml_assertion_attribute.rs +++ b/src/datadogV2/model/model_saml_assertion_attribute.rs @@ -31,7 +31,7 @@ impl SAMLAssertionAttribute { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::SAMLAssertionAttributeAttributes, ) -> &mut Self { diff --git a/src/datadogV2/model/model_saml_assertion_attribute_attributes.rs b/src/datadogV2/model/model_saml_assertion_attribute_attributes.rs index 04c083b77..bdb2c9d87 100644 --- a/src/datadogV2/model/model_saml_assertion_attribute_attributes.rs +++ b/src/datadogV2/model/model_saml_assertion_attribute_attributes.rs @@ -24,16 +24,17 @@ impl SAMLAssertionAttributeAttributes { } } - pub fn with_attribute_key(&mut self, value: String) -> &mut Self { + pub fn attribute_key(&mut self, value: String) -> &mut Self { self.attribute_key = Some(value); self } - pub fn with_attribute_value(&mut self, value: String) -> &mut Self { + pub fn attribute_value(&mut self, value: String) -> &mut Self { self.attribute_value = Some(value); self } } + impl Default for SAMLAssertionAttributeAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_scalar_column.rs b/src/datadogV2/model/model_scalar_column.rs index fa21de9a6..c841a07b6 100644 --- a/src/datadogV2/model/model_scalar_column.rs +++ b/src/datadogV2/model/model_scalar_column.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ScalarColumn { - GroupScalarColumn(crate::datadogV2::model::GroupScalarColumn), - DataScalarColumn(crate::datadogV2::model::DataScalarColumn), + GroupScalarColumn(Box), + DataScalarColumn(Box), } diff --git a/src/datadogV2/model/model_scalar_formula_query_response.rs b/src/datadogV2/model/model_scalar_formula_query_response.rs index 7fc5f5143..cb13c0b23 100644 --- a/src/datadogV2/model/model_scalar_formula_query_response.rs +++ b/src/datadogV2/model/model_scalar_formula_query_response.rs @@ -24,16 +24,17 @@ impl ScalarFormulaQueryResponse { } } - pub fn with_data(&mut self, value: crate::datadogV2::model::ScalarResponse) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::ScalarResponse) -> &mut Self { self.data = Some(value); self } - pub fn with_errors(&mut self, value: String) -> &mut Self { + pub fn errors(&mut self, value: String) -> &mut Self { self.errors = Some(value); self } } + impl Default for ScalarFormulaQueryResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_scalar_formula_request_attributes.rs b/src/datadogV2/model/model_scalar_formula_request_attributes.rs index 663154a4a..931ba516e 100644 --- a/src/datadogV2/model/model_scalar_formula_request_attributes.rs +++ b/src/datadogV2/model/model_scalar_formula_request_attributes.rs @@ -36,10 +36,7 @@ impl ScalarFormulaRequestAttributes { } } - pub fn with_formulas( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn formulas(&mut self, value: Vec) -> &mut Self { self.formulas = Some(value); self } diff --git a/src/datadogV2/model/model_scalar_formula_response_atrributes.rs b/src/datadogV2/model/model_scalar_formula_response_atrributes.rs index e5489e646..a19aac5e5 100644 --- a/src/datadogV2/model/model_scalar_formula_response_atrributes.rs +++ b/src/datadogV2/model/model_scalar_formula_response_atrributes.rs @@ -18,11 +18,12 @@ impl ScalarFormulaResponseAtrributes { ScalarFormulaResponseAtrributes { columns: None } } - pub fn with_columns(&mut self, value: Vec) -> &mut Self { + pub fn columns(&mut self, value: Vec) -> &mut Self { self.columns = Some(value); self } } + impl Default for ScalarFormulaResponseAtrributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_scalar_meta.rs b/src/datadogV2/model/model_scalar_meta.rs index 004b47c9d..c8d49a22c 100644 --- a/src/datadogV2/model/model_scalar_meta.rs +++ b/src/datadogV2/model/model_scalar_meta.rs @@ -21,14 +21,12 @@ impl ScalarMeta { ScalarMeta { unit: None } } - pub fn with_unit( - &mut self, - value: Option>>, - ) -> &mut Self { + pub fn unit(&mut self, value: Option>>) -> &mut Self { self.unit = Some(value); self } } + impl Default for ScalarMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_scalar_query.rs b/src/datadogV2/model/model_scalar_query.rs index f295ba00a..d79190a48 100644 --- a/src/datadogV2/model/model_scalar_query.rs +++ b/src/datadogV2/model/model_scalar_query.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ScalarQuery { - MetricsScalarQuery(crate::datadogV2::model::MetricsScalarQuery), - EventsScalarQuery(crate::datadogV2::model::EventsScalarQuery), + MetricsScalarQuery(Box), + EventsScalarQuery(Box), } diff --git a/src/datadogV2/model/model_scalar_response.rs b/src/datadogV2/model/model_scalar_response.rs index 39cebb3cf..83ae70770 100644 --- a/src/datadogV2/model/model_scalar_response.rs +++ b/src/datadogV2/model/model_scalar_response.rs @@ -24,7 +24,7 @@ impl ScalarResponse { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::ScalarFormulaResponseAtrributes, ) -> &mut Self { @@ -32,7 +32,7 @@ impl ScalarResponse { self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::ScalarFormulaResponseType, ) -> &mut Self { @@ -40,6 +40,7 @@ impl ScalarResponse { self } } + impl Default for ScalarResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_filter.rs b/src/datadogV2/model/model_security_filter.rs index 81cfa87ed..2335ab08e 100644 --- a/src/datadogV2/model/model_security_filter.rs +++ b/src/datadogV2/model/model_security_filter.rs @@ -28,7 +28,7 @@ impl SecurityFilter { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::SecurityFilterAttributes, ) -> &mut Self { @@ -36,16 +36,17 @@ impl SecurityFilter { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::SecurityFilterType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::SecurityFilterType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for SecurityFilter { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_filter_attributes.rs b/src/datadogV2/model/model_security_filter_attributes.rs index 33fb50ea1..0a83225db 100644 --- a/src/datadogV2/model/model_security_filter_attributes.rs +++ b/src/datadogV2/model/model_security_filter_attributes.rs @@ -45,7 +45,7 @@ impl SecurityFilterAttributes { } } - pub fn with_exclusion_filters( + pub fn exclusion_filters( &mut self, value: Vec, ) -> &mut Self { @@ -53,7 +53,7 @@ impl SecurityFilterAttributes { self } - pub fn with_filtered_data_type( + pub fn filtered_data_type( &mut self, value: crate::datadogV2::model::SecurityFilterFilteredDataType, ) -> &mut Self { @@ -61,31 +61,32 @@ impl SecurityFilterAttributes { self } - pub fn with_is_builtin(&mut self, value: bool) -> &mut Self { + pub fn is_builtin(&mut self, value: bool) -> &mut Self { self.is_builtin = Some(value); self } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } - pub fn with_version(&mut self, value: i32) -> &mut Self { + pub fn version(&mut self, value: i32) -> &mut Self { self.version = Some(value); self } } + impl Default for SecurityFilterAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_filter_exclusion_filter_response.rs b/src/datadogV2/model/model_security_filter_exclusion_filter_response.rs index 33c99fdba..1268dae7f 100644 --- a/src/datadogV2/model/model_security_filter_exclusion_filter_response.rs +++ b/src/datadogV2/model/model_security_filter_exclusion_filter_response.rs @@ -24,16 +24,17 @@ impl SecurityFilterExclusionFilterResponse { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } } + impl Default for SecurityFilterExclusionFilterResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_filter_meta.rs b/src/datadogV2/model/model_security_filter_meta.rs index 9280edb42..37601c371 100644 --- a/src/datadogV2/model/model_security_filter_meta.rs +++ b/src/datadogV2/model/model_security_filter_meta.rs @@ -18,11 +18,12 @@ impl SecurityFilterMeta { SecurityFilterMeta { warning: None } } - pub fn with_warning(&mut self, value: String) -> &mut Self { + pub fn warning(&mut self, value: String) -> &mut Self { self.warning = Some(value); self } } + impl Default for SecurityFilterMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_filter_response.rs b/src/datadogV2/model/model_security_filter_response.rs index e3bc2a4c0..0b26bf608 100644 --- a/src/datadogV2/model/model_security_filter_response.rs +++ b/src/datadogV2/model/model_security_filter_response.rs @@ -24,16 +24,17 @@ impl SecurityFilterResponse { } } - pub fn with_data(&mut self, value: crate::datadogV2::model::SecurityFilter) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::SecurityFilter) -> &mut Self { self.data = Some(value); self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::SecurityFilterMeta) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::SecurityFilterMeta) -> &mut Self { self.meta = Some(value); self } } + impl Default for SecurityFilterResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_filter_update_attributes.rs b/src/datadogV2/model/model_security_filter_update_attributes.rs index 4579d7f85..adae7e4fc 100644 --- a/src/datadogV2/model/model_security_filter_update_attributes.rs +++ b/src/datadogV2/model/model_security_filter_update_attributes.rs @@ -40,7 +40,7 @@ impl SecurityFilterUpdateAttributes { } } - pub fn with_exclusion_filters( + pub fn exclusion_filters( &mut self, value: Vec, ) -> &mut Self { @@ -48,7 +48,7 @@ impl SecurityFilterUpdateAttributes { self } - pub fn with_filtered_data_type( + pub fn filtered_data_type( &mut self, value: crate::datadogV2::model::SecurityFilterFilteredDataType, ) -> &mut Self { @@ -56,26 +56,27 @@ impl SecurityFilterUpdateAttributes { self } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } - pub fn with_version(&mut self, value: i32) -> &mut Self { + pub fn version(&mut self, value: i32) -> &mut Self { self.version = Some(value); self } } + impl Default for SecurityFilterUpdateAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_filters_response.rs b/src/datadogV2/model/model_security_filters_response.rs index 26f161ada..f419124a5 100644 --- a/src/datadogV2/model/model_security_filters_response.rs +++ b/src/datadogV2/model/model_security_filters_response.rs @@ -24,16 +24,17 @@ impl SecurityFiltersResponse { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::SecurityFilterMeta) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::SecurityFilterMeta) -> &mut Self { self.meta = Some(value); self } } + impl Default for SecurityFiltersResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_filter.rs b/src/datadogV2/model/model_security_monitoring_filter.rs index 59337c15d..5ca84ae0d 100644 --- a/src/datadogV2/model/model_security_monitoring_filter.rs +++ b/src/datadogV2/model/model_security_monitoring_filter.rs @@ -24,7 +24,7 @@ impl SecurityMonitoringFilter { } } - pub fn with_action( + pub fn action( &mut self, value: crate::datadogV2::model::SecurityMonitoringFilterAction, ) -> &mut Self { @@ -32,11 +32,12 @@ impl SecurityMonitoringFilter { self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } } + impl Default for SecurityMonitoringFilter { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_list_rules_response.rs b/src/datadogV2/model/model_security_monitoring_list_rules_response.rs index 7fafcf00b..d53a65ef6 100644 --- a/src/datadogV2/model/model_security_monitoring_list_rules_response.rs +++ b/src/datadogV2/model/model_security_monitoring_list_rules_response.rs @@ -24,7 +24,7 @@ impl SecurityMonitoringListRulesResponse { } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -32,14 +32,12 @@ impl SecurityMonitoringListRulesResponse { self } - pub fn with_meta( - &mut self, - value: crate::datadogV2::model::ResponseMetaAttributes, - ) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::ResponseMetaAttributes) -> &mut Self { self.meta = Some(value); self } } + impl Default for SecurityMonitoringListRulesResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_rule_case.rs b/src/datadogV2/model/model_security_monitoring_rule_case.rs index 15deeed5f..e67be92e0 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_case.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_case.rs @@ -33,22 +33,22 @@ impl SecurityMonitoringRuleCase { } } - pub fn with_condition(&mut self, value: String) -> &mut Self { + pub fn condition(&mut self, value: String) -> &mut Self { self.condition = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_notifications(&mut self, value: Vec) -> &mut Self { + pub fn notifications(&mut self, value: Vec) -> &mut Self { self.notifications = Some(value); self } - pub fn with_status( + pub fn status( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleSeverity, ) -> &mut Self { @@ -56,6 +56,7 @@ impl SecurityMonitoringRuleCase { self } } + impl Default for SecurityMonitoringRuleCase { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_rule_case_create.rs b/src/datadogV2/model/model_security_monitoring_rule_case_create.rs index 30b13ea98..b616d4bed 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_case_create.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_case_create.rs @@ -35,17 +35,17 @@ impl SecurityMonitoringRuleCaseCreate { } } - pub fn with_condition(&mut self, value: String) -> &mut Self { + pub fn condition(&mut self, value: String) -> &mut Self { self.condition = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_notifications(&mut self, value: Vec) -> &mut Self { + pub fn notifications(&mut self, value: Vec) -> &mut Self { self.notifications = Some(value); self } diff --git a/src/datadogV2/model/model_security_monitoring_rule_create_payload.rs b/src/datadogV2/model/model_security_monitoring_rule_create_payload.rs index 26153cdcd..47d9a883a 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_create_payload.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_create_payload.rs @@ -8,12 +8,12 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum SecurityMonitoringRuleCreatePayload { SecurityMonitoringStandardRuleCreatePayload( - crate::datadogV2::model::SecurityMonitoringStandardRuleCreatePayload, + Box, ), SecurityMonitoringSignalRuleCreatePayload( - crate::datadogV2::model::SecurityMonitoringSignalRuleCreatePayload, + Box, ), CloudConfigurationRuleCreatePayload( - crate::datadogV2::model::CloudConfigurationRuleCreatePayload, + Box, ), } diff --git a/src/datadogV2/model/model_security_monitoring_rule_impossible_travel_options.rs b/src/datadogV2/model/model_security_monitoring_rule_impossible_travel_options.rs index cead6ceba..8892cfc0a 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_impossible_travel_options.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_impossible_travel_options.rs @@ -21,11 +21,12 @@ impl SecurityMonitoringRuleImpossibleTravelOptions { } } - pub fn with_baseline_user_locations(&mut self, value: bool) -> &mut Self { + pub fn baseline_user_locations(&mut self, value: bool) -> &mut Self { self.baseline_user_locations = Some(value); self } } + impl Default for SecurityMonitoringRuleImpossibleTravelOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_rule_new_value_options.rs b/src/datadogV2/model/model_security_monitoring_rule_new_value_options.rs index 813100820..0e461478f 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_new_value_options.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_new_value_options.rs @@ -37,7 +37,7 @@ impl SecurityMonitoringRuleNewValueOptions { } } - pub fn with_forget_after( + pub fn forget_after( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleNewValueOptionsForgetAfter, ) -> &mut Self { @@ -45,7 +45,7 @@ impl SecurityMonitoringRuleNewValueOptions { self } - pub fn with_learning_duration( + pub fn learning_duration( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleNewValueOptionsLearningDuration, ) -> &mut Self { @@ -53,7 +53,7 @@ impl SecurityMonitoringRuleNewValueOptions { self } - pub fn with_learning_method( + pub fn learning_method( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleNewValueOptionsLearningMethod, ) -> &mut Self { @@ -61,7 +61,7 @@ impl SecurityMonitoringRuleNewValueOptions { self } - pub fn with_learning_threshold( + pub fn learning_threshold( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleNewValueOptionsLearningThreshold, ) -> &mut Self { @@ -69,6 +69,7 @@ impl SecurityMonitoringRuleNewValueOptions { self } } + impl Default for SecurityMonitoringRuleNewValueOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_rule_options.rs b/src/datadogV2/model/model_security_monitoring_rule_options.rs index 2f03f64e4..fdcdc4b10 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_options.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_options.rs @@ -68,7 +68,7 @@ impl SecurityMonitoringRuleOptions { } } - pub fn with_compliance_rule_options( + pub fn compliance_rule_options( &mut self, value: crate::datadogV2::model::CloudConfigurationComplianceRuleOptions, ) -> &mut Self { @@ -76,12 +76,12 @@ impl SecurityMonitoringRuleOptions { self } - pub fn with_decrease_criticality_based_on_env(&mut self, value: bool) -> &mut Self { + pub fn decrease_criticality_based_on_env(&mut self, value: bool) -> &mut Self { self.decrease_criticality_based_on_env = Some(value); self } - pub fn with_detection_method( + pub fn detection_method( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleDetectionMethod, ) -> &mut Self { @@ -89,7 +89,7 @@ impl SecurityMonitoringRuleOptions { self } - pub fn with_evaluation_window( + pub fn evaluation_window( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleEvaluationWindow, ) -> &mut Self { @@ -97,7 +97,7 @@ impl SecurityMonitoringRuleOptions { self } - pub fn with_hardcoded_evaluator_type( + pub fn hardcoded_evaluator_type( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleHardcodedEvaluatorType, ) -> &mut Self { @@ -105,7 +105,7 @@ impl SecurityMonitoringRuleOptions { self } - pub fn with_impossible_travel_options( + pub fn impossible_travel_options( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleImpossibleTravelOptions, ) -> &mut Self { @@ -113,7 +113,7 @@ impl SecurityMonitoringRuleOptions { self } - pub fn with_keep_alive( + pub fn keep_alive( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleKeepAlive, ) -> &mut Self { @@ -121,7 +121,7 @@ impl SecurityMonitoringRuleOptions { self } - pub fn with_max_signal_duration( + pub fn max_signal_duration( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleMaxSignalDuration, ) -> &mut Self { @@ -129,7 +129,7 @@ impl SecurityMonitoringRuleOptions { self } - pub fn with_new_value_options( + pub fn new_value_options( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleNewValueOptions, ) -> &mut Self { @@ -137,7 +137,7 @@ impl SecurityMonitoringRuleOptions { self } - pub fn with_third_party_rule_options( + pub fn third_party_rule_options( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleThirdPartyOptions, ) -> &mut Self { @@ -145,6 +145,7 @@ impl SecurityMonitoringRuleOptions { self } } + impl Default for SecurityMonitoringRuleOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_rule_query.rs b/src/datadogV2/model/model_security_monitoring_rule_query.rs index 7e999684b..7de2724ea 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_query.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_query.rs @@ -8,7 +8,9 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum SecurityMonitoringRuleQuery { SecurityMonitoringStandardRuleQuery( - crate::datadogV2::model::SecurityMonitoringStandardRuleQuery, + Box, + ), + SecurityMonitoringSignalRuleQuery( + Box, ), - SecurityMonitoringSignalRuleQuery(crate::datadogV2::model::SecurityMonitoringSignalRuleQuery), } diff --git a/src/datadogV2/model/model_security_monitoring_rule_response.rs b/src/datadogV2/model/model_security_monitoring_rule_response.rs index 6f1ef40a4..1064bb086 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_response.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_response.rs @@ -8,9 +8,9 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum SecurityMonitoringRuleResponse { SecurityMonitoringStandardRuleResponse( - crate::datadogV2::model::SecurityMonitoringStandardRuleResponse, + Box, ), SecurityMonitoringSignalRuleResponse( - crate::datadogV2::model::SecurityMonitoringSignalRuleResponse, + Box, ), } diff --git a/src/datadogV2/model/model_security_monitoring_rule_third_party_options.rs b/src/datadogV2/model/model_security_monitoring_rule_third_party_options.rs index 17320ef45..e54e2eb4e 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_third_party_options.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_third_party_options.rs @@ -32,12 +32,12 @@ impl SecurityMonitoringRuleThirdPartyOptions { } } - pub fn with_default_notifications(&mut self, value: Vec) -> &mut Self { + pub fn default_notifications(&mut self, value: Vec) -> &mut Self { self.default_notifications = Some(value); self } - pub fn with_default_status( + pub fn default_status( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleSeverity, ) -> &mut Self { @@ -45,7 +45,7 @@ impl SecurityMonitoringRuleThirdPartyOptions { self } - pub fn with_root_queries( + pub fn root_queries( &mut self, value: Vec, ) -> &mut Self { @@ -53,11 +53,12 @@ impl SecurityMonitoringRuleThirdPartyOptions { self } - pub fn with_signal_title_template(&mut self, value: String) -> &mut Self { + pub fn signal_title_template(&mut self, value: String) -> &mut Self { self.signal_title_template = Some(value); self } } + impl Default for SecurityMonitoringRuleThirdPartyOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_rule_update_payload.rs b/src/datadogV2/model/model_security_monitoring_rule_update_payload.rs index dff3f5a53..caafce001 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_update_payload.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_update_payload.rs @@ -66,7 +66,7 @@ impl SecurityMonitoringRuleUpdatePayload { } } - pub fn with_cases( + pub fn cases( &mut self, value: Vec, ) -> &mut Self { @@ -74,7 +74,7 @@ impl SecurityMonitoringRuleUpdatePayload { self } - pub fn with_compliance_signal_options( + pub fn compliance_signal_options( &mut self, value: crate::datadogV2::model::CloudConfigurationRuleComplianceSignalOptions, ) -> &mut Self { @@ -82,7 +82,7 @@ impl SecurityMonitoringRuleUpdatePayload { self } - pub fn with_filters( + pub fn filters( &mut self, value: Vec, ) -> &mut Self { @@ -90,27 +90,27 @@ impl SecurityMonitoringRuleUpdatePayload { self } - pub fn with_has_extended_title(&mut self, value: bool) -> &mut Self { + pub fn has_extended_title(&mut self, value: bool) -> &mut Self { self.has_extended_title = Some(value); self } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_options( + pub fn options( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleOptions, ) -> &mut Self { @@ -118,7 +118,7 @@ impl SecurityMonitoringRuleUpdatePayload { self } - pub fn with_queries( + pub fn queries( &mut self, value: Vec, ) -> &mut Self { @@ -126,12 +126,12 @@ impl SecurityMonitoringRuleUpdatePayload { self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_third_party_cases( + pub fn third_party_cases( &mut self, value: Vec, ) -> &mut Self { @@ -139,11 +139,12 @@ impl SecurityMonitoringRuleUpdatePayload { self } - pub fn with_version(&mut self, value: i32) -> &mut Self { + pub fn version(&mut self, value: i32) -> &mut Self { self.version = Some(value); self } } + impl Default for SecurityMonitoringRuleUpdatePayload { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_signal.rs b/src/datadogV2/model/model_security_monitoring_signal.rs index b94832c85..b1cc8a602 100644 --- a/src/datadogV2/model/model_security_monitoring_signal.rs +++ b/src/datadogV2/model/model_security_monitoring_signal.rs @@ -29,7 +29,7 @@ impl SecurityMonitoringSignal { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::SecurityMonitoringSignalAttributes, ) -> &mut Self { @@ -37,12 +37,12 @@ impl SecurityMonitoringSignal { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SecurityMonitoringSignalType, ) -> &mut Self { @@ -50,6 +50,7 @@ impl SecurityMonitoringSignal { self } } + impl Default for SecurityMonitoringSignal { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_signal_assignee_update_attributes.rs b/src/datadogV2/model/model_security_monitoring_signal_assignee_update_attributes.rs index 2ae8c9859..0823656d8 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_assignee_update_attributes.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_assignee_update_attributes.rs @@ -26,7 +26,7 @@ impl SecurityMonitoringSignalAssigneeUpdateAttributes { } } - pub fn with_version(&mut self, value: i64) -> &mut Self { + pub fn version(&mut self, value: i64) -> &mut Self { self.version = Some(value); self } diff --git a/src/datadogV2/model/model_security_monitoring_signal_attributes.rs b/src/datadogV2/model/model_security_monitoring_signal_attributes.rs index 37bb906ee..02e97b639 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_attributes.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_attributes.rs @@ -36,7 +36,7 @@ impl SecurityMonitoringSignalAttributes { } } - pub fn with_custom( + pub fn custom( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -44,21 +44,22 @@ impl SecurityMonitoringSignalAttributes { self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_timestamp(&mut self, value: String) -> &mut Self { + pub fn timestamp(&mut self, value: String) -> &mut Self { self.timestamp = Some(value); self } } + impl Default for SecurityMonitoringSignalAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_signal_incidents_update_attributes.rs b/src/datadogV2/model/model_security_monitoring_signal_incidents_update_attributes.rs index 5ead9bdfb..28feffc1a 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_incidents_update_attributes.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_incidents_update_attributes.rs @@ -24,7 +24,7 @@ impl SecurityMonitoringSignalIncidentsUpdateAttributes { } } - pub fn with_version(&mut self, value: i64) -> &mut Self { + pub fn version(&mut self, value: i64) -> &mut Self { self.version = Some(value); self } diff --git a/src/datadogV2/model/model_security_monitoring_signal_list_request.rs b/src/datadogV2/model/model_security_monitoring_signal_list_request.rs index c0f96b652..220a5df5a 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_list_request.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_list_request.rs @@ -28,7 +28,7 @@ impl SecurityMonitoringSignalListRequest { } } - pub fn with_filter( + pub fn filter( &mut self, value: crate::datadogV2::model::SecurityMonitoringSignalListRequestFilter, ) -> &mut Self { @@ -36,7 +36,7 @@ impl SecurityMonitoringSignalListRequest { self } - pub fn with_page( + pub fn page( &mut self, value: crate::datadogV2::model::SecurityMonitoringSignalListRequestPage, ) -> &mut Self { @@ -44,7 +44,7 @@ impl SecurityMonitoringSignalListRequest { self } - pub fn with_sort( + pub fn sort( &mut self, value: crate::datadogV2::model::SecurityMonitoringSignalsSort, ) -> &mut Self { @@ -52,6 +52,7 @@ impl SecurityMonitoringSignalListRequest { self } } + impl Default for SecurityMonitoringSignalListRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_signal_list_request_filter.rs b/src/datadogV2/model/model_security_monitoring_signal_list_request_filter.rs index ca3f10e2e..5caa91cb8 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_list_request_filter.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_list_request_filter.rs @@ -28,21 +28,22 @@ impl SecurityMonitoringSignalListRequestFilter { } } - pub fn with_from(&mut self, value: String) -> &mut Self { + pub fn from(&mut self, value: String) -> &mut Self { self.from = Some(value); self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } - pub fn with_to(&mut self, value: String) -> &mut Self { + pub fn to(&mut self, value: String) -> &mut Self { self.to = Some(value); self } } + impl Default for SecurityMonitoringSignalListRequestFilter { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_signal_list_request_page.rs b/src/datadogV2/model/model_security_monitoring_signal_list_request_page.rs index 8c2f4fa07..8d47fe242 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_list_request_page.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_list_request_page.rs @@ -24,16 +24,17 @@ impl SecurityMonitoringSignalListRequestPage { } } - pub fn with_cursor(&mut self, value: String) -> &mut Self { + pub fn cursor(&mut self, value: String) -> &mut Self { self.cursor = Some(value); self } - pub fn with_limit(&mut self, value: i32) -> &mut Self { + pub fn limit(&mut self, value: i32) -> &mut Self { self.limit = Some(value); self } } + impl Default for SecurityMonitoringSignalListRequestPage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_signal_response.rs b/src/datadogV2/model/model_security_monitoring_signal_response.rs index d8dd4548f..2989eeafc 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_response.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_response.rs @@ -18,14 +18,12 @@ impl SecurityMonitoringSignalResponse { SecurityMonitoringSignalResponse { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::SecurityMonitoringSignal, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::SecurityMonitoringSignal) -> &mut Self { self.data = Some(value); self } } + impl Default for SecurityMonitoringSignalResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_signal_rule_create_payload.rs b/src/datadogV2/model/model_security_monitoring_signal_rule_create_payload.rs index 5522c7d32..d471a3de5 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_rule_create_payload.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_rule_create_payload.rs @@ -63,7 +63,7 @@ impl SecurityMonitoringSignalRuleCreatePayload { } } - pub fn with_filters( + pub fn filters( &mut self, value: Vec, ) -> &mut Self { @@ -71,17 +71,17 @@ impl SecurityMonitoringSignalRuleCreatePayload { self } - pub fn with_has_extended_title(&mut self, value: bool) -> &mut Self { + pub fn has_extended_title(&mut self, value: bool) -> &mut Self { self.has_extended_title = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SecurityMonitoringSignalRuleType, ) -> &mut Self { diff --git a/src/datadogV2/model/model_security_monitoring_signal_rule_query.rs b/src/datadogV2/model/model_security_monitoring_signal_rule_query.rs index e602b7b71..458bda295 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_rule_query.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_rule_query.rs @@ -40,7 +40,7 @@ impl SecurityMonitoringSignalRuleQuery { } } - pub fn with_aggregation( + pub fn aggregation( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleQueryAggregation, ) -> &mut Self { @@ -48,22 +48,22 @@ impl SecurityMonitoringSignalRuleQuery { self } - pub fn with_correlated_by_fields(&mut self, value: Vec) -> &mut Self { + pub fn correlated_by_fields(&mut self, value: Vec) -> &mut Self { self.correlated_by_fields = Some(value); self } - pub fn with_correlated_query_index(&mut self, value: i32) -> &mut Self { + pub fn correlated_query_index(&mut self, value: i32) -> &mut Self { self.correlated_query_index = Some(value); self } - pub fn with_metrics(&mut self, value: Vec) -> &mut Self { + pub fn metrics(&mut self, value: Vec) -> &mut Self { self.metrics = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV2/model/model_security_monitoring_signal_rule_response.rs b/src/datadogV2/model/model_security_monitoring_signal_rule_response.rs index 5c6d021a7..8f25905a2 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_rule_response.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_rule_response.rs @@ -88,7 +88,7 @@ impl SecurityMonitoringSignalRuleResponse { } } - pub fn with_cases( + pub fn cases( &mut self, value: Vec, ) -> &mut Self { @@ -96,22 +96,22 @@ impl SecurityMonitoringSignalRuleResponse { self } - pub fn with_created_at(&mut self, value: i64) -> &mut Self { + pub fn created_at(&mut self, value: i64) -> &mut Self { self.created_at = Some(value); self } - pub fn with_creation_author_id(&mut self, value: i64) -> &mut Self { + pub fn creation_author_id(&mut self, value: i64) -> &mut Self { self.creation_author_id = Some(value); self } - pub fn with_deprecation_date(&mut self, value: i64) -> &mut Self { + pub fn deprecation_date(&mut self, value: i64) -> &mut Self { self.deprecation_date = Some(value); self } - pub fn with_filters( + pub fn filters( &mut self, value: Vec, ) -> &mut Self { @@ -119,42 +119,42 @@ impl SecurityMonitoringSignalRuleResponse { self } - pub fn with_has_extended_title(&mut self, value: bool) -> &mut Self { + pub fn has_extended_title(&mut self, value: bool) -> &mut Self { self.has_extended_title = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_is_default(&mut self, value: bool) -> &mut Self { + pub fn is_default(&mut self, value: bool) -> &mut Self { self.is_default = Some(value); self } - pub fn with_is_deleted(&mut self, value: bool) -> &mut Self { + pub fn is_deleted(&mut self, value: bool) -> &mut Self { self.is_deleted = Some(value); self } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_options( + pub fn options( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleOptions, ) -> &mut Self { @@ -162,7 +162,7 @@ impl SecurityMonitoringSignalRuleResponse { self } - pub fn with_queries( + pub fn queries( &mut self, value: Vec, ) -> &mut Self { @@ -170,12 +170,12 @@ impl SecurityMonitoringSignalRuleResponse { self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SecurityMonitoringSignalRuleType, ) -> &mut Self { @@ -183,16 +183,17 @@ impl SecurityMonitoringSignalRuleResponse { self } - pub fn with_update_author_id(&mut self, value: i64) -> &mut Self { + pub fn update_author_id(&mut self, value: i64) -> &mut Self { self.update_author_id = Some(value); self } - pub fn with_version(&mut self, value: i64) -> &mut Self { + pub fn version(&mut self, value: i64) -> &mut Self { self.version = Some(value); self } } + impl Default for SecurityMonitoringSignalRuleResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_signal_rule_response_query.rs b/src/datadogV2/model/model_security_monitoring_signal_rule_response_query.rs index 1d395a619..ec5d8dd8f 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_rule_response_query.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_rule_response_query.rs @@ -52,7 +52,7 @@ impl SecurityMonitoringSignalRuleResponseQuery { } } - pub fn with_aggregation( + pub fn aggregation( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleQueryAggregation, ) -> &mut Self { @@ -60,46 +60,47 @@ impl SecurityMonitoringSignalRuleResponseQuery { self } - pub fn with_correlated_by_fields(&mut self, value: Vec) -> &mut Self { + pub fn correlated_by_fields(&mut self, value: Vec) -> &mut Self { self.correlated_by_fields = Some(value); self } - pub fn with_correlated_query_index(&mut self, value: i32) -> &mut Self { + pub fn correlated_query_index(&mut self, value: i32) -> &mut Self { self.correlated_query_index = Some(value); self } - pub fn with_default_rule_id(&mut self, value: String) -> &mut Self { + pub fn default_rule_id(&mut self, value: String) -> &mut Self { self.default_rule_id = Some(value); self } - pub fn with_distinct_fields(&mut self, value: Vec) -> &mut Self { + pub fn distinct_fields(&mut self, value: Vec) -> &mut Self { self.distinct_fields = Some(value); self } - pub fn with_group_by_fields(&mut self, value: Vec) -> &mut Self { + pub fn group_by_fields(&mut self, value: Vec) -> &mut Self { self.group_by_fields = Some(value); self } - pub fn with_metrics(&mut self, value: Vec) -> &mut Self { + pub fn metrics(&mut self, value: Vec) -> &mut Self { self.metrics = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_rule_id(&mut self, value: String) -> &mut Self { + pub fn rule_id(&mut self, value: String) -> &mut Self { self.rule_id = Some(value); self } } + impl Default for SecurityMonitoringSignalRuleResponseQuery { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_signal_state_update_attributes.rs b/src/datadogV2/model/model_security_monitoring_signal_state_update_attributes.rs index f92ae62a7..1acb3bb04 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_state_update_attributes.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_state_update_attributes.rs @@ -34,12 +34,12 @@ impl SecurityMonitoringSignalStateUpdateAttributes { } } - pub fn with_archive_comment(&mut self, value: String) -> &mut Self { + pub fn archive_comment(&mut self, value: String) -> &mut Self { self.archive_comment = Some(value); self } - pub fn with_archive_reason( + pub fn archive_reason( &mut self, value: crate::datadogV2::model::SecurityMonitoringSignalArchiveReason, ) -> &mut Self { @@ -47,7 +47,7 @@ impl SecurityMonitoringSignalStateUpdateAttributes { self } - pub fn with_version(&mut self, value: i64) -> &mut Self { + pub fn version(&mut self, value: i64) -> &mut Self { self.version = Some(value); self } diff --git a/src/datadogV2/model/model_security_monitoring_signal_state_update_data.rs b/src/datadogV2/model/model_security_monitoring_signal_state_update_data.rs index 23b3c4efd..177ea56b7 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_state_update_data.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_state_update_data.rs @@ -30,12 +30,12 @@ impl SecurityMonitoringSignalStateUpdateData { } } - pub fn with_id(&mut self, value: serde_json::Value) -> &mut Self { + pub fn id(&mut self, value: serde_json::Value) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SecurityMonitoringSignalMetadataType, ) -> &mut Self { diff --git a/src/datadogV2/model/model_security_monitoring_signal_triage_attributes.rs b/src/datadogV2/model/model_security_monitoring_signal_triage_attributes.rs index 0d8dbd5de..fd132a6d7 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_triage_attributes.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_triage_attributes.rs @@ -56,17 +56,17 @@ impl SecurityMonitoringSignalTriageAttributes { } } - pub fn with_archive_comment(&mut self, value: String) -> &mut Self { + pub fn archive_comment(&mut self, value: String) -> &mut Self { self.archive_comment = Some(value); self } - pub fn with_archive_comment_timestamp(&mut self, value: i64) -> &mut Self { + pub fn archive_comment_timestamp(&mut self, value: i64) -> &mut Self { self.archive_comment_timestamp = Some(value); self } - pub fn with_archive_comment_user( + pub fn archive_comment_user( &mut self, value: crate::datadogV2::model::SecurityMonitoringTriageUser, ) -> &mut Self { @@ -74,7 +74,7 @@ impl SecurityMonitoringSignalTriageAttributes { self } - pub fn with_archive_reason( + pub fn archive_reason( &mut self, value: crate::datadogV2::model::SecurityMonitoringSignalArchiveReason, ) -> &mut Self { @@ -82,12 +82,12 @@ impl SecurityMonitoringSignalTriageAttributes { self } - pub fn with_state_update_timestamp(&mut self, value: i64) -> &mut Self { + pub fn state_update_timestamp(&mut self, value: i64) -> &mut Self { self.state_update_timestamp = Some(value); self } - pub fn with_state_update_user( + pub fn state_update_user( &mut self, value: crate::datadogV2::model::SecurityMonitoringTriageUser, ) -> &mut Self { diff --git a/src/datadogV2/model/model_security_monitoring_signal_triage_update_data.rs b/src/datadogV2/model/model_security_monitoring_signal_triage_update_data.rs index 7d47ee584..c6e0c5eb2 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_triage_update_data.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_triage_update_data.rs @@ -28,7 +28,7 @@ impl SecurityMonitoringSignalTriageUpdateData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::SecurityMonitoringSignalTriageAttributes, ) -> &mut Self { @@ -36,12 +36,12 @@ impl SecurityMonitoringSignalTriageUpdateData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SecurityMonitoringSignalMetadataType, ) -> &mut Self { @@ -49,6 +49,7 @@ impl SecurityMonitoringSignalTriageUpdateData { self } } + impl Default for SecurityMonitoringSignalTriageUpdateData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_signals_list_response.rs b/src/datadogV2/model/model_security_monitoring_signals_list_response.rs index ee5babca9..f50b91c97 100644 --- a/src/datadogV2/model/model_security_monitoring_signals_list_response.rs +++ b/src/datadogV2/model/model_security_monitoring_signals_list_response.rs @@ -29,7 +29,7 @@ impl SecurityMonitoringSignalsListResponse { } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -37,7 +37,7 @@ impl SecurityMonitoringSignalsListResponse { self } - pub fn with_links( + pub fn links( &mut self, value: crate::datadogV2::model::SecurityMonitoringSignalsListResponseLinks, ) -> &mut Self { @@ -45,7 +45,7 @@ impl SecurityMonitoringSignalsListResponse { self } - pub fn with_meta( + pub fn meta( &mut self, value: crate::datadogV2::model::SecurityMonitoringSignalsListResponseMeta, ) -> &mut Self { @@ -53,6 +53,7 @@ impl SecurityMonitoringSignalsListResponse { self } } + impl Default for SecurityMonitoringSignalsListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_signals_list_response_links.rs b/src/datadogV2/model/model_security_monitoring_signals_list_response_links.rs index f1e5f3d18..52fd89f47 100644 --- a/src/datadogV2/model/model_security_monitoring_signals_list_response_links.rs +++ b/src/datadogV2/model/model_security_monitoring_signals_list_response_links.rs @@ -19,11 +19,12 @@ impl SecurityMonitoringSignalsListResponseLinks { SecurityMonitoringSignalsListResponseLinks { next: None } } - pub fn with_next(&mut self, value: String) -> &mut Self { + pub fn next(&mut self, value: String) -> &mut Self { self.next = Some(value); self } } + impl Default for SecurityMonitoringSignalsListResponseLinks { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_signals_list_response_meta.rs b/src/datadogV2/model/model_security_monitoring_signals_list_response_meta.rs index 147f2e34d..e756f23a8 100644 --- a/src/datadogV2/model/model_security_monitoring_signals_list_response_meta.rs +++ b/src/datadogV2/model/model_security_monitoring_signals_list_response_meta.rs @@ -18,7 +18,7 @@ impl SecurityMonitoringSignalsListResponseMeta { SecurityMonitoringSignalsListResponseMeta { page: None } } - pub fn with_page( + pub fn page( &mut self, value: crate::datadogV2::model::SecurityMonitoringSignalsListResponseMetaPage, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SecurityMonitoringSignalsListResponseMeta { self } } + impl Default for SecurityMonitoringSignalsListResponseMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_signals_list_response_meta_page.rs b/src/datadogV2/model/model_security_monitoring_signals_list_response_meta_page.rs index 8239845ef..79e746287 100644 --- a/src/datadogV2/model/model_security_monitoring_signals_list_response_meta_page.rs +++ b/src/datadogV2/model/model_security_monitoring_signals_list_response_meta_page.rs @@ -19,11 +19,12 @@ impl SecurityMonitoringSignalsListResponseMetaPage { SecurityMonitoringSignalsListResponseMetaPage { after: None } } - pub fn with_after(&mut self, value: String) -> &mut Self { + pub fn after(&mut self, value: String) -> &mut Self { self.after = Some(value); self } } + impl Default for SecurityMonitoringSignalsListResponseMetaPage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_standard_rule_create_payload.rs b/src/datadogV2/model/model_security_monitoring_standard_rule_create_payload.rs index e38a47bb2..5ebee8988 100644 --- a/src/datadogV2/model/model_security_monitoring_standard_rule_create_payload.rs +++ b/src/datadogV2/model/model_security_monitoring_standard_rule_create_payload.rs @@ -68,7 +68,7 @@ impl SecurityMonitoringStandardRuleCreatePayload { } } - pub fn with_filters( + pub fn filters( &mut self, value: Vec, ) -> &mut Self { @@ -76,17 +76,17 @@ impl SecurityMonitoringStandardRuleCreatePayload { self } - pub fn with_has_extended_title(&mut self, value: bool) -> &mut Self { + pub fn has_extended_title(&mut self, value: bool) -> &mut Self { self.has_extended_title = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_third_party_cases( + pub fn third_party_cases( &mut self, value: Vec, ) -> &mut Self { @@ -94,7 +94,7 @@ impl SecurityMonitoringStandardRuleCreatePayload { self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleTypeCreate, ) -> &mut Self { diff --git a/src/datadogV2/model/model_security_monitoring_standard_rule_query.rs b/src/datadogV2/model/model_security_monitoring_standard_rule_query.rs index d46d25d7d..1326a1ec5 100644 --- a/src/datadogV2/model/model_security_monitoring_standard_rule_query.rs +++ b/src/datadogV2/model/model_security_monitoring_standard_rule_query.rs @@ -52,7 +52,7 @@ impl SecurityMonitoringStandardRuleQuery { } #[allow(deprecated)] - pub fn with_aggregation( + pub fn aggregation( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleQueryAggregation, ) -> &mut Self { @@ -61,47 +61,48 @@ impl SecurityMonitoringStandardRuleQuery { } #[allow(deprecated)] - pub fn with_distinct_fields(&mut self, value: Vec) -> &mut Self { + pub fn distinct_fields(&mut self, value: Vec) -> &mut Self { self.distinct_fields = Some(value); self } #[allow(deprecated)] - pub fn with_group_by_fields(&mut self, value: Vec) -> &mut Self { + pub fn group_by_fields(&mut self, value: Vec) -> &mut Self { self.group_by_fields = Some(value); self } #[allow(deprecated)] - pub fn with_has_optional_group_by_fields(&mut self, value: bool) -> &mut Self { + pub fn has_optional_group_by_fields(&mut self, value: bool) -> &mut Self { self.has_optional_group_by_fields = Some(value); self } #[allow(deprecated)] - pub fn with_metric(&mut self, value: String) -> &mut Self { + pub fn metric(&mut self, value: String) -> &mut Self { self.metric = Some(value); self } #[allow(deprecated)] - pub fn with_metrics(&mut self, value: Vec) -> &mut Self { + pub fn metrics(&mut self, value: Vec) -> &mut Self { self.metrics = Some(value); self } #[allow(deprecated)] - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } #[allow(deprecated)] - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } } + impl Default for SecurityMonitoringStandardRuleQuery { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_standard_rule_response.rs b/src/datadogV2/model/model_security_monitoring_standard_rule_response.rs index 6f0ca1170..b4970be12 100644 --- a/src/datadogV2/model/model_security_monitoring_standard_rule_response.rs +++ b/src/datadogV2/model/model_security_monitoring_standard_rule_response.rs @@ -98,7 +98,7 @@ impl SecurityMonitoringStandardRuleResponse { } } - pub fn with_cases( + pub fn cases( &mut self, value: Vec, ) -> &mut Self { @@ -106,7 +106,7 @@ impl SecurityMonitoringStandardRuleResponse { self } - pub fn with_compliance_signal_options( + pub fn compliance_signal_options( &mut self, value: crate::datadogV2::model::CloudConfigurationRuleComplianceSignalOptions, ) -> &mut Self { @@ -114,22 +114,22 @@ impl SecurityMonitoringStandardRuleResponse { self } - pub fn with_created_at(&mut self, value: i64) -> &mut Self { + pub fn created_at(&mut self, value: i64) -> &mut Self { self.created_at = Some(value); self } - pub fn with_creation_author_id(&mut self, value: i64) -> &mut Self { + pub fn creation_author_id(&mut self, value: i64) -> &mut Self { self.creation_author_id = Some(value); self } - pub fn with_deprecation_date(&mut self, value: i64) -> &mut Self { + pub fn deprecation_date(&mut self, value: i64) -> &mut Self { self.deprecation_date = Some(value); self } - pub fn with_filters( + pub fn filters( &mut self, value: Vec, ) -> &mut Self { @@ -137,42 +137,42 @@ impl SecurityMonitoringStandardRuleResponse { self } - pub fn with_has_extended_title(&mut self, value: bool) -> &mut Self { + pub fn has_extended_title(&mut self, value: bool) -> &mut Self { self.has_extended_title = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_is_default(&mut self, value: bool) -> &mut Self { + pub fn is_default(&mut self, value: bool) -> &mut Self { self.is_default = Some(value); self } - pub fn with_is_deleted(&mut self, value: bool) -> &mut Self { + pub fn is_deleted(&mut self, value: bool) -> &mut Self { self.is_deleted = Some(value); self } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_options( + pub fn options( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleOptions, ) -> &mut Self { @@ -180,7 +180,7 @@ impl SecurityMonitoringStandardRuleResponse { self } - pub fn with_queries( + pub fn queries( &mut self, value: Vec, ) -> &mut Self { @@ -188,12 +188,12 @@ impl SecurityMonitoringStandardRuleResponse { self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_third_party_cases( + pub fn third_party_cases( &mut self, value: Vec, ) -> &mut Self { @@ -201,7 +201,7 @@ impl SecurityMonitoringStandardRuleResponse { self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleTypeRead, ) -> &mut Self { @@ -209,16 +209,17 @@ impl SecurityMonitoringStandardRuleResponse { self } - pub fn with_update_author_id(&mut self, value: i64) -> &mut Self { + pub fn update_author_id(&mut self, value: i64) -> &mut Self { self.update_author_id = Some(value); self } - pub fn with_version(&mut self, value: i64) -> &mut Self { + pub fn version(&mut self, value: i64) -> &mut Self { self.version = Some(value); self } } + impl Default for SecurityMonitoringStandardRuleResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_third_party_root_query.rs b/src/datadogV2/model/model_security_monitoring_third_party_root_query.rs index b28480c76..1f5fdcecb 100644 --- a/src/datadogV2/model/model_security_monitoring_third_party_root_query.rs +++ b/src/datadogV2/model/model_security_monitoring_third_party_root_query.rs @@ -24,16 +24,17 @@ impl SecurityMonitoringThirdPartyRootQuery { } } - pub fn with_group_by_fields(&mut self, value: Vec) -> &mut Self { + pub fn group_by_fields(&mut self, value: Vec) -> &mut Self { self.group_by_fields = Some(value); self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } } + impl Default for SecurityMonitoringThirdPartyRootQuery { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_third_party_rule_case.rs b/src/datadogV2/model/model_security_monitoring_third_party_rule_case.rs index d3e1bfe91..7c8bd965f 100644 --- a/src/datadogV2/model/model_security_monitoring_third_party_rule_case.rs +++ b/src/datadogV2/model/model_security_monitoring_third_party_rule_case.rs @@ -32,22 +32,22 @@ impl SecurityMonitoringThirdPartyRuleCase { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_notifications(&mut self, value: Vec) -> &mut Self { + pub fn notifications(&mut self, value: Vec) -> &mut Self { self.notifications = Some(value); self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } - pub fn with_status( + pub fn status( &mut self, value: crate::datadogV2::model::SecurityMonitoringRuleSeverity, ) -> &mut Self { @@ -55,6 +55,7 @@ impl SecurityMonitoringThirdPartyRuleCase { self } } + impl Default for SecurityMonitoringThirdPartyRuleCase { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_security_monitoring_third_party_rule_case_create.rs b/src/datadogV2/model/model_security_monitoring_third_party_rule_case_create.rs index 136b117e3..1180443b7 100644 --- a/src/datadogV2/model/model_security_monitoring_third_party_rule_case_create.rs +++ b/src/datadogV2/model/model_security_monitoring_third_party_rule_case_create.rs @@ -34,17 +34,17 @@ impl SecurityMonitoringThirdPartyRuleCaseCreate { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_notifications(&mut self, value: Vec) -> &mut Self { + pub fn notifications(&mut self, value: Vec) -> &mut Self { self.notifications = Some(value); self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } diff --git a/src/datadogV2/model/model_security_monitoring_triage_user.rs b/src/datadogV2/model/model_security_monitoring_triage_user.rs index 3d24424b1..79f2e2637 100644 --- a/src/datadogV2/model/model_security_monitoring_triage_user.rs +++ b/src/datadogV2/model/model_security_monitoring_triage_user.rs @@ -36,22 +36,22 @@ impl SecurityMonitoringTriageUser { } } - pub fn with_handle(&mut self, value: String) -> &mut Self { + pub fn handle(&mut self, value: String) -> &mut Self { self.handle = Some(value); self } - pub fn with_icon(&mut self, value: String) -> &mut Self { + pub fn icon(&mut self, value: String) -> &mut Self { self.icon = Some(value); self } - pub fn with_id(&mut self, value: i64) -> &mut Self { + pub fn id(&mut self, value: i64) -> &mut Self { self.id = Some(value); self } - pub fn with_name(&mut self, value: Option) -> &mut Self { + pub fn name(&mut self, value: Option) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV2/model/model_sensitive_data_scanner_configuration.rs b/src/datadogV2/model/model_sensitive_data_scanner_configuration.rs index 500a2a59b..e0483f771 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_configuration.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_configuration.rs @@ -24,12 +24,12 @@ impl SensitiveDataScannerConfiguration { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SensitiveDataScannerConfigurationType, ) -> &mut Self { @@ -37,6 +37,7 @@ impl SensitiveDataScannerConfiguration { self } } + impl Default for SensitiveDataScannerConfiguration { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_configuration_data.rs b/src/datadogV2/model/model_sensitive_data_scanner_configuration_data.rs index e5fe639bc..c528eba5f 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_configuration_data.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_configuration_data.rs @@ -18,7 +18,7 @@ impl SensitiveDataScannerConfigurationData { SensitiveDataScannerConfigurationData { data: None } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::SensitiveDataScannerConfiguration, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SensitiveDataScannerConfigurationData { self } } + impl Default for SensitiveDataScannerConfigurationData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_configuration_relationships.rs b/src/datadogV2/model/model_sensitive_data_scanner_configuration_relationships.rs index 21f8c4329..73ef2def5 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_configuration_relationships.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_configuration_relationships.rs @@ -18,7 +18,7 @@ impl SensitiveDataScannerConfigurationRelationships { SensitiveDataScannerConfigurationRelationships { groups: None } } - pub fn with_groups( + pub fn groups( &mut self, value: crate::datadogV2::model::SensitiveDataScannerGroupList, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SensitiveDataScannerConfigurationRelationships { self } } + impl Default for SensitiveDataScannerConfigurationRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_create_group_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_create_group_response.rs index 5257eae64..24bcc39c7 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_create_group_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_create_group_response.rs @@ -24,7 +24,7 @@ impl SensitiveDataScannerCreateGroupResponse { } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::SensitiveDataScannerGroupResponse, ) -> &mut Self { @@ -32,7 +32,7 @@ impl SensitiveDataScannerCreateGroupResponse { self } - pub fn with_meta( + pub fn meta( &mut self, value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, ) -> &mut Self { @@ -40,6 +40,7 @@ impl SensitiveDataScannerCreateGroupResponse { self } } + impl Default for SensitiveDataScannerCreateGroupResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_create_rule_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_create_rule_response.rs index 743891f78..c02987a47 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_create_rule_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_create_rule_response.rs @@ -24,7 +24,7 @@ impl SensitiveDataScannerCreateRuleResponse { } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::SensitiveDataScannerRuleResponse, ) -> &mut Self { @@ -32,7 +32,7 @@ impl SensitiveDataScannerCreateRuleResponse { self } - pub fn with_meta( + pub fn meta( &mut self, value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, ) -> &mut Self { @@ -40,6 +40,7 @@ impl SensitiveDataScannerCreateRuleResponse { self } } + impl Default for SensitiveDataScannerCreateRuleResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_filter.rs b/src/datadogV2/model/model_sensitive_data_scanner_filter.rs index 752ff100c..3b577d1ac 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_filter.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_filter.rs @@ -18,11 +18,12 @@ impl SensitiveDataScannerFilter { SensitiveDataScannerFilter { query: None } } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } } + impl Default for SensitiveDataScannerFilter { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_get_config_included_item.rs b/src/datadogV2/model/model_sensitive_data_scanner_get_config_included_item.rs index 4e94f7ff4..0f02c538b 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_get_config_included_item.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_get_config_included_item.rs @@ -8,9 +8,9 @@ use serde::{Deserialize, Serialize}; #[serde(untagged)] pub enum SensitiveDataScannerGetConfigIncludedItem { SensitiveDataScannerRuleIncludedItem( - crate::datadogV2::model::SensitiveDataScannerRuleIncludedItem, + Box, ), SensitiveDataScannerGroupIncludedItem( - crate::datadogV2::model::SensitiveDataScannerGroupIncludedItem, + Box, ), } diff --git a/src/datadogV2/model/model_sensitive_data_scanner_get_config_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_get_config_response.rs index ab9af0ce4..df40998f6 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_get_config_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_get_config_response.rs @@ -28,7 +28,7 @@ impl SensitiveDataScannerGetConfigResponse { } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::SensitiveDataScannerGetConfigResponseData, ) -> &mut Self { @@ -36,7 +36,7 @@ impl SensitiveDataScannerGetConfigResponse { self } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { @@ -44,14 +44,12 @@ impl SensitiveDataScannerGetConfigResponse { self } - pub fn with_meta( - &mut self, - value: crate::datadogV2::model::SensitiveDataScannerMeta, - ) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::SensitiveDataScannerMeta) -> &mut Self { self.meta = Some(value); self } } + impl Default for SensitiveDataScannerGetConfigResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_get_config_response_data.rs b/src/datadogV2/model/model_sensitive_data_scanner_get_config_response_data.rs index db52ec043..d75e9a550 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_get_config_response_data.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_get_config_response_data.rs @@ -33,7 +33,7 @@ impl SensitiveDataScannerGetConfigResponseData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -41,12 +41,12 @@ impl SensitiveDataScannerGetConfigResponseData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::SensitiveDataScannerConfigurationRelationships, ) -> &mut Self { @@ -54,7 +54,7 @@ impl SensitiveDataScannerGetConfigResponseData { self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SensitiveDataScannerConfigurationType, ) -> &mut Self { @@ -62,6 +62,7 @@ impl SensitiveDataScannerGetConfigResponseData { self } } + impl Default for SensitiveDataScannerGetConfigResponseData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group.rs b/src/datadogV2/model/model_sensitive_data_scanner_group.rs index 8bac8764b..f071a4856 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group.rs @@ -24,12 +24,12 @@ impl SensitiveDataScannerGroup { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SensitiveDataScannerGroupType, ) -> &mut Self { @@ -37,6 +37,7 @@ impl SensitiveDataScannerGroup { self } } + impl Default for SensitiveDataScannerGroup { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_attributes.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_attributes.rs index 7182dadf0..f21066d0f 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_attributes.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_attributes.rs @@ -36,12 +36,12 @@ impl SensitiveDataScannerGroupAttributes { } } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_filter( + pub fn filter( &mut self, value: crate::datadogV2::model::SensitiveDataScannerFilter, ) -> &mut Self { @@ -49,17 +49,17 @@ impl SensitiveDataScannerGroupAttributes { self } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_product_list( + pub fn product_list( &mut self, value: Vec, ) -> &mut Self { @@ -67,6 +67,7 @@ impl SensitiveDataScannerGroupAttributes { self } } + impl Default for SensitiveDataScannerGroupAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_create.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_create.rs index de39e07e8..51113a68f 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_create.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_create.rs @@ -31,7 +31,7 @@ impl SensitiveDataScannerGroupCreate { } } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::SensitiveDataScannerGroupRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_create_request.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_create_request.rs index 160325799..efffcc0ae 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_create_request.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_create_request.rs @@ -24,7 +24,7 @@ impl SensitiveDataScannerGroupCreateRequest { } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::SensitiveDataScannerGroupCreate, ) -> &mut Self { @@ -32,7 +32,7 @@ impl SensitiveDataScannerGroupCreateRequest { self } - pub fn with_meta( + pub fn meta( &mut self, value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, ) -> &mut Self { @@ -40,6 +40,7 @@ impl SensitiveDataScannerGroupCreateRequest { self } } + impl Default for SensitiveDataScannerGroupCreateRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_data.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_data.rs index 04b7a7d84..631a3b14e 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_data.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_data.rs @@ -18,14 +18,12 @@ impl SensitiveDataScannerGroupData { SensitiveDataScannerGroupData { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::SensitiveDataScannerGroup, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::SensitiveDataScannerGroup) -> &mut Self { self.data = Some(value); self } } + impl Default for SensitiveDataScannerGroupData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_delete_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_delete_response.rs index 4620032ab..6621b61d7 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_delete_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_delete_response.rs @@ -18,7 +18,7 @@ impl SensitiveDataScannerGroupDeleteResponse { SensitiveDataScannerGroupDeleteResponse { meta: None } } - pub fn with_meta( + pub fn meta( &mut self, value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SensitiveDataScannerGroupDeleteResponse { self } } + impl Default for SensitiveDataScannerGroupDeleteResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_included_item.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_included_item.rs index d6ab523ec..7c1d511ac 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_included_item.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_included_item.rs @@ -32,7 +32,7 @@ impl SensitiveDataScannerGroupIncludedItem { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::SensitiveDataScannerGroupAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl SensitiveDataScannerGroupIncludedItem { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::SensitiveDataScannerGroupRelationships, ) -> &mut Self { @@ -53,7 +53,7 @@ impl SensitiveDataScannerGroupIncludedItem { self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SensitiveDataScannerGroupType, ) -> &mut Self { @@ -61,6 +61,7 @@ impl SensitiveDataScannerGroupIncludedItem { self } } + impl Default for SensitiveDataScannerGroupIncludedItem { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_item.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_item.rs index 54afb5d49..469916f35 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_item.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_item.rs @@ -24,12 +24,12 @@ impl SensitiveDataScannerGroupItem { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SensitiveDataScannerGroupType, ) -> &mut Self { @@ -37,6 +37,7 @@ impl SensitiveDataScannerGroupItem { self } } + impl Default for SensitiveDataScannerGroupItem { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_list.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_list.rs index c3917d17f..88fe783dc 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_list.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_list.rs @@ -18,7 +18,7 @@ impl SensitiveDataScannerGroupList { SensitiveDataScannerGroupList { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SensitiveDataScannerGroupList { self } } + impl Default for SensitiveDataScannerGroupList { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_relationships.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_relationships.rs index 567611f2f..56784f4d5 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_relationships.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_relationships.rs @@ -24,7 +24,7 @@ impl SensitiveDataScannerGroupRelationships { } } - pub fn with_configuration( + pub fn configuration( &mut self, value: crate::datadogV2::model::SensitiveDataScannerConfigurationData, ) -> &mut Self { @@ -32,7 +32,7 @@ impl SensitiveDataScannerGroupRelationships { self } - pub fn with_rules( + pub fn rules( &mut self, value: crate::datadogV2::model::SensitiveDataScannerRuleData, ) -> &mut Self { @@ -40,6 +40,7 @@ impl SensitiveDataScannerGroupRelationships { self } } + impl Default for SensitiveDataScannerGroupRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_response.rs index 5b54aba4f..5d7c3a621 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_response.rs @@ -32,7 +32,7 @@ impl SensitiveDataScannerGroupResponse { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::SensitiveDataScannerGroupAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl SensitiveDataScannerGroupResponse { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::SensitiveDataScannerGroupRelationships, ) -> &mut Self { @@ -53,7 +53,7 @@ impl SensitiveDataScannerGroupResponse { self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SensitiveDataScannerGroupType, ) -> &mut Self { @@ -61,6 +61,7 @@ impl SensitiveDataScannerGroupResponse { self } } + impl Default for SensitiveDataScannerGroupResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_update.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_update.rs index 32db6472d..55943586d 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_update.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_update.rs @@ -32,7 +32,7 @@ impl SensitiveDataScannerGroupUpdate { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::SensitiveDataScannerGroupAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl SensitiveDataScannerGroupUpdate { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::SensitiveDataScannerGroupRelationships, ) -> &mut Self { @@ -53,7 +53,7 @@ impl SensitiveDataScannerGroupUpdate { self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SensitiveDataScannerGroupType, ) -> &mut Self { @@ -61,6 +61,7 @@ impl SensitiveDataScannerGroupUpdate { self } } + impl Default for SensitiveDataScannerGroupUpdate { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_update_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_update_response.rs index f1509f4ed..2f1daf6d8 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_update_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_update_response.rs @@ -18,7 +18,7 @@ impl SensitiveDataScannerGroupUpdateResponse { SensitiveDataScannerGroupUpdateResponse { meta: None } } - pub fn with_meta( + pub fn meta( &mut self, value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SensitiveDataScannerGroupUpdateResponse { self } } + impl Default for SensitiveDataScannerGroupUpdateResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_meta.rs b/src/datadogV2/model/model_sensitive_data_scanner_meta.rs index 8a84f9696..fc1507ed3 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_meta.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_meta.rs @@ -40,36 +40,37 @@ impl SensitiveDataScannerMeta { } } - pub fn with_count_limit(&mut self, value: i64) -> &mut Self { + pub fn count_limit(&mut self, value: i64) -> &mut Self { self.count_limit = Some(value); self } - pub fn with_group_count_limit(&mut self, value: i64) -> &mut Self { + pub fn group_count_limit(&mut self, value: i64) -> &mut Self { self.group_count_limit = Some(value); self } - pub fn with_has_highlight_enabled(&mut self, value: bool) -> &mut Self { + pub fn has_highlight_enabled(&mut self, value: bool) -> &mut Self { self.has_highlight_enabled = Some(value); self } - pub fn with_has_multi_pass_enabled(&mut self, value: bool) -> &mut Self { + pub fn has_multi_pass_enabled(&mut self, value: bool) -> &mut Self { self.has_multi_pass_enabled = Some(value); self } - pub fn with_is_pci_compliant(&mut self, value: bool) -> &mut Self { + pub fn is_pci_compliant(&mut self, value: bool) -> &mut Self { self.is_pci_compliant = Some(value); self } - pub fn with_version(&mut self, value: i64) -> &mut Self { + pub fn version(&mut self, value: i64) -> &mut Self { self.version = Some(value); self } } + impl Default for SensitiveDataScannerMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_meta_version_only.rs b/src/datadogV2/model/model_sensitive_data_scanner_meta_version_only.rs index bbd8ac4c0..a985ddfb4 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_meta_version_only.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_meta_version_only.rs @@ -18,11 +18,12 @@ impl SensitiveDataScannerMetaVersionOnly { SensitiveDataScannerMetaVersionOnly { version: None } } - pub fn with_version(&mut self, value: i64) -> &mut Self { + pub fn version(&mut self, value: i64) -> &mut Self { self.version = Some(value); self } } + impl Default for SensitiveDataScannerMetaVersionOnly { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_reorder_config.rs b/src/datadogV2/model/model_sensitive_data_scanner_reorder_config.rs index 8e2c5167e..0b6d662c0 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_reorder_config.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_reorder_config.rs @@ -29,12 +29,12 @@ impl SensitiveDataScannerReorderConfig { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::SensitiveDataScannerConfigurationRelationships, ) -> &mut Self { @@ -42,7 +42,7 @@ impl SensitiveDataScannerReorderConfig { self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SensitiveDataScannerConfigurationType, ) -> &mut Self { @@ -50,6 +50,7 @@ impl SensitiveDataScannerReorderConfig { self } } + impl Default for SensitiveDataScannerReorderConfig { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_reorder_groups_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_reorder_groups_response.rs index e901ddce5..d97bd8383 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_reorder_groups_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_reorder_groups_response.rs @@ -18,14 +18,12 @@ impl SensitiveDataScannerReorderGroupsResponse { SensitiveDataScannerReorderGroupsResponse { meta: None } } - pub fn with_meta( - &mut self, - value: crate::datadogV2::model::SensitiveDataScannerMeta, - ) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::SensitiveDataScannerMeta) -> &mut Self { self.meta = Some(value); self } } + impl Default for SensitiveDataScannerReorderGroupsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule.rs index 292f5b200..300378fcc 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule.rs @@ -24,12 +24,12 @@ impl SensitiveDataScannerRule { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SensitiveDataScannerRuleType, ) -> &mut Self { @@ -37,6 +37,7 @@ impl SensitiveDataScannerRule { self } } + impl Default for SensitiveDataScannerRule { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_attributes.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_attributes.rs index 490bee3df..d2c82ddc6 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_attributes.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_attributes.rs @@ -53,47 +53,47 @@ impl SensitiveDataScannerRuleAttributes { } } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_excluded_namespaces(&mut self, value: Vec) -> &mut Self { + pub fn excluded_namespaces(&mut self, value: Vec) -> &mut Self { self.excluded_namespaces = Some(value); self } - pub fn with_is_enabled(&mut self, value: bool) -> &mut Self { + pub fn is_enabled(&mut self, value: bool) -> &mut Self { self.is_enabled = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_namespaces(&mut self, value: Vec) -> &mut Self { + pub fn namespaces(&mut self, value: Vec) -> &mut Self { self.namespaces = Some(value); self } - pub fn with_pattern(&mut self, value: String) -> &mut Self { + pub fn pattern(&mut self, value: String) -> &mut Self { self.pattern = Some(value); self } - pub fn with_priority(&mut self, value: i64) -> &mut Self { + pub fn priority(&mut self, value: i64) -> &mut Self { self.priority = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_text_replacement( + pub fn text_replacement( &mut self, value: crate::datadogV2::model::SensitiveDataScannerTextReplacement, ) -> &mut Self { @@ -101,6 +101,7 @@ impl SensitiveDataScannerRuleAttributes { self } } + impl Default for SensitiveDataScannerRuleAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_data.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_data.rs index 023e495e9..fe1c1ac76 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_data.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_data.rs @@ -18,7 +18,7 @@ impl SensitiveDataScannerRuleData { SensitiveDataScannerRuleData { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SensitiveDataScannerRuleData { self } } + impl Default for SensitiveDataScannerRuleData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_delete_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_delete_response.rs index 24d03e567..9ca0cf0de 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_delete_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_delete_response.rs @@ -18,7 +18,7 @@ impl SensitiveDataScannerRuleDeleteResponse { SensitiveDataScannerRuleDeleteResponse { meta: None } } - pub fn with_meta( + pub fn meta( &mut self, value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SensitiveDataScannerRuleDeleteResponse { self } } + impl Default for SensitiveDataScannerRuleDeleteResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_included_item.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_included_item.rs index 1ec0e6802..d4e5f3eba 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_included_item.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_included_item.rs @@ -32,7 +32,7 @@ impl SensitiveDataScannerRuleIncludedItem { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::SensitiveDataScannerRuleAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl SensitiveDataScannerRuleIncludedItem { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::SensitiveDataScannerRuleRelationships, ) -> &mut Self { @@ -53,7 +53,7 @@ impl SensitiveDataScannerRuleIncludedItem { self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SensitiveDataScannerRuleType, ) -> &mut Self { @@ -61,6 +61,7 @@ impl SensitiveDataScannerRuleIncludedItem { self } } + impl Default for SensitiveDataScannerRuleIncludedItem { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_relationships.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_relationships.rs index f722697b7..b19df973e 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_relationships.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_relationships.rs @@ -24,7 +24,7 @@ impl SensitiveDataScannerRuleRelationships { } } - pub fn with_group( + pub fn group( &mut self, value: crate::datadogV2::model::SensitiveDataScannerGroupData, ) -> &mut Self { @@ -32,7 +32,7 @@ impl SensitiveDataScannerRuleRelationships { self } - pub fn with_standard_pattern( + pub fn standard_pattern( &mut self, value: crate::datadogV2::model::SensitiveDataScannerStandardPatternData, ) -> &mut Self { @@ -40,6 +40,7 @@ impl SensitiveDataScannerRuleRelationships { self } } + impl Default for SensitiveDataScannerRuleRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_response.rs index 0be5aca30..62c6f98f0 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_response.rs @@ -32,7 +32,7 @@ impl SensitiveDataScannerRuleResponse { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::SensitiveDataScannerRuleAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl SensitiveDataScannerRuleResponse { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::SensitiveDataScannerRuleRelationships, ) -> &mut Self { @@ -53,7 +53,7 @@ impl SensitiveDataScannerRuleResponse { self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SensitiveDataScannerRuleType, ) -> &mut Self { @@ -61,6 +61,7 @@ impl SensitiveDataScannerRuleResponse { self } } + impl Default for SensitiveDataScannerRuleResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_update.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_update.rs index 97037e3cf..9388f86b5 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_update.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_update.rs @@ -32,7 +32,7 @@ impl SensitiveDataScannerRuleUpdate { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::SensitiveDataScannerRuleAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl SensitiveDataScannerRuleUpdate { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::SensitiveDataScannerRuleRelationships, ) -> &mut Self { @@ -53,7 +53,7 @@ impl SensitiveDataScannerRuleUpdate { self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SensitiveDataScannerRuleType, ) -> &mut Self { @@ -61,6 +61,7 @@ impl SensitiveDataScannerRuleUpdate { self } } + impl Default for SensitiveDataScannerRuleUpdate { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_update_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_update_response.rs index 8500ea409..f8cdecce9 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_update_response.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_update_response.rs @@ -18,7 +18,7 @@ impl SensitiveDataScannerRuleUpdateResponse { SensitiveDataScannerRuleUpdateResponse { meta: None } } - pub fn with_meta( + pub fn meta( &mut self, value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SensitiveDataScannerRuleUpdateResponse { self } } + impl Default for SensitiveDataScannerRuleUpdateResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern.rs b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern.rs index 0de31bc90..06b7677cc 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern.rs @@ -24,12 +24,12 @@ impl SensitiveDataScannerStandardPattern { } } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SensitiveDataScannerStandardPatternType, ) -> &mut Self { @@ -37,6 +37,7 @@ impl SensitiveDataScannerStandardPattern { self } } + impl Default for SensitiveDataScannerStandardPattern { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_attributes.rs b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_attributes.rs index 9a0783797..59957c120 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_attributes.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_attributes.rs @@ -40,36 +40,37 @@ impl SensitiveDataScannerStandardPatternAttributes { } } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_included_keywords(&mut self, value: Vec) -> &mut Self { + pub fn included_keywords(&mut self, value: Vec) -> &mut Self { self.included_keywords = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_pattern(&mut self, value: String) -> &mut Self { + pub fn pattern(&mut self, value: String) -> &mut Self { self.pattern = Some(value); self } - pub fn with_priority(&mut self, value: i64) -> &mut Self { + pub fn priority(&mut self, value: i64) -> &mut Self { self.priority = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } } + impl Default for SensitiveDataScannerStandardPatternAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_data.rs b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_data.rs index 43ffd4957..51db1a631 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_data.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_data.rs @@ -18,7 +18,7 @@ impl SensitiveDataScannerStandardPatternData { SensitiveDataScannerStandardPatternData { data: None } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::SensitiveDataScannerStandardPattern, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SensitiveDataScannerStandardPatternData { self } } + impl Default for SensitiveDataScannerStandardPatternData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_data.rs b/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_data.rs index 6a4b929f7..34474f698 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_data.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_data.rs @@ -19,7 +19,7 @@ impl SensitiveDataScannerStandardPatternsResponseData { SensitiveDataScannerStandardPatternsResponseData { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -27,6 +27,7 @@ impl SensitiveDataScannerStandardPatternsResponseData { self } } + impl Default for SensitiveDataScannerStandardPatternsResponseData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_item.rs b/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_item.rs index 34ecdaae5..dd6932a1f 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_item.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_item.rs @@ -28,7 +28,7 @@ impl SensitiveDataScannerStandardPatternsResponseItem { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::SensitiveDataScannerStandardPatternAttributes, ) -> &mut Self { @@ -36,12 +36,12 @@ impl SensitiveDataScannerStandardPatternsResponseItem { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SensitiveDataScannerStandardPatternType, ) -> &mut Self { @@ -49,6 +49,7 @@ impl SensitiveDataScannerStandardPatternsResponseItem { self } } + impl Default for SensitiveDataScannerStandardPatternsResponseItem { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_sensitive_data_scanner_text_replacement.rs b/src/datadogV2/model/model_sensitive_data_scanner_text_replacement.rs index f50b2b354..74fb45794 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_text_replacement.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_text_replacement.rs @@ -34,17 +34,17 @@ impl SensitiveDataScannerTextReplacement { } } - pub fn with_number_of_chars(&mut self, value: i64) -> &mut Self { + pub fn number_of_chars(&mut self, value: i64) -> &mut Self { self.number_of_chars = Some(value); self } - pub fn with_replacement_string(&mut self, value: String) -> &mut Self { + pub fn replacement_string(&mut self, value: String) -> &mut Self { self.replacement_string = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SensitiveDataScannerTextReplacementType, ) -> &mut Self { @@ -52,6 +52,7 @@ impl SensitiveDataScannerTextReplacement { self } } + impl Default for SensitiveDataScannerTextReplacement { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_service_account_create_attributes.rs b/src/datadogV2/model/model_service_account_create_attributes.rs index 56c5308c0..94564bb1b 100644 --- a/src/datadogV2/model/model_service_account_create_attributes.rs +++ b/src/datadogV2/model/model_service_account_create_attributes.rs @@ -32,12 +32,12 @@ impl ServiceAccountCreateAttributes { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } diff --git a/src/datadogV2/model/model_service_account_create_data.rs b/src/datadogV2/model/model_service_account_create_data.rs index 64d86781f..55ee9fc9b 100644 --- a/src/datadogV2/model/model_service_account_create_data.rs +++ b/src/datadogV2/model/model_service_account_create_data.rs @@ -31,7 +31,7 @@ impl ServiceAccountCreateData { } } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::UserRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_service_definition_create_response.rs b/src/datadogV2/model/model_service_definition_create_response.rs index d12d9687e..78eba64df 100644 --- a/src/datadogV2/model/model_service_definition_create_response.rs +++ b/src/datadogV2/model/model_service_definition_create_response.rs @@ -18,7 +18,7 @@ impl ServiceDefinitionCreateResponse { ServiceDefinitionCreateResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl ServiceDefinitionCreateResponse { self } } + impl Default for ServiceDefinitionCreateResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_service_definition_data.rs b/src/datadogV2/model/model_service_definition_data.rs index cb20fe9cc..1c3a792d9 100644 --- a/src/datadogV2/model/model_service_definition_data.rs +++ b/src/datadogV2/model/model_service_definition_data.rs @@ -28,7 +28,7 @@ impl ServiceDefinitionData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::ServiceDefinitionDataAttributes, ) -> &mut Self { @@ -36,16 +36,17 @@ impl ServiceDefinitionData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } } + impl Default for ServiceDefinitionData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_service_definition_data_attributes.rs b/src/datadogV2/model/model_service_definition_data_attributes.rs index d2cdb1ccd..f33b649b1 100644 --- a/src/datadogV2/model/model_service_definition_data_attributes.rs +++ b/src/datadogV2/model/model_service_definition_data_attributes.rs @@ -24,22 +24,17 @@ impl ServiceDefinitionDataAttributes { } } - pub fn with_meta( - &mut self, - value: crate::datadogV2::model::ServiceDefinitionMeta, - ) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::ServiceDefinitionMeta) -> &mut Self { self.meta = Some(value); self } - pub fn with_schema( - &mut self, - value: crate::datadogV2::model::ServiceDefinitionSchema, - ) -> &mut Self { + pub fn schema(&mut self, value: crate::datadogV2::model::ServiceDefinitionSchema) -> &mut Self { self.schema = Some(value); self } } + impl Default for ServiceDefinitionDataAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_service_definition_get_response.rs b/src/datadogV2/model/model_service_definition_get_response.rs index 6101235eb..5d2c3e9e6 100644 --- a/src/datadogV2/model/model_service_definition_get_response.rs +++ b/src/datadogV2/model/model_service_definition_get_response.rs @@ -18,14 +18,12 @@ impl ServiceDefinitionGetResponse { ServiceDefinitionGetResponse { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::ServiceDefinitionData, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::ServiceDefinitionData) -> &mut Self { self.data = Some(value); self } } + impl Default for ServiceDefinitionGetResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_service_definition_meta.rs b/src/datadogV2/model/model_service_definition_meta.rs index 91eb83093..910adaf19 100644 --- a/src/datadogV2/model/model_service_definition_meta.rs +++ b/src/datadogV2/model/model_service_definition_meta.rs @@ -44,37 +44,37 @@ impl ServiceDefinitionMeta { } } - pub fn with_github_html_url(&mut self, value: String) -> &mut Self { + pub fn github_html_url(&mut self, value: String) -> &mut Self { self.github_html_url = Some(value); self } - pub fn with_ingested_schema_version(&mut self, value: String) -> &mut Self { + pub fn ingested_schema_version(&mut self, value: String) -> &mut Self { self.ingested_schema_version = Some(value); self } - pub fn with_ingestion_source(&mut self, value: String) -> &mut Self { + pub fn ingestion_source(&mut self, value: String) -> &mut Self { self.ingestion_source = Some(value); self } - pub fn with_last_modified_time(&mut self, value: String) -> &mut Self { + pub fn last_modified_time(&mut self, value: String) -> &mut Self { self.last_modified_time = Some(value); self } - pub fn with_origin(&mut self, value: String) -> &mut Self { + pub fn origin(&mut self, value: String) -> &mut Self { self.origin = Some(value); self } - pub fn with_origin_detail(&mut self, value: String) -> &mut Self { + pub fn origin_detail(&mut self, value: String) -> &mut Self { self.origin_detail = Some(value); self } - pub fn with_warnings( + pub fn warnings( &mut self, value: Vec, ) -> &mut Self { @@ -82,6 +82,7 @@ impl ServiceDefinitionMeta { self } } + impl Default for ServiceDefinitionMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_service_definition_meta_warnings.rs b/src/datadogV2/model/model_service_definition_meta_warnings.rs index cdf60e22d..faaea37a5 100644 --- a/src/datadogV2/model/model_service_definition_meta_warnings.rs +++ b/src/datadogV2/model/model_service_definition_meta_warnings.rs @@ -28,21 +28,22 @@ impl ServiceDefinitionMetaWarnings { } } - pub fn with_instance_location(&mut self, value: String) -> &mut Self { + pub fn instance_location(&mut self, value: String) -> &mut Self { self.instance_location = Some(value); self } - pub fn with_keyword_location(&mut self, value: String) -> &mut Self { + pub fn keyword_location(&mut self, value: String) -> &mut Self { self.keyword_location = Some(value); self } - pub fn with_message(&mut self, value: String) -> &mut Self { + pub fn message(&mut self, value: String) -> &mut Self { self.message = Some(value); self } } + impl Default for ServiceDefinitionMetaWarnings { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_service_definition_schema.rs b/src/datadogV2/model/model_service_definition_schema.rs index 0889497e9..7f53271ea 100644 --- a/src/datadogV2/model/model_service_definition_schema.rs +++ b/src/datadogV2/model/model_service_definition_schema.rs @@ -7,8 +7,8 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ServiceDefinitionSchema { - ServiceDefinitionV1(crate::datadogV2::model::ServiceDefinitionV1), - ServiceDefinitionV2(crate::datadogV2::model::ServiceDefinitionV2), - ServiceDefinitionV2Dot1(crate::datadogV2::model::ServiceDefinitionV2Dot1), - ServiceDefinitionV2Dot2(crate::datadogV2::model::ServiceDefinitionV2Dot2), + ServiceDefinitionV1(Box), + ServiceDefinitionV2(Box), + ServiceDefinitionV2Dot1(Box), + ServiceDefinitionV2Dot2(Box), } diff --git a/src/datadogV2/model/model_service_definition_v1.rs b/src/datadogV2/model/model_service_definition_v1.rs index e10668ca4..c52b8a41a 100644 --- a/src/datadogV2/model/model_service_definition_v1.rs +++ b/src/datadogV2/model/model_service_definition_v1.rs @@ -51,7 +51,7 @@ impl ServiceDefinitionV1 { } } - pub fn with_contact( + pub fn contact( &mut self, value: crate::datadogV2::model::ServiceDefinitionV1Contact, ) -> &mut Self { @@ -59,7 +59,7 @@ impl ServiceDefinitionV1 { self } - pub fn with_extensions( + pub fn extensions( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -67,7 +67,7 @@ impl ServiceDefinitionV1 { self } - pub fn with_external_resources( + pub fn external_resources( &mut self, value: Vec, ) -> &mut Self { @@ -75,7 +75,7 @@ impl ServiceDefinitionV1 { self } - pub fn with_integrations( + pub fn integrations( &mut self, value: crate::datadogV2::model::ServiceDefinitionV1Integrations, ) -> &mut Self { @@ -83,15 +83,12 @@ impl ServiceDefinitionV1 { self } - pub fn with_org( - &mut self, - value: crate::datadogV2::model::ServiceDefinitionV1Org, - ) -> &mut Self { + pub fn org(&mut self, value: crate::datadogV2::model::ServiceDefinitionV1Org) -> &mut Self { self.org = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } diff --git a/src/datadogV2/model/model_service_definition_v1_contact.rs b/src/datadogV2/model/model_service_definition_v1_contact.rs index ebb1e0c3d..073094701 100644 --- a/src/datadogV2/model/model_service_definition_v1_contact.rs +++ b/src/datadogV2/model/model_service_definition_v1_contact.rs @@ -24,16 +24,17 @@ impl ServiceDefinitionV1Contact { } } - pub fn with_email(&mut self, value: String) -> &mut Self { + pub fn email(&mut self, value: String) -> &mut Self { self.email = Some(value); self } - pub fn with_slack(&mut self, value: String) -> &mut Self { + pub fn slack(&mut self, value: String) -> &mut Self { self.slack = Some(value); self } } + impl Default for ServiceDefinitionV1Contact { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_service_definition_v1_info.rs b/src/datadogV2/model/model_service_definition_v1_info.rs index 592a70c8f..5cf360459 100644 --- a/src/datadogV2/model/model_service_definition_v1_info.rs +++ b/src/datadogV2/model/model_service_definition_v1_info.rs @@ -32,17 +32,17 @@ impl ServiceDefinitionV1Info { } } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_display_name(&mut self, value: String) -> &mut Self { + pub fn display_name(&mut self, value: String) -> &mut Self { self.display_name = Some(value); self } - pub fn with_service_tier(&mut self, value: String) -> &mut Self { + pub fn service_tier(&mut self, value: String) -> &mut Self { self.service_tier = Some(value); self } diff --git a/src/datadogV2/model/model_service_definition_v1_integrations.rs b/src/datadogV2/model/model_service_definition_v1_integrations.rs index 0311f6d1c..68aa0ff3c 100644 --- a/src/datadogV2/model/model_service_definition_v1_integrations.rs +++ b/src/datadogV2/model/model_service_definition_v1_integrations.rs @@ -18,11 +18,12 @@ impl ServiceDefinitionV1Integrations { ServiceDefinitionV1Integrations { pagerduty: None } } - pub fn with_pagerduty(&mut self, value: String) -> &mut Self { + pub fn pagerduty(&mut self, value: String) -> &mut Self { self.pagerduty = Some(value); self } } + impl Default for ServiceDefinitionV1Integrations { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_service_definition_v1_org.rs b/src/datadogV2/model/model_service_definition_v1_org.rs index 4ba4a8824..8923b640c 100644 --- a/src/datadogV2/model/model_service_definition_v1_org.rs +++ b/src/datadogV2/model/model_service_definition_v1_org.rs @@ -24,16 +24,17 @@ impl ServiceDefinitionV1Org { } } - pub fn with_application(&mut self, value: String) -> &mut Self { + pub fn application(&mut self, value: String) -> &mut Self { self.application = Some(value); self } - pub fn with_team(&mut self, value: String) -> &mut Self { + pub fn team(&mut self, value: String) -> &mut Self { self.team = Some(value); self } } + impl Default for ServiceDefinitionV1Org { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_service_definition_v2.rs b/src/datadogV2/model/model_service_definition_v2.rs index 4ec9df3b3..379021ab4 100644 --- a/src/datadogV2/model/model_service_definition_v2.rs +++ b/src/datadogV2/model/model_service_definition_v2.rs @@ -63,7 +63,7 @@ impl ServiceDefinitionV2 { } } - pub fn with_contacts( + pub fn contacts( &mut self, value: Vec, ) -> &mut Self { @@ -71,12 +71,12 @@ impl ServiceDefinitionV2 { self } - pub fn with_dd_team(&mut self, value: String) -> &mut Self { + pub fn dd_team(&mut self, value: String) -> &mut Self { self.dd_team = Some(value); self } - pub fn with_docs( + pub fn docs( &mut self, value: Vec, ) -> &mut Self { @@ -84,7 +84,7 @@ impl ServiceDefinitionV2 { self } - pub fn with_extensions( + pub fn extensions( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -92,7 +92,7 @@ impl ServiceDefinitionV2 { self } - pub fn with_integrations( + pub fn integrations( &mut self, value: crate::datadogV2::model::ServiceDefinitionV2Integrations, ) -> &mut Self { @@ -100,7 +100,7 @@ impl ServiceDefinitionV2 { self } - pub fn with_links( + pub fn links( &mut self, value: Vec, ) -> &mut Self { @@ -108,7 +108,7 @@ impl ServiceDefinitionV2 { self } - pub fn with_repos( + pub fn repos( &mut self, value: Vec, ) -> &mut Self { @@ -116,12 +116,12 @@ impl ServiceDefinitionV2 { self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_team(&mut self, value: String) -> &mut Self { + pub fn team(&mut self, value: String) -> &mut Self { self.team = Some(value); self } diff --git a/src/datadogV2/model/model_service_definition_v2_contact.rs b/src/datadogV2/model/model_service_definition_v2_contact.rs index 69fb71346..82dfb76f9 100644 --- a/src/datadogV2/model/model_service_definition_v2_contact.rs +++ b/src/datadogV2/model/model_service_definition_v2_contact.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ServiceDefinitionV2Contact { - ServiceDefinitionV2Email(crate::datadogV2::model::ServiceDefinitionV2Email), - ServiceDefinitionV2Slack(crate::datadogV2::model::ServiceDefinitionV2Slack), - ServiceDefinitionV2MSTeams(crate::datadogV2::model::ServiceDefinitionV2MSTeams), + ServiceDefinitionV2Email(Box), + ServiceDefinitionV2Slack(Box), + ServiceDefinitionV2MSTeams(Box), } diff --git a/src/datadogV2/model/model_service_definition_v2_doc.rs b/src/datadogV2/model/model_service_definition_v2_doc.rs index 3d5a83616..6e7e1431f 100644 --- a/src/datadogV2/model/model_service_definition_v2_doc.rs +++ b/src/datadogV2/model/model_service_definition_v2_doc.rs @@ -28,7 +28,7 @@ impl ServiceDefinitionV2Doc { } } - pub fn with_provider(&mut self, value: String) -> &mut Self { + pub fn provider(&mut self, value: String) -> &mut Self { self.provider = Some(value); self } diff --git a/src/datadogV2/model/model_service_definition_v2_dot1.rs b/src/datadogV2/model/model_service_definition_v2_dot1.rs index 1f37258ab..c15daacfb 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot1.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot1.rs @@ -67,12 +67,12 @@ impl ServiceDefinitionV2Dot1 { } } - pub fn with_application(&mut self, value: String) -> &mut Self { + pub fn application(&mut self, value: String) -> &mut Self { self.application = Some(value); self } - pub fn with_contacts( + pub fn contacts( &mut self, value: Vec, ) -> &mut Self { @@ -80,12 +80,12 @@ impl ServiceDefinitionV2Dot1 { self } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_extensions( + pub fn extensions( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -93,7 +93,7 @@ impl ServiceDefinitionV2Dot1 { self } - pub fn with_integrations( + pub fn integrations( &mut self, value: crate::datadogV2::model::ServiceDefinitionV2Dot1Integrations, ) -> &mut Self { @@ -101,12 +101,12 @@ impl ServiceDefinitionV2Dot1 { self } - pub fn with_lifecycle(&mut self, value: String) -> &mut Self { + pub fn lifecycle(&mut self, value: String) -> &mut Self { self.lifecycle = Some(value); self } - pub fn with_links( + pub fn links( &mut self, value: Vec, ) -> &mut Self { @@ -114,17 +114,17 @@ impl ServiceDefinitionV2Dot1 { self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_team(&mut self, value: String) -> &mut Self { + pub fn team(&mut self, value: String) -> &mut Self { self.team = Some(value); self } - pub fn with_tier(&mut self, value: String) -> &mut Self { + pub fn tier(&mut self, value: String) -> &mut Self { self.tier = Some(value); self } diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_contact.rs b/src/datadogV2/model/model_service_definition_v2_dot1_contact.rs index 81ed4ed07..5dd9ad082 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot1_contact.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot1_contact.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ServiceDefinitionV2Dot1Contact { - ServiceDefinitionV2Dot1Email(crate::datadogV2::model::ServiceDefinitionV2Dot1Email), - ServiceDefinitionV2Dot1Slack(crate::datadogV2::model::ServiceDefinitionV2Dot1Slack), - ServiceDefinitionV2Dot1MSTeams(crate::datadogV2::model::ServiceDefinitionV2Dot1MSTeams), + ServiceDefinitionV2Dot1Email(Box), + ServiceDefinitionV2Dot1Slack(Box), + ServiceDefinitionV2Dot1MSTeams(Box), } diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_email.rs b/src/datadogV2/model/model_service_definition_v2_dot1_email.rs index 714979d0a..79f7c45aa 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot1_email.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot1_email.rs @@ -31,7 +31,7 @@ impl ServiceDefinitionV2Dot1Email { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_integrations.rs b/src/datadogV2/model/model_service_definition_v2_dot1_integrations.rs index 06d0eccb1..98ca88648 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot1_integrations.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot1_integrations.rs @@ -24,7 +24,7 @@ impl ServiceDefinitionV2Dot1Integrations { } } - pub fn with_opsgenie( + pub fn opsgenie( &mut self, value: crate::datadogV2::model::ServiceDefinitionV2Dot1Opsgenie, ) -> &mut Self { @@ -32,7 +32,7 @@ impl ServiceDefinitionV2Dot1Integrations { self } - pub fn with_pagerduty( + pub fn pagerduty( &mut self, value: crate::datadogV2::model::ServiceDefinitionV2Dot1Pagerduty, ) -> &mut Self { @@ -40,6 +40,7 @@ impl ServiceDefinitionV2Dot1Integrations { self } } + impl Default for ServiceDefinitionV2Dot1Integrations { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_link.rs b/src/datadogV2/model/model_service_definition_v2_dot1_link.rs index 3a5954da0..3de76c0b3 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot1_link.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot1_link.rs @@ -36,7 +36,7 @@ impl ServiceDefinitionV2Dot1Link { } } - pub fn with_provider(&mut self, value: String) -> &mut Self { + pub fn provider(&mut self, value: String) -> &mut Self { self.provider = Some(value); self } diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_ms_teams.rs b/src/datadogV2/model/model_service_definition_v2_dot1_ms_teams.rs index ceaa6e2ff..be793a6b4 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot1_ms_teams.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot1_ms_teams.rs @@ -31,7 +31,7 @@ impl ServiceDefinitionV2Dot1MSTeams { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_opsgenie.rs b/src/datadogV2/model/model_service_definition_v2_dot1_opsgenie.rs index faa2863a0..a4acbd08c 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot1_opsgenie.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot1_opsgenie.rs @@ -24,7 +24,7 @@ impl ServiceDefinitionV2Dot1Opsgenie { } } - pub fn with_region( + pub fn region( &mut self, value: crate::datadogV2::model::ServiceDefinitionV2Dot1OpsgenieRegion, ) -> &mut Self { diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_pagerduty.rs b/src/datadogV2/model/model_service_definition_v2_dot1_pagerduty.rs index 4b8119c10..a6837e282 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot1_pagerduty.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot1_pagerduty.rs @@ -18,11 +18,12 @@ impl ServiceDefinitionV2Dot1Pagerduty { ServiceDefinitionV2Dot1Pagerduty { service_url: None } } - pub fn with_service_url(&mut self, value: String) -> &mut Self { + pub fn service_url(&mut self, value: String) -> &mut Self { self.service_url = Some(value); self } } + impl Default for ServiceDefinitionV2Dot1Pagerduty { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_slack.rs b/src/datadogV2/model/model_service_definition_v2_dot1_slack.rs index ad00d9e2d..e2affbe28 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot1_slack.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot1_slack.rs @@ -31,7 +31,7 @@ impl ServiceDefinitionV2Dot1Slack { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV2/model/model_service_definition_v2_dot2.rs b/src/datadogV2/model/model_service_definition_v2_dot2.rs index f1ac864be..d1433fdac 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot2.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot2.rs @@ -75,12 +75,12 @@ impl ServiceDefinitionV2Dot2 { } } - pub fn with_application(&mut self, value: String) -> &mut Self { + pub fn application(&mut self, value: String) -> &mut Self { self.application = Some(value); self } - pub fn with_contacts( + pub fn contacts( &mut self, value: Vec, ) -> &mut Self { @@ -88,12 +88,12 @@ impl ServiceDefinitionV2Dot2 { self } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_extensions( + pub fn extensions( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -101,7 +101,7 @@ impl ServiceDefinitionV2Dot2 { self } - pub fn with_integrations( + pub fn integrations( &mut self, value: crate::datadogV2::model::ServiceDefinitionV2Dot2Integrations, ) -> &mut Self { @@ -109,17 +109,17 @@ impl ServiceDefinitionV2Dot2 { self } - pub fn with_languages(&mut self, value: Vec) -> &mut Self { + pub fn languages(&mut self, value: Vec) -> &mut Self { self.languages = Some(value); self } - pub fn with_lifecycle(&mut self, value: String) -> &mut Self { + pub fn lifecycle(&mut self, value: String) -> &mut Self { self.lifecycle = Some(value); self } - pub fn with_links( + pub fn links( &mut self, value: Vec, ) -> &mut Self { @@ -127,22 +127,22 @@ impl ServiceDefinitionV2Dot2 { self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_team(&mut self, value: String) -> &mut Self { + pub fn team(&mut self, value: String) -> &mut Self { self.team = Some(value); self } - pub fn with_tier(&mut self, value: String) -> &mut Self { + pub fn tier(&mut self, value: String) -> &mut Self { self.tier = Some(value); self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::ServiceDefinitionV2Dot2Type, ) -> &mut Self { diff --git a/src/datadogV2/model/model_service_definition_v2_dot2_contact.rs b/src/datadogV2/model/model_service_definition_v2_dot2_contact.rs index 90aed82e5..83eef43ac 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot2_contact.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot2_contact.rs @@ -28,7 +28,7 @@ impl ServiceDefinitionV2Dot2Contact { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV2/model/model_service_definition_v2_dot2_integrations.rs b/src/datadogV2/model/model_service_definition_v2_dot2_integrations.rs index c68f50792..4e79f2eaa 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot2_integrations.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot2_integrations.rs @@ -24,7 +24,7 @@ impl ServiceDefinitionV2Dot2Integrations { } } - pub fn with_opsgenie( + pub fn opsgenie( &mut self, value: crate::datadogV2::model::ServiceDefinitionV2Dot2Opsgenie, ) -> &mut Self { @@ -32,7 +32,7 @@ impl ServiceDefinitionV2Dot2Integrations { self } - pub fn with_pagerduty( + pub fn pagerduty( &mut self, value: crate::datadogV2::model::ServiceDefinitionV2Dot2Pagerduty, ) -> &mut Self { @@ -40,6 +40,7 @@ impl ServiceDefinitionV2Dot2Integrations { self } } + impl Default for ServiceDefinitionV2Dot2Integrations { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_service_definition_v2_dot2_link.rs b/src/datadogV2/model/model_service_definition_v2_dot2_link.rs index ed00eb3d3..3ce0296c6 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot2_link.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot2_link.rs @@ -32,7 +32,7 @@ impl ServiceDefinitionV2Dot2Link { } } - pub fn with_provider(&mut self, value: String) -> &mut Self { + pub fn provider(&mut self, value: String) -> &mut Self { self.provider = Some(value); self } diff --git a/src/datadogV2/model/model_service_definition_v2_dot2_opsgenie.rs b/src/datadogV2/model/model_service_definition_v2_dot2_opsgenie.rs index 599fa3b18..31d824797 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot2_opsgenie.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot2_opsgenie.rs @@ -24,7 +24,7 @@ impl ServiceDefinitionV2Dot2Opsgenie { } } - pub fn with_region( + pub fn region( &mut self, value: crate::datadogV2::model::ServiceDefinitionV2Dot2OpsgenieRegion, ) -> &mut Self { diff --git a/src/datadogV2/model/model_service_definition_v2_dot2_pagerduty.rs b/src/datadogV2/model/model_service_definition_v2_dot2_pagerduty.rs index d8ed7a8c7..27fcec6bc 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot2_pagerduty.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot2_pagerduty.rs @@ -18,11 +18,12 @@ impl ServiceDefinitionV2Dot2Pagerduty { ServiceDefinitionV2Dot2Pagerduty { service_url: None } } - pub fn with_service_url(&mut self, value: String) -> &mut Self { + pub fn service_url(&mut self, value: String) -> &mut Self { self.service_url = Some(value); self } } + impl Default for ServiceDefinitionV2Dot2Pagerduty { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_service_definition_v2_email.rs b/src/datadogV2/model/model_service_definition_v2_email.rs index 5c2d18f80..496e1b82f 100644 --- a/src/datadogV2/model/model_service_definition_v2_email.rs +++ b/src/datadogV2/model/model_service_definition_v2_email.rs @@ -31,7 +31,7 @@ impl ServiceDefinitionV2Email { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV2/model/model_service_definition_v2_integrations.rs b/src/datadogV2/model/model_service_definition_v2_integrations.rs index 813b86c41..682d4b59e 100644 --- a/src/datadogV2/model/model_service_definition_v2_integrations.rs +++ b/src/datadogV2/model/model_service_definition_v2_integrations.rs @@ -24,7 +24,7 @@ impl ServiceDefinitionV2Integrations { } } - pub fn with_opsgenie( + pub fn opsgenie( &mut self, value: crate::datadogV2::model::ServiceDefinitionV2Opsgenie, ) -> &mut Self { @@ -32,11 +32,12 @@ impl ServiceDefinitionV2Integrations { self } - pub fn with_pagerduty(&mut self, value: String) -> &mut Self { + pub fn pagerduty(&mut self, value: String) -> &mut Self { self.pagerduty = Some(value); self } } + impl Default for ServiceDefinitionV2Integrations { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_service_definition_v2_ms_teams.rs b/src/datadogV2/model/model_service_definition_v2_ms_teams.rs index bd1840844..43a22340f 100644 --- a/src/datadogV2/model/model_service_definition_v2_ms_teams.rs +++ b/src/datadogV2/model/model_service_definition_v2_ms_teams.rs @@ -31,7 +31,7 @@ impl ServiceDefinitionV2MSTeams { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV2/model/model_service_definition_v2_opsgenie.rs b/src/datadogV2/model/model_service_definition_v2_opsgenie.rs index 35e42859e..120c91dad 100644 --- a/src/datadogV2/model/model_service_definition_v2_opsgenie.rs +++ b/src/datadogV2/model/model_service_definition_v2_opsgenie.rs @@ -24,7 +24,7 @@ impl ServiceDefinitionV2Opsgenie { } } - pub fn with_region( + pub fn region( &mut self, value: crate::datadogV2::model::ServiceDefinitionV2OpsgenieRegion, ) -> &mut Self { diff --git a/src/datadogV2/model/model_service_definition_v2_repo.rs b/src/datadogV2/model/model_service_definition_v2_repo.rs index 06b758286..7df980e69 100644 --- a/src/datadogV2/model/model_service_definition_v2_repo.rs +++ b/src/datadogV2/model/model_service_definition_v2_repo.rs @@ -28,7 +28,7 @@ impl ServiceDefinitionV2Repo { } } - pub fn with_provider(&mut self, value: String) -> &mut Self { + pub fn provider(&mut self, value: String) -> &mut Self { self.provider = Some(value); self } diff --git a/src/datadogV2/model/model_service_definition_v2_slack.rs b/src/datadogV2/model/model_service_definition_v2_slack.rs index c79227a31..4cc313006 100644 --- a/src/datadogV2/model/model_service_definition_v2_slack.rs +++ b/src/datadogV2/model/model_service_definition_v2_slack.rs @@ -31,7 +31,7 @@ impl ServiceDefinitionV2Slack { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } diff --git a/src/datadogV2/model/model_service_definitions_create_request.rs b/src/datadogV2/model/model_service_definitions_create_request.rs index 2fa4ac614..58135a292 100644 --- a/src/datadogV2/model/model_service_definitions_create_request.rs +++ b/src/datadogV2/model/model_service_definitions_create_request.rs @@ -7,8 +7,8 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ServiceDefinitionsCreateRequest { - ServiceDefinitionV2Dot2(crate::datadogV2::model::ServiceDefinitionV2Dot2), - ServiceDefinitionV2Dot1(crate::datadogV2::model::ServiceDefinitionV2Dot1), - ServiceDefinitionV2(crate::datadogV2::model::ServiceDefinitionV2), + ServiceDefinitionV2Dot2(Box), + ServiceDefinitionV2Dot1(Box), + ServiceDefinitionV2(Box), ServiceDefinitionRaw(String), } diff --git a/src/datadogV2/model/model_service_definitions_list_response.rs b/src/datadogV2/model/model_service_definitions_list_response.rs index 5d1bb1dff..f1269d225 100644 --- a/src/datadogV2/model/model_service_definitions_list_response.rs +++ b/src/datadogV2/model/model_service_definitions_list_response.rs @@ -18,7 +18,7 @@ impl ServiceDefinitionsListResponse { ServiceDefinitionsListResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl ServiceDefinitionsListResponse { self } } + impl Default for ServiceDefinitionsListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_slack_integration_metadata_channel_item.rs b/src/datadogV2/model/model_slack_integration_metadata_channel_item.rs index 562744a9d..9e4445953 100644 --- a/src/datadogV2/model/model_slack_integration_metadata_channel_item.rs +++ b/src/datadogV2/model/model_slack_integration_metadata_channel_item.rs @@ -36,7 +36,7 @@ impl SlackIntegrationMetadataChannelItem { } } - pub fn with_team_id(&mut self, value: String) -> &mut Self { + pub fn team_id(&mut self, value: String) -> &mut Self { self.team_id = Some(value); self } diff --git a/src/datadogV2/model/model_span.rs b/src/datadogV2/model/model_span.rs index f37b99310..fc394cc5b 100644 --- a/src/datadogV2/model/model_span.rs +++ b/src/datadogV2/model/model_span.rs @@ -28,24 +28,22 @@ impl Span { } } - pub fn with_attributes( - &mut self, - value: crate::datadogV2::model::SpansAttributes, - ) -> &mut Self { + pub fn attributes(&mut self, value: crate::datadogV2::model::SpansAttributes) -> &mut Self { self.attributes = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::SpansType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::SpansType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for Span { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_aggregate_bucket.rs b/src/datadogV2/model/model_spans_aggregate_bucket.rs index 25d05c099..7fabca1be 100644 --- a/src/datadogV2/model/model_spans_aggregate_bucket.rs +++ b/src/datadogV2/model/model_spans_aggregate_bucket.rs @@ -28,7 +28,7 @@ impl SpansAggregateBucket { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::SpansAggregateBucketAttributes, ) -> &mut Self { @@ -36,19 +36,17 @@ impl SpansAggregateBucket { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_( - &mut self, - value: crate::datadogV2::model::SpansAggregateBucketType, - ) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::SpansAggregateBucketType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for SpansAggregateBucket { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_aggregate_bucket_attributes.rs b/src/datadogV2/model/model_spans_aggregate_bucket_attributes.rs index 4e4cd3209..4479d25e0 100644 --- a/src/datadogV2/model/model_spans_aggregate_bucket_attributes.rs +++ b/src/datadogV2/model/model_spans_aggregate_bucket_attributes.rs @@ -30,7 +30,7 @@ impl SpansAggregateBucketAttributes { } } - pub fn with_by( + pub fn by( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -38,7 +38,7 @@ impl SpansAggregateBucketAttributes { self } - pub fn with_compute( + pub fn compute( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -46,7 +46,7 @@ impl SpansAggregateBucketAttributes { self } - pub fn with_computes( + pub fn computes( &mut self, value: std::collections::BTreeMap< String, @@ -57,6 +57,7 @@ impl SpansAggregateBucketAttributes { self } } + impl Default for SpansAggregateBucketAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_aggregate_bucket_value_timeseries.rs b/src/datadogV2/model/model_spans_aggregate_bucket_value_timeseries.rs index d447d2fc3..e28bfbdab 100644 --- a/src/datadogV2/model/model_spans_aggregate_bucket_value_timeseries.rs +++ b/src/datadogV2/model/model_spans_aggregate_bucket_value_timeseries.rs @@ -14,6 +14,7 @@ impl SpansAggregateBucketValueTimeseries { SpansAggregateBucketValueTimeseries {} } } + impl Default for SpansAggregateBucketValueTimeseries { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_aggregate_bucket_value_timeseries_point.rs b/src/datadogV2/model/model_spans_aggregate_bucket_value_timeseries_point.rs index 677993cb0..ec63c459e 100644 --- a/src/datadogV2/model/model_spans_aggregate_bucket_value_timeseries_point.rs +++ b/src/datadogV2/model/model_spans_aggregate_bucket_value_timeseries_point.rs @@ -24,16 +24,17 @@ impl SpansAggregateBucketValueTimeseriesPoint { } } - pub fn with_time(&mut self, value: String) -> &mut Self { + pub fn time(&mut self, value: String) -> &mut Self { self.time = Some(value); self } - pub fn with_value(&mut self, value: f64) -> &mut Self { + pub fn value(&mut self, value: f64) -> &mut Self { self.value = Some(value); self } } + impl Default for SpansAggregateBucketValueTimeseriesPoint { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_aggregate_data.rs b/src/datadogV2/model/model_spans_aggregate_data.rs index 64219b0bc..5c8c77098 100644 --- a/src/datadogV2/model/model_spans_aggregate_data.rs +++ b/src/datadogV2/model/model_spans_aggregate_data.rs @@ -24,7 +24,7 @@ impl SpansAggregateData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::SpansAggregateRequestAttributes, ) -> &mut Self { @@ -32,7 +32,7 @@ impl SpansAggregateData { self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::SpansAggregateRequestType, ) -> &mut Self { @@ -40,6 +40,7 @@ impl SpansAggregateData { self } } + impl Default for SpansAggregateData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_aggregate_request.rs b/src/datadogV2/model/model_spans_aggregate_request.rs index 1215c5b28..876ad5b69 100644 --- a/src/datadogV2/model/model_spans_aggregate_request.rs +++ b/src/datadogV2/model/model_spans_aggregate_request.rs @@ -18,11 +18,12 @@ impl SpansAggregateRequest { SpansAggregateRequest { data: None } } - pub fn with_data(&mut self, value: crate::datadogV2::model::SpansAggregateData) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::SpansAggregateData) -> &mut Self { self.data = Some(value); self } } + impl Default for SpansAggregateRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_aggregate_request_attributes.rs b/src/datadogV2/model/model_spans_aggregate_request_attributes.rs index c95cdc971..dde3a7aea 100644 --- a/src/datadogV2/model/model_spans_aggregate_request_attributes.rs +++ b/src/datadogV2/model/model_spans_aggregate_request_attributes.rs @@ -33,29 +33,27 @@ impl SpansAggregateRequestAttributes { } } - pub fn with_compute(&mut self, value: Vec) -> &mut Self { + pub fn compute(&mut self, value: Vec) -> &mut Self { self.compute = Some(value); self } - pub fn with_filter(&mut self, value: crate::datadogV2::model::SpansQueryFilter) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV2::model::SpansQueryFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_group_by( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn group_by(&mut self, value: Vec) -> &mut Self { self.group_by = Some(value); self } - pub fn with_options(&mut self, value: crate::datadogV2::model::SpansQueryOptions) -> &mut Self { + pub fn options(&mut self, value: crate::datadogV2::model::SpansQueryOptions) -> &mut Self { self.options = Some(value); self } } + impl Default for SpansAggregateRequestAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_aggregate_response.rs b/src/datadogV2/model/model_spans_aggregate_response.rs index a03eb49e2..568b92dff 100644 --- a/src/datadogV2/model/model_spans_aggregate_response.rs +++ b/src/datadogV2/model/model_spans_aggregate_response.rs @@ -24,15 +24,12 @@ impl SpansAggregateResponse { } } - pub fn with_data( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_meta( + pub fn meta( &mut self, value: crate::datadogV2::model::SpansAggregateResponseMetadata, ) -> &mut Self { @@ -40,6 +37,7 @@ impl SpansAggregateResponse { self } } + impl Default for SpansAggregateResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_aggregate_response_metadata.rs b/src/datadogV2/model/model_spans_aggregate_response_metadata.rs index 8dbac4106..a6a36e082 100644 --- a/src/datadogV2/model/model_spans_aggregate_response_metadata.rs +++ b/src/datadogV2/model/model_spans_aggregate_response_metadata.rs @@ -33,17 +33,17 @@ impl SpansAggregateResponseMetadata { } } - pub fn with_elapsed(&mut self, value: i64) -> &mut Self { + pub fn elapsed(&mut self, value: i64) -> &mut Self { self.elapsed = Some(value); self } - pub fn with_request_id(&mut self, value: String) -> &mut Self { + pub fn request_id(&mut self, value: String) -> &mut Self { self.request_id = Some(value); self } - pub fn with_status( + pub fn status( &mut self, value: crate::datadogV2::model::SpansAggregateResponseStatus, ) -> &mut Self { @@ -51,14 +51,12 @@ impl SpansAggregateResponseMetadata { self } - pub fn with_warnings( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn warnings(&mut self, value: Vec) -> &mut Self { self.warnings = Some(value); self } } + impl Default for SpansAggregateResponseMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_aggregate_sort.rs b/src/datadogV2/model/model_spans_aggregate_sort.rs index df6da5ac3..9a06690e0 100644 --- a/src/datadogV2/model/model_spans_aggregate_sort.rs +++ b/src/datadogV2/model/model_spans_aggregate_sort.rs @@ -32,7 +32,7 @@ impl SpansAggregateSort { } } - pub fn with_aggregation( + pub fn aggregation( &mut self, value: crate::datadogV2::model::SpansAggregationFunction, ) -> &mut Self { @@ -40,24 +40,22 @@ impl SpansAggregateSort { self } - pub fn with_metric(&mut self, value: String) -> &mut Self { + pub fn metric(&mut self, value: String) -> &mut Self { self.metric = Some(value); self } - pub fn with_order(&mut self, value: crate::datadogV2::model::SpansSortOrder) -> &mut Self { + pub fn order(&mut self, value: crate::datadogV2::model::SpansSortOrder) -> &mut Self { self.order = Some(value); self } - pub fn with_type_( - &mut self, - value: crate::datadogV2::model::SpansAggregateSortType, - ) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::SpansAggregateSortType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for SpansAggregateSort { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_attributes.rs b/src/datadogV2/model/model_spans_attributes.rs index 01310e12c..35f908972 100644 --- a/src/datadogV2/model/model_spans_attributes.rs +++ b/src/datadogV2/model/model_spans_attributes.rs @@ -86,7 +86,7 @@ impl SpansAttributes { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -94,7 +94,7 @@ impl SpansAttributes { self } - pub fn with_custom( + pub fn custom( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -102,81 +102,82 @@ impl SpansAttributes { self } - pub fn with_end_timestamp(&mut self, value: String) -> &mut Self { + pub fn end_timestamp(&mut self, value: String) -> &mut Self { self.end_timestamp = Some(value); self } - pub fn with_env(&mut self, value: String) -> &mut Self { + pub fn env(&mut self, value: String) -> &mut Self { self.env = Some(value); self } - pub fn with_host(&mut self, value: String) -> &mut Self { + pub fn host(&mut self, value: String) -> &mut Self { self.host = Some(value); self } - pub fn with_ingestion_reason(&mut self, value: String) -> &mut Self { + pub fn ingestion_reason(&mut self, value: String) -> &mut Self { self.ingestion_reason = Some(value); self } - pub fn with_parent_id(&mut self, value: String) -> &mut Self { + pub fn parent_id(&mut self, value: String) -> &mut Self { self.parent_id = Some(value); self } - pub fn with_resource_hash(&mut self, value: String) -> &mut Self { + pub fn resource_hash(&mut self, value: String) -> &mut Self { self.resource_hash = Some(value); self } - pub fn with_resource_name(&mut self, value: String) -> &mut Self { + pub fn resource_name(&mut self, value: String) -> &mut Self { self.resource_name = Some(value); self } - pub fn with_retained_by(&mut self, value: String) -> &mut Self { + pub fn retained_by(&mut self, value: String) -> &mut Self { self.retained_by = Some(value); self } - pub fn with_service(&mut self, value: String) -> &mut Self { + pub fn service(&mut self, value: String) -> &mut Self { self.service = Some(value); self } - pub fn with_single_span(&mut self, value: bool) -> &mut Self { + pub fn single_span(&mut self, value: bool) -> &mut Self { self.single_span = Some(value); self } - pub fn with_span_id(&mut self, value: String) -> &mut Self { + pub fn span_id(&mut self, value: String) -> &mut Self { self.span_id = Some(value); self } - pub fn with_start_timestamp(&mut self, value: String) -> &mut Self { + pub fn start_timestamp(&mut self, value: String) -> &mut Self { self.start_timestamp = Some(value); self } - pub fn with_tags(&mut self, value: Vec) -> &mut Self { + pub fn tags(&mut self, value: Vec) -> &mut Self { self.tags = Some(value); self } - pub fn with_trace_id(&mut self, value: String) -> &mut Self { + pub fn trace_id(&mut self, value: String) -> &mut Self { self.trace_id = Some(value); self } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } } + impl Default for SpansAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_compute.rs b/src/datadogV2/model/model_spans_compute.rs index e9a5f2302..7b7050285 100644 --- a/src/datadogV2/model/model_spans_compute.rs +++ b/src/datadogV2/model/model_spans_compute.rs @@ -33,17 +33,17 @@ impl SpansCompute { } } - pub fn with_interval(&mut self, value: String) -> &mut Self { + pub fn interval(&mut self, value: String) -> &mut Self { self.interval = Some(value); self } - pub fn with_metric(&mut self, value: String) -> &mut Self { + pub fn metric(&mut self, value: String) -> &mut Self { self.metric = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::SpansComputeType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::SpansComputeType) -> &mut Self { self.type_ = Some(value); self } diff --git a/src/datadogV2/model/model_spans_filter.rs b/src/datadogV2/model/model_spans_filter.rs index 4246876d3..5f844ffb1 100644 --- a/src/datadogV2/model/model_spans_filter.rs +++ b/src/datadogV2/model/model_spans_filter.rs @@ -18,11 +18,12 @@ impl SpansFilter { SpansFilter { query: None } } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } } + impl Default for SpansFilter { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_group_by.rs b/src/datadogV2/model/model_spans_group_by.rs index ce8e322cc..8dfe55523 100644 --- a/src/datadogV2/model/model_spans_group_by.rs +++ b/src/datadogV2/model/model_spans_group_by.rs @@ -41,7 +41,7 @@ impl SpansGroupBy { } } - pub fn with_histogram( + pub fn histogram( &mut self, value: crate::datadogV2::model::SpansGroupByHistogram, ) -> &mut Self { @@ -49,25 +49,22 @@ impl SpansGroupBy { self } - pub fn with_limit(&mut self, value: i64) -> &mut Self { + pub fn limit(&mut self, value: i64) -> &mut Self { self.limit = Some(value); self } - pub fn with_missing( - &mut self, - value: crate::datadogV2::model::SpansGroupByMissing, - ) -> &mut Self { + pub fn missing(&mut self, value: crate::datadogV2::model::SpansGroupByMissing) -> &mut Self { self.missing = Some(value); self } - pub fn with_sort(&mut self, value: crate::datadogV2::model::SpansAggregateSort) -> &mut Self { + pub fn sort(&mut self, value: crate::datadogV2::model::SpansAggregateSort) -> &mut Self { self.sort = Some(value); self } - pub fn with_total(&mut self, value: crate::datadogV2::model::SpansGroupByTotal) -> &mut Self { + pub fn total(&mut self, value: crate::datadogV2::model::SpansGroupByTotal) -> &mut Self { self.total = Some(value); self } diff --git a/src/datadogV2/model/model_spans_list_request.rs b/src/datadogV2/model/model_spans_list_request.rs index 61552c00b..43057da11 100644 --- a/src/datadogV2/model/model_spans_list_request.rs +++ b/src/datadogV2/model/model_spans_list_request.rs @@ -18,11 +18,12 @@ impl SpansListRequest { SpansListRequest { data: None } } - pub fn with_data(&mut self, value: crate::datadogV2::model::SpansListRequestData) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::SpansListRequestData) -> &mut Self { self.data = Some(value); self } } + impl Default for SpansListRequest { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_list_request_attributes.rs b/src/datadogV2/model/model_spans_list_request_attributes.rs index 41b4e36b4..236f3ce7b 100644 --- a/src/datadogV2/model/model_spans_list_request_attributes.rs +++ b/src/datadogV2/model/model_spans_list_request_attributes.rs @@ -33,26 +33,27 @@ impl SpansListRequestAttributes { } } - pub fn with_filter(&mut self, value: crate::datadogV2::model::SpansQueryFilter) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV2::model::SpansQueryFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_options(&mut self, value: crate::datadogV2::model::SpansQueryOptions) -> &mut Self { + pub fn options(&mut self, value: crate::datadogV2::model::SpansQueryOptions) -> &mut Self { self.options = Some(value); self } - pub fn with_page(&mut self, value: crate::datadogV2::model::SpansListRequestPage) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV2::model::SpansListRequestPage) -> &mut Self { self.page = Some(value); self } - pub fn with_sort(&mut self, value: crate::datadogV2::model::SpansSort) -> &mut Self { + pub fn sort(&mut self, value: crate::datadogV2::model::SpansSort) -> &mut Self { self.sort = Some(value); self } } + impl Default for SpansListRequestAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_list_request_data.rs b/src/datadogV2/model/model_spans_list_request_data.rs index 22f483737..0f4465fad 100644 --- a/src/datadogV2/model/model_spans_list_request_data.rs +++ b/src/datadogV2/model/model_spans_list_request_data.rs @@ -24,7 +24,7 @@ impl SpansListRequestData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::SpansListRequestAttributes, ) -> &mut Self { @@ -32,14 +32,12 @@ impl SpansListRequestData { self } - pub fn with_type_( - &mut self, - value: crate::datadogV2::model::SpansListRequestType, - ) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::SpansListRequestType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for SpansListRequestData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_list_request_page.rs b/src/datadogV2/model/model_spans_list_request_page.rs index 82abce740..d0072f4ac 100644 --- a/src/datadogV2/model/model_spans_list_request_page.rs +++ b/src/datadogV2/model/model_spans_list_request_page.rs @@ -24,16 +24,17 @@ impl SpansListRequestPage { } } - pub fn with_cursor(&mut self, value: String) -> &mut Self { + pub fn cursor(&mut self, value: String) -> &mut Self { self.cursor = Some(value); self } - pub fn with_limit(&mut self, value: i32) -> &mut Self { + pub fn limit(&mut self, value: i32) -> &mut Self { self.limit = Some(value); self } } + impl Default for SpansListRequestPage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_list_response.rs b/src/datadogV2/model/model_spans_list_response.rs index 0106383f3..81e01ffc6 100644 --- a/src/datadogV2/model/model_spans_list_response.rs +++ b/src/datadogV2/model/model_spans_list_response.rs @@ -28,27 +28,22 @@ impl SpansListResponse { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_links( - &mut self, - value: crate::datadogV2::model::SpansListResponseLinks, - ) -> &mut Self { + pub fn links(&mut self, value: crate::datadogV2::model::SpansListResponseLinks) -> &mut Self { self.links = Some(value); self } - pub fn with_meta( - &mut self, - value: crate::datadogV2::model::SpansListResponseMetadata, - ) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::SpansListResponseMetadata) -> &mut Self { self.meta = Some(value); self } } + impl Default for SpansListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_list_response_links.rs b/src/datadogV2/model/model_spans_list_response_links.rs index 737aa565b..7c795eab9 100644 --- a/src/datadogV2/model/model_spans_list_response_links.rs +++ b/src/datadogV2/model/model_spans_list_response_links.rs @@ -19,11 +19,12 @@ impl SpansListResponseLinks { SpansListResponseLinks { next: None } } - pub fn with_next(&mut self, value: String) -> &mut Self { + pub fn next(&mut self, value: String) -> &mut Self { self.next = Some(value); self } } + impl Default for SpansListResponseLinks { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_list_response_metadata.rs b/src/datadogV2/model/model_spans_list_response_metadata.rs index e9003fde7..4db993561 100644 --- a/src/datadogV2/model/model_spans_list_response_metadata.rs +++ b/src/datadogV2/model/model_spans_list_response_metadata.rs @@ -37,25 +37,22 @@ impl SpansListResponseMetadata { } } - pub fn with_elapsed(&mut self, value: i64) -> &mut Self { + pub fn elapsed(&mut self, value: i64) -> &mut Self { self.elapsed = Some(value); self } - pub fn with_page( - &mut self, - value: crate::datadogV2::model::SpansResponseMetadataPage, - ) -> &mut Self { + pub fn page(&mut self, value: crate::datadogV2::model::SpansResponseMetadataPage) -> &mut Self { self.page = Some(value); self } - pub fn with_request_id(&mut self, value: String) -> &mut Self { + pub fn request_id(&mut self, value: String) -> &mut Self { self.request_id = Some(value); self } - pub fn with_status( + pub fn status( &mut self, value: crate::datadogV2::model::SpansAggregateResponseStatus, ) -> &mut Self { @@ -63,14 +60,12 @@ impl SpansListResponseMetadata { self } - pub fn with_warnings( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn warnings(&mut self, value: Vec) -> &mut Self { self.warnings = Some(value); self } } + impl Default for SpansListResponseMetadata { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_metric_compute.rs b/src/datadogV2/model/model_spans_metric_compute.rs index 344f38d78..e6d225692 100644 --- a/src/datadogV2/model/model_spans_metric_compute.rs +++ b/src/datadogV2/model/model_spans_metric_compute.rs @@ -31,12 +31,12 @@ impl SpansMetricCompute { } } - pub fn with_include_percentiles(&mut self, value: bool) -> &mut Self { + pub fn include_percentiles(&mut self, value: bool) -> &mut Self { self.include_percentiles = Some(value); self } - pub fn with_path(&mut self, value: String) -> &mut Self { + pub fn path(&mut self, value: String) -> &mut Self { self.path = Some(value); self } diff --git a/src/datadogV2/model/model_spans_metric_create_attributes.rs b/src/datadogV2/model/model_spans_metric_create_attributes.rs index 97f848879..c448bca6a 100644 --- a/src/datadogV2/model/model_spans_metric_create_attributes.rs +++ b/src/datadogV2/model/model_spans_metric_create_attributes.rs @@ -30,12 +30,12 @@ impl SpansMetricCreateAttributes { } } - pub fn with_filter(&mut self, value: crate::datadogV2::model::SpansMetricFilter) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV2::model::SpansMetricFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_group_by( + pub fn group_by( &mut self, value: Vec, ) -> &mut Self { diff --git a/src/datadogV2/model/model_spans_metric_filter.rs b/src/datadogV2/model/model_spans_metric_filter.rs index 7cbbc4789..807b4b4df 100644 --- a/src/datadogV2/model/model_spans_metric_filter.rs +++ b/src/datadogV2/model/model_spans_metric_filter.rs @@ -18,11 +18,12 @@ impl SpansMetricFilter { SpansMetricFilter { query: None } } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } } + impl Default for SpansMetricFilter { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_metric_group_by.rs b/src/datadogV2/model/model_spans_metric_group_by.rs index 8cccc6cbd..ed90ac53e 100644 --- a/src/datadogV2/model/model_spans_metric_group_by.rs +++ b/src/datadogV2/model/model_spans_metric_group_by.rs @@ -24,7 +24,7 @@ impl SpansMetricGroupBy { } } - pub fn with_tag_name(&mut self, value: String) -> &mut Self { + pub fn tag_name(&mut self, value: String) -> &mut Self { self.tag_name = Some(value); self } diff --git a/src/datadogV2/model/model_spans_metric_response.rs b/src/datadogV2/model/model_spans_metric_response.rs index 810bb5bba..8cc84b09a 100644 --- a/src/datadogV2/model/model_spans_metric_response.rs +++ b/src/datadogV2/model/model_spans_metric_response.rs @@ -18,14 +18,12 @@ impl SpansMetricResponse { SpansMetricResponse { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::SpansMetricResponseData, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::SpansMetricResponseData) -> &mut Self { self.data = Some(value); self } } + impl Default for SpansMetricResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_metric_response_attributes.rs b/src/datadogV2/model/model_spans_metric_response_attributes.rs index 58d0b55c0..1e65d851c 100644 --- a/src/datadogV2/model/model_spans_metric_response_attributes.rs +++ b/src/datadogV2/model/model_spans_metric_response_attributes.rs @@ -28,7 +28,7 @@ impl SpansMetricResponseAttributes { } } - pub fn with_compute( + pub fn compute( &mut self, value: crate::datadogV2::model::SpansMetricResponseCompute, ) -> &mut Self { @@ -36,7 +36,7 @@ impl SpansMetricResponseAttributes { self } - pub fn with_filter( + pub fn filter( &mut self, value: crate::datadogV2::model::SpansMetricResponseFilter, ) -> &mut Self { @@ -44,7 +44,7 @@ impl SpansMetricResponseAttributes { self } - pub fn with_group_by( + pub fn group_by( &mut self, value: Vec, ) -> &mut Self { @@ -52,6 +52,7 @@ impl SpansMetricResponseAttributes { self } } + impl Default for SpansMetricResponseAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_metric_response_compute.rs b/src/datadogV2/model/model_spans_metric_response_compute.rs index 984f91661..735101f64 100644 --- a/src/datadogV2/model/model_spans_metric_response_compute.rs +++ b/src/datadogV2/model/model_spans_metric_response_compute.rs @@ -29,7 +29,7 @@ impl SpansMetricResponseCompute { } } - pub fn with_aggregation_type( + pub fn aggregation_type( &mut self, value: crate::datadogV2::model::SpansMetricComputeAggregationType, ) -> &mut Self { @@ -37,16 +37,17 @@ impl SpansMetricResponseCompute { self } - pub fn with_include_percentiles(&mut self, value: bool) -> &mut Self { + pub fn include_percentiles(&mut self, value: bool) -> &mut Self { self.include_percentiles = Some(value); self } - pub fn with_path(&mut self, value: String) -> &mut Self { + pub fn path(&mut self, value: String) -> &mut Self { self.path = Some(value); self } } + impl Default for SpansMetricResponseCompute { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_metric_response_data.rs b/src/datadogV2/model/model_spans_metric_response_data.rs index 9af56645e..d70f5f3bc 100644 --- a/src/datadogV2/model/model_spans_metric_response_data.rs +++ b/src/datadogV2/model/model_spans_metric_response_data.rs @@ -28,7 +28,7 @@ impl SpansMetricResponseData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::SpansMetricResponseAttributes, ) -> &mut Self { @@ -36,16 +36,17 @@ impl SpansMetricResponseData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::SpansMetricType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::SpansMetricType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for SpansMetricResponseData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_metric_response_filter.rs b/src/datadogV2/model/model_spans_metric_response_filter.rs index 8b13258c9..8438c9d44 100644 --- a/src/datadogV2/model/model_spans_metric_response_filter.rs +++ b/src/datadogV2/model/model_spans_metric_response_filter.rs @@ -18,11 +18,12 @@ impl SpansMetricResponseFilter { SpansMetricResponseFilter { query: None } } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } } + impl Default for SpansMetricResponseFilter { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_metric_response_group_by.rs b/src/datadogV2/model/model_spans_metric_response_group_by.rs index 2d8a95ec6..938543675 100644 --- a/src/datadogV2/model/model_spans_metric_response_group_by.rs +++ b/src/datadogV2/model/model_spans_metric_response_group_by.rs @@ -24,16 +24,17 @@ impl SpansMetricResponseGroupBy { } } - pub fn with_path(&mut self, value: String) -> &mut Self { + pub fn path(&mut self, value: String) -> &mut Self { self.path = Some(value); self } - pub fn with_tag_name(&mut self, value: String) -> &mut Self { + pub fn tag_name(&mut self, value: String) -> &mut Self { self.tag_name = Some(value); self } } + impl Default for SpansMetricResponseGroupBy { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_metric_update_attributes.rs b/src/datadogV2/model/model_spans_metric_update_attributes.rs index 09469a001..483aa855e 100644 --- a/src/datadogV2/model/model_spans_metric_update_attributes.rs +++ b/src/datadogV2/model/model_spans_metric_update_attributes.rs @@ -28,7 +28,7 @@ impl SpansMetricUpdateAttributes { } } - pub fn with_compute( + pub fn compute( &mut self, value: crate::datadogV2::model::SpansMetricUpdateCompute, ) -> &mut Self { @@ -36,12 +36,12 @@ impl SpansMetricUpdateAttributes { self } - pub fn with_filter(&mut self, value: crate::datadogV2::model::SpansMetricFilter) -> &mut Self { + pub fn filter(&mut self, value: crate::datadogV2::model::SpansMetricFilter) -> &mut Self { self.filter = Some(value); self } - pub fn with_group_by( + pub fn group_by( &mut self, value: Vec, ) -> &mut Self { @@ -49,6 +49,7 @@ impl SpansMetricUpdateAttributes { self } } + impl Default for SpansMetricUpdateAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_metric_update_compute.rs b/src/datadogV2/model/model_spans_metric_update_compute.rs index d554e0584..38d92ed47 100644 --- a/src/datadogV2/model/model_spans_metric_update_compute.rs +++ b/src/datadogV2/model/model_spans_metric_update_compute.rs @@ -21,11 +21,12 @@ impl SpansMetricUpdateCompute { } } - pub fn with_include_percentiles(&mut self, value: bool) -> &mut Self { + pub fn include_percentiles(&mut self, value: bool) -> &mut Self { self.include_percentiles = Some(value); self } } + impl Default for SpansMetricUpdateCompute { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_metrics_response.rs b/src/datadogV2/model/model_spans_metrics_response.rs index 40080c32b..b1b08a19a 100644 --- a/src/datadogV2/model/model_spans_metrics_response.rs +++ b/src/datadogV2/model/model_spans_metrics_response.rs @@ -18,7 +18,7 @@ impl SpansMetricsResponse { SpansMetricsResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl SpansMetricsResponse { self } } + impl Default for SpansMetricsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_query_filter.rs b/src/datadogV2/model/model_spans_query_filter.rs index c7a30942e..5a189ec2a 100644 --- a/src/datadogV2/model/model_spans_query_filter.rs +++ b/src/datadogV2/model/model_spans_query_filter.rs @@ -28,21 +28,22 @@ impl SpansQueryFilter { } } - pub fn with_from(&mut self, value: String) -> &mut Self { + pub fn from(&mut self, value: String) -> &mut Self { self.from = Some(value); self } - pub fn with_query(&mut self, value: String) -> &mut Self { + pub fn query(&mut self, value: String) -> &mut Self { self.query = Some(value); self } - pub fn with_to(&mut self, value: String) -> &mut Self { + pub fn to(&mut self, value: String) -> &mut Self { self.to = Some(value); self } } + impl Default for SpansQueryFilter { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_query_options.rs b/src/datadogV2/model/model_spans_query_options.rs index 3bcf7530d..fccceeb76 100644 --- a/src/datadogV2/model/model_spans_query_options.rs +++ b/src/datadogV2/model/model_spans_query_options.rs @@ -25,16 +25,17 @@ impl SpansQueryOptions { } } - pub fn with_time_offset(&mut self, value: i64) -> &mut Self { + pub fn time_offset(&mut self, value: i64) -> &mut Self { self.time_offset = Some(value); self } - pub fn with_timezone(&mut self, value: String) -> &mut Self { + pub fn timezone(&mut self, value: String) -> &mut Self { self.timezone = Some(value); self } } + impl Default for SpansQueryOptions { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_response_metadata_page.rs b/src/datadogV2/model/model_spans_response_metadata_page.rs index 7d58de1ef..300208959 100644 --- a/src/datadogV2/model/model_spans_response_metadata_page.rs +++ b/src/datadogV2/model/model_spans_response_metadata_page.rs @@ -19,11 +19,12 @@ impl SpansResponseMetadataPage { SpansResponseMetadataPage { after: None } } - pub fn with_after(&mut self, value: String) -> &mut Self { + pub fn after(&mut self, value: String) -> &mut Self { self.after = Some(value); self } } + impl Default for SpansResponseMetadataPage { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_spans_warning.rs b/src/datadogV2/model/model_spans_warning.rs index e3ce23220..8d4751b8f 100644 --- a/src/datadogV2/model/model_spans_warning.rs +++ b/src/datadogV2/model/model_spans_warning.rs @@ -28,21 +28,22 @@ impl SpansWarning { } } - pub fn with_code(&mut self, value: String) -> &mut Self { + pub fn code(&mut self, value: String) -> &mut Self { self.code = Some(value); self } - pub fn with_detail(&mut self, value: String) -> &mut Self { + pub fn detail(&mut self, value: String) -> &mut Self { self.detail = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } } + impl Default for SpansWarning { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_team.rs b/src/datadogV2/model/model_team.rs index 8177ad558..7bb9207b3 100644 --- a/src/datadogV2/model/model_team.rs +++ b/src/datadogV2/model/model_team.rs @@ -36,7 +36,7 @@ impl Team { } } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::TeamRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_team_attributes.rs b/src/datadogV2/model/model_team_attributes.rs index 0ddec19b4..9788d4441 100644 --- a/src/datadogV2/model/model_team_attributes.rs +++ b/src/datadogV2/model/model_team_attributes.rs @@ -72,52 +72,52 @@ impl TeamAttributes { } } - pub fn with_avatar(&mut self, value: Option) -> &mut Self { + pub fn avatar(&mut self, value: Option) -> &mut Self { self.avatar = Some(value); self } - pub fn with_banner(&mut self, value: Option) -> &mut Self { + pub fn banner(&mut self, value: Option) -> &mut Self { self.banner = Some(value); self } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_description(&mut self, value: Option) -> &mut Self { + pub fn description(&mut self, value: Option) -> &mut Self { self.description = Some(value); self } - pub fn with_hidden_modules(&mut self, value: Vec) -> &mut Self { + pub fn hidden_modules(&mut self, value: Vec) -> &mut Self { self.hidden_modules = Some(value); self } - pub fn with_link_count(&mut self, value: i32) -> &mut Self { + pub fn link_count(&mut self, value: i32) -> &mut Self { self.link_count = Some(value); self } - pub fn with_modified_at(&mut self, value: String) -> &mut Self { + pub fn modified_at(&mut self, value: String) -> &mut Self { self.modified_at = Some(value); self } - pub fn with_summary(&mut self, value: Option) -> &mut Self { + pub fn summary(&mut self, value: Option) -> &mut Self { self.summary = Some(value); self } - pub fn with_user_count(&mut self, value: i32) -> &mut Self { + pub fn user_count(&mut self, value: i32) -> &mut Self { self.user_count = Some(value); self } - pub fn with_visible_modules(&mut self, value: Vec) -> &mut Self { + pub fn visible_modules(&mut self, value: Vec) -> &mut Self { self.visible_modules = Some(value); self } diff --git a/src/datadogV2/model/model_team_create.rs b/src/datadogV2/model/model_team_create.rs index 6840fcf01..beb6e439d 100644 --- a/src/datadogV2/model/model_team_create.rs +++ b/src/datadogV2/model/model_team_create.rs @@ -31,7 +31,7 @@ impl TeamCreate { } } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::TeamCreateRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_team_create_attributes.rs b/src/datadogV2/model/model_team_create_attributes.rs index 561fa0c31..93c3dedda 100644 --- a/src/datadogV2/model/model_team_create_attributes.rs +++ b/src/datadogV2/model/model_team_create_attributes.rs @@ -44,27 +44,27 @@ impl TeamCreateAttributes { } } - pub fn with_avatar(&mut self, value: Option) -> &mut Self { + pub fn avatar(&mut self, value: Option) -> &mut Self { self.avatar = Some(value); self } - pub fn with_banner(&mut self, value: Option) -> &mut Self { + pub fn banner(&mut self, value: Option) -> &mut Self { self.banner = Some(value); self } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_hidden_modules(&mut self, value: Vec) -> &mut Self { + pub fn hidden_modules(&mut self, value: Vec) -> &mut Self { self.hidden_modules = Some(value); self } - pub fn with_visible_modules(&mut self, value: Vec) -> &mut Self { + pub fn visible_modules(&mut self, value: Vec) -> &mut Self { self.visible_modules = Some(value); self } diff --git a/src/datadogV2/model/model_team_create_relationships.rs b/src/datadogV2/model/model_team_create_relationships.rs index 44dc94d0f..4314202fb 100644 --- a/src/datadogV2/model/model_team_create_relationships.rs +++ b/src/datadogV2/model/model_team_create_relationships.rs @@ -18,11 +18,12 @@ impl TeamCreateRelationships { TeamCreateRelationships { users: None } } - pub fn with_users(&mut self, value: crate::datadogV2::model::RelationshipToUsers) -> &mut Self { + pub fn users(&mut self, value: crate::datadogV2::model::RelationshipToUsers) -> &mut Self { self.users = Some(value); self } } + impl Default for TeamCreateRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_team_included.rs b/src/datadogV2/model/model_team_included.rs index 49572b11d..a39d9c31a 100644 --- a/src/datadogV2/model/model_team_included.rs +++ b/src/datadogV2/model/model_team_included.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum TeamIncluded { - User(crate::datadogV2::model::User), - TeamLink(crate::datadogV2::model::TeamLink), - UserTeamPermission(crate::datadogV2::model::UserTeamPermission), + User(Box), + TeamLink(Box), + UserTeamPermission(Box), } diff --git a/src/datadogV2/model/model_team_link_attributes.rs b/src/datadogV2/model/model_team_link_attributes.rs index 08f53ea92..92b85d66f 100644 --- a/src/datadogV2/model/model_team_link_attributes.rs +++ b/src/datadogV2/model/model_team_link_attributes.rs @@ -32,12 +32,12 @@ impl TeamLinkAttributes { } } - pub fn with_position(&mut self, value: i32) -> &mut Self { + pub fn position(&mut self, value: i32) -> &mut Self { self.position = Some(value); self } - pub fn with_team_id(&mut self, value: String) -> &mut Self { + pub fn team_id(&mut self, value: String) -> &mut Self { self.team_id = Some(value); self } diff --git a/src/datadogV2/model/model_team_link_response.rs b/src/datadogV2/model/model_team_link_response.rs index 20a3833d1..58903b7c0 100644 --- a/src/datadogV2/model/model_team_link_response.rs +++ b/src/datadogV2/model/model_team_link_response.rs @@ -18,11 +18,12 @@ impl TeamLinkResponse { TeamLinkResponse { data: None } } - pub fn with_data(&mut self, value: crate::datadogV2::model::TeamLink) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::TeamLink) -> &mut Self { self.data = Some(value); self } } + impl Default for TeamLinkResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_team_links_response.rs b/src/datadogV2/model/model_team_links_response.rs index 85047c351..cab8b0469 100644 --- a/src/datadogV2/model/model_team_links_response.rs +++ b/src/datadogV2/model/model_team_links_response.rs @@ -18,11 +18,12 @@ impl TeamLinksResponse { TeamLinksResponse { data: None } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } } + impl Default for TeamLinksResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_team_permission_setting.rs b/src/datadogV2/model/model_team_permission_setting.rs index 37d0c1cd0..04f8e05f4 100644 --- a/src/datadogV2/model/model_team_permission_setting.rs +++ b/src/datadogV2/model/model_team_permission_setting.rs @@ -31,7 +31,7 @@ impl TeamPermissionSetting { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::TeamPermissionSettingAttributes, ) -> &mut Self { diff --git a/src/datadogV2/model/model_team_permission_setting_attributes.rs b/src/datadogV2/model/model_team_permission_setting_attributes.rs index 3c57575ea..39ad25a21 100644 --- a/src/datadogV2/model/model_team_permission_setting_attributes.rs +++ b/src/datadogV2/model/model_team_permission_setting_attributes.rs @@ -36,7 +36,7 @@ impl TeamPermissionSettingAttributes { } } - pub fn with_action( + pub fn action( &mut self, value: crate::datadogV2::model::TeamPermissionSettingSerializerAction, ) -> &mut Self { @@ -44,12 +44,12 @@ impl TeamPermissionSettingAttributes { self } - pub fn with_editable(&mut self, value: bool) -> &mut Self { + pub fn editable(&mut self, value: bool) -> &mut Self { self.editable = Some(value); self } - pub fn with_options( + pub fn options( &mut self, value: Vec, ) -> &mut Self { @@ -57,12 +57,12 @@ impl TeamPermissionSettingAttributes { self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } - pub fn with_value( + pub fn value( &mut self, value: crate::datadogV2::model::TeamPermissionSettingValue, ) -> &mut Self { @@ -70,6 +70,7 @@ impl TeamPermissionSettingAttributes { self } } + impl Default for TeamPermissionSettingAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_team_permission_setting_response.rs b/src/datadogV2/model/model_team_permission_setting_response.rs index 62543506d..17df4f7b8 100644 --- a/src/datadogV2/model/model_team_permission_setting_response.rs +++ b/src/datadogV2/model/model_team_permission_setting_response.rs @@ -18,14 +18,12 @@ impl TeamPermissionSettingResponse { TeamPermissionSettingResponse { data: None } } - pub fn with_data( - &mut self, - value: crate::datadogV2::model::TeamPermissionSetting, - ) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::TeamPermissionSetting) -> &mut Self { self.data = Some(value); self } } + impl Default for TeamPermissionSettingResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_team_permission_setting_update.rs b/src/datadogV2/model/model_team_permission_setting_update.rs index 6ed4fcfd6..1ee13807a 100644 --- a/src/datadogV2/model/model_team_permission_setting_update.rs +++ b/src/datadogV2/model/model_team_permission_setting_update.rs @@ -26,7 +26,7 @@ impl TeamPermissionSettingUpdate { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::TeamPermissionSettingUpdateAttributes, ) -> &mut Self { diff --git a/src/datadogV2/model/model_team_permission_setting_update_attributes.rs b/src/datadogV2/model/model_team_permission_setting_update_attributes.rs index 4117cb7f5..af5024ce9 100644 --- a/src/datadogV2/model/model_team_permission_setting_update_attributes.rs +++ b/src/datadogV2/model/model_team_permission_setting_update_attributes.rs @@ -18,7 +18,7 @@ impl TeamPermissionSettingUpdateAttributes { TeamPermissionSettingUpdateAttributes { value: None } } - pub fn with_value( + pub fn value( &mut self, value: crate::datadogV2::model::TeamPermissionSettingValue, ) -> &mut Self { @@ -26,6 +26,7 @@ impl TeamPermissionSettingUpdateAttributes { self } } + impl Default for TeamPermissionSettingUpdateAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_team_permission_settings_response.rs b/src/datadogV2/model/model_team_permission_settings_response.rs index 72902b48f..ba7015ec7 100644 --- a/src/datadogV2/model/model_team_permission_settings_response.rs +++ b/src/datadogV2/model/model_team_permission_settings_response.rs @@ -18,7 +18,7 @@ impl TeamPermissionSettingsResponse { TeamPermissionSettingsResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl TeamPermissionSettingsResponse { self } } + impl Default for TeamPermissionSettingsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_team_relationships.rs b/src/datadogV2/model/model_team_relationships.rs index 70a7e78da..c8c92a3d4 100644 --- a/src/datadogV2/model/model_team_relationships.rs +++ b/src/datadogV2/model/model_team_relationships.rs @@ -24,7 +24,7 @@ impl TeamRelationships { } } - pub fn with_team_links( + pub fn team_links( &mut self, value: crate::datadogV2::model::RelationshipToTeamLinks, ) -> &mut Self { @@ -32,7 +32,7 @@ impl TeamRelationships { self } - pub fn with_user_team_permissions( + pub fn user_team_permissions( &mut self, value: crate::datadogV2::model::RelationshipToUserTeamPermission, ) -> &mut Self { @@ -40,6 +40,7 @@ impl TeamRelationships { self } } + impl Default for TeamRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_team_relationships_links.rs b/src/datadogV2/model/model_team_relationships_links.rs index f343360e9..9fef62b8d 100644 --- a/src/datadogV2/model/model_team_relationships_links.rs +++ b/src/datadogV2/model/model_team_relationships_links.rs @@ -18,11 +18,12 @@ impl TeamRelationshipsLinks { TeamRelationshipsLinks { related: None } } - pub fn with_related(&mut self, value: String) -> &mut Self { + pub fn related(&mut self, value: String) -> &mut Self { self.related = Some(value); self } } + impl Default for TeamRelationshipsLinks { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_team_response.rs b/src/datadogV2/model/model_team_response.rs index 1c5cf2166..2db73c4d3 100644 --- a/src/datadogV2/model/model_team_response.rs +++ b/src/datadogV2/model/model_team_response.rs @@ -18,11 +18,12 @@ impl TeamResponse { TeamResponse { data: None } } - pub fn with_data(&mut self, value: crate::datadogV2::model::Team) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::Team) -> &mut Self { self.data = Some(value); self } } + impl Default for TeamResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_team_update.rs b/src/datadogV2/model/model_team_update.rs index 837474955..1abb6a37e 100644 --- a/src/datadogV2/model/model_team_update.rs +++ b/src/datadogV2/model/model_team_update.rs @@ -31,7 +31,7 @@ impl TeamUpdate { } } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::TeamUpdateRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_team_update_attributes.rs b/src/datadogV2/model/model_team_update_attributes.rs index f987649fc..547a081c1 100644 --- a/src/datadogV2/model/model_team_update_attributes.rs +++ b/src/datadogV2/model/model_team_update_attributes.rs @@ -48,32 +48,32 @@ impl TeamUpdateAttributes { } } - pub fn with_avatar(&mut self, value: Option) -> &mut Self { + pub fn avatar(&mut self, value: Option) -> &mut Self { self.avatar = Some(value); self } - pub fn with_banner(&mut self, value: Option) -> &mut Self { + pub fn banner(&mut self, value: Option) -> &mut Self { self.banner = Some(value); self } - pub fn with_color(&mut self, value: i32) -> &mut Self { + pub fn color(&mut self, value: i32) -> &mut Self { self.color = Some(value); self } - pub fn with_description(&mut self, value: String) -> &mut Self { + pub fn description(&mut self, value: String) -> &mut Self { self.description = Some(value); self } - pub fn with_hidden_modules(&mut self, value: Vec) -> &mut Self { + pub fn hidden_modules(&mut self, value: Vec) -> &mut Self { self.hidden_modules = Some(value); self } - pub fn with_visible_modules(&mut self, value: Vec) -> &mut Self { + pub fn visible_modules(&mut self, value: Vec) -> &mut Self { self.visible_modules = Some(value); self } diff --git a/src/datadogV2/model/model_team_update_relationships.rs b/src/datadogV2/model/model_team_update_relationships.rs index 79f0ecd07..17870ab92 100644 --- a/src/datadogV2/model/model_team_update_relationships.rs +++ b/src/datadogV2/model/model_team_update_relationships.rs @@ -18,7 +18,7 @@ impl TeamUpdateRelationships { TeamUpdateRelationships { team_links: None } } - pub fn with_team_links( + pub fn team_links( &mut self, value: crate::datadogV2::model::RelationshipToTeamLinks, ) -> &mut Self { @@ -26,6 +26,7 @@ impl TeamUpdateRelationships { self } } + impl Default for TeamUpdateRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_teams_response.rs b/src/datadogV2/model/model_teams_response.rs index 3d572d595..f074f6e1e 100644 --- a/src/datadogV2/model/model_teams_response.rs +++ b/src/datadogV2/model/model_teams_response.rs @@ -32,29 +32,27 @@ impl TeamsResponse { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_included( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn included(&mut self, value: Vec) -> &mut Self { self.included = Some(value); self } - pub fn with_links(&mut self, value: crate::datadogV2::model::TeamsResponseLinks) -> &mut Self { + pub fn links(&mut self, value: crate::datadogV2::model::TeamsResponseLinks) -> &mut Self { self.links = Some(value); self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::TeamsResponseMeta) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::TeamsResponseMeta) -> &mut Self { self.meta = Some(value); self } } + impl Default for TeamsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_teams_response_links.rs b/src/datadogV2/model/model_teams_response_links.rs index 3cabbb69b..981af71f6 100644 --- a/src/datadogV2/model/model_teams_response_links.rs +++ b/src/datadogV2/model/model_teams_response_links.rs @@ -36,31 +36,32 @@ impl TeamsResponseLinks { } } - pub fn with_first(&mut self, value: String) -> &mut Self { + pub fn first(&mut self, value: String) -> &mut Self { self.first = Some(value); self } - pub fn with_last(&mut self, value: Option) -> &mut Self { + pub fn last(&mut self, value: Option) -> &mut Self { self.last = Some(value); self } - pub fn with_next(&mut self, value: String) -> &mut Self { + pub fn next(&mut self, value: String) -> &mut Self { self.next = Some(value); self } - pub fn with_prev(&mut self, value: Option) -> &mut Self { + pub fn prev(&mut self, value: Option) -> &mut Self { self.prev = Some(value); self } - pub fn with_self_(&mut self, value: String) -> &mut Self { + pub fn self_(&mut self, value: String) -> &mut Self { self.self_ = Some(value); self } } + impl Default for TeamsResponseLinks { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_teams_response_meta.rs b/src/datadogV2/model/model_teams_response_meta.rs index f34fd09b4..89fe4cdc3 100644 --- a/src/datadogV2/model/model_teams_response_meta.rs +++ b/src/datadogV2/model/model_teams_response_meta.rs @@ -18,7 +18,7 @@ impl TeamsResponseMeta { TeamsResponseMeta { pagination: None } } - pub fn with_pagination( + pub fn pagination( &mut self, value: crate::datadogV2::model::TeamsResponseMetaPagination, ) -> &mut Self { @@ -26,6 +26,7 @@ impl TeamsResponseMeta { self } } + impl Default for TeamsResponseMeta { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_teams_response_meta_pagination.rs b/src/datadogV2/model/model_teams_response_meta_pagination.rs index a31a6226b..27da1a421 100644 --- a/src/datadogV2/model/model_teams_response_meta_pagination.rs +++ b/src/datadogV2/model/model_teams_response_meta_pagination.rs @@ -48,46 +48,47 @@ impl TeamsResponseMetaPagination { } } - pub fn with_first_offset(&mut self, value: i64) -> &mut Self { + pub fn first_offset(&mut self, value: i64) -> &mut Self { self.first_offset = Some(value); self } - pub fn with_last_offset(&mut self, value: i64) -> &mut Self { + pub fn last_offset(&mut self, value: i64) -> &mut Self { self.last_offset = Some(value); self } - pub fn with_limit(&mut self, value: i64) -> &mut Self { + pub fn limit(&mut self, value: i64) -> &mut Self { self.limit = Some(value); self } - pub fn with_next_offset(&mut self, value: i64) -> &mut Self { + pub fn next_offset(&mut self, value: i64) -> &mut Self { self.next_offset = Some(value); self } - pub fn with_offset(&mut self, value: i64) -> &mut Self { + pub fn offset(&mut self, value: i64) -> &mut Self { self.offset = Some(value); self } - pub fn with_prev_offset(&mut self, value: i64) -> &mut Self { + pub fn prev_offset(&mut self, value: i64) -> &mut Self { self.prev_offset = Some(value); self } - pub fn with_total(&mut self, value: i64) -> &mut Self { + pub fn total(&mut self, value: i64) -> &mut Self { self.total = Some(value); self } - pub fn with_type_(&mut self, value: String) -> &mut Self { + pub fn type_(&mut self, value: String) -> &mut Self { self.type_ = Some(value); self } } + impl Default for TeamsResponseMetaPagination { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_timeseries_formula_query_response.rs b/src/datadogV2/model/model_timeseries_formula_query_response.rs index eab5f7cb0..6f13d145e 100644 --- a/src/datadogV2/model/model_timeseries_formula_query_response.rs +++ b/src/datadogV2/model/model_timeseries_formula_query_response.rs @@ -24,16 +24,17 @@ impl TimeseriesFormulaQueryResponse { } } - pub fn with_data(&mut self, value: crate::datadogV2::model::TimeseriesResponse) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::TimeseriesResponse) -> &mut Self { self.data = Some(value); self } - pub fn with_errors(&mut self, value: String) -> &mut Self { + pub fn errors(&mut self, value: String) -> &mut Self { self.errors = Some(value); self } } + impl Default for TimeseriesFormulaQueryResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_timeseries_formula_request_attributes.rs b/src/datadogV2/model/model_timeseries_formula_request_attributes.rs index 7c3e4b56b..e06201602 100644 --- a/src/datadogV2/model/model_timeseries_formula_request_attributes.rs +++ b/src/datadogV2/model/model_timeseries_formula_request_attributes.rs @@ -43,15 +43,12 @@ impl TimeseriesFormulaRequestAttributes { } } - pub fn with_formulas( - &mut self, - value: Vec, - ) -> &mut Self { + pub fn formulas(&mut self, value: Vec) -> &mut Self { self.formulas = Some(value); self } - pub fn with_interval(&mut self, value: i64) -> &mut Self { + pub fn interval(&mut self, value: i64) -> &mut Self { self.interval = Some(value); self } diff --git a/src/datadogV2/model/model_timeseries_query.rs b/src/datadogV2/model/model_timeseries_query.rs index 98358c8d2..02c434941 100644 --- a/src/datadogV2/model/model_timeseries_query.rs +++ b/src/datadogV2/model/model_timeseries_query.rs @@ -7,6 +7,6 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum TimeseriesQuery { - MetricsTimeseriesQuery(crate::datadogV2::model::MetricsTimeseriesQuery), - EventsTimeseriesQuery(crate::datadogV2::model::EventsTimeseriesQuery), + MetricsTimeseriesQuery(Box), + EventsTimeseriesQuery(Box), } diff --git a/src/datadogV2/model/model_timeseries_response.rs b/src/datadogV2/model/model_timeseries_response.rs index d09bef4f9..8eb2cff46 100644 --- a/src/datadogV2/model/model_timeseries_response.rs +++ b/src/datadogV2/model/model_timeseries_response.rs @@ -24,7 +24,7 @@ impl TimeseriesResponse { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::TimeseriesResponseAttributes, ) -> &mut Self { @@ -32,7 +32,7 @@ impl TimeseriesResponse { self } - pub fn with_type_( + pub fn type_( &mut self, value: crate::datadogV2::model::TimeseriesFormulaResponseType, ) -> &mut Self { @@ -40,6 +40,7 @@ impl TimeseriesResponse { self } } + impl Default for TimeseriesResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_timeseries_response_attributes.rs b/src/datadogV2/model/model_timeseries_response_attributes.rs index 9023fadad..d063d96ad 100644 --- a/src/datadogV2/model/model_timeseries_response_attributes.rs +++ b/src/datadogV2/model/model_timeseries_response_attributes.rs @@ -28,7 +28,7 @@ impl TimeseriesResponseAttributes { } } - pub fn with_series( + pub fn series( &mut self, value: Vec, ) -> &mut Self { @@ -36,16 +36,17 @@ impl TimeseriesResponseAttributes { self } - pub fn with_times(&mut self, value: Vec) -> &mut Self { + pub fn times(&mut self, value: Vec) -> &mut Self { self.times = Some(value); self } - pub fn with_values(&mut self, value: Vec>>) -> &mut Self { + pub fn values(&mut self, value: Vec>>) -> &mut Self { self.values = Some(value); self } } + impl Default for TimeseriesResponseAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_timeseries_response_series.rs b/src/datadogV2/model/model_timeseries_response_series.rs index 3bff9a21d..b21de343e 100644 --- a/src/datadogV2/model/model_timeseries_response_series.rs +++ b/src/datadogV2/model/model_timeseries_response_series.rs @@ -31,21 +31,22 @@ impl TimeseriesResponseSeries { } } - pub fn with_group_tags(&mut self, value: Vec) -> &mut Self { + pub fn group_tags(&mut self, value: Vec) -> &mut Self { self.group_tags = Some(value); self } - pub fn with_query_index(&mut self, value: i32) -> &mut Self { + pub fn query_index(&mut self, value: i32) -> &mut Self { self.query_index = Some(value); self } - pub fn with_unit(&mut self, value: Vec>) -> &mut Self { + pub fn unit(&mut self, value: Vec>) -> &mut Self { self.unit = Some(value); self } } + impl Default for TimeseriesResponseSeries { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_unit.rs b/src/datadogV2/model/model_unit.rs index 965e9bc10..1f3bde050 100644 --- a/src/datadogV2/model/model_unit.rs +++ b/src/datadogV2/model/model_unit.rs @@ -36,31 +36,32 @@ impl Unit { } } - pub fn with_family(&mut self, value: String) -> &mut Self { + pub fn family(&mut self, value: String) -> &mut Self { self.family = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_plural(&mut self, value: String) -> &mut Self { + pub fn plural(&mut self, value: String) -> &mut Self { self.plural = Some(value); self } - pub fn with_scale_factor(&mut self, value: f64) -> &mut Self { + pub fn scale_factor(&mut self, value: f64) -> &mut Self { self.scale_factor = Some(value); self } - pub fn with_short_name(&mut self, value: String) -> &mut Self { + pub fn short_name(&mut self, value: String) -> &mut Self { self.short_name = Some(value); self } } + impl Default for Unit { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_usage_application_security_monitoring_response.rs b/src/datadogV2/model/model_usage_application_security_monitoring_response.rs index fad7bfa47..98ccbf3c0 100644 --- a/src/datadogV2/model/model_usage_application_security_monitoring_response.rs +++ b/src/datadogV2/model/model_usage_application_security_monitoring_response.rs @@ -18,11 +18,12 @@ impl UsageApplicationSecurityMonitoringResponse { UsageApplicationSecurityMonitoringResponse { data: None } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } } + impl Default for UsageApplicationSecurityMonitoringResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_usage_attributes_object.rs b/src/datadogV2/model/model_usage_attributes_object.rs index 01eae651c..2e76b8ec8 100644 --- a/src/datadogV2/model/model_usage_attributes_object.rs +++ b/src/datadogV2/model/model_usage_attributes_object.rs @@ -40,27 +40,27 @@ impl UsageAttributesObject { } } - pub fn with_org_name(&mut self, value: String) -> &mut Self { + pub fn org_name(&mut self, value: String) -> &mut Self { self.org_name = Some(value); self } - pub fn with_product_family(&mut self, value: String) -> &mut Self { + pub fn product_family(&mut self, value: String) -> &mut Self { self.product_family = Some(value); self } - pub fn with_public_id(&mut self, value: String) -> &mut Self { + pub fn public_id(&mut self, value: String) -> &mut Self { self.public_id = Some(value); self } - pub fn with_region(&mut self, value: String) -> &mut Self { + pub fn region(&mut self, value: String) -> &mut Self { self.region = Some(value); self } - pub fn with_timeseries( + pub fn timeseries( &mut self, value: Vec, ) -> &mut Self { @@ -68,14 +68,12 @@ impl UsageAttributesObject { self } - pub fn with_usage_type( - &mut self, - value: crate::datadogV2::model::HourlyUsageType, - ) -> &mut Self { + pub fn usage_type(&mut self, value: crate::datadogV2::model::HourlyUsageType) -> &mut Self { self.usage_type = Some(value); self } } + impl Default for UsageAttributesObject { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_usage_data_object.rs b/src/datadogV2/model/model_usage_data_object.rs index 58ab784a0..5e1ffd532 100644 --- a/src/datadogV2/model/model_usage_data_object.rs +++ b/src/datadogV2/model/model_usage_data_object.rs @@ -28,7 +28,7 @@ impl UsageDataObject { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::UsageAttributesObject, ) -> &mut Self { @@ -36,16 +36,17 @@ impl UsageDataObject { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::UsageTimeSeriesType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::UsageTimeSeriesType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for UsageDataObject { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_usage_lambda_traced_invocations_response.rs b/src/datadogV2/model/model_usage_lambda_traced_invocations_response.rs index 571660b8c..d86c127a9 100644 --- a/src/datadogV2/model/model_usage_lambda_traced_invocations_response.rs +++ b/src/datadogV2/model/model_usage_lambda_traced_invocations_response.rs @@ -18,11 +18,12 @@ impl UsageLambdaTracedInvocationsResponse { UsageLambdaTracedInvocationsResponse { data: None } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } } + impl Default for UsageLambdaTracedInvocationsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_usage_observability_pipelines_response.rs b/src/datadogV2/model/model_usage_observability_pipelines_response.rs index f28ab4ea2..999e627e0 100644 --- a/src/datadogV2/model/model_usage_observability_pipelines_response.rs +++ b/src/datadogV2/model/model_usage_observability_pipelines_response.rs @@ -18,11 +18,12 @@ impl UsageObservabilityPipelinesResponse { UsageObservabilityPipelinesResponse { data: None } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } } + impl Default for UsageObservabilityPipelinesResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_usage_time_series_object.rs b/src/datadogV2/model/model_usage_time_series_object.rs index a87b4f708..0b7a60b47 100644 --- a/src/datadogV2/model/model_usage_time_series_object.rs +++ b/src/datadogV2/model/model_usage_time_series_object.rs @@ -24,16 +24,17 @@ impl UsageTimeSeriesObject { } } - pub fn with_timestamp(&mut self, value: String) -> &mut Self { + pub fn timestamp(&mut self, value: String) -> &mut Self { self.timestamp = Some(value); self } - pub fn with_value(&mut self, value: Option) -> &mut Self { + pub fn value(&mut self, value: Option) -> &mut Self { self.value = Some(value); self } } + impl Default for UsageTimeSeriesObject { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_user.rs b/src/datadogV2/model/model_user.rs index 5a3c1d918..1713a08f6 100644 --- a/src/datadogV2/model/model_user.rs +++ b/src/datadogV2/model/model_user.rs @@ -32,17 +32,17 @@ impl User { } } - pub fn with_attributes(&mut self, value: crate::datadogV2::model::UserAttributes) -> &mut Self { + pub fn attributes(&mut self, value: crate::datadogV2::model::UserAttributes) -> &mut Self { self.attributes = Some(value); self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::UserResponseRelationships, ) -> &mut Self { @@ -50,11 +50,12 @@ impl User { self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::UsersType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::UsersType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for User { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_user_attributes.rs b/src/datadogV2/model/model_user_attributes.rs index e733c665e..d37280a87 100644 --- a/src/datadogV2/model/model_user_attributes.rs +++ b/src/datadogV2/model/model_user_attributes.rs @@ -60,61 +60,62 @@ impl UserAttributes { } } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_disabled(&mut self, value: bool) -> &mut Self { + pub fn disabled(&mut self, value: bool) -> &mut Self { self.disabled = Some(value); self } - pub fn with_email(&mut self, value: String) -> &mut Self { + pub fn email(&mut self, value: String) -> &mut Self { self.email = Some(value); self } - pub fn with_handle(&mut self, value: String) -> &mut Self { + pub fn handle(&mut self, value: String) -> &mut Self { self.handle = Some(value); self } - pub fn with_icon(&mut self, value: String) -> &mut Self { + pub fn icon(&mut self, value: String) -> &mut Self { self.icon = Some(value); self } - pub fn with_modified_at(&mut self, value: String) -> &mut Self { + pub fn modified_at(&mut self, value: String) -> &mut Self { self.modified_at = Some(value); self } - pub fn with_name(&mut self, value: Option) -> &mut Self { + pub fn name(&mut self, value: Option) -> &mut Self { self.name = Some(value); self } - pub fn with_service_account(&mut self, value: bool) -> &mut Self { + pub fn service_account(&mut self, value: bool) -> &mut Self { self.service_account = Some(value); self } - pub fn with_status(&mut self, value: String) -> &mut Self { + pub fn status(&mut self, value: String) -> &mut Self { self.status = Some(value); self } - pub fn with_title(&mut self, value: Option) -> &mut Self { + pub fn title(&mut self, value: Option) -> &mut Self { self.title = Some(value); self } - pub fn with_verified(&mut self, value: bool) -> &mut Self { + pub fn verified(&mut self, value: bool) -> &mut Self { self.verified = Some(value); self } } + impl Default for UserAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_user_create_attributes.rs b/src/datadogV2/model/model_user_create_attributes.rs index e90213405..7d0dc4c0b 100644 --- a/src/datadogV2/model/model_user_create_attributes.rs +++ b/src/datadogV2/model/model_user_create_attributes.rs @@ -28,12 +28,12 @@ impl UserCreateAttributes { } } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } - pub fn with_title(&mut self, value: String) -> &mut Self { + pub fn title(&mut self, value: String) -> &mut Self { self.title = Some(value); self } diff --git a/src/datadogV2/model/model_user_create_data.rs b/src/datadogV2/model/model_user_create_data.rs index 33100c525..8e122292f 100644 --- a/src/datadogV2/model/model_user_create_data.rs +++ b/src/datadogV2/model/model_user_create_data.rs @@ -31,7 +31,7 @@ impl UserCreateData { } } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::UserRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_user_invitation_data_attributes.rs b/src/datadogV2/model/model_user_invitation_data_attributes.rs index 39948cf9c..dd00e87c9 100644 --- a/src/datadogV2/model/model_user_invitation_data_attributes.rs +++ b/src/datadogV2/model/model_user_invitation_data_attributes.rs @@ -32,26 +32,27 @@ impl UserInvitationDataAttributes { } } - pub fn with_created_at(&mut self, value: String) -> &mut Self { + pub fn created_at(&mut self, value: String) -> &mut Self { self.created_at = Some(value); self } - pub fn with_expires_at(&mut self, value: String) -> &mut Self { + pub fn expires_at(&mut self, value: String) -> &mut Self { self.expires_at = Some(value); self } - pub fn with_invite_type(&mut self, value: String) -> &mut Self { + pub fn invite_type(&mut self, value: String) -> &mut Self { self.invite_type = Some(value); self } - pub fn with_uuid(&mut self, value: String) -> &mut Self { + pub fn uuid(&mut self, value: String) -> &mut Self { self.uuid = Some(value); self } } + impl Default for UserInvitationDataAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_user_invitation_response.rs b/src/datadogV2/model/model_user_invitation_response.rs index 70d8e9b51..3eba172ea 100644 --- a/src/datadogV2/model/model_user_invitation_response.rs +++ b/src/datadogV2/model/model_user_invitation_response.rs @@ -18,7 +18,7 @@ impl UserInvitationResponse { UserInvitationResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: crate::datadogV2::model::UserInvitationResponseData, ) -> &mut Self { @@ -26,6 +26,7 @@ impl UserInvitationResponse { self } } + impl Default for UserInvitationResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_user_invitation_response_data.rs b/src/datadogV2/model/model_user_invitation_response_data.rs index 80ab331a3..0c8383aa8 100644 --- a/src/datadogV2/model/model_user_invitation_response_data.rs +++ b/src/datadogV2/model/model_user_invitation_response_data.rs @@ -32,7 +32,7 @@ impl UserInvitationResponseData { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::UserInvitationDataAttributes, ) -> &mut Self { @@ -40,12 +40,12 @@ impl UserInvitationResponseData { self } - pub fn with_id(&mut self, value: String) -> &mut Self { + pub fn id(&mut self, value: String) -> &mut Self { self.id = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::UserInvitationRelationships, ) -> &mut Self { @@ -53,11 +53,12 @@ impl UserInvitationResponseData { self } - pub fn with_type_(&mut self, value: crate::datadogV2::model::UserInvitationsType) -> &mut Self { + pub fn type_(&mut self, value: crate::datadogV2::model::UserInvitationsType) -> &mut Self { self.type_ = Some(value); self } } + impl Default for UserInvitationResponseData { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_user_invitations_response.rs b/src/datadogV2/model/model_user_invitations_response.rs index 32bcdfd0c..01ee984db 100644 --- a/src/datadogV2/model/model_user_invitations_response.rs +++ b/src/datadogV2/model/model_user_invitations_response.rs @@ -18,7 +18,7 @@ impl UserInvitationsResponse { UserInvitationsResponse { data: None } } - pub fn with_data( + pub fn data( &mut self, value: Vec, ) -> &mut Self { @@ -26,6 +26,7 @@ impl UserInvitationsResponse { self } } + impl Default for UserInvitationsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_user_relationships.rs b/src/datadogV2/model/model_user_relationships.rs index eac5fcbf3..91132a370 100644 --- a/src/datadogV2/model/model_user_relationships.rs +++ b/src/datadogV2/model/model_user_relationships.rs @@ -18,11 +18,12 @@ impl UserRelationships { UserRelationships { roles: None } } - pub fn with_roles(&mut self, value: crate::datadogV2::model::RelationshipToRoles) -> &mut Self { + pub fn roles(&mut self, value: crate::datadogV2::model::RelationshipToRoles) -> &mut Self { self.roles = Some(value); self } } + impl Default for UserRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_user_response.rs b/src/datadogV2/model/model_user_response.rs index 2ea3106b8..74cfd001d 100644 --- a/src/datadogV2/model/model_user_response.rs +++ b/src/datadogV2/model/model_user_response.rs @@ -24,12 +24,12 @@ impl UserResponse { } } - pub fn with_data(&mut self, value: crate::datadogV2::model::User) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::User) -> &mut Self { self.data = Some(value); self } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { @@ -37,6 +37,7 @@ impl UserResponse { self } } + impl Default for UserResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_user_response_included_item.rs b/src/datadogV2/model/model_user_response_included_item.rs index 98f1787a6..7255d2c22 100644 --- a/src/datadogV2/model/model_user_response_included_item.rs +++ b/src/datadogV2/model/model_user_response_included_item.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum UserResponseIncludedItem { - Organization(crate::datadogV2::model::Organization), - Permission(crate::datadogV2::model::Permission), - Role(crate::datadogV2::model::Role), + Organization(Box), + Permission(Box), + Role(Box), } diff --git a/src/datadogV2/model/model_user_response_relationships.rs b/src/datadogV2/model/model_user_response_relationships.rs index c38591bc5..b0e70eb93 100644 --- a/src/datadogV2/model/model_user_response_relationships.rs +++ b/src/datadogV2/model/model_user_response_relationships.rs @@ -32,15 +32,12 @@ impl UserResponseRelationships { } } - pub fn with_org( - &mut self, - value: crate::datadogV2::model::RelationshipToOrganization, - ) -> &mut Self { + pub fn org(&mut self, value: crate::datadogV2::model::RelationshipToOrganization) -> &mut Self { self.org = Some(value); self } - pub fn with_other_orgs( + pub fn other_orgs( &mut self, value: crate::datadogV2::model::RelationshipToOrganizations, ) -> &mut Self { @@ -48,7 +45,7 @@ impl UserResponseRelationships { self } - pub fn with_other_users( + pub fn other_users( &mut self, value: crate::datadogV2::model::RelationshipToUsers, ) -> &mut Self { @@ -56,11 +53,12 @@ impl UserResponseRelationships { self } - pub fn with_roles(&mut self, value: crate::datadogV2::model::RelationshipToRoles) -> &mut Self { + pub fn roles(&mut self, value: crate::datadogV2::model::RelationshipToRoles) -> &mut Self { self.roles = Some(value); self } } + impl Default for UserResponseRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_user_team.rs b/src/datadogV2/model/model_user_team.rs index d476af4d2..8f501532f 100644 --- a/src/datadogV2/model/model_user_team.rs +++ b/src/datadogV2/model/model_user_team.rs @@ -32,15 +32,12 @@ impl UserTeam { } } - pub fn with_attributes( - &mut self, - value: crate::datadogV2::model::UserTeamAttributes, - ) -> &mut Self { + pub fn attributes(&mut self, value: crate::datadogV2::model::UserTeamAttributes) -> &mut Self { self.attributes = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::UserTeamRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_user_team_attributes.rs b/src/datadogV2/model/model_user_team_attributes.rs index 71b96dc66..029e4430d 100644 --- a/src/datadogV2/model/model_user_team_attributes.rs +++ b/src/datadogV2/model/model_user_team_attributes.rs @@ -37,21 +37,22 @@ impl UserTeamAttributes { } } - pub fn with_provisioned_by(&mut self, value: Option) -> &mut Self { + pub fn provisioned_by(&mut self, value: Option) -> &mut Self { self.provisioned_by = Some(value); self } - pub fn with_provisioned_by_id(&mut self, value: Option) -> &mut Self { + pub fn provisioned_by_id(&mut self, value: Option) -> &mut Self { self.provisioned_by_id = Some(value); self } - pub fn with_role(&mut self, value: Option) -> &mut Self { + pub fn role(&mut self, value: Option) -> &mut Self { self.role = Some(value); self } } + impl Default for UserTeamAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_user_team_create.rs b/src/datadogV2/model/model_user_team_create.rs index 399f3bd28..d3ecb7aa2 100644 --- a/src/datadogV2/model/model_user_team_create.rs +++ b/src/datadogV2/model/model_user_team_create.rs @@ -28,15 +28,12 @@ impl UserTeamCreate { } } - pub fn with_attributes( - &mut self, - value: crate::datadogV2::model::UserTeamAttributes, - ) -> &mut Self { + pub fn attributes(&mut self, value: crate::datadogV2::model::UserTeamAttributes) -> &mut Self { self.attributes = Some(value); self } - pub fn with_relationships( + pub fn relationships( &mut self, value: crate::datadogV2::model::UserTeamRelationships, ) -> &mut Self { diff --git a/src/datadogV2/model/model_user_team_permission.rs b/src/datadogV2/model/model_user_team_permission.rs index 0fefa236f..3447044e2 100644 --- a/src/datadogV2/model/model_user_team_permission.rs +++ b/src/datadogV2/model/model_user_team_permission.rs @@ -31,7 +31,7 @@ impl UserTeamPermission { } } - pub fn with_attributes( + pub fn attributes( &mut self, value: crate::datadogV2::model::UserTeamPermissionAttributes, ) -> &mut Self { diff --git a/src/datadogV2/model/model_user_team_permission_attributes.rs b/src/datadogV2/model/model_user_team_permission_attributes.rs index 75da4943a..7efd64e34 100644 --- a/src/datadogV2/model/model_user_team_permission_attributes.rs +++ b/src/datadogV2/model/model_user_team_permission_attributes.rs @@ -18,7 +18,7 @@ impl UserTeamPermissionAttributes { UserTeamPermissionAttributes { permissions: None } } - pub fn with_permissions( + pub fn permissions( &mut self, value: std::collections::BTreeMap, ) -> &mut Self { @@ -26,6 +26,7 @@ impl UserTeamPermissionAttributes { self } } + impl Default for UserTeamPermissionAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_user_team_relationships.rs b/src/datadogV2/model/model_user_team_relationships.rs index eeb609417..7bd342f98 100644 --- a/src/datadogV2/model/model_user_team_relationships.rs +++ b/src/datadogV2/model/model_user_team_relationships.rs @@ -24,7 +24,7 @@ impl UserTeamRelationships { } } - pub fn with_team( + pub fn team( &mut self, value: crate::datadogV2::model::RelationshipToUserTeamTeam, ) -> &mut Self { @@ -32,7 +32,7 @@ impl UserTeamRelationships { self } - pub fn with_user( + pub fn user( &mut self, value: crate::datadogV2::model::RelationshipToUserTeamUser, ) -> &mut Self { @@ -40,6 +40,7 @@ impl UserTeamRelationships { self } } + impl Default for UserTeamRelationships { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_user_team_response.rs b/src/datadogV2/model/model_user_team_response.rs index 8f6de0004..0c9fdbd20 100644 --- a/src/datadogV2/model/model_user_team_response.rs +++ b/src/datadogV2/model/model_user_team_response.rs @@ -18,11 +18,12 @@ impl UserTeamResponse { UserTeamResponse { data: None } } - pub fn with_data(&mut self, value: crate::datadogV2::model::UserTeam) -> &mut Self { + pub fn data(&mut self, value: crate::datadogV2::model::UserTeam) -> &mut Self { self.data = Some(value); self } } + impl Default for UserTeamResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_user_team_update.rs b/src/datadogV2/model/model_user_team_update.rs index e9ee986cd..e51045ed8 100644 --- a/src/datadogV2/model/model_user_team_update.rs +++ b/src/datadogV2/model/model_user_team_update.rs @@ -24,10 +24,7 @@ impl UserTeamUpdate { } } - pub fn with_attributes( - &mut self, - value: crate::datadogV2::model::UserTeamAttributes, - ) -> &mut Self { + pub fn attributes(&mut self, value: crate::datadogV2::model::UserTeamAttributes) -> &mut Self { self.attributes = Some(value); self } diff --git a/src/datadogV2/model/model_user_teams_response.rs b/src/datadogV2/model/model_user_teams_response.rs index 46eaeff2d..5eab1a35c 100644 --- a/src/datadogV2/model/model_user_teams_response.rs +++ b/src/datadogV2/model/model_user_teams_response.rs @@ -28,21 +28,22 @@ impl UserTeamsResponse { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_links(&mut self, value: crate::datadogV2::model::TeamsResponseLinks) -> &mut Self { + pub fn links(&mut self, value: crate::datadogV2::model::TeamsResponseLinks) -> &mut Self { self.links = Some(value); self } - pub fn with_meta(&mut self, value: crate::datadogV2::model::TeamsResponseMeta) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::TeamsResponseMeta) -> &mut Self { self.meta = Some(value); self } } + impl Default for UserTeamsResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_user_update_attributes.rs b/src/datadogV2/model/model_user_update_attributes.rs index 86032f4ea..a035abe7f 100644 --- a/src/datadogV2/model/model_user_update_attributes.rs +++ b/src/datadogV2/model/model_user_update_attributes.rs @@ -28,21 +28,22 @@ impl UserUpdateAttributes { } } - pub fn with_disabled(&mut self, value: bool) -> &mut Self { + pub fn disabled(&mut self, value: bool) -> &mut Self { self.disabled = Some(value); self } - pub fn with_email(&mut self, value: String) -> &mut Self { + pub fn email(&mut self, value: String) -> &mut Self { self.email = Some(value); self } - pub fn with_name(&mut self, value: String) -> &mut Self { + pub fn name(&mut self, value: String) -> &mut Self { self.name = Some(value); self } } + impl Default for UserUpdateAttributes { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_users_response.rs b/src/datadogV2/model/model_users_response.rs index 2be93225c..ba703bc5a 100644 --- a/src/datadogV2/model/model_users_response.rs +++ b/src/datadogV2/model/model_users_response.rs @@ -28,12 +28,12 @@ impl UsersResponse { } } - pub fn with_data(&mut self, value: Vec) -> &mut Self { + pub fn data(&mut self, value: Vec) -> &mut Self { self.data = Some(value); self } - pub fn with_included( + pub fn included( &mut self, value: Vec, ) -> &mut Self { @@ -41,14 +41,12 @@ impl UsersResponse { self } - pub fn with_meta( - &mut self, - value: crate::datadogV2::model::ResponseMetaAttributes, - ) -> &mut Self { + pub fn meta(&mut self, value: crate::datadogV2::model::ResponseMetaAttributes) -> &mut Self { self.meta = Some(value); self } } + impl Default for UsersResponse { fn default() -> Self { Self::new() From 818a4bbaf5dc9080aa7bd4f13ca6984f74648615 Mon Sep 17 00:00:00 2001 From: Kevin Zou Date: Fri, 2 Feb 2024 14:15:32 -0500 Subject: [PATCH 3/5] fix bdd test runner --- .../generator/templates/function_mappings.j2 | 17 +- tests/scenarios/function_mappings.rs | 3105 +++++++---------- 2 files changed, 1269 insertions(+), 1853 deletions(-) diff --git a/.generator/src/generator/templates/function_mappings.j2 b/.generator/src/generator/templates/function_mappings.j2 index e18ae7797..fed604e0a 100644 --- a/.generator/src/generator/templates/function_mappings.j2 +++ b/.generator/src/generator/templates/function_mappings.j2 @@ -53,7 +53,6 @@ pub fn collect_function_calls(world: &mut DatadogWorld) { {%- set operationParams = operation|parameters|list %} fn test_{{version}}_{{ operation['operationId'] | snake_case }}(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world.api_instances.{{version}}_{{ apiName }}.as_ref().expect("api instance not found"); - {%- if operationParams|length > 0 -%} {%- for parameter in operationParams %} {%- set schema = parameter[1] | parameter_schema %} {%- if parameter[1].required %} @@ -74,15 +73,17 @@ fn test_{{version}}_{{ operation['operationId'] | snake_case }}(world: &mut Data }; {%- endif %} {%- endfor %} - let params = datadog{{ version.upper() }}::api::{{ apiName }}::{{ operation['operationId'] }}Params { - {%- for param in operationParams %} - {{ param[0] | variable_name }}, - {%- endfor %} + + {%- for parameter in operationParams if parameter[1].required != true %} + {%- if loop.first %} + let params = datadog{{ version.upper() }}::api::{{ apiName }}::{{ operation['operationId'] }}OptionalParams { + {%- endif %} + {{ parameter[0] | variable_name }}, + {%- if loop.last %} }; - let response = match block_on(api.{{ operation['operationId'] | snake_case}}_with_http_info(params)) { - {%- else %} - let response = match block_on(api.{{ operation['operationId'] | snake_case}}_with_http_info()) { {%- endif %} + {%- endfor %} + let response = match block_on(api.{{ operation['operationId'] | snake_case}}_with_http_info({% for name, parameter in operation|parameters if parameter.required == true %}{{name|variable_name}}{% if loop.last %}{% if operation|has_optional %}, {% endif %}{% else %}, {% endif %}{% endfor %}{% if operation|has_optional %}params{% endif %})) { Ok(response) => response, Err(error) => { return match error { diff --git a/tests/scenarios/function_mappings.rs b/tests/scenarios/function_mappings.rs index dd7feb24b..c54ac56f7 100644 --- a/tests/scenarios/function_mappings.rs +++ b/tests/scenarios/function_mappings.rs @@ -2677,8 +2677,7 @@ fn test_v1_create_api_key(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -2703,8 +2702,7 @@ fn test_v1_delete_api_key(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -2729,8 +2727,7 @@ fn test_v1_get_api_key(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -2756,8 +2753,7 @@ fn test_v1_update_api_key(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -2806,8 +2802,7 @@ fn test_v1_create_application_key(world: &mut DatadogWorld, _parameters: &HashMa .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_key_management::CreateApplicationKeyParams { body }; - let response = match block_on(api.create_application_key_with_http_info(params)) { + let response = match block_on(api.create_application_key_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -2832,8 +2827,7 @@ fn test_v1_delete_application_key(world: &mut DatadogWorld, _parameters: &HashMa .as_ref() .expect("api instance not found"); let key = serde_json::from_value(_parameters.get("key").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_key_management::DeleteApplicationKeyParams { key }; - let response = match block_on(api.delete_application_key_with_http_info(params)) { + let response = match block_on(api.delete_application_key_with_http_info(key)) { Ok(response) => response, Err(error) => { return match error { @@ -2858,8 +2852,7 @@ fn test_v1_get_application_key(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -2885,8 +2878,7 @@ fn test_v1_update_application_key(world: &mut DatadogWorld, _parameters: &HashMa .expect("api instance not found"); let key = serde_json::from_value(_parameters.get("key").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_key_management::UpdateApplicationKeyParams { key, body }; - let response = match block_on(api.update_application_key_with_http_info(params)) { + let response = match block_on(api.update_application_key_with_http_info(key, body)) { Ok(response) => response, Err(error) => { return match error { @@ -2911,8 +2903,7 @@ fn test_v1_submit_service_check(world: &mut DatadogWorld, _parameters: &HashMap< .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_service_checks::SubmitServiceCheckParams { body }; - let response = match block_on(api.submit_service_check_with_http_info(params)) { + let response = match block_on(api.submit_service_check_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -2959,7 +2950,7 @@ fn test_v1_get_daily_custom_reports( } else { None }; - let params = datadogV1::api::api_usage_metering::GetDailyCustomReportsParams { + let params = datadogV1::api::api_usage_metering::GetDailyCustomReportsOptionalParams { page_size, page_number, sort_dir, @@ -2993,9 +2984,8 @@ fn test_v1_get_specified_daily_custom_reports( .as_ref() .expect("api instance not found"); let report_id = serde_json::from_value(_parameters.get("report_id").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_usage_metering::GetSpecifiedDailyCustomReportsParams { report_id }; - let response = match block_on(api.get_specified_daily_custom_reports_with_http_info(params)) { + let response = match block_on(api.get_specified_daily_custom_reports_with_http_info(report_id)) + { Ok(response) => response, Err(error) => { return match error { @@ -3042,7 +3032,7 @@ fn test_v1_get_monthly_custom_reports( } else { None }; - let params = datadogV1::api::api_usage_metering::GetMonthlyCustomReportsParams { + let params = datadogV1::api::api_usage_metering::GetMonthlyCustomReportsOptionalParams { page_size, page_number, sort_dir, @@ -3076,22 +3066,21 @@ fn test_v1_get_specified_monthly_custom_reports( .as_ref() .expect("api instance not found"); let report_id = serde_json::from_value(_parameters.get("report_id").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_usage_metering::GetSpecifiedMonthlyCustomReportsParams { report_id }; - let response = match block_on(api.get_specified_monthly_custom_reports_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.get_specified_monthly_custom_reports_with_http_info(report_id)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -3108,9 +3097,8 @@ fn test_v1_get_usage_analyzed_logs(world: &mut DatadogWorld, _parameters: &HashM } else { None }; - let params = - datadogV1::api::api_usage_metering::GetUsageAnalyzedLogsParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_analyzed_logs_with_http_info(params)) { + let params = datadogV1::api::api_usage_metering::GetUsageAnalyzedLogsOptionalParams { end_hr }; + let response = match block_on(api.get_usage_analyzed_logs_with_http_info(start_hr, params)) { Ok(response) => response, Err(error) => { return match error { @@ -3167,9 +3155,7 @@ fn test_v1_get_usage_attribution(world: &mut DatadogWorld, _parameters: &HashMap } else { None }; - let params = datadogV1::api::api_usage_metering::GetUsageAttributionParams { - start_month, - fields, + let params = datadogV1::api::api_usage_metering::GetUsageAttributionOptionalParams { end_month, sort_direction, sort_name, @@ -3177,20 +3163,21 @@ fn test_v1_get_usage_attribution(world: &mut DatadogWorld, _parameters: &HashMap offset, limit, }; - let response = match block_on(api.get_usage_attribution_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.get_usage_attribution_with_http_info(start_month, fields, params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -3207,8 +3194,8 @@ fn test_v1_get_usage_audit_logs(world: &mut DatadogWorld, _parameters: &HashMap< } else { None }; - let params = datadogV1::api::api_usage_metering::GetUsageAuditLogsParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_audit_logs_with_http_info(params)) { + let params = datadogV1::api::api_usage_metering::GetUsageAuditLogsOptionalParams { end_hr }; + let response = match block_on(api.get_usage_audit_logs_with_http_info(start_hr, params)) { Ok(response) => response, Err(error) => { return match error { @@ -3238,8 +3225,8 @@ fn test_v1_get_usage_lambda(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -3271,7 +3258,8 @@ fn test_v1_get_usage_billable_summary( } else { None }; - let params = datadogV1::api::api_usage_metering::GetUsageBillableSummaryParams { month }; + let params = + datadogV1::api::api_usage_metering::GetUsageBillableSummaryOptionalParams { month }; let response = match block_on(api.get_usage_billable_summary_with_http_info(params)) { Ok(response) => response, Err(error) => { @@ -3302,8 +3290,8 @@ fn test_v1_get_usage_ci_app(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -3336,25 +3324,26 @@ fn test_v1_get_usage_cloud_security_posture_management( } else { None }; - let params = datadogV1::api::api_usage_metering::GetUsageCloudSecurityPostureManagementParams { - start_hr, - end_hr, - }; - let response = - match block_on(api.get_usage_cloud_security_posture_management_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); - } - } - _ => panic!("error parsing response: {}", error), - }; - } + let params = + datadogV1::api::api_usage_metering::GetUsageCloudSecurityPostureManagementOptionalParams { + end_hr, }; + let response = match block_on( + api.get_usage_cloud_security_posture_management_with_http_info(start_hr, params), + ) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } + } + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -3371,8 +3360,8 @@ fn test_v1_get_usage_cws(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -3402,8 +3391,8 @@ fn test_v1_get_usage_dbm(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -3433,8 +3422,8 @@ fn test_v1_get_usage_fargate(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -3464,8 +3453,8 @@ fn test_v1_get_usage_hosts(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -3515,15 +3504,15 @@ fn test_v1_get_hourly_usage_attribution( } else { None }; - let params = datadogV1::api::api_usage_metering::GetHourlyUsageAttributionParams { - start_hr, - usage_type, + let params = datadogV1::api::api_usage_metering::GetHourlyUsageAttributionOptionalParams { end_hr, next_record_id, tag_breakdown_keys, include_descendants, }; - let response = match block_on(api.get_hourly_usage_attribution_with_http_info(params)) { + let response = match block_on( + api.get_hourly_usage_attribution_with_http_info(start_hr, usage_type, params), + ) { Ok(response) => response, Err(error) => { return match error { @@ -3553,9 +3542,8 @@ fn test_v1_get_incident_management(world: &mut DatadogWorld, _parameters: &HashM } else { None }; - let params = - datadogV1::api::api_usage_metering::GetIncidentManagementParams { start_hr, end_hr }; - let response = match block_on(api.get_incident_management_with_http_info(params)) { + let params = datadogV1::api::api_usage_metering::GetIncidentManagementOptionalParams { end_hr }; + let response = match block_on(api.get_incident_management_with_http_info(start_hr, params)) { Ok(response) => response, Err(error) => { return match error { @@ -3585,9 +3573,8 @@ fn test_v1_get_usage_indexed_spans(world: &mut DatadogWorld, _parameters: &HashM } else { None }; - let params = - datadogV1::api::api_usage_metering::GetUsageIndexedSpansParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_indexed_spans_with_http_info(params)) { + let params = datadogV1::api::api_usage_metering::GetUsageIndexedSpansOptionalParams { end_hr }; + let response = match block_on(api.get_usage_indexed_spans_with_http_info(start_hr, params)) { Ok(response) => response, Err(error) => { return match error { @@ -3617,8 +3604,8 @@ fn test_v1_get_ingested_spans(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -3652,8 +3639,9 @@ fn test_v1_get_usage_internet_of_things( None }; let params = - datadogV1::api::api_usage_metering::GetUsageInternetOfThingsParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_internet_of_things_with_http_info(params)) { + datadogV1::api::api_usage_metering::GetUsageInternetOfThingsOptionalParams { end_hr }; + let response = match block_on(api.get_usage_internet_of_things_with_http_info(start_hr, params)) + { Ok(response) => response, Err(error) => { return match error { @@ -3683,8 +3671,8 @@ fn test_v1_get_usage_logs(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -3718,8 +3706,9 @@ fn test_v1_get_usage_logs_by_retention( None }; let params = - datadogV1::api::api_usage_metering::GetUsageLogsByRetentionParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_logs_by_retention_with_http_info(params)) { + datadogV1::api::api_usage_metering::GetUsageLogsByRetentionOptionalParams { end_hr }; + let response = match block_on(api.get_usage_logs_by_retention_with_http_info(start_hr, params)) + { Ok(response) => response, Err(error) => { return match error { @@ -3754,12 +3743,11 @@ fn test_v1_get_usage_logs_by_index(world: &mut DatadogWorld, _parameters: &HashM } else { None }; - let params = datadogV1::api::api_usage_metering::GetUsageLogsByIndexParams { - start_hr, + let params = datadogV1::api::api_usage_metering::GetUsageLogsByIndexOptionalParams { end_hr, index_name, }; - let response = match block_on(api.get_usage_logs_by_index_with_http_info(params)) { + let response = match block_on(api.get_usage_logs_by_index_with_http_info(start_hr, params)) { Ok(response) => response, Err(error) => { return match error { @@ -3819,9 +3807,7 @@ fn test_v1_get_monthly_usage_attribution( } else { None }; - let params = datadogV1::api::api_usage_metering::GetMonthlyUsageAttributionParams { - start_month, - fields, + let params = datadogV1::api::api_usage_metering::GetMonthlyUsageAttributionOptionalParams { end_month, sort_direction, sort_name, @@ -3829,7 +3815,11 @@ fn test_v1_get_monthly_usage_attribution( next_record_id, include_descendants, }; - let response = match block_on(api.get_monthly_usage_attribution_with_http_info(params)) { + let response = match block_on(api.get_monthly_usage_attribution_with_http_info( + start_month, + fields, + params, + )) { Ok(response) => response, Err(error) => { return match error { @@ -3859,9 +3849,8 @@ fn test_v1_get_usage_network_flows(world: &mut DatadogWorld, _parameters: &HashM } else { None }; - let params = - datadogV1::api::api_usage_metering::GetUsageNetworkFlowsParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_network_flows_with_http_info(params)) { + let params = datadogV1::api::api_usage_metering::GetUsageNetworkFlowsOptionalParams { end_hr }; + let response = match block_on(api.get_usage_network_flows_with_http_info(start_hr, params)) { Ok(response) => response, Err(error) => { return match error { @@ -3891,9 +3880,8 @@ fn test_v1_get_usage_network_hosts(world: &mut DatadogWorld, _parameters: &HashM } else { None }; - let params = - datadogV1::api::api_usage_metering::GetUsageNetworkHostsParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_network_hosts_with_http_info(params)) { + let params = datadogV1::api::api_usage_metering::GetUsageNetworkHostsOptionalParams { end_hr }; + let response = match block_on(api.get_usage_network_hosts_with_http_info(start_hr, params)) { Ok(response) => response, Err(error) => { return match error { @@ -3926,9 +3914,8 @@ fn test_v1_get_usage_online_archive( } else { None }; - let params = - datadogV1::api::api_usage_metering::GetUsageOnlineArchiveParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_online_archive_with_http_info(params)) { + let params = datadogV1::api::api_usage_metering::GetUsageOnlineArchiveOptionalParams { end_hr }; + let response = match block_on(api.get_usage_online_archive_with_http_info(start_hr, params)) { Ok(response) => response, Err(error) => { return match error { @@ -3958,8 +3945,8 @@ fn test_v1_get_usage_profiling(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -3989,8 +3976,8 @@ fn test_v1_get_usage_rum_units(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -4025,12 +4012,9 @@ fn test_v1_get_usage_rum_sessions(world: &mut DatadogWorld, _parameters: &HashMa } else { None }; - let params = datadogV1::api::api_usage_metering::GetUsageRumSessionsParams { - start_hr, - end_hr, - type_, - }; - let response = match block_on(api.get_usage_rum_sessions_with_http_info(params)) { + let params = + datadogV1::api::api_usage_metering::GetUsageRumSessionsOptionalParams { end_hr, type_ }; + let response = match block_on(api.get_usage_rum_sessions_with_http_info(start_hr, params)) { Ok(response) => response, Err(error) => { return match error { @@ -4060,8 +4044,8 @@ fn test_v1_get_usage_sds(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -4091,8 +4075,8 @@ fn test_v1_get_usage_snmp(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -4128,12 +4112,11 @@ fn test_v1_get_usage_summary(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -4163,8 +4146,8 @@ fn test_v1_get_usage_synthetics(world: &mut DatadogWorld, _parameters: &HashMap< } else { None }; - let params = datadogV1::api::api_usage_metering::GetUsageSyntheticsParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_synthetics_with_http_info(params)) { + let params = datadogV1::api::api_usage_metering::GetUsageSyntheticsOptionalParams { end_hr }; + let response = match block_on(api.get_usage_synthetics_with_http_info(start_hr, params)) { Ok(response) => response, Err(error) => { return match error { @@ -4197,9 +4180,8 @@ fn test_v1_get_usage_synthetics_api( } else { None }; - let params = - datadogV1::api::api_usage_metering::GetUsageSyntheticsAPIParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_synthetics_api_with_http_info(params)) { + let params = datadogV1::api::api_usage_metering::GetUsageSyntheticsAPIOptionalParams { end_hr }; + let response = match block_on(api.get_usage_synthetics_api_with_http_info(start_hr, params)) { Ok(response) => response, Err(error) => { return match error { @@ -4233,8 +4215,9 @@ fn test_v1_get_usage_synthetics_browser( None }; let params = - datadogV1::api::api_usage_metering::GetUsageSyntheticsBrowserParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_synthetics_browser_with_http_info(params)) { + datadogV1::api::api_usage_metering::GetUsageSyntheticsBrowserOptionalParams { end_hr }; + let response = match block_on(api.get_usage_synthetics_browser_with_http_info(start_hr, params)) + { Ok(response) => response, Err(error) => { return match error { @@ -4264,8 +4247,8 @@ fn test_v1_get_usage_timeseries(world: &mut DatadogWorld, _parameters: &HashMap< } else { None }; - let params = datadogV1::api::api_usage_metering::GetUsageTimeseriesParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_timeseries_with_http_info(params)) { + let params = datadogV1::api::api_usage_metering::GetUsageTimeseriesOptionalParams { end_hr }; + let response = match block_on(api.get_usage_timeseries_with_http_info(start_hr, params)) { Ok(response) => response, Err(error) => { return match error { @@ -4317,7 +4300,7 @@ fn test_v1_get_usage_top_avg_metrics( } else { None }; - let params = datadogV1::api::api_usage_metering::GetUsageTopAvgMetricsParams { + let params = datadogV1::api::api_usage_metering::GetUsageTopAvgMetricsOptionalParams { month, day, names, @@ -4349,8 +4332,7 @@ fn test_v1_delete_dashboards(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -4394,7 +4376,7 @@ fn test_v1_list_dashboards(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -4451,8 +4432,7 @@ fn test_v1_create_dashboard(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -4477,8 +4457,7 @@ fn test_v1_create_public_dashboard(world: &mut DatadogWorld, _parameters: &HashM .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_dashboards::CreatePublicDashboardParams { body }; - let response = match block_on(api.create_public_dashboard_with_http_info(params)) { + let response = match block_on(api.create_public_dashboard_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -4503,8 +4482,7 @@ fn test_v1_delete_public_dashboard(world: &mut DatadogWorld, _parameters: &HashM .as_ref() .expect("api instance not found"); let token = serde_json::from_value(_parameters.get("token").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_dashboards::DeletePublicDashboardParams { token }; - let response = match block_on(api.delete_public_dashboard_with_http_info(params)) { + let response = match block_on(api.delete_public_dashboard_with_http_info(token)) { Ok(response) => response, Err(error) => { return match error { @@ -4529,8 +4507,7 @@ fn test_v1_get_public_dashboard(world: &mut DatadogWorld, _parameters: &HashMap< .as_ref() .expect("api instance not found"); let token = serde_json::from_value(_parameters.get("token").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_dashboards::GetPublicDashboardParams { token }; - let response = match block_on(api.get_public_dashboard_with_http_info(params)) { + let response = match block_on(api.get_public_dashboard_with_http_info(token)) { Ok(response) => response, Err(error) => { return match error { @@ -4556,8 +4533,7 @@ fn test_v1_update_public_dashboard(world: &mut DatadogWorld, _parameters: &HashM .expect("api instance not found"); let token = serde_json::from_value(_parameters.get("token").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_dashboards::UpdatePublicDashboardParams { token, body }; - let response = match block_on(api.update_public_dashboard_with_http_info(params)) { + let response = match block_on(api.update_public_dashboard_with_http_info(token, body)) { Ok(response) => response, Err(error) => { return match error { @@ -4586,22 +4562,21 @@ fn test_v1_delete_public_dashboard_invitation( .expect("api instance not found"); let token = serde_json::from_value(_parameters.get("token").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_dashboards::DeletePublicDashboardInvitationParams { token, body }; - let response = match block_on(api.delete_public_dashboard_invitation_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.delete_public_dashboard_invitation_with_http_info(token, body)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -4626,25 +4601,25 @@ fn test_v1_get_public_dashboard_invitations( } else { None }; - let params = datadogV1::api::api_dashboards::GetPublicDashboardInvitationsParams { - token, + let params = datadogV1::api::api_dashboards::GetPublicDashboardInvitationsOptionalParams { page_size, page_number, }; - let response = match block_on(api.get_public_dashboard_invitations_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.get_public_dashboard_invitations_with_http_info(token, params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -4660,9 +4635,8 @@ fn test_v1_send_public_dashboard_invitation( .expect("api instance not found"); let token = serde_json::from_value(_parameters.get("token").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_dashboards::SendPublicDashboardInvitationParams { token, body }; - let response = match block_on(api.send_public_dashboard_invitation_with_http_info(params)) { + let response = match block_on(api.send_public_dashboard_invitation_with_http_info(token, body)) + { Ok(response) => response, Err(error) => { return match error { @@ -4688,8 +4662,7 @@ fn test_v1_delete_dashboard(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -4715,8 +4688,7 @@ fn test_v1_get_dashboard(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -4743,8 +4715,7 @@ fn test_v1_update_dashboard(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -4793,8 +4764,7 @@ fn test_v1_create_dashboard_list(world: &mut DatadogWorld, _parameters: &HashMap .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_dashboard_lists::CreateDashboardListParams { body }; - let response = match block_on(api.create_dashboard_list_with_http_info(params)) { + let response = match block_on(api.create_dashboard_list_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -4819,8 +4789,7 @@ fn test_v1_delete_dashboard_list(world: &mut DatadogWorld, _parameters: &HashMap .as_ref() .expect("api instance not found"); let list_id = serde_json::from_value(_parameters.get("list_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_dashboard_lists::DeleteDashboardListParams { list_id }; - let response = match block_on(api.delete_dashboard_list_with_http_info(params)) { + let response = match block_on(api.delete_dashboard_list_with_http_info(list_id)) { Ok(response) => response, Err(error) => { return match error { @@ -4845,8 +4814,7 @@ fn test_v1_get_dashboard_list(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -4872,8 +4840,7 @@ fn test_v1_update_dashboard_list(world: &mut DatadogWorld, _parameters: &HashMap .expect("api instance not found"); let list_id = serde_json::from_value(_parameters.get("list_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_dashboard_lists::UpdateDashboardListParams { list_id, body }; - let response = match block_on(api.update_dashboard_list_with_http_info(params)) { + let response = match block_on(api.update_dashboard_list_with_http_info(list_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -4906,11 +4873,9 @@ fn test_v1_submit_distribution_points( } else { None }; - let params = datadogV1::api::api_metrics::SubmitDistributionPointsParams { - body, - content_encoding, - }; - let response = match block_on(api.submit_distribution_points_with_http_info(params)) { + let params = + datadogV1::api::api_metrics::SubmitDistributionPointsOptionalParams { content_encoding }; + let response = match block_on(api.submit_distribution_points_with_http_info(body, params)) { Ok(response) => response, Err(error) => { return match error { @@ -4945,12 +4910,8 @@ fn test_v1_list_active_metrics(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -4976,8 +4937,7 @@ fn test_v1_get_metric_metadata(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -5004,8 +4964,7 @@ fn test_v1_update_metric_metadata(world: &mut DatadogWorld, _parameters: &HashMa let metric_name = serde_json::from_value(_parameters.get("metric_name").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_metrics::UpdateMetricMetadataParams { metric_name, body }; - let response = match block_on(api.update_metric_metadata_with_http_info(params)) { + let response = match block_on(api.update_metric_metadata_with_http_info(metric_name, body)) { Ok(response) => response, Err(error) => { return match error { @@ -5032,8 +4991,7 @@ fn test_v1_query_metrics(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -5058,8 +5016,7 @@ fn test_v1_list_metrics(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -5089,11 +5046,8 @@ fn test_v1_submit_metrics(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -5127,7 +5081,7 @@ fn test_v1_list_downtimes(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -5185,8 +5138,7 @@ fn test_v1_cancel_downtimes_by_scope( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_downtimes::CancelDowntimesByScopeParams { body }; - let response = match block_on(api.cancel_downtimes_by_scope_with_http_info(params)) { + let response = match block_on(api.cancel_downtimes_by_scope_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -5212,8 +5164,7 @@ fn test_v1_cancel_downtime(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -5239,8 +5190,7 @@ fn test_v1_get_downtime(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -5267,8 +5217,7 @@ fn test_v1_update_downtime(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -5294,8 +5243,7 @@ fn test_v1_list_monitor_downtimes(world: &mut DatadogWorld, _parameters: &HashMa .expect("api instance not found"); let monitor_id = serde_json::from_value(_parameters.get("monitor_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_downtimes::ListMonitorDowntimesParams { monitor_id }; - let response = match block_on(api.list_monitor_downtimes_with_http_info(params)) { + let response = match block_on(api.list_monitor_downtimes_with_http_info(monitor_id)) { Ok(response) => response, Err(error) => { return match error { @@ -5351,9 +5299,7 @@ fn test_v1_list_events(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -5386,8 +5332,7 @@ fn test_v1_create_event(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -5412,8 +5357,7 @@ fn test_v1_get_event(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -5469,9 +5413,7 @@ fn test_v1_get_graph_snapshot(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -5505,8 +5447,7 @@ fn test_v1_mute_host(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -5531,8 +5472,7 @@ fn test_v1_unmute_host(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -5597,7 +5537,7 @@ fn test_v1_list_hosts(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { @@ -5662,8 +5602,7 @@ fn test_v1_delete_aws_account(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -5702,7 +5641,7 @@ fn test_v1_list_aws_accounts(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -5773,13 +5711,12 @@ fn test_v1_update_aws_account(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -5834,8 +5771,7 @@ fn test_v1_delete_aws_event_bridge_source( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_integration::DeleteAWSEventBridgeSourceParams { body }; - let response = match block_on(api.delete_aws_event_bridge_source_with_http_info(params)) { + let response = match block_on(api.delete_aws_event_bridge_source_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -5890,8 +5826,7 @@ fn test_v1_create_aws_event_bridge_source( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_integration::CreateAWSEventBridgeSourceParams { body }; - let response = match block_on(api.create_aws_event_bridge_source_with_http_info(params)) { + let response = match block_on(api.create_aws_event_bridge_source_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -5916,8 +5851,7 @@ fn test_v1_delete_aws_tag_filter(world: &mut DatadogWorld, _parameters: &HashMap .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_integration::DeleteAWSTagFilterParams { body }; - let response = match block_on(api.delete_aws_tag_filter_with_http_info(params)) { + let response = match block_on(api.delete_aws_tag_filter_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -5943,8 +5877,7 @@ fn test_v1_list_aws_tag_filters(world: &mut DatadogWorld, _parameters: &HashMap< .expect("api instance not found"); let account_id = serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_integration::ListAWSTagFiltersParams { account_id }; - let response = match block_on(api.list_aws_tag_filters_with_http_info(params)) { + let response = match block_on(api.list_aws_tag_filters_with_http_info(account_id)) { Ok(response) => response, Err(error) => { return match error { @@ -5969,8 +5902,7 @@ fn test_v1_create_aws_tag_filter(world: &mut DatadogWorld, _parameters: &HashMap .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_integration::CreateAWSTagFilterParams { body }; - let response = match block_on(api.create_aws_tag_filter_with_http_info(params)) { + let response = match block_on(api.create_aws_tag_filter_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -5998,8 +5930,7 @@ fn test_v1_create_new_aws_external_id( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_integration::CreateNewAWSExternalIDParams { body }; - let response = match block_on(api.create_new_aws_external_id_with_http_info(params)) { + let response = match block_on(api.create_new_aws_external_id_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -6024,8 +5955,7 @@ fn test_v1_delete_aws_lambda_arn(world: &mut DatadogWorld, _parameters: &HashMap .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_logs_integration::DeleteAWSLambdaARNParams { body }; - let response = match block_on(api.delete_aws_lambda_arn_with_http_info(params)) { + let response = match block_on(api.delete_aws_lambda_arn_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -6077,8 +6007,7 @@ fn test_v1_create_aws_lambda_arn(world: &mut DatadogWorld, _parameters: &HashMap .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_logs_integration::CreateAWSLambdaARNParams { body }; - let response = match block_on(api.create_aws_lambda_arn_with_http_info(params)) { + let response = match block_on(api.create_aws_lambda_arn_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -6106,8 +6035,7 @@ fn test_v1_check_aws_logs_lambda_async( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_logs_integration::CheckAWSLogsLambdaAsyncParams { body }; - let response = match block_on(api.check_aws_logs_lambda_async_with_http_info(params)) { + let response = match block_on(api.check_aws_logs_lambda_async_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -6156,8 +6084,7 @@ fn test_v1_enable_aws_log_services(world: &mut DatadogWorld, _parameters: &HashM .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_logs_integration::EnableAWSLogServicesParams { body }; - let response = match block_on(api.enable_aws_log_services_with_http_info(params)) { + let response = match block_on(api.enable_aws_log_services_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -6185,8 +6112,7 @@ fn test_v1_check_aws_logs_services_async( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_logs_integration::CheckAWSLogsServicesAsyncParams { body }; - let response = match block_on(api.check_aws_logs_services_async_with_http_info(params)) { + let response = match block_on(api.check_aws_logs_services_async_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -6214,8 +6140,7 @@ fn test_v1_delete_azure_integration( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_azure_integration::DeleteAzureIntegrationParams { body }; - let response = match block_on(api.delete_azure_integration_with_http_info(params)) { + let response = match block_on(api.delete_azure_integration_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -6267,8 +6192,7 @@ fn test_v1_create_azure_integration( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_azure_integration::CreateAzureIntegrationParams { body }; - let response = match block_on(api.create_azure_integration_with_http_info(params)) { + let response = match block_on(api.create_azure_integration_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -6296,8 +6220,7 @@ fn test_v1_update_azure_integration( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_azure_integration::UpdateAzureIntegrationParams { body }; - let response = match block_on(api.update_azure_integration_with_http_info(params)) { + let response = match block_on(api.update_azure_integration_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -6325,8 +6248,7 @@ fn test_v1_update_azure_host_filters( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_azure_integration::UpdateAzureHostFiltersParams { body }; - let response = match block_on(api.update_azure_host_filters_with_http_info(params)) { + let response = match block_on(api.update_azure_host_filters_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -6351,8 +6273,7 @@ fn test_v1_delete_gcp_integration(world: &mut DatadogWorld, _parameters: &HashMa .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_gcp_integration::DeleteGCPIntegrationParams { body }; - let response = match block_on(api.delete_gcp_integration_with_http_info(params)) { + let response = match block_on(api.delete_gcp_integration_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -6401,8 +6322,7 @@ fn test_v1_create_gcp_integration(world: &mut DatadogWorld, _parameters: &HashMa .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_gcp_integration::CreateGCPIntegrationParams { body }; - let response = match block_on(api.create_gcp_integration_with_http_info(params)) { + let response = match block_on(api.create_gcp_integration_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -6427,8 +6347,7 @@ fn test_v1_update_gcp_integration(world: &mut DatadogWorld, _parameters: &HashMa .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_gcp_integration::UpdateGCPIntegrationParams { body }; - let response = match block_on(api.update_gcp_integration_with_http_info(params)) { + let response = match block_on(api.update_gcp_integration_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -6456,12 +6375,7 @@ fn test_v1_create_pager_duty_integration_service( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_pager_duty_integration::CreatePagerDutyIntegrationServiceParams { - body, - }; - let response = match block_on(api.create_pager_duty_integration_service_with_http_info(params)) - { + let response = match block_on(api.create_pager_duty_integration_service_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -6490,25 +6404,21 @@ fn test_v1_delete_pager_duty_integration_service( .expect("api instance not found"); let service_name = serde_json::from_value(_parameters.get("service_name").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_pager_duty_integration::DeletePagerDutyIntegrationServiceParams { - service_name, - }; - let response = match block_on(api.delete_pager_duty_integration_service_with_http_info(params)) - { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.delete_pager_duty_integration_service_with_http_info(service_name)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -6524,23 +6434,21 @@ fn test_v1_get_pager_duty_integration_service( .expect("api instance not found"); let service_name = serde_json::from_value(_parameters.get("service_name").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_pager_duty_integration::GetPagerDutyIntegrationServiceParams { - service_name, - }; - let response = match block_on(api.get_pager_duty_integration_service_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.get_pager_duty_integration_service_with_http_info(service_name)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -6557,13 +6465,9 @@ fn test_v1_update_pager_duty_integration_service( let service_name = serde_json::from_value(_parameters.get("service_name").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_pager_duty_integration::UpdatePagerDutyIntegrationServiceParams { - service_name, - body, - }; - let response = match block_on(api.update_pager_duty_integration_service_with_http_info(params)) - { + let response = match block_on( + api.update_pager_duty_integration_service_with_http_info(service_name, body), + ) { Ok(response) => response, Err(error) => { return match error { @@ -6592,9 +6496,7 @@ fn test_v1_get_slack_integration_channels( .expect("api instance not found"); let account_name = serde_json::from_value(_parameters.get("account_name").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_slack_integration::GetSlackIntegrationChannelsParams { account_name }; - let response = match block_on(api.get_slack_integration_channels_with_http_info(params)) { + let response = match block_on(api.get_slack_integration_channels_with_http_info(account_name)) { Ok(response) => response, Err(error) => { return match error { @@ -6624,24 +6526,21 @@ fn test_v1_create_slack_integration_channel( let account_name = serde_json::from_value(_parameters.get("account_name").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_slack_integration::CreateSlackIntegrationChannelParams { - account_name, - body, - }; - let response = match block_on(api.create_slack_integration_channel_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.create_slack_integration_channel_with_http_info(account_name, body)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -6659,11 +6558,9 @@ fn test_v1_remove_slack_integration_channel( serde_json::from_value(_parameters.get("account_name").unwrap().clone()).unwrap(); let channel_name = serde_json::from_value(_parameters.get("channel_name").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_slack_integration::RemoveSlackIntegrationChannelParams { - account_name, - channel_name, - }; - let response = match block_on(api.remove_slack_integration_channel_with_http_info(params)) { + let response = match block_on( + api.remove_slack_integration_channel_with_http_info(account_name, channel_name), + ) { Ok(response) => response, Err(error) => { return match error { @@ -6694,11 +6591,9 @@ fn test_v1_get_slack_integration_channel( serde_json::from_value(_parameters.get("account_name").unwrap().clone()).unwrap(); let channel_name = serde_json::from_value(_parameters.get("channel_name").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_slack_integration::GetSlackIntegrationChannelParams { - account_name, - channel_name, - }; - let response = match block_on(api.get_slack_integration_channel_with_http_info(params)) { + let response = match block_on( + api.get_slack_integration_channel_with_http_info(account_name, channel_name), + ) { Ok(response) => response, Err(error) => { return match error { @@ -6730,12 +6625,11 @@ fn test_v1_update_slack_integration_channel( let channel_name = serde_json::from_value(_parameters.get("channel_name").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_slack_integration::UpdateSlackIntegrationChannelParams { + let response = match block_on(api.update_slack_integration_channel_with_http_info( account_name, channel_name, body, - }; - let response = match block_on(api.update_slack_integration_channel_with_http_info(params)) { + )) { Ok(response) => response, Err(error) => { return match error { @@ -6763,12 +6657,8 @@ fn test_v1_create_webhooks_integration_custom_variable( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_webhooks_integration::CreateWebhooksIntegrationCustomVariableParams { - body, - }; let response = - match block_on(api.create_webhooks_integration_custom_variable_with_http_info(params)) { + match block_on(api.create_webhooks_integration_custom_variable_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -6797,25 +6687,22 @@ fn test_v1_delete_webhooks_integration_custom_variable( .expect("api instance not found"); let custom_variable_name = serde_json::from_value(_parameters.get("custom_variable_name").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_webhooks_integration::DeleteWebhooksIntegrationCustomVariableParams { - custom_variable_name, - }; - let response = - match block_on(api.delete_webhooks_integration_custom_variable_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); - } + let response = match block_on( + api.delete_webhooks_integration_custom_variable_with_http_info(custom_variable_name), + ) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); } - _ => panic!("error parsing response: {}", error), - }; - } - }; + } + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -6831,25 +6718,22 @@ fn test_v1_get_webhooks_integration_custom_variable( .expect("api instance not found"); let custom_variable_name = serde_json::from_value(_parameters.get("custom_variable_name").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_webhooks_integration::GetWebhooksIntegrationCustomVariableParams { - custom_variable_name, - }; - let response = - match block_on(api.get_webhooks_integration_custom_variable_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); - } + let response = match block_on( + api.get_webhooks_integration_custom_variable_with_http_info(custom_variable_name), + ) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); } - _ => panic!("error parsing response: {}", error), - }; - } - }; + } + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -6866,26 +6750,22 @@ fn test_v1_update_webhooks_integration_custom_variable( let custom_variable_name = serde_json::from_value(_parameters.get("custom_variable_name").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_webhooks_integration::UpdateWebhooksIntegrationCustomVariableParams { - custom_variable_name, - body, - }; - let response = - match block_on(api.update_webhooks_integration_custom_variable_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); - } + let response = match block_on( + api.update_webhooks_integration_custom_variable_with_http_info(custom_variable_name, body), + ) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); } - _ => panic!("error parsing response: {}", error), - }; - } - }; + } + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -6900,8 +6780,7 @@ fn test_v1_create_webhooks_integration( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_webhooks_integration::CreateWebhooksIntegrationParams { body }; - let response = match block_on(api.create_webhooks_integration_with_http_info(params)) { + let response = match block_on(api.create_webhooks_integration_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -6930,9 +6809,7 @@ fn test_v1_delete_webhooks_integration( .expect("api instance not found"); let webhook_name = serde_json::from_value(_parameters.get("webhook_name").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_webhooks_integration::DeleteWebhooksIntegrationParams { webhook_name }; - let response = match block_on(api.delete_webhooks_integration_with_http_info(params)) { + let response = match block_on(api.delete_webhooks_integration_with_http_info(webhook_name)) { Ok(response) => response, Err(error) => { return match error { @@ -6961,9 +6838,7 @@ fn test_v1_get_webhooks_integration( .expect("api instance not found"); let webhook_name = serde_json::from_value(_parameters.get("webhook_name").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_webhooks_integration::GetWebhooksIntegrationParams { webhook_name }; - let response = match block_on(api.get_webhooks_integration_with_http_info(params)) { + let response = match block_on(api.get_webhooks_integration_with_http_info(webhook_name)) { Ok(response) => response, Err(error) => { return match error { @@ -6993,24 +6868,21 @@ fn test_v1_update_webhooks_integration( let webhook_name = serde_json::from_value(_parameters.get("webhook_name").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_webhooks_integration::UpdateWebhooksIntegrationParams { - webhook_name, - body, - }; - let response = match block_on(api.update_webhooks_integration_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.update_webhooks_integration_with_http_info(webhook_name, body)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -7022,8 +6894,7 @@ fn test_v1_list_logs(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -7058,12 +6929,11 @@ fn test_v1_submit_log(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -7112,8 +6982,7 @@ fn test_v1_update_logs_index_order(world: &mut DatadogWorld, _parameters: &HashM .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_logs_indexes::UpdateLogsIndexOrderParams { body }; - let response = match block_on(api.update_logs_index_order_with_http_info(params)) { + let response = match block_on(api.update_logs_index_order_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -7162,8 +7031,7 @@ fn test_v1_create_logs_index(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -7188,8 +7056,7 @@ fn test_v1_get_logs_index(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -7215,8 +7082,7 @@ fn test_v1_update_logs_index(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -7268,8 +7134,7 @@ fn test_v1_update_logs_pipeline_order( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_logs_pipelines::UpdateLogsPipelineOrderParams { body }; - let response = match block_on(api.update_logs_pipeline_order_with_http_info(params)) { + let response = match block_on(api.update_logs_pipeline_order_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -7318,8 +7183,7 @@ fn test_v1_create_logs_pipeline(world: &mut DatadogWorld, _parameters: &HashMap< .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_logs_pipelines::CreateLogsPipelineParams { body }; - let response = match block_on(api.create_logs_pipeline_with_http_info(params)) { + let response = match block_on(api.create_logs_pipeline_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -7345,8 +7209,7 @@ fn test_v1_delete_logs_pipeline(world: &mut DatadogWorld, _parameters: &HashMap< .expect("api instance not found"); let pipeline_id = serde_json::from_value(_parameters.get("pipeline_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_logs_pipelines::DeleteLogsPipelineParams { pipeline_id }; - let response = match block_on(api.delete_logs_pipeline_with_http_info(params)) { + let response = match block_on(api.delete_logs_pipeline_with_http_info(pipeline_id)) { Ok(response) => response, Err(error) => { return match error { @@ -7372,8 +7235,7 @@ fn test_v1_get_logs_pipeline(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -7400,8 +7262,7 @@ fn test_v1_update_logs_pipeline(world: &mut DatadogWorld, _parameters: &HashMap< let pipeline_id = serde_json::from_value(_parameters.get("pipeline_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_logs_pipelines::UpdateLogsPipelineParams { pipeline_id, body }; - let response = match block_on(api.update_logs_pipeline_with_http_info(params)) { + let response = match block_on(api.update_logs_pipeline_with_http_info(pipeline_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -7465,7 +7326,7 @@ fn test_v1_list_monitors(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -7530,8 +7390,7 @@ fn test_v1_check_can_delete_monitor( .expect("api instance not found"); let monitor_ids = serde_json::from_value(_parameters.get("monitor_ids").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_monitors::CheckCanDeleteMonitorParams { monitor_ids }; - let response = match block_on(api.check_can_delete_monitor_with_http_info(params)) { + let response = match block_on(api.check_can_delete_monitor_with_http_info(monitor_ids)) { Ok(response) => response, Err(error) => { return match error { @@ -7575,7 +7434,7 @@ fn test_v1_search_monitor_groups(world: &mut DatadogWorld, _parameters: &HashMap } else { None }; - let params = datadogV1::api::api_monitors::SearchMonitorGroupsParams { + let params = datadogV1::api::api_monitors::SearchMonitorGroupsOptionalParams { query, page, per_page, @@ -7625,7 +7484,7 @@ fn test_v1_search_monitors(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -7688,8 +7546,8 @@ fn test_v1_delete_monitor(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -7725,12 +7583,11 @@ fn test_v1_get_monitor(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -7757,8 +7614,7 @@ fn test_v1_update_monitor(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -7788,8 +7644,7 @@ fn test_v1_validate_existing_monitor( let monitor_id = serde_json::from_value(_parameters.get("monitor_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_monitors::ValidateExistingMonitorParams { monitor_id, body }; - let response = match block_on(api.validate_existing_monitor_with_http_info(params)) { + let response = match block_on(api.validate_existing_monitor_with_http_info(monitor_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -7863,7 +7718,7 @@ fn test_v1_list_notebooks(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -7927,8 +7781,7 @@ fn test_v1_delete_notebook(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -7954,8 +7807,7 @@ fn test_v1_get_notebook(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -7982,8 +7834,7 @@ fn test_v1_update_notebook(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -8032,8 +7883,7 @@ fn test_v1_create_child_org(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -8058,8 +7908,7 @@ fn test_v1_get_org(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -8085,8 +7934,7 @@ fn test_v1_update_org(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -8111,8 +7959,7 @@ fn test_v1_downgrade_org(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -8144,11 +7991,7 @@ fn test_v1_upload_id_p_for_org(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -8177,26 +8020,22 @@ fn test_v1_add_security_monitoring_signal_to_incident( .expect("api instance not found"); let signal_id = serde_json::from_value(_parameters.get("signal_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_security_monitoring::AddSecurityMonitoringSignalToIncidentParams { - signal_id, - body, - }; - let response = - match block_on(api.add_security_monitoring_signal_to_incident_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); - } + let response = match block_on( + api.add_security_monitoring_signal_to_incident_with_http_info(signal_id, body), + ) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); } - _ => panic!("error parsing response: {}", error), - }; - } - }; + } + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -8212,26 +8051,22 @@ fn test_v1_edit_security_monitoring_signal_assignee( .expect("api instance not found"); let signal_id = serde_json::from_value(_parameters.get("signal_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_security_monitoring::EditSecurityMonitoringSignalAssigneeParams { - signal_id, - body, - }; - let response = - match block_on(api.edit_security_monitoring_signal_assignee_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); - } + let response = match block_on( + api.edit_security_monitoring_signal_assignee_with_http_info(signal_id, body), + ) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); } - _ => panic!("error parsing response: {}", error), - }; - } - }; + } + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -8247,25 +8082,21 @@ fn test_v1_edit_security_monitoring_signal_state( .expect("api instance not found"); let signal_id = serde_json::from_value(_parameters.get("signal_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_security_monitoring::EditSecurityMonitoringSignalStateParams { - signal_id, - body, - }; - let response = match block_on(api.edit_security_monitoring_signal_state_with_http_info(params)) - { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.edit_security_monitoring_signal_state_with_http_info(signal_id, body)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -8306,7 +8137,7 @@ fn test_v1_list_sl_os(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -8368,9 +8198,7 @@ fn test_v1_delete_slo_timeframe_in_bulk( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_service_level_objectives::DeleteSLOTimeframeInBulkParams { body }; - let response = match block_on(api.delete_slo_timeframe_in_bulk_with_http_info(params)) { + let response = match block_on(api.delete_slo_timeframe_in_bulk_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -8395,8 +8223,7 @@ fn test_v1_check_can_delete_slo(world: &mut DatadogWorld, _parameters: &HashMap< .as_ref() .expect("api instance not found"); let ids = serde_json::from_value(_parameters.get("ids").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_service_level_objectives::CheckCanDeleteSLOParams { ids }; - let response = match block_on(api.check_can_delete_slo_with_http_info(params)) { + let response = match block_on(api.check_can_delete_slo_with_http_info(ids)) { Ok(response) => response, Err(error) => { return match error { @@ -8440,7 +8267,7 @@ fn test_v1_search_slo(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -8508,11 +8335,10 @@ fn test_v1_get_slo(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -8538,8 +8364,7 @@ fn test_v1_update_slo(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -8564,8 +8389,7 @@ fn test_v1_get_slo_corrections(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -8602,27 +8426,25 @@ fn test_v1_get_slo_history(world: &mut DatadogWorld, _parameters: &HashMap response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.get_slo_history_with_http_info(slo_id, from_ts, to_ts, params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -8643,10 +8465,11 @@ fn test_v1_list_slo_correction(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { @@ -8672,9 +8495,7 @@ fn test_v1_create_slo_correction(world: &mut DatadogWorld, _parameters: &HashMap .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_service_level_objective_corrections::CreateSLOCorrectionParams { body }; - let response = match block_on(api.create_slo_correction_with_http_info(params)) { + let response = match block_on(api.create_slo_correction_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -8700,11 +8521,7 @@ fn test_v1_delete_slo_correction(world: &mut DatadogWorld, _parameters: &HashMap .expect("api instance not found"); let slo_correction_id = serde_json::from_value(_parameters.get("slo_correction_id").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_service_level_objective_corrections::DeleteSLOCorrectionParams { - slo_correction_id, - }; - let response = match block_on(api.delete_slo_correction_with_http_info(params)) { + let response = match block_on(api.delete_slo_correction_with_http_info(slo_correction_id)) { Ok(response) => response, Err(error) => { return match error { @@ -8730,10 +8547,7 @@ fn test_v1_get_slo_correction(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -8760,12 +8574,8 @@ fn test_v1_update_slo_correction(world: &mut DatadogWorld, _parameters: &HashMap let slo_correction_id = serde_json::from_value(_parameters.get("slo_correction_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_service_level_objective_corrections::UpdateSLOCorrectionParams { - slo_correction_id, - body, - }; - let response = match block_on(api.update_slo_correction_with_http_info(params)) { + let response = match block_on(api.update_slo_correction_with_http_info(slo_correction_id, body)) + { Ok(response) => response, Err(error) => { return match error { @@ -8790,8 +8600,7 @@ fn test_v1_get_synthetics_ci_batch(world: &mut DatadogWorld, _parameters: &HashM .as_ref() .expect("api instance not found"); let batch_id = serde_json::from_value(_parameters.get("batch_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_synthetics::GetSyntheticsCIBatchParams { batch_id }; - let response = match block_on(api.get_synthetics_ci_batch_with_http_info(params)) { + let response = match block_on(api.get_synthetics_ci_batch_with_http_info(batch_id)) { Ok(response) => response, Err(error) => { return match error { @@ -8840,8 +8649,7 @@ fn test_v1_create_private_location(world: &mut DatadogWorld, _parameters: &HashM .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_synthetics::CreatePrivateLocationParams { body }; - let response = match block_on(api.create_private_location_with_http_info(params)) { + let response = match block_on(api.create_private_location_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -8867,8 +8675,7 @@ fn test_v1_delete_private_location(world: &mut DatadogWorld, _parameters: &HashM .expect("api instance not found"); let location_id = serde_json::from_value(_parameters.get("location_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_synthetics::DeletePrivateLocationParams { location_id }; - let response = match block_on(api.delete_private_location_with_http_info(params)) { + let response = match block_on(api.delete_private_location_with_http_info(location_id)) { Ok(response) => response, Err(error) => { return match error { @@ -8894,8 +8701,7 @@ fn test_v1_get_private_location(world: &mut DatadogWorld, _parameters: &HashMap< .expect("api instance not found"); let location_id = serde_json::from_value(_parameters.get("location_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_synthetics::GetPrivateLocationParams { location_id }; - let response = match block_on(api.get_private_location_with_http_info(params)) { + let response = match block_on(api.get_private_location_with_http_info(location_id)) { Ok(response) => response, Err(error) => { return match error { @@ -8922,8 +8728,7 @@ fn test_v1_update_private_location(world: &mut DatadogWorld, _parameters: &HashM let location_id = serde_json::from_value(_parameters.get("location_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_synthetics::UpdatePrivateLocationParams { location_id, body }; - let response = match block_on(api.update_private_location_with_http_info(params)) { + let response = match block_on(api.update_private_location_with_http_info(location_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -8984,7 +8789,7 @@ fn test_v1_list_tests(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -9042,8 +8846,7 @@ fn test_v1_get_api_test(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -9069,8 +8872,7 @@ fn test_v1_update_api_test(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -9098,8 +8900,7 @@ fn test_v1_create_synthetics_browser_test( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_synthetics::CreateSyntheticsBrowserTestParams { body }; - let response = match block_on(api.create_synthetics_browser_test_with_http_info(params)) { + let response = match block_on(api.create_synthetics_browser_test_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -9124,8 +8925,7 @@ fn test_v1_get_browser_test(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -9151,8 +8951,7 @@ fn test_v1_update_browser_test(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -9195,26 +8994,26 @@ fn test_v1_get_browser_test_latest_results( } else { None }; - let params = datadogV1::api::api_synthetics::GetBrowserTestLatestResultsParams { - public_id, + let params = datadogV1::api::api_synthetics::GetBrowserTestLatestResultsOptionalParams { from_ts, to_ts, probe_dc, }; - let response = match block_on(api.get_browser_test_latest_results_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.get_browser_test_latest_results_with_http_info(public_id, params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -9227,11 +9026,8 @@ fn test_v1_get_browser_test_result(world: &mut DatadogWorld, _parameters: &HashM .expect("api instance not found"); let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); let result_id = serde_json::from_value(_parameters.get("result_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_synthetics::GetBrowserTestResultParams { - public_id, - result_id, - }; - let response = match block_on(api.get_browser_test_result_with_http_info(params)) { + let response = match block_on(api.get_browser_test_result_with_http_info(public_id, result_id)) + { Ok(response) => response, Err(error) => { return match error { @@ -9256,8 +9052,7 @@ fn test_v1_delete_tests(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -9282,8 +9077,7 @@ fn test_v1_trigger_tests(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -9308,8 +9102,7 @@ fn test_v1_trigger_ci_tests(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -9334,8 +9127,7 @@ fn test_v1_get_test(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -9361,8 +9153,7 @@ fn test_v1_patch_test(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -9405,13 +9196,13 @@ fn test_v1_get_api_test_latest_results( } else { None }; - let params = datadogV1::api::api_synthetics::GetAPITestLatestResultsParams { - public_id, + let params = datadogV1::api::api_synthetics::GetAPITestLatestResultsOptionalParams { from_ts, to_ts, probe_dc, }; - let response = match block_on(api.get_api_test_latest_results_with_http_info(params)) { + let response = match block_on(api.get_api_test_latest_results_with_http_info(public_id, params)) + { Ok(response) => response, Err(error) => { return match error { @@ -9437,11 +9228,7 @@ fn test_v1_get_api_test_result(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -9470,8 +9257,7 @@ fn test_v1_update_test_pause_status( .expect("api instance not found"); let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_synthetics::UpdateTestPauseStatusParams { public_id, body }; - let response = match block_on(api.update_test_pause_status_with_http_info(params)) { + let response = match block_on(api.update_test_pause_status_with_http_info(public_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -9520,8 +9306,7 @@ fn test_v1_create_global_variable(world: &mut DatadogWorld, _parameters: &HashMa .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_synthetics::CreateGlobalVariableParams { body }; - let response = match block_on(api.create_global_variable_with_http_info(params)) { + let response = match block_on(api.create_global_variable_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -9547,8 +9332,7 @@ fn test_v1_delete_global_variable(world: &mut DatadogWorld, _parameters: &HashMa .expect("api instance not found"); let variable_id = serde_json::from_value(_parameters.get("variable_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_synthetics::DeleteGlobalVariableParams { variable_id }; - let response = match block_on(api.delete_global_variable_with_http_info(params)) { + let response = match block_on(api.delete_global_variable_with_http_info(variable_id)) { Ok(response) => response, Err(error) => { return match error { @@ -9574,8 +9358,7 @@ fn test_v1_get_global_variable(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -9602,8 +9385,7 @@ fn test_v1_edit_global_variable(world: &mut DatadogWorld, _parameters: &HashMap< let variable_id = serde_json::from_value(_parameters.get("variable_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_synthetics::EditGlobalVariableParams { variable_id, body }; - let response = match block_on(api.edit_global_variable_with_http_info(params)) { + let response = match block_on(api.edit_global_variable_with_http_info(variable_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -9632,7 +9414,7 @@ fn test_v1_list_host_tags(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { @@ -9663,8 +9445,8 @@ fn test_v1_delete_host_tags(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -9694,8 +9476,8 @@ fn test_v1_get_host_tags(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -9726,12 +9508,8 @@ fn test_v1_create_host_tags(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -9762,12 +9540,8 @@ fn test_v1_update_host_tags(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -9816,8 +9590,7 @@ fn test_v1_create_user(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -9843,8 +9616,7 @@ fn test_v1_disable_user(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -9870,8 +9642,7 @@ fn test_v1_get_user(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -9898,8 +9669,7 @@ fn test_v1_update_user(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -10005,7 +9775,7 @@ fn test_v2_list_api_keys(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -10070,8 +9839,7 @@ fn test_v2_delete_api_key(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -10102,11 +9870,8 @@ fn test_v2_get_api_key(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -10133,8 +9898,7 @@ fn test_v2_update_api_key(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -10194,7 +9958,7 @@ fn test_v2_list_application_keys(world: &mut DatadogWorld, _parameters: &HashMap } else { None }; - let params = datadogV2::api::api_key_management::ListApplicationKeysParams { + let params = datadogV2::api::api_key_management::ListApplicationKeysOptionalParams { page_size, page_number, sort, @@ -10229,8 +9993,7 @@ fn test_v2_delete_application_key(world: &mut DatadogWorld, _parameters: &HashMa .expect("api instance not found"); let app_key_id = serde_json::from_value(_parameters.get("app_key_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_key_management::DeleteApplicationKeyParams { app_key_id }; - let response = match block_on(api.delete_application_key_with_http_info(params)) { + let response = match block_on(api.delete_application_key_with_http_info(app_key_id)) { Ok(response) => response, Err(error) => { return match error { @@ -10261,11 +10024,8 @@ fn test_v2_get_application_key(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -10292,9 +10052,7 @@ fn test_v2_update_application_key(world: &mut DatadogWorld, _parameters: &HashMa let app_key_id = serde_json::from_value(_parameters.get("app_key_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_key_management::UpdateApplicationKeyParams { app_key_id, body }; - let response = match block_on(api.update_application_key_with_http_info(params)) { + let response = match block_on(api.update_application_key_with_http_info(app_key_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -10357,7 +10115,7 @@ fn test_v2_list_current_user_application_keys( } else { None }; - let params = datadogV2::api::api_key_management::ListCurrentUserApplicationKeysParams { + let params = datadogV2::api::api_key_management::ListCurrentUserApplicationKeysOptionalParams { page_size, page_number, sort, @@ -10394,8 +10152,7 @@ fn test_v2_create_current_user_application_key( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_key_management::CreateCurrentUserApplicationKeyParams { body }; - let response = match block_on(api.create_current_user_application_key_with_http_info(params)) { + let response = match block_on(api.create_current_user_application_key_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -10424,22 +10181,21 @@ fn test_v2_delete_current_user_application_key( .expect("api instance not found"); let app_key_id = serde_json::from_value(_parameters.get("app_key_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_key_management::DeleteCurrentUserApplicationKeyParams { app_key_id }; - let response = match block_on(api.delete_current_user_application_key_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.delete_current_user_application_key_with_http_info(app_key_id)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -10455,9 +10211,7 @@ fn test_v2_get_current_user_application_key( .expect("api instance not found"); let app_key_id = serde_json::from_value(_parameters.get("app_key_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_key_management::GetCurrentUserApplicationKeyParams { app_key_id }; - let response = match block_on(api.get_current_user_application_key_with_http_info(params)) { + let response = match block_on(api.get_current_user_application_key_with_http_info(app_key_id)) { Ok(response) => response, Err(error) => { return match error { @@ -10487,24 +10241,21 @@ fn test_v2_update_current_user_application_key( let app_key_id = serde_json::from_value(_parameters.get("app_key_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_key_management::UpdateCurrentUserApplicationKeyParams { - app_key_id, - body, - }; - let response = match block_on(api.update_current_user_application_key_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.update_current_user_application_key_with_http_info(app_key_id, body)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -10540,8 +10291,7 @@ fn test_v2_create_spans_metric(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -10566,8 +10316,7 @@ fn test_v2_delete_spans_metric(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -10592,8 +10341,7 @@ fn test_v2_get_spans_metric(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -10619,8 +10367,7 @@ fn test_v2_update_spans_metric(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -10675,8 +10422,7 @@ fn test_v2_create_apm_retention_filter( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_apm_retention_filters::CreateApmRetentionFilterParams { body }; - let response = match block_on(api.create_apm_retention_filter_with_http_info(params)) { + let response = match block_on(api.create_apm_retention_filter_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -10704,9 +10450,7 @@ fn test_v2_reorder_apm_retention_filters( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_apm_retention_filters::ReorderApmRetentionFiltersParams { body }; - let response = match block_on(api.reorder_apm_retention_filters_with_http_info(params)) { + let response = match block_on(api.reorder_apm_retention_filters_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -10734,9 +10478,7 @@ fn test_v2_delete_apm_retention_filter( .as_ref() .expect("api instance not found"); let filter_id = serde_json::from_value(_parameters.get("filter_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_apm_retention_filters::DeleteApmRetentionFilterParams { filter_id }; - let response = match block_on(api.delete_apm_retention_filter_with_http_info(params)) { + let response = match block_on(api.delete_apm_retention_filter_with_http_info(filter_id)) { Ok(response) => response, Err(error) => { return match error { @@ -10764,9 +10506,7 @@ fn test_v2_get_apm_retention_filter( .as_ref() .expect("api instance not found"); let filter_id = serde_json::from_value(_parameters.get("filter_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_apm_retention_filters::GetApmRetentionFilterParams { filter_id }; - let response = match block_on(api.get_apm_retention_filter_with_http_info(params)) { + let response = match block_on(api.get_apm_retention_filter_with_http_info(filter_id)) { Ok(response) => response, Err(error) => { return match error { @@ -10795,11 +10535,7 @@ fn test_v2_update_apm_retention_filter( .expect("api instance not found"); let filter_id = serde_json::from_value(_parameters.get("filter_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_apm_retention_filters::UpdateApmRetentionFilterParams { - filter_id, - body, - }; - let response = match block_on(api.update_apm_retention_filter_with_http_info(params)) { + let response = match block_on(api.update_apm_retention_filter_with_http_info(filter_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -10853,7 +10589,7 @@ fn test_v2_list_audit_logs(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { @@ -10935,7 +10671,7 @@ fn test_v2_list_auth_n_mappings(world: &mut DatadogWorld, _parameters: &HashMap< } else { None }; - let params = datadogV2::api::api_auth_n_mappings::ListAuthNMappingsParams { + let params = datadogV2::api::api_auth_n_mappings::ListAuthNMappingsOptionalParams { page_size, page_number, sort, @@ -10966,8 +10702,7 @@ fn test_v2_create_auth_n_mapping(world: &mut DatadogWorld, _parameters: &HashMap .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_auth_n_mappings::CreateAuthNMappingParams { body }; - let response = match block_on(api.create_auth_n_mapping_with_http_info(params)) { + let response = match block_on(api.create_auth_n_mapping_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -10993,8 +10728,7 @@ fn test_v2_delete_auth_n_mapping(world: &mut DatadogWorld, _parameters: &HashMap .expect("api instance not found"); let authn_mapping_id = serde_json::from_value(_parameters.get("authn_mapping_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_auth_n_mappings::DeleteAuthNMappingParams { authn_mapping_id }; - let response = match block_on(api.delete_auth_n_mapping_with_http_info(params)) { + let response = match block_on(api.delete_auth_n_mapping_with_http_info(authn_mapping_id)) { Ok(response) => response, Err(error) => { return match error { @@ -11020,8 +10754,7 @@ fn test_v2_get_auth_n_mapping(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -11048,11 +10781,8 @@ fn test_v2_update_auth_n_mapping(world: &mut DatadogWorld, _parameters: &HashMap let authn_mapping_id = serde_json::from_value(_parameters.get("authn_mapping_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_auth_n_mappings::UpdateAuthNMappingParams { - authn_mapping_id, - body, - }; - let response = match block_on(api.update_auth_n_mapping_with_http_info(params)) { + let response = match block_on(api.update_auth_n_mapping_with_http_info(authn_mapping_id, body)) + { Ok(response) => response, Err(error) => { return match error { @@ -11080,9 +10810,7 @@ fn test_v2_create_ci_app_pipeline_event( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_ci_visibility_pipelines::CreateCIAppPipelineEventParams { body }; - let response = match block_on(api.create_ci_app_pipeline_event_with_http_info(params)) { + let response = match block_on(api.create_ci_app_pipeline_event_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -11110,9 +10838,7 @@ fn test_v2_aggregate_ci_app_pipeline_events( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_ci_visibility_pipelines::AggregateCIAppPipelineEventsParams { body }; - let response = match block_on(api.aggregate_ci_app_pipeline_events_with_http_info(params)) { + let response = match block_on(api.aggregate_ci_app_pipeline_events_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -11169,14 +10895,15 @@ fn test_v2_list_ci_app_pipeline_events( } else { None }; - let params = datadogV2::api::api_ci_visibility_pipelines::ListCIAppPipelineEventsParams { - filter_query, - filter_from, - filter_to, - sort, - page_cursor, - page_limit, - }; + let params = + datadogV2::api::api_ci_visibility_pipelines::ListCIAppPipelineEventsOptionalParams { + filter_query, + filter_from, + filter_to, + sort, + page_cursor, + page_limit, + }; let response = match block_on(api.list_ci_app_pipeline_events_with_http_info(params)) { Ok(response) => response, Err(error) => { @@ -11210,7 +10937,9 @@ fn test_v2_search_ci_app_pipeline_events( None }; let params = - datadogV2::api::api_ci_visibility_pipelines::SearchCIAppPipelineEventsParams { body }; + datadogV2::api::api_ci_visibility_pipelines::SearchCIAppPipelineEventsOptionalParams { + body, + }; let response = match block_on(api.search_ci_app_pipeline_events_with_http_info(params)) { Ok(response) => response, Err(error) => { @@ -11239,8 +10968,7 @@ fn test_v2_aggregate_ci_app_test_events( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_ci_visibility_tests::AggregateCIAppTestEventsParams { body }; - let response = match block_on(api.aggregate_ci_app_test_events_with_http_info(params)) { + let response = match block_on(api.aggregate_ci_app_test_events_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -11294,7 +11022,7 @@ fn test_v2_list_ci_app_test_events(world: &mut DatadogWorld, _parameters: &HashM } else { None }; - let params = datadogV2::api::api_ci_visibility_tests::ListCIAppTestEventsParams { + let params = datadogV2::api::api_ci_visibility_tests::ListCIAppTestEventsOptionalParams { filter_query, filter_from, filter_to, @@ -11334,7 +11062,8 @@ fn test_v2_search_ci_app_test_events( } else { None }; - let params = datadogV2::api::api_ci_visibility_tests::SearchCIAppTestEventsParams { body }; + let params = + datadogV2::api::api_ci_visibility_tests::SearchCIAppTestEventsOptionalParams { body }; let response = match block_on(api.search_ci_app_test_events_with_http_info(params)) { Ok(response) => response, Err(error) => { @@ -11384,7 +11113,7 @@ fn test_v2_list_container_images(world: &mut DatadogWorld, _parameters: &HashMap } else { None }; - let params = datadogV2::api::api_container_images::ListContainerImagesParams { + let params = datadogV2::api::api_container_images::ListContainerImagesOptionalParams { filter_tags, group_by, sort, @@ -11440,7 +11169,7 @@ fn test_v2_list_containers(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -11532,10 +11260,7 @@ fn test_v2_delete_cost_awscur_config( .expect("api instance not found"); let cloud_account_id = serde_json::from_value(_parameters.get("cloud_account_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_cloud_cost_management::DeleteCostAWSCURConfigParams { - cloud_account_id, - }; - let response = match block_on(api.delete_cost_awscur_config_with_http_info(params)) { + let response = match block_on(api.delete_cost_awscur_config_with_http_info(cloud_account_id)) { Ok(response) => response, Err(error) => { return match error { @@ -11565,24 +11290,21 @@ fn test_v2_update_cost_awscur_config( let cloud_account_id = serde_json::from_value(_parameters.get("cloud_account_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_cloud_cost_management::UpdateCostAWSCURConfigParams { - cloud_account_id, - body, - }; - let response = match block_on(api.update_cost_awscur_config_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.update_cost_awscur_config_with_http_info(cloud_account_id, body)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -11603,10 +11325,9 @@ fn test_v2_list_aws_related_accounts( .clone(), ) .unwrap(); - let params = datadogV2::api::api_cloud_cost_management::ListAWSRelatedAccountsParams { - filter_management_account_id, - }; - let response = match block_on(api.list_aws_related_accounts_with_http_info(params)) { + let response = match block_on( + api.list_aws_related_accounts_with_http_info(filter_management_account_id), + ) { Ok(response) => response, Err(error) => { return match error { @@ -11661,8 +11382,7 @@ fn test_v2_create_cost_azure_uc_configs( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_cloud_cost_management::CreateCostAzureUCConfigsParams { body }; - let response = match block_on(api.create_cost_azure_uc_configs_with_http_info(params)) { + let response = match block_on(api.create_cost_azure_uc_configs_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -11691,10 +11411,8 @@ fn test_v2_delete_cost_azure_uc_config( .expect("api instance not found"); let cloud_account_id = serde_json::from_value(_parameters.get("cloud_account_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_cloud_cost_management::DeleteCostAzureUCConfigParams { - cloud_account_id, - }; - let response = match block_on(api.delete_cost_azure_uc_config_with_http_info(params)) { + let response = match block_on(api.delete_cost_azure_uc_config_with_http_info(cloud_account_id)) + { Ok(response) => response, Err(error) => { return match error { @@ -11724,24 +11442,21 @@ fn test_v2_update_cost_azure_uc_configs( let cloud_account_id = serde_json::from_value(_parameters.get("cloud_account_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_cloud_cost_management::UpdateCostAzureUCConfigsParams { - cloud_account_id, - body, - }; - let response = match block_on(api.update_cost_azure_uc_configs_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.update_cost_azure_uc_configs_with_http_info(cloud_account_id, body)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -11835,17 +11550,19 @@ fn test_v2_get_monthly_cost_attribution( } else { None }; - let params = datadogV2::api::api_usage_metering::GetMonthlyCostAttributionParams { - start_month, - end_month, - fields, + let params = datadogV2::api::api_usage_metering::GetMonthlyCostAttributionOptionalParams { sort_direction, sort_name, tag_breakdown_keys, next_record_id, include_descendants, }; - let response = match block_on(api.get_monthly_cost_attribution_with_http_info(params)) { + let response = match block_on(api.get_monthly_cost_attribution_with_http_info( + start_month, + end_month, + fields, + params, + )) { Ok(response) => response, Err(error) => { return match error { @@ -11878,25 +11595,26 @@ fn test_v2_get_usage_application_security_monitoring( } else { None }; - let params = datadogV2::api::api_usage_metering::GetUsageApplicationSecurityMonitoringParams { - start_hr, - end_hr, - }; - let response = - match block_on(api.get_usage_application_security_monitoring_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); - } - } - _ => panic!("error parsing response: {}", error), - }; - } + let params = + datadogV2::api::api_usage_metering::GetUsageApplicationSecurityMonitoringOptionalParams { + end_hr, }; + let response = match block_on( + api.get_usage_application_security_monitoring_with_http_info(start_hr, params), + ) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } + } + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -11914,11 +11632,8 @@ fn test_v2_get_cost_by_org(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -11970,7 +11685,7 @@ fn test_v2_get_estimated_cost_by_org( } else { None }; - let params = datadogV2::api::api_usage_metering::GetEstimatedCostByOrgParams { + let params = datadogV2::api::api_usage_metering::GetEstimatedCostByOrgOptionalParams { view, start_month, end_month, @@ -12016,25 +11731,25 @@ fn test_v2_get_historical_cost_by_org( } else { None }; - let params = datadogV2::api::api_usage_metering::GetHistoricalCostByOrgParams { - start_month, + let params = datadogV2::api::api_usage_metering::GetHistoricalCostByOrgOptionalParams { view, end_month, }; - let response = match block_on(api.get_historical_cost_by_org_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.get_historical_cost_by_org_with_http_info(start_month, params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -12083,9 +11798,7 @@ fn test_v2_get_hourly_usage(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -12126,24 +11843,25 @@ fn test_v2_get_usage_lambda_traced_invocations( } else { None }; - let params = datadogV2::api::api_usage_metering::GetUsageLambdaTracedInvocationsParams { - start_hr, - end_hr, - }; - let response = match block_on(api.get_usage_lambda_traced_invocations_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let params = + datadogV2::api::api_usage_metering::GetUsageLambdaTracedInvocationsOptionalParams { + end_hr, + }; + let response = + match block_on(api.get_usage_lambda_traced_invocations_with_http_info(start_hr, params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -12163,24 +11881,23 @@ fn test_v2_get_usage_observability_pipelines( } else { None }; - let params = datadogV2::api::api_usage_metering::GetUsageObservabilityPipelinesParams { - start_hr, - end_hr, - }; - let response = match block_on(api.get_usage_observability_pipelines_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let params = + datadogV2::api::api_usage_metering::GetUsageObservabilityPipelinesOptionalParams { end_hr }; + let response = + match block_on(api.get_usage_observability_pipelines_with_http_info(start_hr, params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -12196,7 +11913,7 @@ fn test_v2_get_projected_cost(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { @@ -12227,24 +11944,21 @@ fn test_v2_delete_dashboard_list_items( let dashboard_list_id = serde_json::from_value(_parameters.get("dashboard_list_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_dashboard_lists::DeleteDashboardListItemsParams { - dashboard_list_id, - body, - }; - let response = match block_on(api.delete_dashboard_list_items_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.delete_dashboard_list_items_with_http_info(dashboard_list_id, body)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -12260,9 +11974,7 @@ fn test_v2_get_dashboard_list_items( .expect("api instance not found"); let dashboard_list_id = serde_json::from_value(_parameters.get("dashboard_list_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_dashboard_lists::GetDashboardListItemsParams { dashboard_list_id }; - let response = match block_on(api.get_dashboard_list_items_with_http_info(params)) { + let response = match block_on(api.get_dashboard_list_items_with_http_info(dashboard_list_id)) { Ok(response) => response, Err(error) => { return match error { @@ -12292,24 +12004,21 @@ fn test_v2_create_dashboard_list_items( let dashboard_list_id = serde_json::from_value(_parameters.get("dashboard_list_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_dashboard_lists::CreateDashboardListItemsParams { - dashboard_list_id, - body, - }; - let response = match block_on(api.create_dashboard_list_items_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.create_dashboard_list_items_with_http_info(dashboard_list_id, body)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -12326,24 +12035,21 @@ fn test_v2_update_dashboard_list_items( let dashboard_list_id = serde_json::from_value(_parameters.get("dashboard_list_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_dashboard_lists::UpdateDashboardListItemsParams { - dashboard_list_id, - body, - }; - let response = match block_on(api.update_dashboard_list_items_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.update_dashboard_list_items_with_http_info(dashboard_list_id, body)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -12355,8 +12061,7 @@ fn test_v2_create_dora_deployment(world: &mut DatadogWorld, _parameters: &HashMa .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_dora_metrics::CreateDORADeploymentParams { body }; - let response = match block_on(api.create_dora_deployment_with_http_info(params)) { + let response = match block_on(api.create_dora_deployment_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -12381,8 +12086,7 @@ fn test_v2_create_dora_incident(world: &mut DatadogWorld, _parameters: &HashMap< .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_dora_metrics::CreateDORAIncidentParams { body }; - let response = match block_on(api.create_dora_incident_with_http_info(params)) { + let response = match block_on(api.create_dora_incident_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -12426,7 +12130,7 @@ fn test_v2_list_downtimes(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -12484,8 +12187,7 @@ fn test_v2_cancel_downtime(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -12516,11 +12218,8 @@ fn test_v2_get_downtime(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -12547,8 +12246,7 @@ fn test_v2_update_downtime(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -12584,12 +12282,11 @@ fn test_v2_list_monitor_downtimes(world: &mut DatadogWorld, _parameters: &HashMa } else { None }; - let params = datadogV2::api::api_downtimes::ListMonitorDowntimesParams { - monitor_id, + let params = datadogV2::api::api_downtimes::ListMonitorDowntimesOptionalParams { page_offset, page_limit, }; - let response = match block_on(api.list_monitor_downtimes_with_http_info(params)) { + let response = match block_on(api.list_monitor_downtimes_with_http_info(monitor_id, params)) { Ok(response) => response, Err(error) => { return match error { @@ -12643,7 +12340,7 @@ fn test_v2_list_events(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { @@ -12720,7 +12417,7 @@ fn test_v2_list_incidents(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -12796,14 +12492,13 @@ fn test_v2_search_incidents(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -12829,8 +12524,7 @@ fn test_v2_delete_incident(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -12861,11 +12555,8 @@ fn test_v2_get_incident(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -12897,12 +12588,8 @@ fn test_v2_update_incident(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -12941,12 +12628,12 @@ fn test_v2_list_incident_attachments( } else { None }; - let params = datadogV2::api::api_incidents::ListIncidentAttachmentsParams { - incident_id, + let params = datadogV2::api::api_incidents::ListIncidentAttachmentsOptionalParams { include, filter_attachment_type, }; - let response = match block_on(api.list_incident_attachments_with_http_info(params)) { + let response = match block_on(api.list_incident_attachments_with_http_info(incident_id, params)) + { Ok(response) => response, Err(error) => { return match error { @@ -12981,25 +12668,22 @@ fn test_v2_update_incident_attachments( } else { None }; - let params = datadogV2::api::api_incidents::UpdateIncidentAttachmentsParams { - incident_id, - body, - include, - }; - let response = match block_on(api.update_incident_attachments_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let params = datadogV2::api::api_incidents::UpdateIncidentAttachmentsOptionalParams { include }; + let response = + match block_on(api.update_incident_attachments_with_http_info(incident_id, body, params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -13015,8 +12699,7 @@ fn test_v2_list_incident_integrations( .expect("api instance not found"); let incident_id = serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_incidents::ListIncidentIntegrationsParams { incident_id }; - let response = match block_on(api.list_incident_integrations_with_http_info(params)) { + let response = match block_on(api.list_incident_integrations_with_http_info(incident_id)) { Ok(response) => response, Err(error) => { return match error { @@ -13046,9 +12729,8 @@ fn test_v2_create_incident_integration( let incident_id = serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_incidents::CreateIncidentIntegrationParams { incident_id, body }; - let response = match block_on(api.create_incident_integration_with_http_info(params)) { + let response = match block_on(api.create_incident_integration_with_http_info(incident_id, body)) + { Ok(response) => response, Err(error) => { return match error { @@ -13080,11 +12762,9 @@ fn test_v2_delete_incident_integration( let integration_metadata_id = serde_json::from_value(_parameters.get("integration_metadata_id").unwrap().clone()) .unwrap(); - let params = datadogV2::api::api_incidents::DeleteIncidentIntegrationParams { - incident_id, - integration_metadata_id, - }; - let response = match block_on(api.delete_incident_integration_with_http_info(params)) { + let response = match block_on( + api.delete_incident_integration_with_http_info(incident_id, integration_metadata_id), + ) { Ok(response) => response, Err(error) => { return match error { @@ -13116,11 +12796,9 @@ fn test_v2_get_incident_integration( let integration_metadata_id = serde_json::from_value(_parameters.get("integration_metadata_id").unwrap().clone()) .unwrap(); - let params = datadogV2::api::api_incidents::GetIncidentIntegrationParams { - incident_id, - integration_metadata_id, - }; - let response = match block_on(api.get_incident_integration_with_http_info(params)) { + let response = match block_on( + api.get_incident_integration_with_http_info(incident_id, integration_metadata_id), + ) { Ok(response) => response, Err(error) => { return match error { @@ -13153,12 +12831,11 @@ fn test_v2_update_incident_integration( serde_json::from_value(_parameters.get("integration_metadata_id").unwrap().clone()) .unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_incidents::UpdateIncidentIntegrationParams { + let response = match block_on(api.update_incident_integration_with_http_info( incident_id, integration_metadata_id, body, - }; - let response = match block_on(api.update_incident_integration_with_http_info(params)) { + )) { Ok(response) => response, Err(error) => { return match error { @@ -13184,8 +12861,7 @@ fn test_v2_list_incident_todos(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -13212,8 +12888,7 @@ fn test_v2_create_incident_todo(world: &mut DatadogWorld, _parameters: &HashMap< let incident_id = serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_incidents::CreateIncidentTodoParams { incident_id, body }; - let response = match block_on(api.create_incident_todo_with_http_info(params)) { + let response = match block_on(api.create_incident_todo_with_http_info(incident_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -13240,11 +12915,7 @@ fn test_v2_delete_incident_todo(world: &mut DatadogWorld, _parameters: &HashMap< let incident_id = serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); let todo_id = serde_json::from_value(_parameters.get("todo_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_incidents::DeleteIncidentTodoParams { - incident_id, - todo_id, - }; - let response = match block_on(api.delete_incident_todo_with_http_info(params)) { + let response = match block_on(api.delete_incident_todo_with_http_info(incident_id, todo_id)) { Ok(response) => response, Err(error) => { return match error { @@ -13271,11 +12942,7 @@ fn test_v2_get_incident_todo(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -13303,25 +12970,21 @@ fn test_v2_update_incident_todo(world: &mut DatadogWorld, _parameters: &HashMap< serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); let todo_id = serde_json::from_value(_parameters.get("todo_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_incidents::UpdateIncidentTodoParams { - incident_id, - todo_id, - body, - }; - let response = match block_on(api.update_incident_todo_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.update_incident_todo_with_http_info(incident_id, todo_id, body)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -13357,8 +13020,7 @@ fn test_v2_create_gcpsts_account(world: &mut DatadogWorld, _parameters: &HashMap .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_gcp_integration::CreateGCPSTSAccountParams { body }; - let response = match block_on(api.create_gcpsts_account_with_http_info(params)) { + let response = match block_on(api.create_gcpsts_account_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -13384,8 +13046,7 @@ fn test_v2_delete_gcpsts_account(world: &mut DatadogWorld, _parameters: &HashMap .expect("api instance not found"); let account_id = serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_gcp_integration::DeleteGCPSTSAccountParams { account_id }; - let response = match block_on(api.delete_gcpsts_account_with_http_info(params)) { + let response = match block_on(api.delete_gcpsts_account_with_http_info(account_id)) { Ok(response) => response, Err(error) => { return match error { @@ -13412,9 +13073,7 @@ fn test_v2_update_gcpsts_account(world: &mut DatadogWorld, _parameters: &HashMap let account_id = serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_gcp_integration::UpdateGCPSTSAccountParams { account_id, body }; - let response = match block_on(api.update_gcpsts_account_with_http_info(params)) { + let response = match block_on(api.update_gcpsts_account_with_http_info(account_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -13467,7 +13126,7 @@ fn test_v2_make_gcpsts_delegate(world: &mut DatadogWorld, _parameters: &HashMap< } else { None }; - let params = datadogV2::api::api_gcp_integration::MakeGCPSTSDelegateParams { body }; + let params = datadogV2::api::api_gcp_integration::MakeGCPSTSDelegateOptionalParams { body }; let response = match block_on(api.make_gcpsts_delegate_with_http_info(params)) { Ok(response) => response, Err(error) => { @@ -13517,8 +13176,7 @@ fn test_v2_create_opsgenie_service(world: &mut DatadogWorld, _parameters: &HashM .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_opsgenie_integration::CreateOpsgenieServiceParams { body }; - let response = match block_on(api.create_opsgenie_service_with_http_info(params)) { + let response = match block_on(api.create_opsgenie_service_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -13544,23 +13202,21 @@ fn test_v2_delete_opsgenie_service(world: &mut DatadogWorld, _parameters: &HashM .expect("api instance not found"); let integration_service_id = serde_json::from_value(_parameters.get("integration_service_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_opsgenie_integration::DeleteOpsgenieServiceParams { - integration_service_id, - }; - let response = match block_on(api.delete_opsgenie_service_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.delete_opsgenie_service_with_http_info(integration_service_id)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -13573,10 +13229,7 @@ fn test_v2_get_opsgenie_service(world: &mut DatadogWorld, _parameters: &HashMap< .expect("api instance not found"); let integration_service_id = serde_json::from_value(_parameters.get("integration_service_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_opsgenie_integration::GetOpsgenieServiceParams { - integration_service_id, - }; - let response = match block_on(api.get_opsgenie_service_with_http_info(params)) { + let response = match block_on(api.get_opsgenie_service_with_http_info(integration_service_id)) { Ok(response) => response, Err(error) => { return match error { @@ -13603,24 +13256,21 @@ fn test_v2_update_opsgenie_service(world: &mut DatadogWorld, _parameters: &HashM let integration_service_id = serde_json::from_value(_parameters.get("integration_service_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_opsgenie_integration::UpdateOpsgenieServiceParams { - integration_service_id, - body, - }; - let response = match block_on(api.update_opsgenie_service_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.update_opsgenie_service_with_http_info(integration_service_id, body)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -13662,8 +13312,7 @@ fn test_v2_create_cloudflare_account( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_cloudflare_integration::CreateCloudflareAccountParams { body }; - let response = match block_on(api.create_cloudflare_account_with_http_info(params)) { + let response = match block_on(api.create_cloudflare_account_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -13692,9 +13341,7 @@ fn test_v2_delete_cloudflare_account( .expect("api instance not found"); let account_id = serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_cloudflare_integration::DeleteCloudflareAccountParams { account_id }; - let response = match block_on(api.delete_cloudflare_account_with_http_info(params)) { + let response = match block_on(api.delete_cloudflare_account_with_http_info(account_id)) { Ok(response) => response, Err(error) => { return match error { @@ -13720,9 +13367,7 @@ fn test_v2_get_cloudflare_account(world: &mut DatadogWorld, _parameters: &HashMa .expect("api instance not found"); let account_id = serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_cloudflare_integration::GetCloudflareAccountParams { account_id }; - let response = match block_on(api.get_cloudflare_account_with_http_info(params)) { + let response = match block_on(api.get_cloudflare_account_with_http_info(account_id)) { Ok(response) => response, Err(error) => { return match error { @@ -13752,11 +13397,7 @@ fn test_v2_update_cloudflare_account( let account_id = serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_cloudflare_integration::UpdateCloudflareAccountParams { - account_id, - body, - }; - let response = match block_on(api.update_cloudflare_account_with_http_info(params)) { + let response = match block_on(api.update_cloudflare_account_with_http_info(account_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -13808,8 +13449,7 @@ fn test_v2_create_confluent_account( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_confluent_cloud::CreateConfluentAccountParams { body }; - let response = match block_on(api.create_confluent_account_with_http_info(params)) { + let response = match block_on(api.create_confluent_account_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -13838,8 +13478,7 @@ fn test_v2_delete_confluent_account( .expect("api instance not found"); let account_id = serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_confluent_cloud::DeleteConfluentAccountParams { account_id }; - let response = match block_on(api.delete_confluent_account_with_http_info(params)) { + let response = match block_on(api.delete_confluent_account_with_http_info(account_id)) { Ok(response) => response, Err(error) => { return match error { @@ -13865,8 +13504,7 @@ fn test_v2_get_confluent_account(world: &mut DatadogWorld, _parameters: &HashMap .expect("api instance not found"); let account_id = serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_confluent_cloud::GetConfluentAccountParams { account_id }; - let response = match block_on(api.get_confluent_account_with_http_info(params)) { + let response = match block_on(api.get_confluent_account_with_http_info(account_id)) { Ok(response) => response, Err(error) => { return match error { @@ -13896,9 +13534,7 @@ fn test_v2_update_confluent_account( let account_id = serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_confluent_cloud::UpdateConfluentAccountParams { account_id, body }; - let response = match block_on(api.update_confluent_account_with_http_info(params)) { + let response = match block_on(api.update_confluent_account_with_http_info(account_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -13924,8 +13560,7 @@ fn test_v2_list_confluent_resource(world: &mut DatadogWorld, _parameters: &HashM .expect("api instance not found"); let account_id = serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_confluent_cloud::ListConfluentResourceParams { account_id }; - let response = match block_on(api.list_confluent_resource_with_http_info(params)) { + let response = match block_on(api.list_confluent_resource_with_http_info(account_id)) { Ok(response) => response, Err(error) => { return match error { @@ -13955,9 +13590,7 @@ fn test_v2_create_confluent_resource( let account_id = serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_confluent_cloud::CreateConfluentResourceParams { account_id, body }; - let response = match block_on(api.create_confluent_resource_with_http_info(params)) { + let response = match block_on(api.create_confluent_resource_with_http_info(account_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -13988,24 +13621,21 @@ fn test_v2_delete_confluent_resource( serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); let resource_id = serde_json::from_value(_parameters.get("resource_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_confluent_cloud::DeleteConfluentResourceParams { - account_id, - resource_id, - }; - let response = match block_on(api.delete_confluent_resource_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.delete_confluent_resource_with_http_info(account_id, resource_id)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -14020,24 +13650,21 @@ fn test_v2_get_confluent_resource(world: &mut DatadogWorld, _parameters: &HashMa serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); let resource_id = serde_json::from_value(_parameters.get("resource_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_confluent_cloud::GetConfluentResourceParams { - account_id, - resource_id, - }; - let response = match block_on(api.get_confluent_resource_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.get_confluent_resource_with_http_info(account_id, resource_id)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -14056,25 +13683,22 @@ fn test_v2_update_confluent_resource( let resource_id = serde_json::from_value(_parameters.get("resource_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_confluent_cloud::UpdateConfluentResourceParams { - account_id, - resource_id, - body, - }; - let response = match block_on(api.update_confluent_resource_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.update_confluent_resource_with_http_info(account_id, resource_id, body)) + { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -14110,8 +13734,7 @@ fn test_v2_create_fastly_account(world: &mut DatadogWorld, _parameters: &HashMap .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_fastly_integration::CreateFastlyAccountParams { body }; - let response = match block_on(api.create_fastly_account_with_http_info(params)) { + let response = match block_on(api.create_fastly_account_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -14137,8 +13760,7 @@ fn test_v2_delete_fastly_account(world: &mut DatadogWorld, _parameters: &HashMap .expect("api instance not found"); let account_id = serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_fastly_integration::DeleteFastlyAccountParams { account_id }; - let response = match block_on(api.delete_fastly_account_with_http_info(params)) { + let response = match block_on(api.delete_fastly_account_with_http_info(account_id)) { Ok(response) => response, Err(error) => { return match error { @@ -14164,8 +13786,7 @@ fn test_v2_get_fastly_account(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -14192,9 +13813,7 @@ fn test_v2_update_fastly_account(world: &mut DatadogWorld, _parameters: &HashMap let account_id = serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_fastly_integration::UpdateFastlyAccountParams { account_id, body }; - let response = match block_on(api.update_fastly_account_with_http_info(params)) { + let response = match block_on(api.update_fastly_account_with_http_info(account_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -14220,8 +13839,7 @@ fn test_v2_list_fastly_services(world: &mut DatadogWorld, _parameters: &HashMap< .expect("api instance not found"); let account_id = serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_fastly_integration::ListFastlyServicesParams { account_id }; - let response = match block_on(api.list_fastly_services_with_http_info(params)) { + let response = match block_on(api.list_fastly_services_with_http_info(account_id)) { Ok(response) => response, Err(error) => { return match error { @@ -14248,9 +13866,7 @@ fn test_v2_create_fastly_service(world: &mut DatadogWorld, _parameters: &HashMap let account_id = serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_fastly_integration::CreateFastlyServiceParams { account_id, body }; - let response = match block_on(api.create_fastly_service_with_http_info(params)) { + let response = match block_on(api.create_fastly_service_with_http_info(account_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -14278,11 +13894,8 @@ fn test_v2_delete_fastly_service(world: &mut DatadogWorld, _parameters: &HashMap serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); let service_id = serde_json::from_value(_parameters.get("service_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_fastly_integration::DeleteFastlyServiceParams { - account_id, - service_id, - }; - let response = match block_on(api.delete_fastly_service_with_http_info(params)) { + let response = match block_on(api.delete_fastly_service_with_http_info(account_id, service_id)) + { Ok(response) => response, Err(error) => { return match error { @@ -14310,11 +13923,7 @@ fn test_v2_get_fastly_service(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -14343,25 +13952,21 @@ fn test_v2_update_fastly_service(world: &mut DatadogWorld, _parameters: &HashMap let service_id = serde_json::from_value(_parameters.get("service_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_fastly_integration::UpdateFastlyServiceParams { - account_id, - service_id, - body, - }; - let response = match block_on(api.update_fastly_service_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.update_fastly_service_with_http_info(account_id, service_id, body)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -14397,8 +14002,7 @@ fn test_v2_create_okta_account(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -14424,8 +14028,7 @@ fn test_v2_delete_okta_account(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -14451,8 +14054,7 @@ fn test_v2_get_okta_account(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -14479,8 +14081,7 @@ fn test_v2_update_okta_account(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -14529,8 +14130,7 @@ fn test_v2_update_ip_allowlist(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -14565,12 +14165,11 @@ fn test_v2_submit_log(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -14595,8 +14194,7 @@ fn test_v2_aggregate_logs(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -14660,7 +14258,7 @@ fn test_v2_list_logs_get(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { @@ -14752,8 +14350,7 @@ fn test_v2_update_logs_archive_order( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_logs_archives::UpdateLogsArchiveOrderParams { body }; - let response = match block_on(api.update_logs_archive_order_with_http_info(params)) { + let response = match block_on(api.update_logs_archive_order_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -14802,8 +14399,7 @@ fn test_v2_create_logs_archive(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -14829,8 +14425,7 @@ fn test_v2_delete_logs_archive(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -14856,8 +14451,7 @@ fn test_v2_get_logs_archive(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -14884,8 +14478,7 @@ fn test_v2_update_logs_archive(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -14915,9 +14508,7 @@ fn test_v2_remove_role_from_archive( let archive_id = serde_json::from_value(_parameters.get("archive_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_logs_archives::RemoveRoleFromArchiveParams { archive_id, body }; - let response = match block_on(api.remove_role_from_archive_with_http_info(params)) { + let response = match block_on(api.remove_role_from_archive_with_http_info(archive_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -14943,8 +14534,7 @@ fn test_v2_list_archive_read_roles(world: &mut DatadogWorld, _parameters: &HashM .expect("api instance not found"); let archive_id = serde_json::from_value(_parameters.get("archive_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_logs_archives::ListArchiveReadRolesParams { archive_id }; - let response = match block_on(api.list_archive_read_roles_with_http_info(params)) { + let response = match block_on(api.list_archive_read_roles_with_http_info(archive_id)) { Ok(response) => response, Err(error) => { return match error { @@ -14974,8 +14564,7 @@ fn test_v2_add_read_role_to_archive( let archive_id = serde_json::from_value(_parameters.get("archive_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_logs_archives::AddReadRoleToArchiveParams { archive_id, body }; - let response = match block_on(api.add_read_role_to_archive_with_http_info(params)) { + let response = match block_on(api.add_read_role_to_archive_with_http_info(archive_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -15024,8 +14613,7 @@ fn test_v2_create_logs_metric(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -15050,8 +14638,7 @@ fn test_v2_delete_logs_metric(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -15076,8 +14663,7 @@ fn test_v2_get_logs_metric(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -15103,8 +14689,7 @@ fn test_v2_update_logs_metric(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -15164,7 +14749,7 @@ fn test_v2_list_tag_configurations(world: &mut DatadogWorld, _parameters: &HashM } else { None }; - let params = datadogV2::api::api_metrics::ListTagConfigurationsParams { + let params = datadogV2::api::api_metrics::ListTagConfigurationsOptionalParams { filter_configured, filter_tags_configured, filter_metric_type, @@ -15201,9 +14786,7 @@ fn test_v2_delete_bulk_tags_metrics_configuration( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_metrics::DeleteBulkTagsMetricsConfigurationParams { body }; - let response = match block_on(api.delete_bulk_tags_metrics_configuration_with_http_info(params)) - { + let response = match block_on(api.delete_bulk_tags_metrics_configuration_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -15231,9 +14814,7 @@ fn test_v2_create_bulk_tags_metrics_configuration( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_metrics::CreateBulkTagsMetricsConfigurationParams { body }; - let response = match block_on(api.create_bulk_tags_metrics_configuration_with_http_info(params)) - { + let response = match block_on(api.create_bulk_tags_metrics_configuration_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -15267,24 +14848,24 @@ fn test_v2_list_active_metric_configurations( } else { None }; - let params = datadogV2::api::api_metrics::ListActiveMetricConfigurationsParams { - metric_name, + let params = datadogV2::api::api_metrics::ListActiveMetricConfigurationsOptionalParams { window_seconds, }; - let response = match block_on(api.list_active_metric_configurations_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.list_active_metric_configurations_with_http_info(metric_name, params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -15300,8 +14881,7 @@ fn test_v2_list_tags_by_metric_name( .expect("api instance not found"); let metric_name = serde_json::from_value(_parameters.get("metric_name").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_metrics::ListTagsByMetricNameParams { metric_name }; - let response = match block_on(api.list_tags_by_metric_name_with_http_info(params)) { + let response = match block_on(api.list_tags_by_metric_name_with_http_info(metric_name)) { Ok(response) => response, Err(error) => { return match error { @@ -15355,28 +14935,28 @@ fn test_v2_estimate_metrics_output_series( } else { None }; - let params = datadogV2::api::api_metrics::EstimateMetricsOutputSeriesParams { - metric_name, + let params = datadogV2::api::api_metrics::EstimateMetricsOutputSeriesOptionalParams { filter_groups, filter_hours_ago, filter_num_aggregations, filter_pct, filter_timespan_h, }; - let response = match block_on(api.estimate_metrics_output_series_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.estimate_metrics_output_series_with_http_info(metric_name, params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -15392,8 +14972,7 @@ fn test_v2_delete_tag_configuration( .expect("api instance not found"); let metric_name = serde_json::from_value(_parameters.get("metric_name").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_metrics::DeleteTagConfigurationParams { metric_name }; - let response = match block_on(api.delete_tag_configuration_with_http_info(params)) { + let response = match block_on(api.delete_tag_configuration_with_http_info(metric_name)) { Ok(response) => response, Err(error) => { return match error { @@ -15422,8 +15001,7 @@ fn test_v2_list_tag_configuration_by_name( .expect("api instance not found"); let metric_name = serde_json::from_value(_parameters.get("metric_name").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_metrics::ListTagConfigurationByNameParams { metric_name }; - let response = match block_on(api.list_tag_configuration_by_name_with_http_info(params)) { + let response = match block_on(api.list_tag_configuration_by_name_with_http_info(metric_name)) { Ok(response) => response, Err(error) => { return match error { @@ -15453,8 +15031,7 @@ fn test_v2_update_tag_configuration( let metric_name = serde_json::from_value(_parameters.get("metric_name").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_metrics::UpdateTagConfigurationParams { metric_name, body }; - let response = match block_on(api.update_tag_configuration_with_http_info(params)) { + let response = match block_on(api.update_tag_configuration_with_http_info(metric_name, body)) { Ok(response) => response, Err(error) => { return match error { @@ -15484,8 +15061,7 @@ fn test_v2_create_tag_configuration( let metric_name = serde_json::from_value(_parameters.get("metric_name").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_metrics::CreateTagConfigurationParams { metric_name, body }; - let response = match block_on(api.create_tag_configuration_with_http_info(params)) { + let response = match block_on(api.create_tag_configuration_with_http_info(metric_name, body)) { Ok(response) => response, Err(error) => { return match error { @@ -15514,8 +15090,7 @@ fn test_v2_list_volumes_by_metric_name( .expect("api instance not found"); let metric_name = serde_json::from_value(_parameters.get("metric_name").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_metrics::ListVolumesByMetricNameParams { metric_name }; - let response = match block_on(api.list_volumes_by_metric_name_with_http_info(params)) { + let response = match block_on(api.list_volumes_by_metric_name_with_http_info(metric_name)) { Ok(response) => response, Err(error) => { return match error { @@ -15540,8 +15115,7 @@ fn test_v2_query_scalar_data(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -15566,8 +15140,7 @@ fn test_v2_query_timeseries_data(world: &mut DatadogWorld, _parameters: &HashMap .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_metrics::QueryTimeseriesDataParams { body }; - let response = match block_on(api.query_timeseries_data_with_http_info(params)) { + let response = match block_on(api.query_timeseries_data_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -15597,11 +15170,8 @@ fn test_v2_submit_metrics(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -15656,8 +15226,7 @@ fn test_v2_create_monitor_config_policy( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_monitors::CreateMonitorConfigPolicyParams { body }; - let response = match block_on(api.create_monitor_config_policy_with_http_info(params)) { + let response = match block_on(api.create_monitor_config_policy_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -15685,8 +15254,7 @@ fn test_v2_delete_monitor_config_policy( .as_ref() .expect("api instance not found"); let policy_id = serde_json::from_value(_parameters.get("policy_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_monitors::DeleteMonitorConfigPolicyParams { policy_id }; - let response = match block_on(api.delete_monitor_config_policy_with_http_info(params)) { + let response = match block_on(api.delete_monitor_config_policy_with_http_info(policy_id)) { Ok(response) => response, Err(error) => { return match error { @@ -15714,8 +15282,7 @@ fn test_v2_get_monitor_config_policy( .as_ref() .expect("api instance not found"); let policy_id = serde_json::from_value(_parameters.get("policy_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_monitors::GetMonitorConfigPolicyParams { policy_id }; - let response = match block_on(api.get_monitor_config_policy_with_http_info(params)) { + let response = match block_on(api.get_monitor_config_policy_with_http_info(policy_id)) { Ok(response) => response, Err(error) => { return match error { @@ -15744,8 +15311,8 @@ fn test_v2_update_monitor_config_policy( .expect("api instance not found"); let policy_id = serde_json::from_value(_parameters.get("policy_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_monitors::UpdateMonitorConfigPolicyParams { policy_id, body }; - let response = match block_on(api.update_monitor_config_policy_with_http_info(params)) { + let response = match block_on(api.update_monitor_config_policy_with_http_info(policy_id, body)) + { Ok(response) => response, Err(error) => { return match error { @@ -15818,7 +15385,7 @@ fn test_v2_list_roles(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -15876,8 +15442,7 @@ fn test_v2_delete_role(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -15902,8 +15467,7 @@ fn test_v2_get_role(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -15929,8 +15493,7 @@ fn test_v2_update_role(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -15956,8 +15519,7 @@ fn test_v2_clone_role(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -15986,8 +15548,7 @@ fn test_v2_remove_permission_from_role( .expect("api instance not found"); let role_id = serde_json::from_value(_parameters.get("role_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_roles::RemovePermissionFromRoleParams { role_id, body }; - let response = match block_on(api.remove_permission_from_role_with_http_info(params)) { + let response = match block_on(api.remove_permission_from_role_with_http_info(role_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -16012,8 +15573,7 @@ fn test_v2_list_role_permissions(world: &mut DatadogWorld, _parameters: &HashMap .as_ref() .expect("api instance not found"); let role_id = serde_json::from_value(_parameters.get("role_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_roles::ListRolePermissionsParams { role_id }; - let response = match block_on(api.list_role_permissions_with_http_info(params)) { + let response = match block_on(api.list_role_permissions_with_http_info(role_id)) { Ok(response) => response, Err(error) => { return match error { @@ -16039,8 +15599,7 @@ fn test_v2_add_permission_to_role(world: &mut DatadogWorld, _parameters: &HashMa .expect("api instance not found"); let role_id = serde_json::from_value(_parameters.get("role_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_roles::AddPermissionToRoleParams { role_id, body }; - let response = match block_on(api.add_permission_to_role_with_http_info(params)) { + let response = match block_on(api.add_permission_to_role_with_http_info(role_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -16066,8 +15625,7 @@ fn test_v2_remove_user_from_role(world: &mut DatadogWorld, _parameters: &HashMap .expect("api instance not found"); let role_id = serde_json::from_value(_parameters.get("role_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_roles::RemoveUserFromRoleParams { role_id, body }; - let response = match block_on(api.remove_user_from_role_with_http_info(params)) { + let response = match block_on(api.remove_user_from_role_with_http_info(role_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -16112,14 +15670,13 @@ fn test_v2_list_role_users(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -16145,8 +15702,7 @@ fn test_v2_add_user_to_role(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -16232,7 +15788,7 @@ fn test_v2_list_findings(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -16303,11 +15858,9 @@ fn test_v2_get_finding(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -16356,8 +15909,7 @@ fn test_v2_create_security_filter(world: &mut DatadogWorld, _parameters: &HashMa .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_security_monitoring::CreateSecurityFilterParams { body }; - let response = match block_on(api.create_security_filter_with_http_info(params)) { + let response = match block_on(api.create_security_filter_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -16383,9 +15935,7 @@ fn test_v2_delete_security_filter(world: &mut DatadogWorld, _parameters: &HashMa .expect("api instance not found"); let security_filter_id = serde_json::from_value(_parameters.get("security_filter_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_security_monitoring::DeleteSecurityFilterParams { security_filter_id }; - let response = match block_on(api.delete_security_filter_with_http_info(params)) { + let response = match block_on(api.delete_security_filter_with_http_info(security_filter_id)) { Ok(response) => response, Err(error) => { return match error { @@ -16411,9 +15961,7 @@ fn test_v2_get_security_filter(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -16440,24 +15988,21 @@ fn test_v2_update_security_filter(world: &mut DatadogWorld, _parameters: &HashMa let security_filter_id = serde_json::from_value(_parameters.get("security_filter_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_security_monitoring::UpdateSecurityFilterParams { - security_filter_id, - body, - }; - let response = match block_on(api.update_security_filter_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.update_security_filter_with_http_info(security_filter_id, body)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -16481,10 +16026,11 @@ fn test_v2_list_security_monitoring_rules( } else { None }; - let params = datadogV2::api::api_security_monitoring::ListSecurityMonitoringRulesParams { - page_size, - page_number, - }; + let params = + datadogV2::api::api_security_monitoring::ListSecurityMonitoringRulesOptionalParams { + page_size, + page_number, + }; let response = match block_on(api.list_security_monitoring_rules_with_http_info(params)) { Ok(response) => response, Err(error) => { @@ -16513,9 +16059,7 @@ fn test_v2_create_security_monitoring_rule( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_security_monitoring::CreateSecurityMonitoringRuleParams { body }; - let response = match block_on(api.create_security_monitoring_rule_with_http_info(params)) { + let response = match block_on(api.create_security_monitoring_rule_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -16543,9 +16087,7 @@ fn test_v2_delete_security_monitoring_rule( .as_ref() .expect("api instance not found"); let rule_id = serde_json::from_value(_parameters.get("rule_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_security_monitoring::DeleteSecurityMonitoringRuleParams { rule_id }; - let response = match block_on(api.delete_security_monitoring_rule_with_http_info(params)) { + let response = match block_on(api.delete_security_monitoring_rule_with_http_info(rule_id)) { Ok(response) => response, Err(error) => { return match error { @@ -16573,9 +16115,7 @@ fn test_v2_get_security_monitoring_rule( .as_ref() .expect("api instance not found"); let rule_id = serde_json::from_value(_parameters.get("rule_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_security_monitoring::GetSecurityMonitoringRuleParams { rule_id }; - let response = match block_on(api.get_security_monitoring_rule_with_http_info(params)) { + let response = match block_on(api.get_security_monitoring_rule_with_http_info(rule_id)) { Ok(response) => response, Err(error) => { return match error { @@ -16604,11 +16144,8 @@ fn test_v2_update_security_monitoring_rule( .expect("api instance not found"); let rule_id = serde_json::from_value(_parameters.get("rule_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_security_monitoring::UpdateSecurityMonitoringRuleParams { - rule_id, - body, - }; - let response = match block_on(api.update_security_monitoring_rule_with_http_info(params)) { + let response = match block_on(api.update_security_monitoring_rule_with_http_info(rule_id, body)) + { Ok(response) => response, Err(error) => { return match error { @@ -16665,14 +16202,15 @@ fn test_v2_list_security_monitoring_signals( } else { None }; - let params = datadogV2::api::api_security_monitoring::ListSecurityMonitoringSignalsParams { - filter_query, - filter_from, - filter_to, - sort, - page_cursor, - page_limit, - }; + let params = + datadogV2::api::api_security_monitoring::ListSecurityMonitoringSignalsOptionalParams { + filter_query, + filter_from, + filter_to, + sort, + page_cursor, + page_limit, + }; let response = match block_on(api.list_security_monitoring_signals_with_http_info(params)) { Ok(response) => response, Err(error) => { @@ -16706,7 +16244,9 @@ fn test_v2_search_security_monitoring_signals( None }; let params = - datadogV2::api::api_security_monitoring::SearchSecurityMonitoringSignalsParams { body }; + datadogV2::api::api_security_monitoring::SearchSecurityMonitoringSignalsOptionalParams { + body, + }; let response = match block_on(api.search_security_monitoring_signals_with_http_info(params)) { Ok(response) => response, Err(error) => { @@ -16735,9 +16275,7 @@ fn test_v2_get_security_monitoring_signal( .as_ref() .expect("api instance not found"); let signal_id = serde_json::from_value(_parameters.get("signal_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_security_monitoring::GetSecurityMonitoringSignalParams { signal_id }; - let response = match block_on(api.get_security_monitoring_signal_with_http_info(params)) { + let response = match block_on(api.get_security_monitoring_signal_with_http_info(signal_id)) { Ok(response) => response, Err(error) => { return match error { @@ -16766,26 +16304,22 @@ fn test_v2_edit_security_monitoring_signal_assignee( .expect("api instance not found"); let signal_id = serde_json::from_value(_parameters.get("signal_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_security_monitoring::EditSecurityMonitoringSignalAssigneeParams { - signal_id, - body, - }; - let response = - match block_on(api.edit_security_monitoring_signal_assignee_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); - } + let response = match block_on( + api.edit_security_monitoring_signal_assignee_with_http_info(signal_id, body), + ) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); } - _ => panic!("error parsing response: {}", error), - }; - } - }; + } + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -16801,26 +16335,22 @@ fn test_v2_edit_security_monitoring_signal_incidents( .expect("api instance not found"); let signal_id = serde_json::from_value(_parameters.get("signal_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_security_monitoring::EditSecurityMonitoringSignalIncidentsParams { - signal_id, - body, - }; - let response = - match block_on(api.edit_security_monitoring_signal_incidents_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); - } + let response = match block_on( + api.edit_security_monitoring_signal_incidents_with_http_info(signal_id, body), + ) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); } - _ => panic!("error parsing response: {}", error), - }; - } - }; + } + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -16836,25 +16366,21 @@ fn test_v2_edit_security_monitoring_signal_state( .expect("api instance not found"); let signal_id = serde_json::from_value(_parameters.get("signal_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_security_monitoring::EditSecurityMonitoringSignalStateParams { - signal_id, - body, - }; - let response = match block_on(api.edit_security_monitoring_signal_state_with_http_info(params)) - { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.edit_security_monitoring_signal_state_with_http_info(signal_id, body)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -16875,7 +16401,7 @@ fn test_v2_list_powerpacks(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -16931,8 +16456,7 @@ fn test_v2_delete_powerpack(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -16958,8 +16482,7 @@ fn test_v2_get_powerpack(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -16986,8 +16509,7 @@ fn test_v2_update_powerpack(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -17041,7 +16563,7 @@ fn test_v2_list_processes(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -17106,9 +16626,7 @@ fn test_v2_get_restriction_policy(world: &mut DatadogWorld, _parameters: &HashMa .expect("api instance not found"); let resource_id = serde_json::from_value(_parameters.get("resource_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_restriction_policies::GetRestrictionPolicyParams { resource_id }; - let response = match block_on(api.get_restriction_policy_with_http_info(params)) { + let response = match block_on(api.get_restriction_policy_with_http_info(resource_id)) { Ok(response) => response, Err(error) => { return match error { @@ -17138,11 +16656,7 @@ fn test_v2_update_restriction_policy( let resource_id = serde_json::from_value(_parameters.get("resource_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_restriction_policies::UpdateRestrictionPolicyParams { - resource_id, - body, - }; - let response = match block_on(api.update_restriction_policy_with_http_info(params)) { + let response = match block_on(api.update_restriction_policy_with_http_info(resource_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -17167,8 +16681,7 @@ fn test_v2_aggregate_rum_events(world: &mut DatadogWorld, _parameters: &HashMap< .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_rum::AggregateRUMEventsParams { body }; - let response = match block_on(api.aggregate_rum_events_with_http_info(params)) { + let response = match block_on(api.aggregate_rum_events_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -17217,8 +16730,7 @@ fn test_v2_create_rum_application(world: &mut DatadogWorld, _parameters: &HashMa .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_rum::CreateRUMApplicationParams { body }; - let response = match block_on(api.create_rum_application_with_http_info(params)) { + let response = match block_on(api.create_rum_application_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -17243,8 +16755,7 @@ fn test_v2_delete_rum_application(world: &mut DatadogWorld, _parameters: &HashMa .as_ref() .expect("api instance not found"); let id = serde_json::from_value(_parameters.get("id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_rum::DeleteRUMApplicationParams { id }; - let response = match block_on(api.delete_rum_application_with_http_info(params)) { + let response = match block_on(api.delete_rum_application_with_http_info(id)) { Ok(response) => response, Err(error) => { return match error { @@ -17269,8 +16780,7 @@ fn test_v2_get_rum_application(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -17296,8 +16806,7 @@ fn test_v2_update_rum_application(world: &mut DatadogWorld, _parameters: &HashMa .expect("api instance not found"); let id = serde_json::from_value(_parameters.get("id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_rum::UpdateRUMApplicationParams { id, body }; - let response = match block_on(api.update_rum_application_with_http_info(params)) { + let response = match block_on(api.update_rum_application_with_http_info(id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -17351,7 +16860,7 @@ fn test_v2_list_rum_events(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -17414,7 +16922,7 @@ fn test_v2_upload_id_p_metadata(world: &mut DatadogWorld, _parameters: &HashMap< } else { None }; - let params = datadogV2::api::api_organizations::UploadIdPMetadataParams { idp_file }; + let params = datadogV2::api::api_organizations::UploadIdPMetadataOptionalParams { idp_file }; let response = match block_on(api.upload_id_p_metadata_with_http_info(params)) { Ok(response) => response, Err(error) => { @@ -17490,7 +16998,7 @@ fn test_v2_list_scorecard_outcomes(world: &mut DatadogWorld, _parameters: &HashM } else { None }; - let params = datadogV2::api::api_service_scorecards::ListScorecardOutcomesParams { + let params = datadogV2::api::api_service_scorecards::ListScorecardOutcomesOptionalParams { page_size, page_offset, include, @@ -17530,9 +17038,7 @@ fn test_v2_create_scorecard_outcomes_batch( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_service_scorecards::CreateScorecardOutcomesBatchParams { body }; - let response = match block_on(api.create_scorecard_outcomes_batch_with_http_info(params)) { + let response = match block_on(api.create_scorecard_outcomes_batch_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -17607,7 +17113,7 @@ fn test_v2_list_scorecard_rules(world: &mut DatadogWorld, _parameters: &HashMap< } else { None }; - let params = datadogV2::api::api_service_scorecards::ListScorecardRulesParams { + let params = datadogV2::api::api_service_scorecards::ListScorecardRulesOptionalParams { page_size, page_offset, include, @@ -17644,8 +17150,7 @@ fn test_v2_create_scorecard_rule(world: &mut DatadogWorld, _parameters: &HashMap .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_service_scorecards::CreateScorecardRuleParams { body }; - let response = match block_on(api.create_scorecard_rule_with_http_info(params)) { + let response = match block_on(api.create_scorecard_rule_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -17670,8 +17175,7 @@ fn test_v2_delete_scorecard_rule(world: &mut DatadogWorld, _parameters: &HashMap .as_ref() .expect("api instance not found"); let rule_id = serde_json::from_value(_parameters.get("rule_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_service_scorecards::DeleteScorecardRuleParams { rule_id }; - let response = match block_on(api.delete_scorecard_rule_with_http_info(params)) { + let response = match block_on(api.delete_scorecard_rule_with_http_info(rule_id)) { Ok(response) => response, Err(error) => { return match error { @@ -17753,12 +17257,8 @@ fn test_v2_create_cloud_workload_security_agent_rule( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_cloud_workload_security::CreateCloudWorkloadSecurityAgentRuleParams { - body, - }; let response = - match block_on(api.create_cloud_workload_security_agent_rule_with_http_info(params)) { + match block_on(api.create_cloud_workload_security_agent_rule_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -17787,12 +17287,9 @@ fn test_v2_delete_cloud_workload_security_agent_rule( .expect("api instance not found"); let agent_rule_id = serde_json::from_value(_parameters.get("agent_rule_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_cloud_workload_security::DeleteCloudWorkloadSecurityAgentRuleParams { - agent_rule_id, - }; let response = - match block_on(api.delete_cloud_workload_security_agent_rule_with_http_info(params)) { + match block_on(api.delete_cloud_workload_security_agent_rule_with_http_info(agent_rule_id)) + { Ok(response) => response, Err(error) => { return match error { @@ -17821,25 +17318,21 @@ fn test_v2_get_cloud_workload_security_agent_rule( .expect("api instance not found"); let agent_rule_id = serde_json::from_value(_parameters.get("agent_rule_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_cloud_workload_security::GetCloudWorkloadSecurityAgentRuleParams { - agent_rule_id, - }; - let response = match block_on(api.get_cloud_workload_security_agent_rule_with_http_info(params)) - { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.get_cloud_workload_security_agent_rule_with_http_info(agent_rule_id)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -17856,26 +17349,22 @@ fn test_v2_update_cloud_workload_security_agent_rule( let agent_rule_id = serde_json::from_value(_parameters.get("agent_rule_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_cloud_workload_security::UpdateCloudWorkloadSecurityAgentRuleParams { - agent_rule_id, - body, - }; - let response = - match block_on(api.update_cloud_workload_security_agent_rule_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); - } + let response = match block_on( + api.update_cloud_workload_security_agent_rule_with_http_info(agent_rule_id, body), + ) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); } - _ => panic!("error parsing response: {}", error), - }; - } - }; + } + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -17911,8 +17400,7 @@ fn test_v2_reorder_scanning_groups(world: &mut DatadogWorld, _parameters: &HashM .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_sensitive_data_scanner::ReorderScanningGroupsParams { body }; - let response = match block_on(api.reorder_scanning_groups_with_http_info(params)) { + let response = match block_on(api.reorder_scanning_groups_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -17937,8 +17425,7 @@ fn test_v2_create_scanning_group(world: &mut DatadogWorld, _parameters: &HashMap .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_sensitive_data_scanner::CreateScanningGroupParams { body }; - let response = match block_on(api.create_scanning_group_with_http_info(params)) { + let response = match block_on(api.create_scanning_group_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -17964,9 +17451,7 @@ fn test_v2_delete_scanning_group(world: &mut DatadogWorld, _parameters: &HashMap .expect("api instance not found"); let group_id = serde_json::from_value(_parameters.get("group_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_sensitive_data_scanner::DeleteScanningGroupParams { group_id, body }; - let response = match block_on(api.delete_scanning_group_with_http_info(params)) { + let response = match block_on(api.delete_scanning_group_with_http_info(group_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -17992,9 +17477,7 @@ fn test_v2_update_scanning_group(world: &mut DatadogWorld, _parameters: &HashMap .expect("api instance not found"); let group_id = serde_json::from_value(_parameters.get("group_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_sensitive_data_scanner::UpdateScanningGroupParams { group_id, body }; - let response = match block_on(api.update_scanning_group_with_http_info(params)) { + let response = match block_on(api.update_scanning_group_with_http_info(group_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -18019,8 +17502,7 @@ fn test_v2_create_scanning_rule(world: &mut DatadogWorld, _parameters: &HashMap< .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_sensitive_data_scanner::CreateScanningRuleParams { body }; - let response = match block_on(api.create_scanning_rule_with_http_info(params)) { + let response = match block_on(api.create_scanning_rule_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -18046,9 +17528,7 @@ fn test_v2_delete_scanning_rule(world: &mut DatadogWorld, _parameters: &HashMap< .expect("api instance not found"); let rule_id = serde_json::from_value(_parameters.get("rule_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_sensitive_data_scanner::DeleteScanningRuleParams { rule_id, body }; - let response = match block_on(api.delete_scanning_rule_with_http_info(params)) { + let response = match block_on(api.delete_scanning_rule_with_http_info(rule_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -18074,9 +17554,7 @@ fn test_v2_update_scanning_rule(world: &mut DatadogWorld, _parameters: &HashMap< .expect("api instance not found"); let rule_id = serde_json::from_value(_parameters.get("rule_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_sensitive_data_scanner::UpdateScanningRuleParams { rule_id, body }; - let response = match block_on(api.update_scanning_rule_with_http_info(params)) { + let response = match block_on(api.update_scanning_rule_with_http_info(rule_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -18125,8 +17603,7 @@ fn test_v2_create_service_account(world: &mut DatadogWorld, _parameters: &HashMa .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_service_accounts::CreateServiceAccountParams { body }; - let response = match block_on(api.create_service_account_with_http_info(params)) { + let response = match block_on(api.create_service_account_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -18186,17 +17663,18 @@ fn test_v2_list_service_account_application_keys( } else { None }; - let params = datadogV2::api::api_service_accounts::ListServiceAccountApplicationKeysParams { - service_account_id, - page_size, - page_number, - sort, - filter, - filter_created_at_start, - filter_created_at_end, - }; - let response = match block_on(api.list_service_account_application_keys_with_http_info(params)) - { + let params = + datadogV2::api::api_service_accounts::ListServiceAccountApplicationKeysOptionalParams { + page_size, + page_number, + sort, + filter, + filter_created_at_start, + filter_created_at_end, + }; + let response = match block_on( + api.list_service_account_application_keys_with_http_info(service_account_id, params), + ) { Ok(response) => response, Err(error) => { return match error { @@ -18226,12 +17704,9 @@ fn test_v2_create_service_account_application_key( let service_account_id = serde_json::from_value(_parameters.get("service_account_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_service_accounts::CreateServiceAccountApplicationKeyParams { - service_account_id, - body, - }; - let response = match block_on(api.create_service_account_application_key_with_http_info(params)) - { + let response = match block_on( + api.create_service_account_application_key_with_http_info(service_account_id, body), + ) { Ok(response) => response, Err(error) => { return match error { @@ -18262,12 +17737,9 @@ fn test_v2_delete_service_account_application_key( serde_json::from_value(_parameters.get("service_account_id").unwrap().clone()).unwrap(); let app_key_id = serde_json::from_value(_parameters.get("app_key_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_service_accounts::DeleteServiceAccountApplicationKeyParams { - service_account_id, - app_key_id, - }; - let response = match block_on(api.delete_service_account_application_key_with_http_info(params)) - { + let response = match block_on( + api.delete_service_account_application_key_with_http_info(service_account_id, app_key_id), + ) { Ok(response) => response, Err(error) => { return match error { @@ -18298,11 +17770,9 @@ fn test_v2_get_service_account_application_key( serde_json::from_value(_parameters.get("service_account_id").unwrap().clone()).unwrap(); let app_key_id = serde_json::from_value(_parameters.get("app_key_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_service_accounts::GetServiceAccountApplicationKeyParams { - service_account_id, - app_key_id, - }; - let response = match block_on(api.get_service_account_application_key_with_http_info(params)) { + let response = match block_on( + api.get_service_account_application_key_with_http_info(service_account_id, app_key_id), + ) { Ok(response) => response, Err(error) => { return match error { @@ -18334,13 +17804,11 @@ fn test_v2_update_service_account_application_key( let app_key_id = serde_json::from_value(_parameters.get("app_key_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_service_accounts::UpdateServiceAccountApplicationKeyParams { + let response = match block_on(api.update_service_account_application_key_with_http_info( service_account_id, app_key_id, body, - }; - let response = match block_on(api.update_service_account_application_key_with_http_info(params)) - { + )) { Ok(response) => response, Err(error) => { return match error { @@ -18384,7 +17852,7 @@ fn test_v2_list_incident_services(world: &mut DatadogWorld, _parameters: &HashMa } else { None }; - let params = datadogV2::api::api_incident_services::ListIncidentServicesParams { + let params = datadogV2::api::api_incident_services::ListIncidentServicesOptionalParams { include, page_size, page_offset, @@ -18415,8 +17883,7 @@ fn test_v2_create_incident_service(world: &mut DatadogWorld, _parameters: &HashM .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_incident_services::CreateIncidentServiceParams { body }; - let response = match block_on(api.create_incident_service_with_http_info(params)) { + let response = match block_on(api.create_incident_service_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -18442,8 +17909,7 @@ fn test_v2_delete_incident_service(world: &mut DatadogWorld, _parameters: &HashM .expect("api instance not found"); let service_id = serde_json::from_value(_parameters.get("service_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_incident_services::DeleteIncidentServiceParams { service_id }; - let response = match block_on(api.delete_incident_service_with_http_info(params)) { + let response = match block_on(api.delete_incident_service_with_http_info(service_id)) { Ok(response) => response, Err(error) => { return match error { @@ -18474,11 +17940,9 @@ fn test_v2_get_incident_service(world: &mut DatadogWorld, _parameters: &HashMap< } else { None }; - let params = datadogV2::api::api_incident_services::GetIncidentServiceParams { - service_id, - include, - }; - let response = match block_on(api.get_incident_service_with_http_info(params)) { + let params = + datadogV2::api::api_incident_services::GetIncidentServiceOptionalParams { include }; + let response = match block_on(api.get_incident_service_with_http_info(service_id, params)) { Ok(response) => response, Err(error) => { return match error { @@ -18505,9 +17969,7 @@ fn test_v2_update_incident_service(world: &mut DatadogWorld, _parameters: &HashM let service_id = serde_json::from_value(_parameters.get("service_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_incident_services::UpdateIncidentServiceParams { service_id, body }; - let response = match block_on(api.update_incident_service_with_http_info(params)) { + let response = match block_on(api.update_incident_service_with_http_info(service_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -18549,7 +18011,7 @@ fn test_v2_list_service_definitions( } else { None }; - let params = datadogV2::api::api_service_definition::ListServiceDefinitionsParams { + let params = datadogV2::api::api_service_definition::ListServiceDefinitionsOptionalParams { page_size, page_number, schema_version, @@ -18582,9 +18044,7 @@ fn test_v2_create_or_update_service_definitions( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_service_definition::CreateOrUpdateServiceDefinitionsParams { body }; - let response = match block_on(api.create_or_update_service_definitions_with_http_info(params)) { + let response = match block_on(api.create_or_update_service_definitions_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -18613,9 +18073,7 @@ fn test_v2_delete_service_definition( .expect("api instance not found"); let service_name = serde_json::from_value(_parameters.get("service_name").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_service_definition::DeleteServiceDefinitionParams { service_name }; - let response = match block_on(api.delete_service_definition_with_http_info(params)) { + let response = match block_on(api.delete_service_definition_with_http_info(service_name)) { Ok(response) => response, Err(error) => { return match error { @@ -18646,11 +18104,10 @@ fn test_v2_get_service_definition(world: &mut DatadogWorld, _parameters: &HashMa } else { None }; - let params = datadogV2::api::api_service_definition::GetServiceDefinitionParams { - service_name, + let params = datadogV2::api::api_service_definition::GetServiceDefinitionOptionalParams { schema_version, }; - let response = match block_on(api.get_service_definition_with_http_info(params)) { + let response = match block_on(api.get_service_definition_with_http_info(service_name, params)) { Ok(response) => response, Err(error) => { return match error { @@ -18675,8 +18132,7 @@ fn test_v2_aggregate_spans(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -18730,7 +18186,7 @@ fn test_v2_list_spans_get(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -18819,8 +18274,7 @@ fn test_v2_set_on_demand_concurrency_cap( .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_synthetics::SetOnDemandConcurrencyCapParams { body }; - let response = match block_on(api.set_on_demand_concurrency_cap_with_http_info(params)) { + let response = match block_on(api.set_on_demand_concurrency_cap_with_http_info(body)) { Ok(response) => response, Err(error) => { return match error { @@ -18879,7 +18333,7 @@ fn test_v2_list_teams(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -18939,8 +18392,7 @@ fn test_v2_delete_team(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -18965,8 +18417,7 @@ fn test_v2_get_team(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -18992,8 +18443,7 @@ fn test_v2_update_team(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -19018,8 +18468,7 @@ fn test_v2_get_team_links(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -19045,8 +18494,7 @@ fn test_v2_create_team_link(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -19072,8 +18520,7 @@ fn test_v2_delete_team_link(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -19099,8 +18546,7 @@ fn test_v2_get_team_link(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -19127,12 +18573,7 @@ fn test_v2_update_team_link(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -19177,14 +18618,13 @@ fn test_v2_get_team_memberships(world: &mut DatadogWorld, _parameters: &HashMap< } else { None }; - let params = datadogV2::api::api_teams::GetTeamMembershipsParams { - team_id, + let params = datadogV2::api::api_teams::GetTeamMembershipsOptionalParams { page_size, page_number, sort, filter_keyword, }; - let response = match block_on(api.get_team_memberships_with_http_info(params)) { + let response = match block_on(api.get_team_memberships_with_http_info(team_id, params)) { Ok(response) => response, Err(error) => { return match error { @@ -19210,8 +18650,7 @@ fn test_v2_create_team_membership(world: &mut DatadogWorld, _parameters: &HashMa .expect("api instance not found"); let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_teams::CreateTeamMembershipParams { team_id, body }; - let response = match block_on(api.create_team_membership_with_http_info(params)) { + let response = match block_on(api.create_team_membership_with_http_info(team_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -19237,8 +18676,7 @@ fn test_v2_delete_team_membership(world: &mut DatadogWorld, _parameters: &HashMa .expect("api instance not found"); let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); let user_id = serde_json::from_value(_parameters.get("user_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_teams::DeleteTeamMembershipParams { team_id, user_id }; - let response = match block_on(api.delete_team_membership_with_http_info(params)) { + let response = match block_on(api.delete_team_membership_with_http_info(team_id, user_id)) { Ok(response) => response, Err(error) => { return match error { @@ -19265,12 +18703,8 @@ fn test_v2_update_team_membership(world: &mut DatadogWorld, _parameters: &HashMa let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); let user_id = serde_json::from_value(_parameters.get("user_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_teams::UpdateTeamMembershipParams { - team_id, - user_id, - body, - }; - let response = match block_on(api.update_team_membership_with_http_info(params)) { + let response = match block_on(api.update_team_membership_with_http_info(team_id, user_id, body)) + { Ok(response) => response, Err(error) => { return match error { @@ -19298,8 +18732,7 @@ fn test_v2_get_team_permission_settings( .as_ref() .expect("api instance not found"); let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_teams::GetTeamPermissionSettingsParams { team_id }; - let response = match block_on(api.get_team_permission_settings_with_http_info(params)) { + let response = match block_on(api.get_team_permission_settings_with_http_info(team_id)) { Ok(response) => response, Err(error) => { return match error { @@ -19329,25 +18762,21 @@ fn test_v2_update_team_permission_setting( let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); let action = serde_json::from_value(_parameters.get("action").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_teams::UpdateTeamPermissionSettingParams { - team_id, - action, - body, - }; - let response = match block_on(api.update_team_permission_setting_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => { - world.response.code = e.status.as_u16(); - if let Some(entity) = e.entity { - world.response.object = serde_json::to_value(entity).unwrap(); + let response = + match block_on(api.update_team_permission_setting_with_http_info(team_id, action, body)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } } - } - _ => panic!("error parsing response: {}", error), - }; - } - }; + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } @@ -19359,8 +18788,7 @@ fn test_v2_get_user_memberships(world: &mut DatadogWorld, _parameters: &HashMap< .as_ref() .expect("api instance not found"); let user_uuid = serde_json::from_value(_parameters.get("user_uuid").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_teams::GetUserMembershipsParams { user_uuid }; - let response = match block_on(api.get_user_memberships_with_http_info(params)) { + let response = match block_on(api.get_user_memberships_with_http_info(user_uuid)) { Ok(response) => response, Err(error) => { return match error { @@ -19404,7 +18832,7 @@ fn test_v2_list_incident_teams(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -19461,8 +18888,7 @@ fn test_v2_delete_incident_team(world: &mut DatadogWorld, _parameters: &HashMap< .as_ref() .expect("api instance not found"); let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_incident_teams::DeleteIncidentTeamParams { team_id }; - let response = match block_on(api.delete_incident_team_with_http_info(params)) { + let response = match block_on(api.delete_incident_team_with_http_info(team_id)) { Ok(response) => response, Err(error) => { return match error { @@ -19492,8 +18918,8 @@ fn test_v2_get_incident_team(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -19519,8 +18945,7 @@ fn test_v2_update_incident_team(world: &mut DatadogWorld, _parameters: &HashMap< .expect("api instance not found"); let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_incident_teams::UpdateIncidentTeamParams { team_id, body }; - let response = match block_on(api.update_incident_team_with_http_info(params)) { + let response = match block_on(api.update_incident_team_with_http_info(team_id, body)) { Ok(response) => response, Err(error) => { return match error { @@ -19545,8 +18970,7 @@ fn test_v2_send_invitations(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -19572,10 +18996,7 @@ fn test_v2_get_invitation(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -19629,7 +19050,7 @@ fn test_v2_list_users(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -19688,8 +19108,7 @@ fn test_v2_disable_user(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -19714,8 +19133,7 @@ fn test_v2_get_user(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -19741,8 +19159,7 @@ fn test_v2_update_user(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -19767,8 +19184,7 @@ fn test_v2_list_user_organizations(world: &mut DatadogWorld, _parameters: &HashM .as_ref() .expect("api instance not found"); let user_id = serde_json::from_value(_parameters.get("user_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_users::ListUserOrganizationsParams { user_id }; - let response = match block_on(api.list_user_organizations_with_http_info(params)) { + let response = match block_on(api.list_user_organizations_with_http_info(user_id)) { Ok(response) => response, Err(error) => { return match error { @@ -19793,8 +19209,7 @@ fn test_v2_list_user_permissions(world: &mut DatadogWorld, _parameters: &HashMap .as_ref() .expect("api instance not found"); let user_id = serde_json::from_value(_parameters.get("user_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_users::ListUserPermissionsParams { user_id }; - let response = match block_on(api.list_user_permissions_with_http_info(params)) { + let response = match block_on(api.list_user_permissions_with_http_info(user_id)) { Ok(response) => response, Err(error) => { return match error { From d22601022685499f39773a814fa178778d529a52 Mon Sep 17 00:00:00 2001 From: Kevin Zou Date: Fri, 2 Feb 2024 14:33:13 -0500 Subject: [PATCH 4/5] remove box override --- .generator/src/generator/openapi.py | 1 - 1 file changed, 1 deletion(-) diff --git a/.generator/src/generator/openapi.py b/.generator/src/generator/openapi.py index 18aa4fe26..d60b97c91 100644 --- a/.generator/src/generator/openapi.py +++ b/.generator/src/generator/openapi.py @@ -35,7 +35,6 @@ def option_wrapper(name, option, nullable): def type_to_rust(schema, alternative_name=None, render_nullable=False, render_option=True, render_box=False, version=None): """Return Rust type name for the type.""" - render_box = False # special case for additionalProperties: true if schema is True or schema == {}: return "serde_json::Value" From 32d496be2445a57ff7fc072d38f61f0cfaa3c28d Mon Sep 17 00:00:00 2001 From: Kevin Zou Date: Mon, 5 Feb 2024 15:35:44 -0500 Subject: [PATCH 5/5] template refactor --- .generator/src/generator/cli.py | 3 +-- .generator/src/generator/openapi.py | 15 +++------------ .generator/src/generator/templates/api.j2 | 12 +++++++----- .../src/generator/templates/function_mappings.j2 | 9 +++++---- 4 files changed, 16 insertions(+), 23 deletions(-) diff --git a/.generator/src/generator/cli.py b/.generator/src/generator/cli.py index 01569f574..d2547f629 100644 --- a/.generator/src/generator/cli.py +++ b/.generator/src/generator/cli.py @@ -47,8 +47,7 @@ def cli(specs, output): env.filters["untitle_case"] = formatter.untitle_case env.filters["upperfirst"] = utils.upperfirst env.filters["variable_name"] = formatter.variable_name - env.filters["has_required"] = openapi.has_required - env.filters["has_optional"] = openapi.has_optional + env.filters["has_optional_parameter"] = openapi.has_optional_parameter env.globals["enumerate"] = enumerate env.globals["responses_by_types"] = openapi.responses_by_types diff --git a/.generator/src/generator/openapi.py b/.generator/src/generator/openapi.py index d60b97c91..0bf8565bc 100644 --- a/.generator/src/generator/openapi.py +++ b/.generator/src/generator/openapi.py @@ -92,25 +92,16 @@ def get_type_for_attribute(schema, attribute, current_name=None): def get_type_for_parameter(parameter, version=None, render_option=None): """Return Rust type name for the parameter.""" if render_option is None: - if "required" in parameter: - render_option = not parameter["required"] - else: - render_option = True + render_option = not parameter.get("required") if "content" in parameter: assert "in" not in parameter for content in parameter["content"].values(): return type_to_rust(content["schema"], version=version, render_option=render_option) return type_to_rust(parameter.get("schema"), version=version, render_option=render_option) -def has_required(operation): - for _, parameter in parameters(operation): - if parameter.get("required", False) == True: - return True - return False - -def has_optional(operation): +def has_optional_parameter(operation): for _, parameter in parameters(operation): - if parameter.get("required", False) != True: + if not parameter.get("required"): return True return False diff --git a/.generator/src/generator/templates/api.j2 b/.generator/src/generator/templates/api.j2 index aebad1036..32e710cd1 100644 --- a/.generator/src/generator/templates/api.j2 +++ b/.generator/src/generator/templates/api.j2 @@ -9,8 +9,9 @@ use crate::datadog::*; {%- set returnType = operation|return_type(version) %} {%- set formParameter = operation|form_parameter %} {%- set optionalBody = false if "required" in operation.requestBody and operation.requestBody.required else true %} +{%- set optionalParams = operation|parameters|rejectattr('1.required', 'equalto', true) | list %} -{%- for name, parameter in operation|parameters if parameter.required != true %} +{%- for name, parameter in optionalParams %} {%- if loop.first %} /// {{operation.operationId}}OptionalParams is a struct for passing parameters to the method [`{{ structName }}::{{operation.operationId | snake_case}}`] #[derive(Clone, Default, Debug)] @@ -24,7 +25,7 @@ pub struct {{operation.operationId}}OptionalParams { } {% endif %} {%- endfor %} -{%- for name, parameter in operation|parameters if parameter.required != true %} +{%- for name, parameter in optionalParams %} {%- if loop.first %} impl {{operation.operationId}}OptionalParams { {%- endif %} @@ -87,11 +88,12 @@ impl {{ structName }} { {%- set httpMethod = method.upper() %} {%- set returnType = operation|return_type(version) %} {%- set formParameter = operation|form_parameter %} + {%- set requiredParams = operation|parameters|selectattr('1.required', 'equalto', true) | list %} {% if operation.description is defined %} {{ operation.description | block_comment }} {%- endif %} - pub async fn {{operation.operationId | snake_case}}(&self{% for name, parameter in operation|parameters if parameter.required == true %}, {{name|variable_name}}: {{ get_type_for_parameter(parameter, version) }}{% endfor %}{% if operation|has_optional %}, params: {{operation.operationId}}OptionalParams{% endif %}) -> Result, Error<{{operation.operationId}}Error>> { - match self.{{operation.operationId | snake_case}}_with_http_info({% for name, parameter in operation|parameters if parameter.required == true %}{{name|variable_name}}{% if loop.last %}{% if operation|has_optional %}, {% endif %}{% else %}, {% endif %}{% endfor %}{% if operation|has_optional %} params{% endif %}).await { + pub async fn {{operation.operationId | snake_case}}(&self{% for name, parameter in requiredParams %}, {{name|variable_name}}: {{ get_type_for_parameter(parameter, version) }}{% endfor %}{% if operation|has_optional_parameter %}, params: {{operation.operationId}}OptionalParams{% endif %}) -> Result, Error<{{operation.operationId}}Error>> { + match self.{{operation.operationId | snake_case}}_with_http_info({% for name, parameter in requiredParams %}{{name|variable_name}}{% if loop.last %}{% if operation|has_optional_parameter %}, {% endif %}{% else %}, {% endif %}{% endfor %}{% if operation|has_optional_parameter %} params{% endif %}).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } @@ -100,7 +102,7 @@ impl {{ structName }} { {% if operation.description is defined %} {{ operation.description | block_comment }} {%- endif %} - pub async fn {{operation.operationId | snake_case}}_with_http_info(&self{% for name, parameter in operation|parameters if parameter.required == true %}, {{name|variable_name}}: {{ get_type_for_parameter(parameter, version) }}{% endfor %}{% if operation|has_optional %}, params: {{operation.operationId}}OptionalParams{% endif %}) -> Result, Error<{{operation.operationId}}Error>> { + pub async fn {{operation.operationId | snake_case}}_with_http_info(&self{% for name, parameter in requiredParams %}, {{name|variable_name}}: {{ get_type_for_parameter(parameter, version) }}{% endfor %}{% if operation|has_optional_parameter %}, params: {{operation.operationId}}OptionalParams{% endif %}) -> Result, Error<{{operation.operationId}}Error>> { let local_configuration = &self.config; {% for name, parameter in operation|parameters if parameter.required != true %} diff --git a/.generator/src/generator/templates/function_mappings.j2 b/.generator/src/generator/templates/function_mappings.j2 index fed604e0a..1f99ad2c1 100644 --- a/.generator/src/generator/templates/function_mappings.j2 +++ b/.generator/src/generator/templates/function_mappings.j2 @@ -50,10 +50,11 @@ pub fn collect_function_calls(world: &mut DatadogWorld) { {%- for name, operations in apis.items() %} {%- set apiName = "api_"+name | snake_case %} {% for _, _, operation in operations %} -{%- set operationParams = operation|parameters|list %} +{%- set requiredParams = operation|parameters|selectattr('1.required', 'equalto', true) | list %} +{%- set optionalParams = operation|parameters|rejectattr('1.required', 'equalto', true) | list %} fn test_{{version}}_{{ operation['operationId'] | snake_case }}(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world.api_instances.{{version}}_{{ apiName }}.as_ref().expect("api instance not found"); - {%- for parameter in operationParams %} + {%- for parameter in operation|parameters|list %} {%- set schema = parameter[1] | parameter_schema %} {%- if parameter[1].required %} {%- if schema | is_primitive and schema.get("format") == "binary" -%} @@ -74,7 +75,7 @@ fn test_{{version}}_{{ operation['operationId'] | snake_case }}(world: &mut Data {%- endif %} {%- endfor %} - {%- for parameter in operationParams if parameter[1].required != true %} + {%- for parameter in optionalParams %} {%- if loop.first %} let params = datadog{{ version.upper() }}::api::{{ apiName }}::{{ operation['operationId'] }}OptionalParams { {%- endif %} @@ -83,7 +84,7 @@ fn test_{{version}}_{{ operation['operationId'] | snake_case }}(world: &mut Data }; {%- endif %} {%- endfor %} - let response = match block_on(api.{{ operation['operationId'] | snake_case}}_with_http_info({% for name, parameter in operation|parameters if parameter.required == true %}{{name|variable_name}}{% if loop.last %}{% if operation|has_optional %}, {% endif %}{% else %}, {% endif %}{% endfor %}{% if operation|has_optional %}params{% endif %})) { + let response = match block_on(api.{{ operation['operationId'] | snake_case}}_with_http_info({% for name, parameter in requiredParams %}{{name|variable_name}}{% if loop.last %}{% if operation|has_optional_parameter %}, {% endif %}{% else %}, {% endif %}{% endfor %}{% if operation|has_optional_parameter %}params{% endif %})) { Ok(response) => response, Err(error) => { return match error {