From eecaa4e03efc6298c083a0e69a7acb735a1531c3 Mon Sep 17 00:00:00 2001 From: Kevin Zou <17015060+nkzou@users.noreply.github.com> Date: Fri, 9 Feb 2024 11:19:36 -0500 Subject: [PATCH] Add builder-like pattern to API instances and models (#9) --- .generator/src/generator/cli.py | 1 + .generator/src/generator/openapi.py | 13 +- .generator/src/generator/templates/api.j2 | 58 +- .../generator/templates/function_mappings.j2 | 22 +- .../src/generator/templates/model_oneof.j2 | 2 +- .../src/generator/templates/model_simple.j2 | 22 +- src/datadogV1/api/api_authentication.rs | 2 - src/datadogV1/api/api_aws_integration.rs | 228 +- 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 | 311 +- src/datadogV1/api/api_downtimes.rs | 130 +- src/datadogV1/api/api_events.rs | 121 +- src/datadogV1/api/api_gcp_integration.rs | 50 +- src/datadogV1/api/api_hosts.rs | 155 +- src/datadogV1/api/api_ip_ranges.rs | 2 - src/datadogV1/api/api_key_management.rs | 138 +- src/datadogV1/api/api_logs.rs | 56 +- src/datadogV1/api/api_logs_indexes.rs | 73 +- src/datadogV1/api/api_logs_pipelines.rs | 92 +- src/datadogV1/api/api_metrics.rs | 177 +- src/datadogV1/api/api_monitors.rs | 391 ++- src/datadogV1/api/api_notebooks.rs | 179 +- 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 | 109 +- .../api/api_service_level_objectives.rs | 324 +- src/datadogV1/api/api_slack_integration.rs | 105 +- src/datadogV1/api/api_snapshots.rs | 91 +- src/datadogV1/api/api_synthetics.rs | 561 ++- src/datadogV1/api/api_tags.rs | 175 +- src/datadogV1/api/api_usage_metering.rs | 1491 +++++--- 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 | 22 +- .../model_alert_value_widget_definition.rs | 30 + src/datadogV1/model/model_api_key.rs | 21 + .../model/model_api_key_list_response.rs | 6 + src/datadogV1/model/model_api_key_response.rs | 8 +- .../model_apm_stats_query_column_type.rs | 18 + .../model/model_apm_stats_query_definition.rs | 13 + src/datadogV1/model/model_application_key.rs | 16 + .../model_application_key_list_response.rs | 9 + .../model/model_application_key_response.rs | 8 +- ...odel_authentication_validation_response.rs | 6 + src/datadogV1/model/model_aws_account.rs | 59 + .../model_aws_account_create_response.rs | 6 + .../model/model_aws_account_delete_request.rs | 16 + .../model/model_aws_account_list_response.rs | 6 + ..._aws_event_bridge_account_configuration.rs | 19 + .../model_aws_event_bridge_create_request.rs | 21 + .../model_aws_event_bridge_create_response.rs | 24 + .../model_aws_event_bridge_delete_request.rs | 16 + .../model_aws_event_bridge_delete_response.rs | 9 + .../model_aws_event_bridge_list_response.rs | 14 + .../model/model_aws_event_bridge_source.rs | 11 + .../model/model_aws_logs_async_error.rs | 11 + .../model/model_aws_logs_async_response.rs | 11 + src/datadogV1/model/model_aws_logs_lambda.rs | 6 + .../model/model_aws_logs_list_response.rs | 16 + .../model_aws_logs_list_services_response.rs | 11 + src/datadogV1/model/model_aws_tag_filter.rs | 11 + .../model_aws_tag_filter_create_request.rs | 16 + .../model_aws_tag_filter_delete_request.rs | 11 + .../model_aws_tag_filter_list_response.rs | 6 + src/datadogV1/model/model_azure_account.rs | 66 + .../model/model_canceled_downtimes_ids.rs | 6 + .../model/model_change_widget_definition.rs | 30 +- .../model/model_change_widget_request.rs | 125 +- ...model_check_can_delete_monitor_response.rs | 12 +- ..._check_can_delete_monitor_response_data.rs | 6 + .../model_check_can_delete_slo_response.rs | 16 +- ...odel_check_can_delete_slo_response_data.rs | 6 + .../model_check_status_widget_definition.rs | 37 +- src/datadogV1/model/model_creator.rs | 16 + src/datadogV1/model/model_dashboard.rs | 93 + .../model/model_dashboard_delete_response.rs | 6 + .../model/model_dashboard_global_time.rs | 9 + src/datadogV1/model/model_dashboard_list.rs | 37 +- .../model_dashboard_list_delete_response.rs | 6 + .../model_dashboard_list_list_response.rs | 9 + .../model/model_dashboard_summary.rs | 9 + .../model_dashboard_summary_definition.rs | 49 + .../model_dashboard_template_variable.rs | 24 + ...odel_dashboard_template_variable_preset.rs | 14 + ...ashboard_template_variable_preset_value.rs | 19 + .../model_delete_shared_dashboard_response.rs | 6 + src/datadogV1/model/model_deleted_monitor.rs | 6 + .../model/model_distribution_points_series.rs | 15 + .../model_distribution_widget_definition.rs | 69 +- .../model_distribution_widget_request.rs | 109 +- .../model/model_distribution_widget_x_axis.rs | 21 + .../model/model_distribution_widget_y_axis.rs | 26 + src/datadogV1/model/model_downtime.rs | 117 +- src/datadogV1/model/model_downtime_child.rs | 107 +- .../model/model_downtime_recurrence.rs | 31 + src/datadogV1/model/model_event.rs | 66 + .../model/model_event_create_request.rs | 45 + .../model/model_event_create_response.rs | 13 +- .../model/model_event_list_response.rs | 11 + src/datadogV1/model/model_event_response.rs | 13 +- .../model_event_stream_widget_definition.rs | 32 +- .../model_event_timeline_widget_definition.rs | 27 +- ...n_apm_dependency_stats_query_definition.rs | 15 + ...ion_apm_resource_stats_query_definition.rs | 25 + ...nd_function_cloud_cost_query_definition.rs | 5 + ...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 + ...rmula_and_function_slo_query_definition.rs | 26 + .../model_free_text_widget_definition.rs | 15 + .../model/model_funnel_widget_definition.rs | 22 +- .../model/model_funnel_widget_request.rs | 4 +- src/datadogV1/model/model_gcp_account.rs | 81 + .../model/model_geomap_widget_definition.rs | 38 +- .../model/model_geomap_widget_request.rs | 63 +- src/datadogV1/model/model_graph_snapshot.rs | 16 + .../model/model_group_widget_definition.rs | 25 + .../model/model_heat_map_widget_definition.rs | 52 +- .../model/model_heat_map_widget_request.rs | 105 +- src/datadogV1/model/model_host.rs | 78 +- .../model/model_host_list_response.rs | 16 + src/datadogV1/model/model_host_map_request.rs | 74 +- .../model/model_host_map_widget_definition.rs | 67 +- ...del_host_map_widget_definition_requests.rs | 15 +- .../model_host_map_widget_definition_style.rs | 21 + src/datadogV1/model/model_host_meta.rs | 81 +- .../model/model_host_meta_install_method.rs | 16 + src/datadogV1/model/model_host_metrics.rs | 16 + .../model/model_host_mute_response.rs | 21 + .../model/model_host_mute_settings.rs | 16 + src/datadogV1/model/model_host_tags.rs | 11 + src/datadogV1/model/model_host_totals.rs | 11 + .../model_hourly_usage_attribution_body.rs | 52 + ...model_hourly_usage_attribution_metadata.rs | 11 +- ...del_hourly_usage_attribution_pagination.rs | 6 + ...model_hourly_usage_attribution_response.rs | 19 +- src/datadogV1/model/model_http_log_item.rs | 20 + .../model/model_image_widget_definition.rs | 41 + .../model/model_intake_payload_accepted.rs | 6 + .../model/model_ip_prefixes_agents.rs | 11 + src/datadogV1/model/model_ip_prefixes_api.rs | 11 + src/datadogV1/model/model_ip_prefixes_apm.rs | 11 + .../model/model_ip_prefixes_global.rs | 11 + src/datadogV1/model/model_ip_prefixes_logs.rs | 11 + .../model/model_ip_prefixes_orchestrator.rs | 11 + .../model/model_ip_prefixes_process.rs | 11 + .../model_ip_prefixes_remote_configuration.rs | 11 + .../model/model_ip_prefixes_synthetics.rs | 27 + ...p_prefixes_synthetics_private_locations.rs | 11 + .../model/model_ip_prefixes_webhooks.rs | 11 + src/datadogV1/model/model_ip_ranges.rs | 100 +- .../model/model_list_stream_compute_items.rs | 5 + .../model/model_list_stream_query.rs | 38 +- .../model_list_stream_widget_definition.rs | 32 +- .../model/model_list_stream_widget_request.rs | 4 +- src/datadogV1/model/model_log.rs | 13 +- src/datadogV1/model/model_log_content.rs | 34 + .../model/model_log_query_definition.rs | 39 +- .../model_log_query_definition_group_by.rs | 15 +- ...odel_log_query_definition_group_by_sort.rs | 5 + .../model_log_stream_widget_definition.rs | 79 +- src/datadogV1/model/model_logs_api_error.rs | 16 + .../model/model_logs_api_error_response.rs | 8 +- .../model/model_logs_arithmetic_processor.rs | 15 + .../model/model_logs_attribute_remapper.rs | 35 + .../model/model_logs_by_retention.rs | 26 +- .../model_logs_by_retention_monthly_usage.rs | 14 + .../model_logs_by_retention_org_usage.rs | 9 + .../model/model_logs_by_retention_orgs.rs | 9 + .../model/model_logs_category_processor.rs | 10 + .../model_logs_category_processor_category.rs | 13 +- .../model/model_logs_date_remapper.rs | 10 + src/datadogV1/model/model_logs_exclusion.rs | 12 +- .../model/model_logs_exclusion_filter.rs | 5 + src/datadogV1/model/model_logs_filter.rs | 6 + .../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 | 6 + .../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 | 16 + .../model/model_logs_lookup_processor.rs | 15 + .../model/model_logs_message_remapper.rs | 10 + src/datadogV1/model/model_logs_pipeline.rs | 32 +- .../model/model_logs_pipeline_processor.rs | 22 +- .../model/model_logs_query_compute.rs | 10 + .../model_logs_retention_agg_sum_usage.rs | 21 + .../model/model_logs_retention_sum_usage.rs | 21 + .../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 | 36 + .../model/model_metric_search_response.rs | 11 +- .../model_metric_search_response_results.rs | 6 + .../model/model_metrics_list_response.rs | 11 + .../model/model_metrics_query_metadata.rs | 69 + .../model/model_metrics_query_response.rs | 49 + .../model/model_metrics_query_unit.rs | 26 + 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 + .../model_monitor_group_search_response.rs | 29 +- ...el_monitor_group_search_response_counts.rs | 17 + .../model_monitor_group_search_result.rs | 36 + src/datadogV1/model/model_monitor_options.rs | 219 +- .../model_monitor_options_aggregation.rs | 16 + .../model_monitor_options_custom_schedule.rs | 9 + ...itor_options_custom_schedule_recurrence.rs | 16 + ...odel_monitor_options_scheduling_options.rs | 21 +- ...ns_scheduling_options_evaluation_window.rs | 16 + .../model/model_monitor_search_count_item.rs | 11 + .../model/model_monitor_search_response.rs | 29 +- .../model_monitor_search_response_counts.rs | 33 + .../model_monitor_search_response_metadata.rs | 21 + .../model/model_monitor_search_result.rs | 71 +- ...odel_monitor_search_result_notification.rs | 11 + src/datadogV1/model/model_monitor_state.rs | 9 + .../model/model_monitor_state_group.rs | 31 + ...model_monitor_summary_widget_definition.rs | 78 + .../model_monitor_threshold_window_options.rs | 11 + .../model/model_monitor_thresholds.rs | 31 + .../model/model_monitor_update_request.rs | 90 +- .../model_monthly_usage_attribution_body.rs | 49 +- ...odel_monthly_usage_attribution_metadata.rs | 19 +- ...el_monthly_usage_attribution_pagination.rs | 6 + ...odel_monthly_usage_attribution_response.rs | 19 +- .../model_monthly_usage_attribution_values.rs | 601 ++++ .../model/model_note_widget_definition.rs | 43 + .../model/model_notebook_absolute_time.rs | 5 + src/datadogV1/model/model_notebook_author.rs | 46 + .../model_notebook_cell_create_request.rs | 4 +- .../model/model_notebook_cell_response.rs | 4 +- .../model_notebook_cell_update_request.rs | 4 +- .../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 | 23 +- ...model_notebook_heat_map_cell_attributes.rs | 23 +- ...del_notebook_log_stream_cell_attributes.rs | 16 +- ...model_notebook_markdown_cell_attributes.rs | 4 +- .../model/model_notebook_metadata.rs | 19 + .../model/model_notebook_response.rs | 8 +- .../model/model_notebook_response_data.rs | 4 +- ...model_notebook_response_data_attributes.rs | 33 +- ...del_notebook_timeseries_cell_attributes.rs | 23 +- .../model_notebook_toplist_cell_attributes.rs | 23 +- .../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 | 16 +- .../model/model_notebooks_response_data.rs | 4 +- ...odel_notebooks_response_data_attributes.rs | 44 +- .../model/model_notebooks_response_meta.rs | 8 +- .../model/model_notebooks_response_page.rs | 11 + .../model/model_org_downgraded_response.rs | 6 + src/datadogV1/model/model_organization.rs | 58 +- .../model/model_organization_billing.rs | 6 + .../model/model_organization_create_body.rs | 19 +- .../model_organization_create_response.rs | 29 +- .../model/model_organization_list_response.rs | 6 + .../model/model_organization_response.rs | 8 +- .../model/model_organization_settings.rs | 71 +- .../model/model_organization_settings_saml.rs | 6 + ..._settings_saml_autocreate_users_domains.rs | 11 + ...ation_settings_saml_idp_initiated_login.rs | 6 + ..._organization_settings_saml_strict_mode.rs | 6 + .../model/model_organization_subscription.rs | 6 + src/datadogV1/model/model_pagination.rs | 11 + ...el_powerpack_template_variable_contents.rs | 5 + .../model_powerpack_template_variables.rs | 17 + .../model_powerpack_widget_definition.rs | 30 +- .../model/model_process_query_definition.rs | 15 + .../model_query_value_widget_definition.rs | 60 +- .../model/model_query_value_widget_request.rs | 115 +- ...l_reference_table_logs_lookup_processor.rs | 10 + .../model/model_response_meta_attributes.rs | 8 +- .../model_run_workflow_widget_definition.rs | 38 +- .../model/model_scatter_plot_request.rs | 82 +- .../model_scatter_plot_widget_definition.rs | 53 +- ...scatter_plot_widget_definition_requests.rs | 22 +- .../model/model_scatterplot_table_request.rs | 25 + .../model/model_scatterplot_widget_formula.rs | 5 + .../model_search_service_level_objective.rs | 11 +- ...arch_service_level_objective_attributes.rs | 93 +- ...del_search_service_level_objective_data.rs | 21 +- src/datadogV1/model/model_search_slo_query.rs | 16 + .../model/model_search_slo_response.rs | 22 +- .../model/model_search_slo_response_data.rs | 16 +- ...del_search_slo_response_data_attributes.rs | 19 +- ...rch_slo_response_data_attributes_facets.rs | 65 + ...ponse_data_attributes_facets_object_int.rs | 11 + ...se_data_attributes_facets_object_string.rs | 11 + .../model/model_search_slo_response_links.rs | 26 + .../model/model_search_slo_response_meta.rs | 11 +- .../model_search_slo_response_meta_page.rs | 41 + .../model/model_search_slo_threshold.rs | 15 + ...odel_selectable_template_variable_items.rs | 21 + 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 | 23 + ...model_service_summary_widget_definition.rs | 65 +- src/datadogV1/model/model_shared_dashboard.rs | 58 +- .../model/model_shared_dashboard_author.rs | 11 + .../model/model_shared_dashboard_invites.rs | 14 +- ...el_shared_dashboard_invites_data_object.rs | 4 +- ...ashboard_invites_data_object_attributes.rs | 31 + .../model_shared_dashboard_invites_meta.rs | 11 +- ...odel_shared_dashboard_invites_meta_page.rs | 6 + .../model_shared_dashboard_update_request.rs | 30 +- ...ed_dashboard_update_request_global_time.rs | 9 + .../model_signal_assignee_update_request.rs | 5 + .../model_signal_state_update_request.rs | 18 + .../model/model_slack_integration_channel.rs | 16 +- ...model_slack_integration_channel_display.rs | 21 + .../model/model_slo_bulk_delete_response.rs | 13 +- .../model_slo_bulk_delete_response_data.rs | 11 + src/datadogV1/model/model_slo_correction.rs | 21 +- .../model/model_slo_correction_create_data.rs | 10 +- .../model_slo_correction_create_request.rs | 8 +- ...lo_correction_create_request_attributes.rs | 25 + .../model_slo_correction_list_response.rs | 13 +- .../model/model_slo_correction_response.rs | 8 +- ...odel_slo_correction_response_attributes.rs | 69 +- ...correction_response_attributes_modifier.rs | 16 + .../model/model_slo_correction_update_data.rs | 16 +- .../model_slo_correction_update_request.rs | 8 +- ...lo_correction_update_request_attributes.rs | 36 + src/datadogV1/model/model_slo_creator.rs | 16 + .../model/model_slo_delete_response.rs | 11 + .../model/model_slo_history_metrics.rs | 13 +- .../model/model_slo_history_metrics_series.rs | 10 +- ...del_slo_history_metrics_series_metadata.rs | 34 + ...lo_history_metrics_series_metadata_unit.rs | 31 + .../model/model_slo_history_monitor.rs | 79 + .../model/model_slo_history_response.rs | 16 +- .../model/model_slo_history_response_data.rs | 61 +- .../model/model_slo_history_response_error.rs | 6 + .../model/model_slo_history_sli_data.rs | 79 + .../model/model_slo_list_response.rs | 24 +- .../model/model_slo_list_response_metadata.rs | 11 +- .../model_slo_list_response_metadata_page.rs | 11 + .../model/model_slo_list_widget_definition.rs | 15 + .../model/model_slo_list_widget_query.rs | 10 + .../model/model_slo_list_widget_request.rs | 4 +- .../model/model_slo_overall_statuses.rs | 51 +- .../model_slo_raw_error_budget_remaining.rs | 11 + src/datadogV1/model/model_slo_response.rs | 13 +- .../model/model_slo_response_data.rs | 93 +- src/datadogV1/model/model_slo_status.rs | 41 +- src/datadogV1/model/model_slo_threshold.rs | 15 + .../model/model_slo_widget_definition.rs | 48 + src/datadogV1/model/model_split_config.rs | 12 +- .../model_split_graph_widget_definition.rs | 25 +- src/datadogV1/model/model_split_sort.rs | 7 +- ...model_successful_signal_update_response.rs | 6 + .../model/model_sunburst_widget_definition.rs | 42 +- ...sunburst_widget_legend_inline_automatic.rs | 10 + .../model/model_sunburst_widget_request.rs | 109 +- .../model/model_synthetics_api_step.rs | 32 +- .../model/model_synthetics_api_test.rs | 39 +- .../model/model_synthetics_api_test_config.rs | 29 +- .../model_synthetics_api_test_result_data.rs | 67 +- ...odel_synthetics_api_test_result_failure.rs | 14 + .../model_synthetics_api_test_result_full.rs | 49 +- ...l_synthetics_api_test_result_full_check.rs | 4 +- .../model_synthetics_api_test_result_short.rs | 34 +- ...synthetics_api_test_result_short_result.rs | 13 +- ...l_synthetics_assertion_json_path_target.rs | 15 +- ...etics_assertion_json_path_target_target.rs | 16 + .../model_synthetics_assertion_target.rs | 13 + ...odel_synthetics_assertion_x_path_target.rs | 15 +- ...nthetics_assertion_x_path_target_target.rs | 16 + .../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 | 11 +- .../model_synthetics_batch_details_data.rs | 24 +- .../model/model_synthetics_batch_result.rs | 57 + .../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 | 71 +- ..._synthetics_browser_test_result_failure.rs | 14 + ...del_synthetics_browser_test_result_full.rs | 49 +- ...nthetics_browser_test_result_full_check.rs | 4 +- ...el_synthetics_browser_test_result_short.rs | 34 +- ...hetics_browser_test_result_short_result.rs | 28 +- ...el_synthetics_browser_test_rum_settings.rs | 10 + .../model_synthetics_browser_variable.rs | 20 + .../model_synthetics_ci_batch_metadata.rs | 18 +- .../model_synthetics_ci_batch_metadata_ci.rs | 21 +- .../model_synthetics_ci_batch_metadata_git.rs | 11 + ...l_synthetics_ci_batch_metadata_pipeline.rs | 6 + ...l_synthetics_ci_batch_metadata_provider.rs | 6 + .../model/model_synthetics_ci_test.rs | 80 +- .../model/model_synthetics_ci_test_body.rs | 6 + .../model/model_synthetics_config_variable.rs | 20 + .../model/model_synthetics_core_web_vitals.rs | 16 + .../model_synthetics_delete_tests_payload.rs | 6 + .../model_synthetics_delete_tests_response.rs | 9 + .../model/model_synthetics_deleted_test.rs | 11 + .../model/model_synthetics_device.rs | 5 + ...cs_get_api_test_latest_results_response.rs | 14 + ...et_browser_test_latest_results_response.rs | 14 + .../model/model_synthetics_global_variable.rs | 34 +- ...l_synthetics_global_variable_attributes.rs | 6 + ...odel_synthetics_global_variable_options.rs | 12 +- ...tics_global_variable_parse_test_options.rs | 20 +- ...thetics_global_variable_totp_parameters.rs | 11 + .../model_synthetics_global_variable_value.rs | 21 +- ...nthetics_list_global_variables_response.rs | 9 + .../model_synthetics_list_tests_response.rs | 9 + .../model/model_synthetics_location.rs | 11 + .../model/model_synthetics_locations.rs | 9 + .../model/model_synthetics_parsing_options.rs | 34 +- .../model/model_synthetics_patch_test_body.rs | 9 + .../model_synthetics_patch_test_operation.rs | 19 + .../model_synthetics_private_location.rs | 25 +- ...tics_private_location_creation_response.rs | 32 +- ...ion_creation_response_result_encryption.rs | 11 + ...el_synthetics_private_location_metadata.rs | 6 + ...del_synthetics_private_location_secrets.rs | 21 +- ...private_location_secrets_authentication.rs | 11 + ...vate_location_secrets_config_decryption.rs | 6 + .../model/model_synthetics_ssl_certificate.rs | 71 +- ...model_synthetics_ssl_certificate_issuer.rs | 31 + ...odel_synthetics_ssl_certificate_subject.rs | 36 + src/datadogV1/model/model_synthetics_step.rs | 39 + .../model/model_synthetics_step_detail.rs | 101 + .../model/model_synthetics_test_ci_options.rs | 9 + .../model/model_synthetics_test_config.rs | 32 +- .../model/model_synthetics_test_details.rs | 81 +- .../model/model_synthetics_test_options.rs | 139 +- ...synthetics_test_options_monitor_options.rs | 6 + .../model_synthetics_test_options_retry.rs | 11 + ...odel_synthetics_test_options_scheduling.rs | 14 + ...etics_test_options_scheduling_timeframe.rs | 16 + .../model/model_synthetics_test_request.rs | 157 +- ...del_synthetics_test_request_certificate.rs | 21 +- ...ynthetics_test_request_certificate_item.rs | 16 + .../model_synthetics_test_request_proxy.rs | 5 + .../model/model_synthetics_timing.rs | 46 + ...del_synthetics_trigger_ci_test_location.rs | 11 + ...l_synthetics_trigger_ci_test_run_result.rs | 21 + ...el_synthetics_trigger_ci_tests_response.rs | 27 + .../model/model_synthetics_trigger_test.rs | 10 +- ...hetics_update_test_pause_status_payload.rs | 9 + .../model/model_synthetics_variable_parser.rs | 5 + .../model/model_table_widget_definition.rs | 38 +- .../model/model_table_widget_request.rs | 141 +- src/datadogV1/model/model_tag_to_hosts.rs | 6 + .../model/model_timeseries_background.rs | 7 +- .../model_timeseries_widget_definition.rs | 80 +- ...odel_timeseries_widget_expression_alias.rs | 5 + .../model/model_timeseries_widget_request.rs | 127 +- .../model/model_toplist_widget_definition.rs | 37 +- .../model/model_toplist_widget_request.rs | 117 +- .../model/model_toplist_widget_style.rs | 13 +- .../model_topology_map_widget_definition.rs | 23 + src/datadogV1/model/model_topology_query.rs | 19 + src/datadogV1/model/model_topology_request.rs | 16 +- .../model/model_tree_map_widget_definition.rs | 41 +- .../model/model_tree_map_widget_request.rs | 27 + .../model/model_usage_analyzed_logs_hour.rs | 21 + .../model_usage_analyzed_logs_response.rs | 9 + ...model_usage_attribution_aggregates_body.rs | 16 + .../model/model_usage_attribution_body.rs | 41 +- .../model/model_usage_attribution_metadata.rs | 19 +- .../model_usage_attribution_pagination.rs | 26 + .../model/model_usage_attribution_response.rs | 19 +- .../model/model_usage_attribution_values.rs | 261 ++ .../model/model_usage_audit_logs_hour.rs | 21 + .../model/model_usage_audit_logs_response.rs | 6 + .../model_usage_billable_summary_body.rs | 36 + .../model_usage_billable_summary_hour.rs | 48 +- .../model_usage_billable_summary_keys.rs | 889 ++++- .../model_usage_billable_summary_response.rs | 9 + .../model/model_usage_ci_visibility_hour.rs | 36 + .../model_usage_ci_visibility_response.rs | 9 + ..._cloud_security_posture_management_hour.rs | 51 + ...ud_security_posture_management_response.rs | 9 + .../model_usage_custom_reports_attributes.rs | 26 + .../model/model_usage_custom_reports_data.rs | 21 +- .../model/model_usage_custom_reports_meta.rs | 8 +- .../model/model_usage_custom_reports_page.rs | 6 + .../model_usage_custom_reports_response.rs | 16 +- src/datadogV1/model/model_usage_cws_hour.rs | 26 + .../model/model_usage_cws_response.rs | 6 + src/datadogV1/model/model_usage_dbm_hour.rs | 26 + .../model/model_usage_dbm_response.rs | 6 + .../model/model_usage_fargate_hour.rs | 36 + .../model/model_usage_fargate_response.rs | 6 + src/datadogV1/model/model_usage_host_hour.rs | 86 + .../model/model_usage_hosts_response.rs | 6 + .../model_usage_incident_management_hour.rs | 21 + ...odel_usage_incident_management_response.rs | 9 + .../model/model_usage_indexed_spans_hour.rs | 21 + .../model_usage_indexed_spans_response.rs | 9 + .../model/model_usage_ingested_spans_hour.rs | 21 + .../model_usage_ingested_spans_response.rs | 9 + src/datadogV1/model/model_usage_io_t_hour.rs | 21 + .../model/model_usage_io_t_response.rs | 6 + .../model/model_usage_lambda_hour.rs | 26 + .../model/model_usage_lambda_response.rs | 6 + .../model/model_usage_logs_by_index_hour.rs | 36 + .../model_usage_logs_by_index_response.rs | 9 + .../model_usage_logs_by_retention_hour.rs | 31 + .../model_usage_logs_by_retention_response.rs | 9 + src/datadogV1/model/model_usage_logs_hour.rs | 56 + .../model/model_usage_logs_response.rs | 6 + .../model/model_usage_network_flows_hour.rs | 21 + .../model_usage_network_flows_response.rs | 9 + .../model/model_usage_network_hosts_hour.rs | 21 + .../model_usage_network_hosts_response.rs | 9 + .../model/model_usage_online_archive_hour.rs | 21 + .../model_usage_online_archive_response.rs | 9 + .../model/model_usage_profiling_hour.rs | 31 + .../model/model_usage_profiling_response.rs | 6 + .../model/model_usage_rum_sessions_hour.rs | 46 + .../model_usage_rum_sessions_response.rs | 9 + .../model/model_usage_rum_units_hour.rs | 26 + .../model/model_usage_rum_units_response.rs | 6 + src/datadogV1/model/model_usage_sds_hour.rs | 41 + .../model/model_usage_sds_response.rs | 6 + src/datadogV1/model/model_usage_snmp_hour.rs | 21 + .../model/model_usage_snmp_response.rs | 6 + ...age_specified_custom_reports_attributes.rs | 31 + ...del_usage_specified_custom_reports_data.rs | 21 +- ...del_usage_specified_custom_reports_meta.rs | 11 +- ...del_usage_specified_custom_reports_page.rs | 6 + ...usage_specified_custom_reports_response.rs | 21 +- .../model/model_usage_summary_date.rs | 613 ++++ .../model/model_usage_summary_date_org.rs | 637 ++++ .../model/model_usage_summary_response.rs | 687 +++- .../model/model_usage_synthetics_api_hour.rs | 21 + .../model_usage_synthetics_api_response.rs | 9 + .../model_usage_synthetics_browser_hour.rs | 21 + ...model_usage_synthetics_browser_response.rs | 9 + .../model/model_usage_synthetics_hour.rs | 21 + .../model/model_usage_synthetics_response.rs | 6 + .../model/model_usage_timeseries_hour.rs | 31 + .../model/model_usage_timeseries_response.rs | 6 + .../model/model_usage_top_avg_metrics_hour.rs | 24 + .../model_usage_top_avg_metrics_metadata.rs | 21 +- .../model_usage_top_avg_metrics_pagination.rs | 16 + .../model_usage_top_avg_metrics_response.rs | 19 +- src/datadogV1/model/model_user.rs | 36 + .../model/model_user_disable_response.rs | 6 + .../model/model_user_list_response.rs | 6 + src/datadogV1/model/model_user_response.rs | 8 +- .../model/model_webhooks_integration.rs | 18 + ...ks_integration_custom_variable_response.rs | 5 + ...egration_custom_variable_update_request.rs | 16 + ...del_webhooks_integration_update_request.rs | 29 + src/datadogV1/model/model_widget.rs | 16 +- src/datadogV1/model/model_widget_axis.rs | 26 + .../model/model_widget_conditional_format.rs | 30 + .../model/model_widget_custom_link.rs | 21 + src/datadogV1/model/model_widget_event.rs | 5 + src/datadogV1/model/model_widget_formula.rs | 35 +- .../model/model_widget_formula_limit.rs | 11 + .../model/model_widget_formula_style.rs | 11 + src/datadogV1/model/model_widget_layout.rs | 5 + src/datadogV1/model/model_widget_marker.rs | 15 + .../model/model_widget_request_style.rs | 16 + src/datadogV1/model/model_widget_style.rs | 6 + src/datadogV1/model/model_widget_time.rs | 6 + .../api/api_apm_retention_filters.rs | 93 +- src/datadogV2/api/api_audit.rs | 96 +- src/datadogV2/api/api_auth_n_mappings.rs | 126 +- .../api/api_ci_visibility_pipelines.rs | 129 +- src/datadogV2/api/api_ci_visibility_tests.rs | 111 +- .../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 | 64 +- src/datadogV2/api/api_containers.rs | 64 +- src/datadogV2/api/api_dashboard_lists.rs | 82 +- src/datadogV2/api/api_dora_metrics.rs | 30 +- src/datadogV2/api/api_downtimes.rs | 178 +- src/datadogV2/api/api_events.rs | 93 +- src/datadogV2/api/api_fastly_integration.rs | 187 +- src/datadogV2/api/api_gcp_integration.rs | 79 +- src/datadogV2/api/api_incident_services.rs | 142 +- src/datadogV2/api/api_incident_teams.rs | 136 +- src/datadogV2/api/api_incidents.rs | 509 ++- src/datadogV2/api/api_ip_allowlist.rs | 17 +- src/datadogV2/api/api_key_management.rs | 520 +-- src/datadogV2/api/api_logs.rs | 166 +- src/datadogV2/api/api_logs_archives.rs | 157 +- src/datadogV2/api/api_logs_metrics.rs | 74 +- src/datadogV2/api/api_metrics.rs | 386 +- 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 | 20 +- src/datadogV2/api/api_powerpack.rs | 102 +- src/datadogV2/api/api_processes.rs | 78 +- src/datadogV2/api/api_restriction_policies.rs | 62 +- src/datadogV2/api/api_roles.rs | 319 +- src/datadogV2/api/api_rum.rs | 167 +- src/datadogV2/api/api_security_monitoring.rs | 541 +-- .../api/api_sensitive_data_scanner.rs | 141 +- src/datadogV2/api/api_service_accounts.rs | 187 +- src/datadogV2/api/api_service_definition.rs | 116 +- src/datadogV2/api/api_service_scorecards.rs | 276 +- src/datadogV2/api/api_spans.rs | 102 +- src/datadogV2/api/api_spans_metrics.rs | 74 +- src/datadogV2/api/api_synthetics.rs | 18 +- src/datadogV2/api/api_teams.rs | 440 +-- src/datadogV2/api/api_usage_metering.rs | 462 ++- src/datadogV2/api/api_users.rs | 207 +- ...el_active_billing_dimensions_attributes.rs | 11 + .../model_active_billing_dimensions_body.rs | 24 +- ...odel_active_billing_dimensions_response.rs | 11 +- .../model/model_api_key_create_data.rs | 4 +- .../model/model_api_key_create_request.rs | 4 +- .../model/model_api_key_relationships.rs | 15 +- src/datadogV2/model/model_api_key_response.rs | 16 +- .../model/model_api_key_update_data.rs | 4 +- .../model/model_api_key_update_request.rs | 4 +- .../model/model_api_keys_response.rs | 21 +- .../model/model_api_keys_response_meta.rs | 13 +- .../model_api_keys_response_meta_page.rs | 6 + ...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 | 8 +- .../model/model_application_key_response.rs | 16 +- .../model_application_key_response_meta.rs | 16 +- ...odel_application_key_response_meta_page.rs | 6 + ...model_application_key_update_attributes.rs | 11 + .../model_application_key_update_data.rs | 4 +- .../model_application_key_update_request.rs | 4 +- src/datadogV2/model/model_audit_logs_event.rs | 21 +- .../model_audit_logs_event_attributes.rs | 29 + .../model/model_audit_logs_events_response.rs | 20 +- .../model/model_audit_logs_query_filter.rs | 16 + .../model/model_audit_logs_query_options.rs | 11 + .../model_audit_logs_query_page_options.rs | 11 + .../model/model_audit_logs_response_links.rs | 6 + .../model_audit_logs_response_metadata.rs | 28 +- .../model/model_audit_logs_response_page.rs | 6 + .../model_audit_logs_search_events_request.rs | 27 +- .../model/model_audit_logs_warning.rs | 16 + src/datadogV2/model/model_auth_n_mapping.rs | 20 +- .../model/model_auth_n_mapping_attributes.rs | 26 + .../model_auth_n_mapping_create_attributes.rs | 11 + .../model/model_auth_n_mapping_create_data.rs | 20 +- ...del_auth_n_mapping_create_relationships.rs | 8 +- .../model_auth_n_mapping_create_request.rs | 6 +- .../model_auth_n_mapping_relationships.rs | 18 +- .../model/model_auth_n_mapping_response.rs | 16 +- .../model_auth_n_mapping_update_attributes.rs | 11 + .../model/model_auth_n_mapping_update_data.rs | 20 +- ...del_auth_n_mapping_update_relationships.rs | 8 +- .../model_auth_n_mapping_update_request.rs | 6 +- .../model/model_auth_n_mappings_response.rs | 21 +- 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 | 8 +- .../model/model_aws_cur_configs_response.rs | 6 + .../model/model_aws_related_account.rs | 10 +- .../model_aws_related_account_attributes.rs | 11 + .../model_aws_related_accounts_response.rs | 6 + 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 | 8 +- .../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 | 6 + .../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 | 9 + ...ulk_mute_findings_request_meta_findings.rs | 6 + ...l_bulk_mute_findings_request_properties.rs | 10 + .../model_bulk_mute_findings_response.rs | 4 +- .../model_bulk_mute_findings_response_data.rs | 11 + .../model/model_chargeback_breakdown.rs | 16 + ...i_app_aggregate_bucket_value_timeseries.rs | 1 + ...aggregate_bucket_value_timeseries_point.rs | 11 + .../model/model_ci_app_aggregate_sort.rs | 24 + src/datadogV2/model/model_ci_app_ci_error.rs | 21 + src/datadogV2/model/model_ci_app_compute.rs | 15 + ...el_ci_app_create_pipeline_event_request.rs | 11 +- ...reate_pipeline_event_request_attributes.rs | 14 +- ..._app_create_pipeline_event_request_data.rs | 19 +- .../model/model_ci_app_event_attributes.rs | 19 + src/datadogV2/model/model_ci_app_git_info.rs | 45 + src/datadogV2/model/model_ci_app_host_info.rs | 21 + .../model/model_ci_app_pipeline_event.rs | 24 +- .../model_ci_app_pipeline_event_attributes.rs | 19 + .../model/model_ci_app_pipeline_event_job.rs | 59 +- ...l_ci_app_pipeline_event_parent_pipeline.rs | 5 + .../model_ci_app_pipeline_event_pipeline.rs | 80 +- ...ci_app_pipeline_event_previous_pipeline.rs | 5 + .../model_ci_app_pipeline_event_stage.rs | 49 +- .../model/model_ci_app_pipeline_event_step.rs | 64 +- .../model_ci_app_pipeline_events_request.rs | 30 +- .../model_ci_app_pipeline_events_response.rs | 23 +- ...odel_ci_app_pipelines_aggregate_request.rs | 31 +- ..._pipelines_aggregation_buckets_response.rs | 9 + ..._pipelines_analytics_aggregate_response.rs | 25 +- .../model_ci_app_pipelines_bucket_response.rs | 20 + .../model/model_ci_app_pipelines_group_by.rs | 36 +- .../model_ci_app_pipelines_query_filter.rs | 16 + .../model/model_ci_app_query_options.rs | 11 + .../model/model_ci_app_query_page_options.rs | 11 + .../model/model_ci_app_response_links.rs | 6 + .../model/model_ci_app_response_metadata.rs | 21 + ...i_app_response_metadata_with_pagination.rs | 28 +- .../model/model_ci_app_response_page.rs | 6 + .../model/model_ci_app_test_event.rs | 21 +- .../model/model_ci_app_test_events_request.rs | 27 +- .../model_ci_app_test_events_response.rs | 23 +- .../model_ci_app_tests_aggregate_request.rs | 28 +- ..._app_tests_aggregation_buckets_response.rs | 9 + ..._app_tests_analytics_aggregate_response.rs | 28 +- .../model_ci_app_tests_bucket_response.rs | 20 + .../model/model_ci_app_tests_group_by.rs | 36 +- .../model/model_ci_app_tests_query_filter.rs | 16 + src/datadogV2/model/model_ci_app_warning.rs | 16 + ...d_configuration_compliance_rule_options.rs | 21 +- ...el_cloud_configuration_rule_case_create.rs | 5 + ...guration_rule_compliance_signal_options.rs | 21 + ...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 | 8 +- ...workload_security_agent_rule_attributes.rs | 93 +- ...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 | 11 + ...cloud_workload_security_agent_rule_data.rs | 24 +- ...d_workload_security_agent_rule_response.rs | 11 +- ...d_security_agent_rule_update_attributes.rs | 16 + ...orkload_security_agent_rule_update_data.rs | 4 +- ...load_security_agent_rule_update_request.rs | 4 +- ..._security_agent_rule_updater_attributes.rs | 11 + ...load_security_agent_rules_list_response.rs | 9 + ...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 | 11 +- ..._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 | 16 +- .../model_cloudflare_accounts_response.rs | 9 + .../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 | 11 +- ...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 | 9 + .../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 | 11 +- ..._confluent_resource_response_attributes.rs | 15 + .../model_confluent_resource_response_data.rs | 4 +- .../model_confluent_resources_response.rs | 9 + src/datadogV2/model/model_container.rs | 18 +- .../model/model_container_attributes.rs | 51 + src/datadogV2/model/model_container_group.rs | 31 +- .../model/model_container_group_attributes.rs | 14 + .../model_container_group_relationships.rs | 11 +- ...odel_container_group_relationships_link.rs | 16 +- ...del_container_group_relationships_links.rs | 6 + src/datadogV2/model/model_container_image.rs | 21 +- .../model/model_container_image_attributes.rs | 94 +- .../model/model_container_image_flavor.rs | 26 + .../model/model_container_image_group.rs | 31 +- .../model_container_image_group_attributes.rs | 19 + ...r_image_group_images_relationships_link.rs | 16 +- ...del_container_image_group_relationships.rs | 11 +- ...ntainer_image_group_relationships_links.rs | 6 + .../model/model_container_image_meta.rs | 11 +- .../model/model_container_image_meta_page.rs | 34 + .../model_container_image_vulnerabilities.rs | 36 + .../model/model_container_images_response.rs | 23 +- .../model_container_images_response_links.rs | 26 + src/datadogV2/model/model_container_meta.rs | 8 +- .../model/model_container_meta_page.rs | 31 + .../model/model_containers_response.rs | 20 +- .../model/model_containers_response_links.rs | 26 + .../model_cost_attribution_aggregates_body.rs | 16 + src/datadogV2/model/model_cost_by_org.rs | 18 +- .../model/model_cost_by_org_attributes.rs | 34 + .../model/model_cost_by_org_response.rs | 6 + .../model/model_create_rule_request.rs | 8 +- .../model/model_create_rule_request_data.rs | 13 +- .../model/model_create_rule_response.rs | 8 +- .../model/model_create_rule_response_data.rs | 28 +- src/datadogV2/model/model_creator.rs | 16 + .../model_dashboard_list_add_items_request.rs | 9 + ...model_dashboard_list_add_items_response.rs | 9 + ...del_dashboard_list_delete_items_request.rs | 9 + ...el_dashboard_list_delete_items_response.rs | 9 + .../model/model_dashboard_list_item.rs | 62 +- .../model/model_dashboard_list_items.rs | 5 + ...del_dashboard_list_update_items_request.rs | 9 + ...el_dashboard_list_update_items_response.rs | 9 + .../model/model_data_scalar_column.rs | 23 +- src/datadogV2/model/model_detailed_finding.rs | 21 +- .../model_detailed_finding_attributes.rs | 63 +- .../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 | 8 +- .../model/model_downtime_meta_page.rs | 6 + ...el_downtime_monitor_included_attributes.rs | 6 + .../model_downtime_monitor_included_item.rs | 24 +- .../model/model_downtime_relationships.rs | 21 +- ...model_downtime_relationships_created_by.rs | 11 +- ..._downtime_relationships_created_by_data.rs | 11 + .../model_downtime_relationships_monitor.rs | 11 +- ...del_downtime_relationships_monitor_data.rs | 14 + .../model/model_downtime_response.rs | 16 +- .../model_downtime_response_attributes.rs | 77 +- .../model/model_downtime_response_data.rs | 31 +- ...time_schedule_current_downtime_response.rs | 11 + ...schedule_one_time_create_update_request.rs | 11 + ...del_downtime_schedule_one_time_response.rs | 5 + ...hedule_recurrence_create_update_request.rs | 5 + ...l_downtime_schedule_recurrence_response.rs | 16 + ...ime_schedule_recurrences_create_request.rs | 5 + ..._downtime_schedule_recurrences_response.rs | 16 +- ...ime_schedule_recurrences_update_request.rs | 14 + .../model/model_downtime_update_request.rs | 6 +- ...odel_downtime_update_request_attributes.rs | 57 +- .../model_downtime_update_request_data.rs | 4 +- src/datadogV2/model/model_event.rs | 21 + src/datadogV2/model/model_event_attributes.rs | 100 +- src/datadogV2/model/model_event_response.rs | 21 +- .../model/model_event_response_attributes.rs | 23 +- 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 | 27 +- .../model/model_events_list_response.rs | 20 +- .../model/model_events_list_response_links.rs | 6 + .../model/model_events_query_filter.rs | 16 + .../model/model_events_query_options.rs | 11 + .../model/model_events_request_page.rs | 11 + .../model/model_events_response_metadata.rs | 31 +- .../model_events_response_metadata_page.rs | 6 + .../model/model_events_scalar_query.rs | 26 +- src/datadogV2/model/model_events_search.rs | 6 + .../model/model_events_timeseries_query.rs | 26 +- src/datadogV2/model/model_events_warning.rs | 16 + ...model_fastly_accoun_response_attributes.rs | 5 + .../model_fastly_account_create_request.rs | 4 +- ...astly_account_create_request_attributes.rs | 5 + ...odel_fastly_account_create_request_data.rs | 4 +- .../model/model_fastly_account_response.rs | 8 +- .../model_fastly_account_response_data.rs | 4 +- .../model_fastly_account_update_request.rs | 4 +- ...astly_account_update_request_attributes.rs | 6 + ...odel_fastly_account_update_request_data.rs | 16 +- .../model/model_fastly_accounts_response.rs | 9 + src/datadogV2/model/model_fastly_service.rs | 5 + .../model/model_fastly_service_attributes.rs | 6 + .../model/model_fastly_service_data.rs | 10 +- .../model/model_fastly_service_request.rs | 4 +- .../model/model_fastly_service_response.rs | 8 +- .../model/model_fastly_services_response.rs | 9 + src/datadogV2/model/model_finding.rs | 18 +- .../model/model_finding_attributes.rs | 50 +- src/datadogV2/model/model_finding_mute.rs | 31 + src/datadogV2/model/model_finding_rule.rs | 11 + src/datadogV2/model/model_formula_limit.rs | 11 + src/datadogV2/model/model_full_api_key.rs | 31 +- .../model/model_full_api_key_attributes.rs | 36 + .../model/model_full_application_key.rs | 31 +- .../model_full_application_key_attributes.rs | 26 + .../model/model_gcp_service_account_meta.rs | 6 + .../model/model_gcpsts_delegate_account.rs | 24 +- ...odel_gcpsts_delegate_account_attributes.rs | 6 + .../model_gcpsts_delegate_account_response.rs | 8 +- .../model/model_gcpsts_service_account.rs | 28 +- ...model_gcpsts_service_account_attributes.rs | 36 + ...l_gcpsts_service_account_create_request.rs | 8 +- .../model_gcpsts_service_account_data.rs | 16 +- .../model_gcpsts_service_account_response.rs | 8 +- ...l_gcpsts_service_account_update_request.rs | 11 +- ...sts_service_account_update_request_data.rs | 21 +- .../model_gcpsts_service_accounts_response.rs | 6 + .../model/model_get_finding_response.rs | 4 +- .../model/model_group_scalar_column.rs | 16 + src/datadogV2/model/model_hourly_usage.rs | 21 +- .../model/model_hourly_usage_attributes.rs | 34 + .../model/model_hourly_usage_measurement.rs | 11 + .../model/model_hourly_usage_metadata.rs | 11 +- .../model/model_hourly_usage_pagination.rs | 6 + .../model/model_hourly_usage_response.rs | 13 +- src/datadogV2/model/model_http_log_error.rs | 16 + src/datadogV2/model/model_http_log_errors.rs | 6 + src/datadogV2/model/model_http_log_item.rs | 20 + src/datadogV2/model/model_httpci_app_error.rs | 16 + .../model/model_httpci_app_errors.rs | 6 + .../model/model_id_p_metadata_form_data.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 | 11 +- .../model_incident_attachment_update_data.rs | 15 +- ...del_incident_attachment_update_response.rs | 8 + .../model_incident_attachments_response.rs | 8 + .../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 +- ...ncident_field_attributes_multiple_value.rs | 14 + ..._incident_field_attributes_single_value.rs | 14 + ...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 +- ...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 +- ...odel_incident_integration_relationships.rs | 21 +- .../model_incident_non_datadog_creator.rs | 11 + .../model_incident_notification_handle.rs | 11 + .../model/model_incident_response.rs | 12 +- .../model_incident_response_attributes.rs | 122 +- .../model/model_incident_response_data.rs | 20 +- .../model/model_incident_response_meta.rs | 11 +- ...model_incident_response_meta_pagination.rs | 16 + .../model_incident_response_relationships.rs | 82 +- .../model/model_incident_search_response.rs | 22 +- ...del_incident_search_response_attributes.rs | 4 +- .../model_incident_search_response_data.rs | 19 +- ...el_incident_search_response_facets_data.rs | 89 + ...cident_search_response_field_facet_data.rs | 11 + ...incident_search_response_incidents_data.rs | 4 +- .../model_incident_search_response_meta.rs | 11 +- ...dent_search_response_numeric_facet_data.rs | 4 +- ..._response_numeric_facet_data_aggregates.rs | 11 + ...arch_response_property_field_facet_data.rs | 10 +- ...ncident_search_response_user_facet_data.rs | 26 + .../model_incident_service_create_data.rs | 20 +- .../model_incident_service_create_request.rs | 4 +- .../model_incident_service_relationships.rs | 18 +- .../model/model_incident_service_response.rs | 12 +- ...el_incident_service_response_attributes.rs | 16 + .../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_relationships.rs | 18 +- .../model/model_incident_team_response.rs | 14 +- ...model_incident_team_response_attributes.rs | 16 + .../model_incident_team_response_data.rs | 31 +- .../model/model_incident_team_update_data.rs | 25 +- .../model_incident_team_update_request.rs | 6 +- .../model/model_incident_teams_response.rs | 15 +- ...imeline_cell_markdown_create_attributes.rs | 9 +- ...cell_markdown_create_attributes_content.rs | 6 + .../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 | 21 +- .../model/model_incident_todo_response.rs | 14 +- .../model_incident_todo_response_data.rs | 20 +- .../model/model_incident_update_attributes.rs | 47 + .../model/model_incident_update_data.rs | 20 +- .../model_incident_update_relationships.rs | 32 +- .../model/model_incident_update_request.rs | 4 +- .../model/model_incidents_response.rs | 15 +- .../model/model_intake_payload_accepted.rs | 6 + .../model/model_ip_allowlist_attributes.rs | 11 + .../model/model_ip_allowlist_data.rs | 15 +- .../model/model_ip_allowlist_entry.rs | 4 +- .../model_ip_allowlist_entry_attributes.rs | 21 + .../model/model_ip_allowlist_entry_data.rs | 15 +- .../model/model_ip_allowlist_response.rs | 8 +- .../model_ip_allowlist_update_request.rs | 4 +- ...l_jira_integration_metadata_issues_item.rs | 15 + .../model/model_jsonapi_error_item.rs | 16 + .../model_list_application_keys_response.rs | 27 +- .../model/model_list_downtimes_response.rs | 21 +- .../model/model_list_findings_meta.rs | 13 +- .../model/model_list_findings_page.rs | 11 + .../model/model_list_findings_response.rs | 4 +- .../model/model_list_powerpacks_response.rs | 25 +- .../model/model_list_rules_response.rs | 16 +- .../model_list_rules_response_data_item.rs | 28 +- .../model/model_list_rules_response_links.rs | 6 + src/datadogV2/model/model_log.rs | 18 +- src/datadogV2/model/model_log_attributes.rs | 39 + .../model/model_logs_aggregate_bucket.rs | 20 + ..._logs_aggregate_bucket_value_timeseries.rs | 1 + ...aggregate_bucket_value_timeseries_point.rs | 11 + .../model/model_logs_aggregate_request.rs | 32 +- .../model_logs_aggregate_request_page.rs | 6 + .../model/model_logs_aggregate_response.rs | 15 +- .../model_logs_aggregate_response_data.rs | 9 + .../model/model_logs_aggregate_sort.rs | 24 + src/datadogV2/model/model_logs_archive.rs | 8 +- .../model/model_logs_archive_attributes.rs | 24 +- .../model_logs_archive_create_request.rs | 11 +- ..._logs_archive_create_request_attributes.rs | 19 +- ..._logs_archive_create_request_definition.rs | 10 +- .../model/model_logs_archive_definition.rs | 15 +- .../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 | 11 +- .../model_logs_archive_order_definition.rs | 4 +- src/datadogV2/model/model_logs_archives.rs | 9 + src/datadogV2/model/model_logs_compute.rs | 15 + src/datadogV2/model/model_logs_group_by.rs | 33 +- .../model/model_logs_list_request.rs | 27 +- .../model/model_logs_list_request_page.rs | 11 + .../model/model_logs_list_response.rs | 20 +- .../model/model_logs_list_response_links.rs | 6 + .../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 | 6 + .../model/model_logs_metric_group_by.rs | 5 + .../model/model_logs_metric_response.rs | 8 +- .../model_logs_metric_response_attributes.rs | 29 +- .../model_logs_metric_response_compute.rs | 19 + .../model/model_logs_metric_response_data.rs | 21 +- .../model_logs_metric_response_filter.rs | 6 + .../model_logs_metric_response_group_by.rs | 11 + .../model_logs_metric_update_attributes.rs | 26 +- .../model/model_logs_metric_update_compute.rs | 6 + .../model/model_logs_metric_update_data.rs | 4 +- .../model/model_logs_metric_update_request.rs | 6 +- .../model/model_logs_metrics_response.rs | 9 + .../model/model_logs_query_filter.rs | 26 + .../model/model_logs_query_options.rs | 11 + .../model/model_logs_response_metadata.rs | 31 +- .../model_logs_response_metadata_page.rs | 6 + src/datadogV2/model/model_logs_warning.rs | 16 + src/datadogV2/model/model_metric.rs | 11 + src/datadogV2/model/model_metric_all_tags.rs | 21 +- .../model/model_metric_all_tags_attributes.rs | 6 + .../model/model_metric_all_tags_response.rs | 8 +- .../model_metric_bulk_tag_config_create.rs | 10 +- ...etric_bulk_tag_config_create_attributes.rs | 16 + ...l_metric_bulk_tag_config_create_request.rs | 4 +- .../model_metric_bulk_tag_config_delete.rs | 10 +- ...etric_bulk_tag_config_delete_attributes.rs | 6 + ...l_metric_bulk_tag_config_delete_request.rs | 4 +- .../model_metric_bulk_tag_config_response.rs | 8 +- .../model_metric_bulk_tag_config_status.rs | 10 +- ...etric_bulk_tag_config_status_attributes.rs | 21 + .../model/model_metric_distinct_volume.rs | 21 +- ...model_metric_distinct_volume_attributes.rs | 6 + src/datadogV2/model/model_metric_estimate.rs | 24 +- .../model/model_metric_estimate_attributes.rs | 19 + .../model/model_metric_estimate_response.rs | 8 +- .../model_metric_ingested_indexed_volume.rs | 24 +- ...tric_ingested_indexed_volume_attributes.rs | 11 + src/datadogV2/model/model_metric_metadata.rs | 8 +- src/datadogV2/model/model_metric_origin.rs | 16 + src/datadogV2/model/model_metric_point.rs | 11 + src/datadogV2/model/model_metric_resource.rs | 11 + src/datadogV2/model/model_metric_series.rs | 37 +- ..._metric_suggested_tags_and_aggregations.rs | 24 +- ...uggested_tags_and_aggregations_response.rs | 11 +- .../model_metric_suggested_tags_attributes.rs | 14 + .../model/model_metric_tag_configuration.rs | 24 +- ...del_metric_tag_configuration_attributes.rs | 42 + ...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 | 8 +- ...ric_tag_configuration_update_attributes.rs | 24 + ...el_metric_tag_configuration_update_data.rs | 10 +- ...metric_tag_configuration_update_request.rs | 4 +- .../model/model_metric_volumes_response.rs | 8 +- ..._and_metric_tag_configurations_response.rs | 9 + .../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 | 19 +- ...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 | 9 + .../model_monitor_config_policy_response.rs | 11 +- ...del_monitor_config_policy_response_data.rs | 24 +- .../model_monitor_config_policy_tag_policy.rs | 16 + .../model_monitor_downtime_match_response.rs | 16 +- ...itor_downtime_match_response_attributes.rs | 21 + ...el_monitor_downtime_match_response_data.rs | 24 +- src/datadogV2/model/model_monitor_type.rs | 56 + ...del_monthly_cost_attribution_attributes.rs | 42 + .../model_monthly_cost_attribution_body.rs | 21 +- .../model_monthly_cost_attribution_meta.rs | 19 +- ...del_monthly_cost_attribution_pagination.rs | 6 + ...model_monthly_cost_attribution_response.rs | 19 +- .../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 | 8 +- .../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 | 16 +- .../model/model_okta_accounts_response.rs | 9 + .../model/model_on_demand_concurrency_cap.rs | 19 +- ...el_on_demand_concurrency_cap_attributes.rs | 6 + ...odel_on_demand_concurrency_cap_response.rs | 8 +- ...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 | 19 + .../model_opsgenie_service_response_data.rs | 4 +- ...odel_opsgenie_service_update_attributes.rs | 24 + .../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 | 41 + .../model/model_outcomes_batch_attributes.rs | 9 + .../model/model_outcomes_batch_request.rs | 8 +- .../model_outcomes_batch_request_data.rs | 16 +- .../model_outcomes_batch_request_item.rs | 5 + .../model/model_outcomes_batch_response.rs | 4 +- ...odel_outcomes_batch_response_attributes.rs | 26 + .../model_outcomes_batch_response_meta.rs | 11 + .../model/model_outcomes_response.rs | 24 +- .../model_outcomes_response_data_item.rs | 31 +- .../model_outcomes_response_included_item.rs | 21 +- ...comes_response_included_rule_attributes.rs | 11 + .../model/model_outcomes_response_links.rs | 6 + src/datadogV2/model/model_pagination.rs | 11 + src/datadogV2/model/model_partial_api_key.rs | 31 +- .../model/model_partial_api_key_attributes.rs | 31 + .../model/model_partial_application_key.rs | 31 +- ...odel_partial_application_key_attributes.rs | 21 + .../model_partial_application_key_response.rs | 16 +- src/datadogV2/model/model_permission.rs | 15 +- .../model/model_permission_attributes.rs | 36 + .../model/model_permissions_response.rs | 6 + src/datadogV2/model/model_powerpack.rs | 8 +- .../model/model_powerpack_attributes.rs | 22 +- src/datadogV2/model/model_powerpack_data.rs | 28 +- .../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 | 8 +- .../model/model_powerpack_response.rs | 13 +- .../model/model_powerpack_response_links.rs | 26 + .../model_powerpack_template_variable.rs | 5 + .../model/model_powerpacks_response_meta.rs | 11 +- ...del_powerpacks_response_meta_pagination.rs | 41 + .../model/model_process_summaries_meta.rs | 8 +- .../model_process_summaries_meta_page.rs | 11 + .../model/model_process_summaries_response.rs | 13 +- src/datadogV2/model/model_process_summary.rs | 21 +- .../model/model_process_summary_attributes.rs | 41 + src/datadogV2/model/model_projected_cost.rs | 21 +- .../model/model_projected_cost_attributes.rs | 34 + .../model/model_projected_cost_response.rs | 6 + 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 | 8 +- .../model_relationship_to_outcome_data.rs | 11 + .../model/model_relationship_to_permission.rs | 11 +- .../model_relationship_to_permission_data.rs | 11 + .../model_relationship_to_permissions.rs | 9 + .../model/model_relationship_to_role.rs | 8 +- .../model/model_relationship_to_role_data.rs | 11 + .../model/model_relationship_to_roles.rs | 9 + .../model/model_relationship_to_rule.rs | 11 +- .../model/model_relationship_to_rule_data.rs | 11 +- .../model_relationship_to_rule_data_object.rs | 11 + ...elationship_to_saml_assertion_attribute.rs | 4 +- .../model/model_relationship_to_team_links.rs | 16 +- .../model/model_relationship_to_user.rs | 4 +- ...el_relationship_to_user_team_permission.rs | 18 +- .../model_relationship_to_user_team_team.rs | 4 +- .../model_relationship_to_user_team_user.rs | 4 +- .../model/model_response_meta_attributes.rs | 8 +- .../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 | 61 +- .../model_retention_filter_attributes.rs | 61 +- ...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 | 8 +- .../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 | 21 + 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 | 8 +- .../model/model_role_create_response_data.rs | 25 +- .../model/model_role_relationships.rs | 18 +- src/datadogV2/model/model_role_response.rs | 8 +- .../model_role_response_relationships.rs | 11 +- .../model/model_role_update_attributes.rs | 16 + src/datadogV2/model/model_role_update_data.rs | 14 +- .../model/model_role_update_request.rs | 4 +- .../model/model_role_update_response.rs | 8 +- .../model/model_role_update_response_data.rs | 25 +- src/datadogV2/model/model_roles_response.rs | 13 +- src/datadogV2/model/model_rule_attributes.rs | 55 + .../model/model_rule_outcome_relationships.rs | 8 +- ...l_rum_aggregate_bucket_value_timeseries.rs | 1 + ...aggregate_bucket_value_timeseries_point.rs | 11 + .../model/model_rum_aggregate_request.rs | 32 +- .../model/model_rum_aggregate_sort.rs | 24 + .../model_rum_aggregation_buckets_response.rs | 6 + .../model_rum_analytics_aggregate_response.rs | 25 +- 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 | 8 +- .../model/model_rum_application_update.rs | 10 +- ...model_rum_application_update_attributes.rs | 11 + .../model_rum_application_update_request.rs | 6 +- .../model/model_rum_applications_response.rs | 6 + .../model/model_rum_bucket_response.rs | 14 + src/datadogV2/model/model_rum_compute.rs | 15 + src/datadogV2/model/model_rum_event.rs | 18 +- .../model/model_rum_event_attributes.rs | 24 + .../model/model_rum_events_response.rs | 20 +- src/datadogV2/model/model_rum_group_by.rs | 33 +- src/datadogV2/model/model_rum_query_filter.rs | 16 + .../model/model_rum_query_options.rs | 11 + .../model/model_rum_query_page_options.rs | 11 + .../model/model_rum_response_links.rs | 6 + .../model/model_rum_response_metadata.rs | 28 +- .../model/model_rum_response_page.rs | 6 + .../model/model_rum_search_events_request.rs | 27 +- src/datadogV2/model/model_rum_warning.rs | 16 + .../model/model_saml_assertion_attribute.rs | 10 +- ...del_saml_assertion_attribute_attributes.rs | 11 + .../model_scalar_formula_query_request.rs | 6 +- .../model_scalar_formula_query_response.rs | 13 +- .../model/model_scalar_formula_request.rs | 4 +- ...model_scalar_formula_request_attributes.rs | 5 + ...odel_scalar_formula_response_atrributes.rs | 6 + src/datadogV2/model/model_scalar_meta.rs | 6 + src/datadogV2/model/model_scalar_response.rs | 19 +- src/datadogV2/model/model_security_filter.rs | 21 +- .../model/model_security_filter_attributes.rs | 42 + .../model_security_filter_create_data.rs | 4 +- .../model_security_filter_create_request.rs | 4 +- ...curity_filter_exclusion_filter_response.rs | 11 + .../model/model_security_filter_meta.rs | 6 + .../model/model_security_filter_response.rs | 15 +- ...model_security_filter_update_attributes.rs | 37 + .../model_security_filter_update_data.rs | 4 +- .../model_security_filter_update_request.rs | 4 +- .../model/model_security_filters_response.rs | 13 +- .../model/model_security_monitoring_filter.rs | 14 + ...security_monitoring_list_rules_response.rs | 16 +- .../model_security_monitoring_rule_case.rs | 24 + ...el_security_monitoring_rule_case_create.rs | 15 + ...nitoring_rule_impossible_travel_options.rs | 6 + ...urity_monitoring_rule_new_value_options.rs | 33 + .../model_security_monitoring_rule_options.rs | 87 +- ...ity_monitoring_rule_third_party_options.rs | 27 + ...security_monitoring_rule_update_payload.rs | 83 +- .../model/model_security_monitoring_signal.rs | 24 +- ...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 | 24 + ...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 | 29 +- ...y_monitoring_signal_list_request_filter.rs | 16 + ...ity_monitoring_signal_list_request_page.rs | 11 + ...del_security_monitoring_signal_response.rs | 8 +- ...y_monitoring_signal_rule_create_payload.rs | 30 +- ...l_security_monitoring_signal_rule_query.rs | 28 + ...ecurity_monitoring_signal_rule_response.rs | 108 +- ...y_monitoring_signal_rule_response_query.rs | 49 + ...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 | 24 +- ...onitoring_signal_triage_update_response.rs | 4 +- ...curity_monitoring_signals_list_response.rs | 29 +- ..._monitoring_signals_list_response_links.rs | 6 + ...y_monitoring_signals_list_response_meta.rs | 11 +- ...itoring_signals_list_response_meta_page.rs | 6 + ...monitoring_standard_rule_create_payload.rs | 38 +- ...security_monitoring_standard_rule_query.rs | 52 + ...urity_monitoring_standard_rule_response.rs | 126 +- ...urity_monitoring_third_party_root_query.rs | 11 + ...curity_monitoring_third_party_rule_case.rs | 24 + ...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 | 14 + ...nsitive_data_scanner_configuration_data.rs | 11 +- ...ata_scanner_configuration_relationships.rs | 11 +- ...tive_data_scanner_create_group_response.rs | 21 +- ...itive_data_scanner_create_rule_response.rs | 21 +- .../model_sensitive_data_scanner_filter.rs | 6 + ...sitive_data_scanner_get_config_response.rs | 26 +- ...e_data_scanner_get_config_response_data.rs | 32 +- .../model_sensitive_data_scanner_group.rs | 14 + ...sensitive_data_scanner_group_attributes.rs | 34 +- ...del_sensitive_data_scanner_group_create.rs | 14 +- ...itive_data_scanner_group_create_request.rs | 21 +- ...model_sensitive_data_scanner_group_data.rs | 8 +- ...itive_data_scanner_group_delete_request.rs | 4 +- ...tive_data_scanner_group_delete_response.rs | 11 +- ...sitive_data_scanner_group_included_item.rs | 34 +- ...model_sensitive_data_scanner_group_item.rs | 14 + ...model_sensitive_data_scanner_group_list.rs | 9 + ...sitive_data_scanner_group_relationships.rs | 21 +- ...l_sensitive_data_scanner_group_response.rs | 34 +- ...del_sensitive_data_scanner_group_update.rs | 34 +- ...itive_data_scanner_group_update_request.rs | 8 +- ...tive_data_scanner_group_update_response.rs | 11 +- .../model_sensitive_data_scanner_meta.rs | 31 + ...ensitive_data_scanner_meta_version_only.rs | 6 + ...l_sensitive_data_scanner_reorder_config.rs | 24 +- ...ve_data_scanner_reorder_groups_response.rs | 8 +- .../model_sensitive_data_scanner_rule.rs | 14 + ..._sensitive_data_scanner_rule_attributes.rs | 51 +- ...odel_sensitive_data_scanner_rule_create.rs | 8 +- ...sitive_data_scanner_rule_create_request.rs | 8 +- .../model_sensitive_data_scanner_rule_data.rs | 9 + ...sitive_data_scanner_rule_delete_request.rs | 4 +- ...itive_data_scanner_rule_delete_response.rs | 11 +- ...nsitive_data_scanner_rule_included_item.rs | 34 +- ...nsitive_data_scanner_rule_relationships.rs | 22 +- ...el_sensitive_data_scanner_rule_response.rs | 34 +- ...odel_sensitive_data_scanner_rule_update.rs | 34 +- ...sitive_data_scanner_rule_update_request.rs | 8 +- ...itive_data_scanner_rule_update_response.rs | 11 +- ...sensitive_data_scanner_standard_pattern.rs | 14 + ...ata_scanner_standard_pattern_attributes.rs | 31 + ...tive_data_scanner_standard_pattern_data.rs | 11 +- ...scanner_standard_patterns_response_data.rs | 9 + ...scanner_standard_patterns_response_item.rs | 25 +- ...sensitive_data_scanner_text_replacement.rs | 19 + ...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 | 9 + .../model/model_service_definition_data.rs | 21 +- ...odel_service_definition_data_attributes.rs | 15 +- .../model_service_definition_get_response.rs | 8 +- .../model/model_service_definition_meta.rs | 39 + .../model_service_definition_meta_warnings.rs | 16 + .../model/model_service_definition_v1.rs | 52 +- .../model_service_definition_v1_contact.rs | 11 + .../model/model_service_definition_v1_info.rs | 15 + ...odel_service_definition_v1_integrations.rs | 6 + .../model/model_service_definition_v1_org.rs | 11 + .../model/model_service_definition_v2.rs | 65 +- .../model/model_service_definition_v2_doc.rs | 5 + .../model/model_service_definition_v2_dot1.rs | 64 +- .../model_service_definition_v2_dot1_email.rs | 5 + ...service_definition_v2_dot1_integrations.rs | 21 +- .../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 | 6 + .../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 | 21 +- .../model_service_definition_v2_dot2_link.rs | 5 + ...del_service_definition_v2_dot2_opsgenie.rs | 8 + ...el_service_definition_v2_dot2_pagerduty.rs | 6 + .../model_service_definition_v2_email.rs | 5 + ...odel_service_definition_v2_integrations.rs | 16 +- .../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 + ...model_service_definitions_list_response.rs | 9 + ...slack_integration_metadata_channel_item.rs | 5 + src/datadogV2/model/model_span.rs | 18 +- .../model/model_spans_aggregate_bucket.rs | 21 +- ...model_spans_aggregate_bucket_attributes.rs | 28 + ...spans_aggregate_bucket_value_timeseries.rs | 1 + ...aggregate_bucket_value_timeseries_point.rs | 11 + .../model/model_spans_aggregate_data.rs | 19 +- .../model/model_spans_aggregate_request.rs | 8 +- ...odel_spans_aggregate_request_attributes.rs | 25 +- .../model/model_spans_aggregate_response.rs | 16 +- ...model_spans_aggregate_response_metadata.rs | 24 + .../model/model_spans_aggregate_sort.rs | 24 + src/datadogV2/model/model_spans_attributes.rs | 92 + src/datadogV2/model/model_spans_compute.rs | 15 + src/datadogV2/model/model_spans_filter.rs | 6 + src/datadogV2/model/model_spans_group_by.rs | 36 +- .../model/model_spans_list_request.rs | 8 +- .../model_spans_list_request_attributes.rs | 27 +- .../model/model_spans_list_request_data.rs | 16 +- .../model/model_spans_list_request_page.rs | 11 + .../model/model_spans_list_response.rs | 20 +- .../model/model_spans_list_response_links.rs | 6 + .../model_spans_list_response_metadata.rs | 31 +- .../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 | 6 + .../model/model_spans_metric_group_by.rs | 5 + .../model/model_spans_metric_response.rs | 8 +- .../model_spans_metric_response_attributes.rs | 29 +- .../model_spans_metric_response_compute.rs | 19 + .../model/model_spans_metric_response_data.rs | 21 +- .../model_spans_metric_response_filter.rs | 6 + .../model_spans_metric_response_group_by.rs | 11 + .../model_spans_metric_update_attributes.rs | 26 +- .../model_spans_metric_update_compute.rs | 6 + .../model/model_spans_metric_update_data.rs | 4 +- .../model_spans_metric_update_request.rs | 6 +- .../model/model_spans_metrics_response.rs | 9 + .../model/model_spans_query_filter.rs | 16 + .../model/model_spans_query_options.rs | 11 + .../model_spans_response_metadata_page.rs | 6 + src/datadogV2/model/model_spans_warning.rs | 16 + 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 | 8 +- .../model/model_team_create_request.rs | 4 +- 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 | 8 +- .../model/model_team_links_response.rs | 6 + .../model/model_team_permission_setting.rs | 10 +- ...odel_team_permission_setting_attributes.rs | 35 + .../model_team_permission_setting_response.rs | 8 +- .../model_team_permission_setting_update.rs | 10 +- ...am_permission_setting_update_attributes.rs | 9 + ..._team_permission_setting_update_request.rs | 4 +- ...model_team_permission_settings_response.rs | 9 + .../model/model_team_relationships.rs | 22 +- .../model/model_team_relationships_links.rs | 6 + src/datadogV2/model/model_team_response.rs | 8 +- src/datadogV2/model/model_team_update.rs | 14 +- .../model/model_team_update_attributes.rs | 30 + .../model/model_team_update_relationships.rs | 11 +- .../model/model_team_update_request.rs | 4 +- src/datadogV2/model/model_teams_response.rs | 25 +- .../model/model_teams_response_links.rs | 26 + .../model/model_teams_response_meta.rs | 11 +- .../model_teams_response_meta_pagination.rs | 41 + .../model_timeseries_formula_query_request.rs | 4 +- ...model_timeseries_formula_query_response.rs | 13 +- .../model/model_timeseries_formula_request.rs | 4 +- ...l_timeseries_formula_request_attributes.rs | 10 + .../model/model_timeseries_response.rs | 19 +- .../model_timeseries_response_attributes.rs | 19 + .../model/model_timeseries_response_series.rs | 16 + src/datadogV2/model/model_unit.rs | 26 + ...pplication_security_monitoring_response.rs | 6 + .../model/model_usage_attributes_object.rs | 34 + .../model/model_usage_data_object.rs | 21 +- ...sage_lambda_traced_invocations_response.rs | 6 + ..._usage_observability_pipelines_response.rs | 6 + .../model/model_usage_time_series_object.rs | 11 + src/datadogV2/model/model_user.rs | 28 +- src/datadogV2/model/model_user_attributes.rs | 56 + .../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 | 21 + .../model_user_invitation_relationships.rs | 6 +- .../model/model_user_invitation_response.rs | 11 +- .../model_user_invitation_response_data.rs | 31 +- .../model/model_user_invitations_response.rs | 9 + .../model/model_user_relationships.rs | 8 +- src/datadogV2/model/model_user_response.rs | 16 +- .../model_user_response_relationships.rs | 35 +- src/datadogV2/model/model_user_team.rs | 17 +- .../model/model_user_team_attributes.rs | 16 + src/datadogV2/model/model_user_team_create.rs | 17 +- .../model/model_user_team_permission.rs | 10 +- .../model_user_team_permission_attributes.rs | 9 + .../model/model_user_team_relationships.rs | 21 +- .../model/model_user_team_request.rs | 4 +- .../model/model_user_team_response.rs | 8 +- src/datadogV2/model/model_user_team_update.rs | 7 +- .../model/model_user_team_update_request.rs | 4 +- .../model/model_user_teams_response.rs | 20 +- .../model/model_user_update_attributes.rs | 16 + src/datadogV2/model/model_user_update_data.rs | 4 +- .../model/model_user_update_request.rs | 4 +- src/datadogV2/model/model_users_response.rs | 21 +- tests/scenarios/function_mappings.rs | 3105 +++++++---------- 1572 files changed, 37862 insertions(+), 10272 deletions(-) diff --git a/.generator/src/generator/cli.py b/.generator/src/generator/cli.py index 0bd37c1ae..d2547f629 100644 --- a/.generator/src/generator/cli.py +++ b/.generator/src/generator/cli.py @@ -47,6 +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_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 23f0ebffe..0bf8565bc 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.""" - # special case for additionalProperties: true if schema is True or schema == {}: return "serde_json::Value" @@ -90,17 +89,21 @@ 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: + 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_optional_parameter(operation): + for _, parameter in parameters(operation): + if not parameter.get("required"): + 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..32e710cd1 100644 --- a/.generator/src/generator/templates/api.j2 +++ b/.generator/src/generator/templates/api.j2 @@ -4,33 +4,48 @@ 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 %} +{%- set optionalParams = operation|parameters|rejectattr('1.required', 'equalto', true) | list %} -{%- for name, parameter in operation|parameters %} +{%- for name, parameter in optionalParams %} {%- if loop.first %} -/// {{ operation.operationId }}Params is a struct for passing parameters to the method [`{{ structName }}::{{operation.operationId | snake_case}}`] -#[derive(Clone, Debug)] -pub struct {{operation.operationId}}Params { +/// {{operation.operationId}}OptionalParams is a struct for passing parameters to the method [`{{ structName }}::{{operation.operationId | snake_case}}`] +#[derive(Clone, Default, Debug)] +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) }}, +{%- if loop.last %} +} +{% endif %} +{%- endfor %} +{%- for name, parameter in optionalParams %} +{%- 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 %} @@ -69,15 +84,16 @@ 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 %} + {%- 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 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 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), } @@ -86,11 +102,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 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; - // 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 +129,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/function_mappings.j2 b/.generator/src/generator/templates/function_mappings.j2 index e18ae7797..1f99ad2c1 100644 --- a/.generator/src/generator/templates/function_mappings.j2 +++ b/.generator/src/generator/templates/function_mappings.j2 @@ -50,11 +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"); - {%- if operationParams|length > 0 -%} - {%- 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,15 +74,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 optionalParams %} + {%- 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 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 { diff --git a/.generator/src/generator/templates/model_oneof.j2 b/.generator/src/generator/templates/model_oneof.j2 index c4e59c7a8..d297426a7 100644 --- a/.generator/src/generator/templates/model_oneof.j2 +++ b/.generator/src/generator/templates/model_oneof.j2 @@ -5,7 +5,7 @@ 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=false, version=version) %} {%- set attributeName = (get_name(oneOf) or dataType)|upperfirst %} {%- if oneOf | is_primitive or oneOf.type == "array" %} {{attributeName}}({{dataType}}), diff --git a/.generator/src/generator/templates/model_simple.j2 b/.generator/src/generator/templates/model_simple.j2 index 5a0c7265c..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,23 +20,22 @@ 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 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=false, 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=false, version=version) %} {%- if attr in model.get("required", []) %} {{ attr|variable_name }}, {%- else %} @@ -48,9 +47,20 @@ 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=false, version=version) %} + {%- if get_deprecated(model) %} + #[allow(deprecated)] + {%- endif %} + 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_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..b2b5b33a0 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`] -#[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 { +/// ListAWSAccountsOptionalParams is a struct for passing parameters to the method [`AWSIntegrationAPI::list_aws_accounts`] +#[derive(Clone, Default, Debug)] +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,27 @@ pub struct ListAWSAccountsParams { pub access_key_id: Option, } -/// ListAWSTagFiltersParams is a struct for passing parameters to the method [`AWSIntegrationAPI::list_aws_tag_filters`] -#[derive(Clone, Debug)] -pub struct ListAWSTagFiltersParams { - /// Only return AWS filters that matches this `account_id`. - pub account_id: String, +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 + } } -/// 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, +/// UpdateAWSAccountOptionalParams is a struct for passing parameters to the method [`AWSIntegrationAPI::update_aws_account`] +#[derive(Clone, Default, Debug)] +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`. @@ -90,6 +47,26 @@ pub struct UpdateAWSAccountParams { 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)] @@ -239,12 +216,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 +233,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 +296,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 +313,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 +379,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 +393,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 +459,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 +473,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 +539,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 +553,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 +616,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 +633,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 +699,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 +713,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 +779,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 +791,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 +809,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 +884,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 +936,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 +950,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 +1024,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 +1075,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 +1090,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 +1109,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..a513d60e0 100644 --- a/src/datadogV1/api/api_dashboards.rs +++ b/src/datadogV1/api/api_dashboards.rs @@ -5,78 +5,31 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateDashboardParams is a struct for passing parameters to the method [`DashboardsAPI::create_dashboard`] -#[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, +/// GetPublicDashboardInvitationsOptionalParams is a struct for passing parameters to the method [`DashboardsAPI::get_public_dashboard_invitations`] +#[derive(Clone, Default, Debug)] +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`] -#[derive(Clone, Debug)] -pub struct ListDashboardsParams { +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, Default, Debug)] +pub struct ListDashboardsOptionalParams { /// When `true`, this query only returns shared custom created /// or cloned dashboards. pub filter_shared: Option, @@ -89,38 +42,29 @@ 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, +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`] @@ -293,9 +237,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 +249,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 +310,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 +322,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 +385,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 +397,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 +457,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 +468,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 +526,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 +540,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 +600,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 +615,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 +678,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 +689,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 +745,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 +757,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 +817,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 +835,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 +857,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 +912,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 +926,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 +945,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 +1005,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 +1016,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 +1074,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 +1092,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 +1160,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 +1175,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 +1241,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 +1257,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..297aa37d3 100644 --- a/src/datadogV1/api/api_downtimes.rs +++ b/src/datadogV1/api/api_downtimes.rs @@ -5,57 +5,26 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CancelDowntimeParams is a struct for passing parameters to the method [`DowntimesAPI::cancel_downtime`] -#[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 { +/// ListDowntimesOptionalParams is a struct for passing parameters to the method [`DowntimesAPI::list_downtimes`] +#[derive(Clone, Default, Debug)] +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, +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`] @@ -153,9 +122,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 +133,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 +188,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 +202,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 +268,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 +279,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 +340,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 +351,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 +407,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 +418,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 +433,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 +485,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 +497,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 +557,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 +569,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..3ca9d5466 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`] -#[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, +/// ListEventsOptionalParams is a struct for passing parameters to the method [`EventsAPI::list_events`] +#[derive(Clone, Default, Debug)] +pub struct ListEventsOptionalParams { /// Priority of your events, either `low` or `normal`. pub priority: Option, /// A comma separated string of sources. @@ -44,6 +26,43 @@ pub struct ListEventsParams { 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)] @@ -98,9 +117,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 +129,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 +191,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 +205,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 +269,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 +290,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 +313,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..812369958 100644 --- a/src/datadogV1/api/api_hosts.rs +++ b/src/datadogV1/api/api_hosts.rs @@ -5,16 +5,24 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// GetHostTotalsParams is a struct for passing parameters to the method [`HostsAPI::get_host_totals`] -#[derive(Clone, Debug)] -pub struct GetHostTotalsParams { +/// GetHostTotalsOptionalParams is a struct for passing parameters to the method [`HostsAPI::get_host_totals`] +#[derive(Clone, Default, Debug)] +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`] -#[derive(Clone, Debug)] -pub struct ListHostsParams { +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, Default, Debug)] +pub struct ListHostsOptionalParams { /// String to filter search results. pub filter: Option, /// Sort hosts by this field. @@ -33,20 +41,47 @@ 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, +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`] @@ -114,7 +149,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 +161,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 +175,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 +226,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 +240,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 +261,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 +336,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 +348,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 +413,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 +424,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..cc85bf80b 100644 --- a/src/datadogV1/api/api_logs.rs +++ b/src/datadogV1/api/api_logs.rs @@ -5,24 +5,31 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// ListLogsParams is a struct for passing parameters to the method [`LogsAPI::list_logs`] -#[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, +/// SubmitLogOptionalParams is a struct for passing parameters to the method [`LogsAPI::submit_log`] +#[derive(Clone, Default, Debug)] +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. 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)] @@ -74,9 +81,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 +100,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 +178,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 +209,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 +227,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..c6021fe73 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`] -#[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, +/// ListActiveMetricsOptionalParams is a struct for passing parameters to the method [`MetricsAPI::list_active_metrics`] +#[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. pub host: Option, @@ -25,47 +16,55 @@ 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, +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 + } } -/// 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, +/// SubmitDistributionPointsOptionalParams is a struct for passing parameters to the method [`MetricsAPI::submit_distribution_points`] +#[derive(Clone, Default, Debug)] +pub struct SubmitDistributionPointsOptionalParams { + /// HTTP header used to compress the media-type. + pub content_encoding: Option, } -/// SubmitDistributionPointsParams 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, +impl SubmitDistributionPointsOptionalParams { /// HTTP header used to compress the media-type. - pub content_encoding: Option, + pub fn content_encoding( + &mut self, + value: crate::datadogV1::model::DistributionPointsContentEncoding, + ) -> &mut Self { + self.content_encoding = Some(value); + self + } } -/// SubmitMetricsParams is a struct for passing parameters to the method [`MetricsAPI::submit_metrics`] -#[derive(Clone, Debug)] -pub struct SubmitMetricsParams { - pub body: crate::datadogV1::model::MetricsPayload, +/// SubmitMetricsOptionalParams is a struct for passing parameters to the method [`MetricsAPI::submit_metrics`] +#[derive(Clone, Default, Debug)] +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, +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`] @@ -167,10 +166,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 +178,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 +238,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 +251,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 +270,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 +322,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 +334,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 +391,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 +405,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 +466,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 +484,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 +565,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 +588,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 +656,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 +672,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..83d02ec94 100644 --- a/src/datadogV1/api/api_monitors.rs +++ b/src/datadogV1/api/api_monitors.rs @@ -5,43 +5,46 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CheckCanDeleteMonitorParams is a struct for passing parameters to the method [`MonitorsAPI::check_can_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, +/// DeleteMonitorOptionalParams is a struct for passing parameters to the method [`MonitorsAPI::delete_monitor`] +#[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, } -/// 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, +impl DeleteMonitorOptionalParams { /// Delete the monitor even if it's referenced by other resources (for example SLO, composite monitor). - pub force: Option, + pub fn force(&mut self, value: String) -> &mut Self { + self.force = Some(value); + self + } } -/// GetMonitorParams 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, +/// GetMonitorOptionalParams is a struct for passing parameters to the method [`MonitorsAPI::get_monitor`] +#[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, /// 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`] -#[derive(Clone, Debug)] -pub struct ListMonitorsParams { +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, 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`. pub group_states: Option, @@ -63,9 +66,55 @@ pub struct ListMonitorsParams { pub page_size: Option, } -/// SearchMonitorGroupsParams is a struct for passing parameters to the method [`MonitorsAPI::search_monitor_groups`] -#[derive(Clone, Debug)] -pub struct SearchMonitorGroupsParams { +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, 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] /// page to learn more. @@ -87,9 +136,43 @@ pub struct SearchMonitorGroupsParams { pub sort: Option, } -/// SearchMonitorsParams is a struct for passing parameters to the method [`MonitorsAPI::search_monitors`] -#[derive(Clone, Debug)] -pub struct SearchMonitorsParams { +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, 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] /// page to learn more. @@ -111,29 +194,38 @@ 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, +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`] @@ -266,12 +358,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 +375,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 +394,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 +625,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 +817,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 +877,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 +889,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 +908,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 +956,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 +968,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 +987,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 +1038,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 +1049,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 +1070,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 +1145,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 +1159,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 +1181,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 +1241,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 +1253,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 +1272,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 +1332,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 +1344,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 +1409,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 +1427,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 +1497,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 +1513,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..6c3b8858c 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`] -#[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 { +/// ListNotebooksOptionalParams is a struct for passing parameters to the method [`NotebooksAPI::list_notebooks`] +#[derive(Clone, Default, Debug)] +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,13 +30,57 @@ 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, +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`] @@ -138,9 +161,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 +172,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 +235,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 +246,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 +301,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 +312,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 +370,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 +382,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 +407,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 +491,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 +503,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..289867471 100644 --- a/src/datadogV1/api/api_service_level_objective_corrections.rs +++ b/src/datadogV1/api/api_service_level_objective_corrections.rs @@ -5,43 +5,26 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateSLOCorrectionParams is a struct for passing parameters to the method [`ServiceLevelObjectiveCorrectionsAPI::create_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 { +/// ListSLOCorrectionOptionalParams is a struct for passing parameters to the method [`ServiceLevelObjectiveCorrectionsAPI::list_slo_correction`] +#[derive(Clone, Default, Debug)] +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, +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`] @@ -119,12 +102,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 +116,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 +179,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 +193,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 +248,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 +263,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 +323,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 +337,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 +354,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 +406,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 +424,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..4741de8c5 100644 --- a/src/datadogV1/api/api_service_level_objectives.rs +++ b/src/datadogV1/api/api_service_level_objectives.rs @@ -5,61 +5,39 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CheckCanDeleteSLOParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::check_can_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, +/// DeleteSLOOptionalParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::delete_slo`] +#[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, } -/// 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>, +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 + } } -/// GetSLOParams 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, +/// GetSLOOptionalParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::get_slo`] +#[derive(Clone, Default, Debug)] +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`] -#[derive(Clone, Debug)] -pub struct GetSLOCorrectionsParams { - /// The ID of the service level objective object. - pub slo_id: String, +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 + } } -/// 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, +/// GetSLOHistoryOptionalParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::get_slo_history`] +#[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, /// Defaults to `true`. If any SLO corrections are applied and this parameter is set to `false`, @@ -67,9 +45,23 @@ pub struct GetSLOHistoryParams { pub apply_correction: Option, } -/// ListSLOsParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::list_sl_os`] -#[derive(Clone, Debug)] -pub struct ListSLOsParams { +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, Default, Debug)] +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 +76,42 @@ pub struct ListSLOsParams { pub offset: Option, } -/// SearchSLOParams is a struct for passing parameters to the method [`ServiceLevelObjectivesAPI::search_slo`] -#[derive(Clone, Debug)] -pub struct SearchSLOParams { +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, Default, Debug)] +pub struct SearchSLOOptionalParams { /// The query string to filter results based on SLO names. /// Some examples of queries include `service:` /// and ``. @@ -99,13 +124,29 @@ 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, +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`] @@ -239,12 +280,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 +295,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 +353,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 +364,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 +427,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 +442,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 +461,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 +512,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 +530,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 +593,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 +605,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 +623,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 +670,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 +684,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 +751,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 +776,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 +802,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 +854,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 +865,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 +884,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 +950,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 +961,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 +978,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 +1037,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 +1049,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..f906b9c79 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`] -#[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, +/// GetGraphSnapshotOptionalParams is a struct for passing parameters to the method [`SnapshotsAPI::get_graph_snapshot`] +#[derive(Clone, Default, Debug)] +pub struct GetGraphSnapshotOptionalParams { /// The metric query. pub metric_query: Option, /// A query that adds event bands to the graph. @@ -28,6 +24,41 @@ pub struct GetGraphSnapshotParams { 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)] @@ -63,9 +94,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 +111,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 +134,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..9515ef045 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`] -#[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, +/// GetAPITestLatestResultsOptionalParams is a struct for passing parameters to the method [`SyntheticsAPI::get_api_test_latest_results`] +#[derive(Clone, Default, Debug)] +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,27 @@ 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`] -#[derive(Clone, Debug)] -pub struct GetBrowserTestParams { - /// The public ID of the test to get details from. - pub public_id: String, +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 + } } -/// 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, +/// GetBrowserTestLatestResultsOptionalParams is a struct for passing parameters to the method [`SyntheticsAPI::get_browser_test_latest_results`] +#[derive(Clone, Default, Debug)] +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,110 +45,44 @@ 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, +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 + } } -/// ListTestsParams is a struct for passing parameters to the method [`SyntheticsAPI::list_tests`] -#[derive(Clone, Debug)] -pub struct ListTestsParams { +/// ListTestsOptionalParams is a struct for passing parameters to the method [`SyntheticsAPI::list_tests`] +#[derive(Clone, Default, Debug)] +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, +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`] @@ -530,12 +396,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 +410,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 +476,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 +490,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 +557,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 +571,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 +637,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 +654,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 +720,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 +734,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 +789,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 +803,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 +858,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 +872,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 +937,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 +955,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 +1024,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 +1036,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 +1093,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 +1111,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 +1134,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 +1198,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 +1216,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 +1279,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 +1292,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 +1352,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 +1370,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 +1393,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 +1457,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 +1475,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 +1537,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 +1551,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 +1611,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 +1625,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 +1685,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 +1699,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 +1772,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 +1823,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 +1834,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 +1910,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 +1982,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 +2034,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 +2046,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 +2063,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 +2114,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 +2126,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 +2193,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 +2207,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 +2273,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 +2287,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 +2352,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 +2364,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 +2432,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 +2448,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 +2516,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 +2534,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 +2602,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 +2617,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..5dc4361cd 100644 --- a/src/datadogV1/api/api_tags.rs +++ b/src/datadogV1/api/api_tags.rs @@ -5,56 +5,87 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateHostTagsParams 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, +/// CreateHostTagsOptionalParams is a struct for passing parameters to the method [`TagsAPI::create_host_tags`] +#[derive(Clone, Default, Debug)] +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`] -#[derive(Clone, Debug)] -pub struct DeleteHostTagsParams { - /// This endpoint allows you to remove all user-assigned tags for a single host. - pub host_name: String, +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, Default, Debug)] +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`] -#[derive(Clone, Debug)] -pub struct GetHostTagsParams { - /// When specified, filters list of tags to those tags with the specified source. - pub host_name: String, +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, Default, Debug)] +pub struct GetHostTagsOptionalParams { /// Source to filter. pub source: Option, } -/// ListHostTagsParams is a struct for passing parameters to the method [`TagsAPI::list_host_tags`] -#[derive(Clone, Debug)] -pub struct ListHostTagsParams { +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, Default, Debug)] +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`] -#[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, +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, 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)] @@ -130,9 +161,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 +178,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 +198,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 +254,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 +270,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 +288,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 +334,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 +346,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 +364,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 +411,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 +422,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 +436,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 +484,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 +501,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 +521,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..56d795793 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`] -#[derive(Clone, Debug)] -pub struct GetDailyCustomReportsParams { +/// GetDailyCustomReportsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_daily_custom_reports`] +#[derive(Clone, Default, Debug)] +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,32 @@ pub struct GetDailyCustomReportsParams { pub sort: Option, } -/// GetHourlyUsageAttributionParams 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, +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, Default, Debug)] +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 +57,69 @@ pub struct GetHourlyUsageAttributionParams { pub include_descendants: Option, } -/// GetIncidentManagementParams 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, +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, 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, } -/// GetIngestedSpansParams 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, +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, 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, } -/// GetMonthlyCustomReportsParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_monthly_custom_reports`] -#[derive(Clone, Debug)] -pub struct GetMonthlyCustomReportsParams { +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, Default, Debug)] +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 +130,32 @@ pub struct GetMonthlyCustomReportsParams { pub sort: Option, } -/// GetMonthlyUsageAttributionParams 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, +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, 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, /// The direction to sort by: `[desc, asc]`. @@ -95,38 +172,67 @@ pub struct GetMonthlyUsageAttributionParams { pub include_descendants: Option, } -/// GetSpecifiedDailyCustomReportsParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_specified_daily_custom_reports`] -#[derive(Clone, Debug)] -pub struct GetSpecifiedDailyCustomReportsParams { - /// Date of the report in the format `YYYY-MM-DD`. - pub report_id: String, +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 + } } -/// 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, +/// GetUsageAnalyzedLogsOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_analyzed_logs`] +#[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, } -/// 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, +impl GetUsageAnalyzedLogsOptionalParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending /// **before** this hour. - pub end_hr: Option, + pub fn end_hr(&mut self, value: String) -> &mut Self { + self.end_hr = Some(value); + self + } } -/// GetUsageAttributionParams 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, +/// GetUsageAttributionOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_attribution`] +#[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, /// The direction to sort by: `[desc, asc]`. @@ -141,269 +247,495 @@ pub struct GetUsageAttributionParams { pub limit: Option, } -/// GetUsageAuditLogsParams 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, +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, 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, } -/// GetUsageBillableSummaryParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_billable_summary`] -#[derive(Clone, Debug)] -pub struct GetUsageBillableSummaryParams { +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, Default, Debug)] +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`] -#[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, +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, 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, } -/// GetUsageCWSParams 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, +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, 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, } -/// GetUsageCloudSecurityPostureManagementParams 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, +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, 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, } -/// GetUsageDBMParams 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, +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, 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, } -/// GetUsageFargateParams 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, +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, 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, } -/// GetUsageHostsParams 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, +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, 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, } -/// GetUsageIndexedSpansParams 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, +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, 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, } -/// GetUsageInternetOfThingsParams 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, +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, 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, } -/// GetUsageLambdaParams 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, +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, 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, } -/// GetUsageLogsParams 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, +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, 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, } -/// GetUsageLogsByIndexParams 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, +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, 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, /// 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`] -#[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, +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, 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, } -/// GetUsageNetworkFlowsParams 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, +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, 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, } -/// GetUsageNetworkHostsParams 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, +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, 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, } -/// GetUsageOnlineArchiveParams 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, +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, 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, } -/// GetUsageProfilingParams 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, +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, 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, } -/// GetUsageRumSessionsParams 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, +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, 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, /// 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`] -#[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, +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, 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, } -/// GetUsageSDSParams 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, +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, 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, } -/// GetUsageSNMPParams 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, +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, 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, } -/// GetUsageSummaryParams 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, +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, 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, /// 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`] -#[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, +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, 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, } -/// GetUsageSyntheticsAPIParams 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, +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, 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, } -/// GetUsageSyntheticsBrowserParams 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, +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, 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, } -/// GetUsageTimeseriesParams 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, +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, 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, } -/// GetUsageTopAvgMetricsParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_usage_top_avg_metrics`] -#[derive(Clone, Debug)] -pub struct GetUsageTopAvgMetricsParams { +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, 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, /// 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) @@ -416,6 +748,34 @@ pub struct GetUsageTopAvgMetricsParams { 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)] @@ -818,7 +1178,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 +1194,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 +1216,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 +1290,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 +1323,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 +1349,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 +1410,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 +1429,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 +1450,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 +1499,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 +1518,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 +1539,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 +1589,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 +1605,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 +1627,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 +1701,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 +1734,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 +1762,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 +1832,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 +1851,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 +1913,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 +1932,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 +1993,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 +2012,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 +2033,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 +2083,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 +2104,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 +2129,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 +2198,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 +2217,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 +2235,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 +2283,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 +2297,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 +2316,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 +2365,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 +2379,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 +2397,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 +2446,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 +2459,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 +2475,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 +2523,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 +2542,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 +2560,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 +2610,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 +2623,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 +2639,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 +2687,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 +2704,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 +2722,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 +2771,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 +2785,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 +2803,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 +2852,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 +2871,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 +2892,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 +2941,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 +2960,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 +2978,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 +3027,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 +3041,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 +3059,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 +3108,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 +3121,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 +3137,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 +3184,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 +3202,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 +3224,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 +3284,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 +3303,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 +3324,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 +3373,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 +3392,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 +3413,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 +3462,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 +3481,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 +3502,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 +3551,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 +3570,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 +3591,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 +3640,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 +3659,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 +3677,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 +3726,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 +3745,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 +3767,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 +3820,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 +3837,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 +3855,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 +3904,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 +3917,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 +3933,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 +3981,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 +3994,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 +4010,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 +4057,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 +4073,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 +4092,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 +4145,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 +4164,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 +4182,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 +4231,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 +4250,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 +4271,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 +4320,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 +4339,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 +4360,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 +4409,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 +4428,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 +4446,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 +4494,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 +4508,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 +4531,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..4c5699274 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 add_to_signal_timeline(&mut self, value: bool) -> &mut Self { + self.add_to_signal_timeline = Some(value); + 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 ab7fd5bc0..749847764 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,24 @@ impl AlertGraphWidgetDefinition { viz_type, } } + + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + 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 ddd4c46fd..b27cabceb 100644 --- a/src/datadogV1/model/model_alert_value_widget_definition.rs +++ b/src/datadogV1/model/model_alert_value_widget_definition.rs @@ -50,4 +50,34 @@ impl AlertValueWidgetDefinition { unit: None, } } + + pub fn precision(&mut self, value: i64) -> &mut Self { + self.precision = Some(value); + self + } + + pub fn text_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.text_align = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + 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 584c824d4..765eb709e 100644 --- a/src/datadogV1/model/model_api_key.rs +++ b/src/datadogV1/model/model_api_key.rs @@ -31,7 +31,28 @@ impl ApiKey { name: None, } } + + pub fn created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn created_by(&mut self, value: String) -> &mut Self { + self.created_by = Some(value); + self + } + + pub fn key(&mut self, value: String) -> &mut Self { + self.key = Some(value); + 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 b34cf01a5..ec1bf223c 100644 --- a/src/datadogV1/model/model_api_key_list_response.rs +++ b/src/datadogV1/model/model_api_key_list_response.rs @@ -17,7 +17,13 @@ impl ApiKeyListResponse { pub fn new() -> ApiKeyListResponse { ApiKeyListResponse { api_keys: None } } + + 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 78968703f..500143efb 100644 --- a/src/datadogV1/model/model_api_key_response.rs +++ b/src/datadogV1/model/model_api_key_response.rs @@ -10,14 +10,20 @@ 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 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 ac66ec4b8..c64d12de7 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 alias(&mut self, value: String) -> &mut Self { + self.alias = Some(value); + self + } + + pub fn cell_display_mode( + &mut self, + value: crate::datadogV1::model::TableWidgetCellDisplayMode, + ) -> &mut Self { + self.cell_display_mode = Some(value); + 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 849c401a2..07927d8b6 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 columns( + &mut self, + value: Vec, + ) -> &mut Self { + self.columns = Some(value); + 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 8940b0d85..e57f041b2 100644 --- a/src/datadogV1/model/model_application_key.rs +++ b/src/datadogV1/model/model_application_key.rs @@ -27,7 +27,23 @@ impl ApplicationKey { owner: None, } } + + pub fn hash(&mut self, value: String) -> &mut Self { + self.hash = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 9efcf07b0..4a2ae0ffc 100644 --- a/src/datadogV1/model/model_application_key_list_response.rs +++ b/src/datadogV1/model/model_application_key_list_response.rs @@ -19,7 +19,16 @@ impl ApplicationKeyListResponse { application_keys: None, } } + + pub fn application_keys( + &mut self, + value: Vec, + ) -> &mut Self { + self.application_keys = Some(value); + 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 132b471ee..11fc00c01 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,7 +19,13 @@ impl ApplicationKeyResponse { application_key: None, } } + + 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 21d85c108..215bc823b 100644 --- a/src/datadogV1/model/model_authentication_validation_response.rs +++ b/src/datadogV1/model/model_authentication_validation_response.rs @@ -17,7 +17,13 @@ impl AuthenticationValidationResponse { pub fn new() -> AuthenticationValidationResponse { AuthenticationValidationResponse { valid: None } } + + 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 7b4b249ba..07d089228 100644 --- a/src/datadogV1/model/model_aws_account.rs +++ b/src/datadogV1/model/model_aws_account.rs @@ -68,7 +68,66 @@ impl AWSAccount { secret_access_key: None, } } + + pub fn access_key_id(&mut self, value: String) -> &mut Self { + self.access_key_id = Some(value); + self + } + + pub fn account_id(&mut self, value: String) -> &mut Self { + self.account_id = Some(value); + self + } + + pub fn account_specific_namespace_rules( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.account_specific_namespace_rules = Some(value); + self + } + + pub fn cspm_resource_collection_enabled(&mut self, value: bool) -> &mut Self { + self.cspm_resource_collection_enabled = Some(value); + self + } + + pub fn excluded_regions(&mut self, value: Vec) -> &mut Self { + self.excluded_regions = Some(value); + self + } + + pub fn filter_tags(&mut self, value: Vec) -> &mut Self { + self.filter_tags = Some(value); + self + } + + pub fn host_tags(&mut self, value: Vec) -> &mut Self { + self.host_tags = Some(value); + self + } + + pub fn metrics_collection_enabled(&mut self, value: bool) -> &mut Self { + self.metrics_collection_enabled = Some(value); + self + } + + pub fn resource_collection_enabled(&mut self, value: bool) -> &mut Self { + self.resource_collection_enabled = Some(value); + self + } + + pub fn role_name(&mut self, value: String) -> &mut Self { + self.role_name = Some(value); + 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 cb48527ae..7a42eebe4 100644 --- a/src/datadogV1/model/model_aws_account_create_response.rs +++ b/src/datadogV1/model/model_aws_account_create_response.rs @@ -17,7 +17,13 @@ impl AWSAccountCreateResponse { pub fn new() -> AWSAccountCreateResponse { AWSAccountCreateResponse { external_id: None } } + + 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 cde343f29..ccbe2ccb0 100644 --- a/src/datadogV1/model/model_aws_account_delete_request.rs +++ b/src/datadogV1/model/model_aws_account_delete_request.rs @@ -27,7 +27,23 @@ impl AWSAccountDeleteRequest { role_name: None, } } + + pub fn access_key_id(&mut self, value: String) -> &mut Self { + self.access_key_id = Some(value); + self + } + + pub fn account_id(&mut self, value: String) -> &mut Self { + self.account_id = Some(value); + 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 c7a42700e..d507ce34f 100644 --- a/src/datadogV1/model/model_aws_account_list_response.rs +++ b/src/datadogV1/model/model_aws_account_list_response.rs @@ -17,7 +17,13 @@ impl AWSAccountListResponse { pub fn new() -> AWSAccountListResponse { AWSAccountListResponse { accounts: None } } + + 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 cc35b9ff6..a34ae0ed6 100644 --- a/src/datadogV1/model/model_aws_event_bridge_account_configuration.rs +++ b/src/datadogV1/model/model_aws_event_bridge_account_configuration.rs @@ -28,7 +28,26 @@ impl AWSEventBridgeAccountConfiguration { tags: None, } } + + pub fn account_id(&mut self, value: String) -> &mut Self { + self.account_id = Some(value); + self + } + + pub fn event_hubs( + &mut self, + value: Vec, + ) -> &mut Self { + self.event_hubs = Some(value); + 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 a743b7b37..8cac48acf 100644 --- a/src/datadogV1/model/model_aws_event_bridge_create_request.rs +++ b/src/datadogV1/model/model_aws_event_bridge_create_request.rs @@ -33,7 +33,28 @@ impl AWSEventBridgeCreateRequest { region: None, } } + + pub fn account_id(&mut self, value: String) -> &mut Self { + self.account_id = Some(value); + self + } + + pub fn create_event_bus(&mut self, value: bool) -> &mut Self { + self.create_event_bus = Some(value); + self + } + + pub fn event_generator_name(&mut self, value: String) -> &mut Self { + self.event_generator_name = Some(value); + 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 4339c5058..c1c699eee 100644 --- a/src/datadogV1/model/model_aws_event_bridge_create_response.rs +++ b/src/datadogV1/model/model_aws_event_bridge_create_response.rs @@ -31,7 +31,31 @@ impl AWSEventBridgeCreateResponse { status: None, } } + + pub fn event_source_name(&mut self, value: String) -> &mut Self { + self.event_source_name = Some(value); + self + } + + pub fn has_bus(&mut self, value: bool) -> &mut Self { + self.has_bus = Some(value); + self + } + + pub fn region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } + + pub fn status( + &mut self, + value: crate::datadogV1::model::AWSEventBridgeCreateStatus, + ) -> &mut Self { + self.status = Some(value); + 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 2c7b8942b..ddcc09085 100644 --- a/src/datadogV1/model/model_aws_event_bridge_delete_request.rs +++ b/src/datadogV1/model/model_aws_event_bridge_delete_request.rs @@ -27,7 +27,23 @@ impl AWSEventBridgeDeleteRequest { region: None, } } + + pub fn account_id(&mut self, value: String) -> &mut Self { + self.account_id = Some(value); + self + } + + pub fn event_generator_name(&mut self, value: String) -> &mut Self { + self.event_generator_name = Some(value); + 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 2762ba3ff..91ed2848b 100644 --- a/src/datadogV1/model/model_aws_event_bridge_delete_response.rs +++ b/src/datadogV1/model/model_aws_event_bridge_delete_response.rs @@ -17,7 +17,16 @@ impl AWSEventBridgeDeleteResponse { pub fn new() -> AWSEventBridgeDeleteResponse { AWSEventBridgeDeleteResponse { status: None } } + + pub fn status( + &mut self, + value: crate::datadogV1::model::AWSEventBridgeDeleteStatus, + ) -> &mut Self { + self.status = Some(value); + 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 d9451f69f..ddf7a5fa8 100644 --- a/src/datadogV1/model/model_aws_event_bridge_list_response.rs +++ b/src/datadogV1/model/model_aws_event_bridge_list_response.rs @@ -23,7 +23,21 @@ impl AWSEventBridgeListResponse { is_installed: None, } } + + pub fn accounts( + &mut self, + value: Vec, + ) -> &mut Self { + self.accounts = Some(value); + 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 51bca6639..c35e155a8 100644 --- a/src/datadogV1/model/model_aws_event_bridge_source.rs +++ b/src/datadogV1/model/model_aws_event_bridge_source.rs @@ -23,7 +23,18 @@ impl AWSEventBridgeSource { region: None, } } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 ce2222f5c..6b44d9800 100644 --- a/src/datadogV1/model/model_aws_logs_async_error.rs +++ b/src/datadogV1/model/model_aws_logs_async_error.rs @@ -23,7 +23,18 @@ impl AWSLogsAsyncError { message: None, } } + + pub fn code(&mut self, value: String) -> &mut Self { + self.code = Some(value); + 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 0dd8bb6f4..cb8137726 100644 --- a/src/datadogV1/model/model_aws_logs_async_response.rs +++ b/src/datadogV1/model/model_aws_logs_async_response.rs @@ -23,7 +23,18 @@ impl AWSLogsAsyncResponse { status: None, } } + + pub fn errors(&mut self, value: Vec) -> &mut Self { + self.errors = Some(value); + 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 f77b85fe0..4530a2637 100644 --- a/src/datadogV1/model/model_aws_logs_lambda.rs +++ b/src/datadogV1/model/model_aws_logs_lambda.rs @@ -17,7 +17,13 @@ impl AWSLogsLambda { pub fn new() -> AWSLogsLambda { AWSLogsLambda { arn: None } } + + 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 1ecc3b9ec..e2bd9b52b 100644 --- a/src/datadogV1/model/model_aws_logs_list_response.rs +++ b/src/datadogV1/model/model_aws_logs_list_response.rs @@ -27,7 +27,23 @@ impl AWSLogsListResponse { services: None, } } + + pub fn account_id(&mut self, value: String) -> &mut Self { + self.account_id = Some(value); + self + } + + pub fn lambdas(&mut self, value: Vec) -> &mut Self { + self.lambdas = Some(value); + 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 8ac1dcbc5..c7c1cf36b 100644 --- a/src/datadogV1/model/model_aws_logs_list_services_response.rs +++ b/src/datadogV1/model/model_aws_logs_list_services_response.rs @@ -23,7 +23,18 @@ impl AWSLogsListServicesResponse { label: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 06c4b039d..0f72f32c5 100644 --- a/src/datadogV1/model/model_aws_tag_filter.rs +++ b/src/datadogV1/model/model_aws_tag_filter.rs @@ -23,7 +23,18 @@ impl AWSTagFilter { tag_filter_str: None, } } + + pub fn namespace(&mut self, value: crate::datadogV1::model::AWSNamespace) -> &mut Self { + self.namespace = Some(value); + 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 51504ddec..b133816d4 100644 --- a/src/datadogV1/model/model_aws_tag_filter_create_request.rs +++ b/src/datadogV1/model/model_aws_tag_filter_create_request.rs @@ -27,7 +27,23 @@ impl AWSTagFilterCreateRequest { tag_filter_str: None, } } + + pub fn account_id(&mut self, value: String) -> &mut Self { + self.account_id = Some(value); + self + } + + pub fn namespace(&mut self, value: crate::datadogV1::model::AWSNamespace) -> &mut Self { + self.namespace = Some(value); + 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 61592164c..f1440e109 100644 --- a/src/datadogV1/model/model_aws_tag_filter_delete_request.rs +++ b/src/datadogV1/model/model_aws_tag_filter_delete_request.rs @@ -23,7 +23,18 @@ impl AWSTagFilterDeleteRequest { namespace: None, } } + + pub fn account_id(&mut self, value: String) -> &mut Self { + self.account_id = Some(value); + 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 6ba618ee6..b0a92e284 100644 --- a/src/datadogV1/model/model_aws_tag_filter_list_response.rs +++ b/src/datadogV1/model/model_aws_tag_filter_list_response.rs @@ -17,7 +17,13 @@ impl AWSTagFilterListResponse { pub fn new() -> AWSTagFilterListResponse { AWSTagFilterListResponse { filters: None } } + + 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 aa2f9f6e6..34951ada5 100644 --- a/src/datadogV1/model/model_azure_account.rs +++ b/src/datadogV1/model/model_azure_account.rs @@ -71,7 +71,73 @@ impl AzureAccount { tenant_name: None, } } + + pub fn app_service_plan_filters(&mut self, value: String) -> &mut Self { + self.app_service_plan_filters = Some(value); + self + } + + pub fn automute(&mut self, value: bool) -> &mut Self { + self.automute = Some(value); + self + } + + pub fn client_id(&mut self, value: String) -> &mut Self { + self.client_id = Some(value); + self + } + + pub fn client_secret(&mut self, value: String) -> &mut Self { + self.client_secret = Some(value); + self + } + + pub fn container_app_filters(&mut self, value: String) -> &mut Self { + self.container_app_filters = Some(value); + self + } + + pub fn cspm_enabled(&mut self, value: bool) -> &mut Self { + self.cspm_enabled = Some(value); + self + } + + pub fn custom_metrics_enabled(&mut self, value: bool) -> &mut Self { + self.custom_metrics_enabled = Some(value); + self + } + + pub fn errors(&mut self, value: Vec) -> &mut Self { + self.errors = Some(value); + self + } + + pub fn host_filters(&mut self, value: String) -> &mut Self { + self.host_filters = Some(value); + self + } + + pub fn new_client_id(&mut self, value: String) -> &mut Self { + self.new_client_id = Some(value); + self + } + + pub fn new_tenant_name(&mut self, value: String) -> &mut Self { + self.new_tenant_name = Some(value); + self + } + + pub fn resource_collection_enabled(&mut self, value: bool) -> &mut Self { + self.resource_collection_enabled = Some(value); + 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 fe38eb4b2..f9aaeefb7 100644 --- a/src/datadogV1/model/model_canceled_downtimes_ids.rs +++ b/src/datadogV1/model/model_canceled_downtimes_ids.rs @@ -19,7 +19,13 @@ impl CanceledDowntimesIds { cancelled_ids: None, } } + + 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 a95781343..62f93e7d9 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,32 @@ impl ChangeWidgetDefinition { type_, } } + + pub fn custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + 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 5263858f5..244beebf3 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,7 +87,116 @@ impl ChangeWidgetRequest { show_present: None, } } + + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn change_type(&mut self, value: crate::datadogV1::model::WidgetChangeType) -> &mut Self { + self.change_type = Some(value); + self + } + + pub fn compare_to(&mut self, value: crate::datadogV1::model::WidgetCompareTo) -> &mut Self { + self.compare_to = Some(value); + self + } + + pub fn event_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn formulas(&mut self, value: Vec) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn increase_good(&mut self, value: bool) -> &mut Self { + self.increase_good = Some(value); + self + } + + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn order_by(&mut self, value: crate::datadogV1::model::WidgetOrderBy) -> &mut Self { + self.order_by = Some(value); + self + } + + pub fn order_dir(&mut self, value: crate::datadogV1::model::WidgetSort) -> &mut Self { + self.order_dir = Some(value); + self + } + + pub fn process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + self + } + + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + 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 deecd9c82..53b742c80 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 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..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 @@ -17,7 +17,13 @@ impl CheckCanDeleteMonitorResponseData { pub fn new() -> CheckCanDeleteMonitorResponseData { CheckCanDeleteMonitorResponseData { ok: None } } + + 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 bc0062f36..e4c37285b 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,7 +23,21 @@ impl CheckCanDeleteSLOResponse { errors: None, } } + + pub fn data( + &mut self, + value: crate::datadogV1::model::CheckCanDeleteSLOResponseData, + ) -> &mut Self { + self.data = Some(value); + 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 b62509387..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 @@ -17,7 +17,13 @@ impl CheckCanDeleteSLOResponseData { pub fn new() -> CheckCanDeleteSLOResponseData { CheckCanDeleteSLOResponseData { ok: None } } + + 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 f21e2f667..1427b1d27 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,39 @@ impl CheckStatusWidgetDefinition { type_, } } + + pub fn group(&mut self, value: String) -> &mut Self { + self.group = Some(value); + self + } + + pub fn group_by(&mut self, value: Vec) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + 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 43073f4a0..41cdc099a 100644 --- a/src/datadogV1/model/model_creator.rs +++ b/src/datadogV1/model/model_creator.rs @@ -27,7 +27,23 @@ impl Creator { name: None, } } + + pub fn email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + 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 8cc5e1432..f57e596b4 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 author_handle(&mut self, value: String) -> &mut Self { + self.author_handle = Some(value); + self + } + + #[allow(deprecated)] + pub fn author_name(&mut self, value: Option) -> &mut Self { + self.author_name = Some(value); + self + } + + #[allow(deprecated)] + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + #[allow(deprecated)] + pub fn description(&mut self, value: Option) -> &mut Self { + self.description = Some(value); + self + } + + #[allow(deprecated)] + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + #[allow(deprecated)] + pub fn is_read_only(&mut self, value: bool) -> &mut Self { + self.is_read_only = Some(value); + self + } + + #[allow(deprecated)] + pub fn modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + #[allow(deprecated)] + pub fn notify_list(&mut self, value: Option>) -> &mut Self { + self.notify_list = Some(value); + self + } + + #[allow(deprecated)] + pub fn reflow_type( + &mut self, + value: crate::datadogV1::model::DashboardReflowType, + ) -> &mut Self { + self.reflow_type = Some(value); + self + } + + #[allow(deprecated)] + pub fn restricted_roles(&mut self, value: Vec) -> &mut Self { + self.restricted_roles = Some(value); + self + } + + #[allow(deprecated)] + pub fn tags(&mut self, value: Option>) -> &mut Self { + self.tags = Some(value); + self + } + + #[allow(deprecated)] + pub fn template_variable_presets( + &mut self, + value: Option>, + ) -> &mut Self { + self.template_variable_presets = Some(value); + self + } + + #[allow(deprecated)] + pub fn template_variables( + &mut self, + value: Option>, + ) -> &mut Self { + self.template_variables = Some(value); + self + } + + #[allow(deprecated)] + 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 7d8b79f39..9f2982194 100644 --- a/src/datadogV1/model/model_dashboard_delete_response.rs +++ b/src/datadogV1/model/model_dashboard_delete_response.rs @@ -19,7 +19,13 @@ impl DashboardDeleteResponse { deleted_dashboard_id: None, } } + + 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 65f8a44fd..d0a5b7fe3 100644 --- a/src/datadogV1/model/model_dashboard_global_time.rs +++ b/src/datadogV1/model/model_dashboard_global_time.rs @@ -17,7 +17,16 @@ impl DashboardGlobalTime { pub fn new() -> DashboardGlobalTime { DashboardGlobalTime { live_span: None } } + + pub fn live_span( + &mut self, + value: crate::datadogV1::model::DashboardGlobalTimeLiveSpan, + ) -> &mut Self { + self.live_span = Some(value); + 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 3743e2a44..31c260ffc 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 author(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + self.author = Some(value); + self + } + + pub fn created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn dashboard_count(&mut self, value: i64) -> &mut Self { + self.dashboard_count = Some(value); + self + } + + pub fn id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn is_favorite(&mut self, value: bool) -> &mut Self { + self.is_favorite = Some(value); + self + } + + pub fn modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + 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 0a80b31b3..21e935a12 100644 --- a/src/datadogV1/model/model_dashboard_list_delete_response.rs +++ b/src/datadogV1/model/model_dashboard_list_delete_response.rs @@ -19,7 +19,13 @@ impl DashboardListDeleteResponse { deleted_dashboard_list_id: None, } } + + 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 ff027009e..1c5439287 100644 --- a/src/datadogV1/model/model_dashboard_list_list_response.rs +++ b/src/datadogV1/model/model_dashboard_list_list_response.rs @@ -19,7 +19,16 @@ impl DashboardListListResponse { dashboard_lists: None, } } + + pub fn dashboard_lists( + &mut self, + value: Vec, + ) -> &mut Self { + self.dashboard_lists = Some(value); + 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 304b9ddeb..273369fd1 100644 --- a/src/datadogV1/model/model_dashboard_summary.rs +++ b/src/datadogV1/model/model_dashboard_summary.rs @@ -17,7 +17,16 @@ impl DashboardSummary { pub fn new() -> DashboardSummary { DashboardSummary { dashboards: None } } + + pub fn dashboards( + &mut self, + value: Vec, + ) -> &mut Self { + self.dashboards = Some(value); + 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 08f2e021f..3a515f1e9 100644 --- a/src/datadogV1/model/model_dashboard_summary_definition.rs +++ b/src/datadogV1/model/model_dashboard_summary_definition.rs @@ -55,7 +55,56 @@ impl DashboardSummaryDefinition { url: None, } } + + pub fn author_handle(&mut self, value: String) -> &mut Self { + self.author_handle = Some(value); + self + } + + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn description(&mut self, value: Option) -> &mut Self { + self.description = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn is_read_only(&mut self, value: bool) -> &mut Self { + self.is_read_only = Some(value); + self + } + + pub fn layout_type( + &mut self, + value: crate::datadogV1::model::DashboardLayoutType, + ) -> &mut Self { + self.layout_type = Some(value); + self + } + + pub fn modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + 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 eb961e796..ca970bd59 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 available_values(&mut self, value: Option>) -> &mut Self { + self.available_values = Some(value); + self + } + + #[allow(deprecated)] + pub fn default(&mut self, value: Option) -> &mut Self { + self.default = Some(value); + self + } + + #[allow(deprecated)] + pub fn defaults(&mut self, value: Vec) -> &mut Self { + self.defaults = Some(value); + self + } + + #[allow(deprecated)] + 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 83f93e5ff..7347dcb30 100644 --- a/src/datadogV1/model/model_dashboard_template_variable_preset.rs +++ b/src/datadogV1/model/model_dashboard_template_variable_preset.rs @@ -24,7 +24,21 @@ impl DashboardTemplateVariablePreset { template_variables: None, } } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn template_variables( + &mut self, + value: Vec, + ) -> &mut Self { + self.template_variables = Some(value); + 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 500d9f4d6..c38424925 100644 --- a/src/datadogV1/model/model_dashboard_template_variable_preset_value.rs +++ b/src/datadogV1/model/model_dashboard_template_variable_preset_value.rs @@ -29,7 +29,26 @@ impl DashboardTemplateVariablePresetValue { values: None, } } + + #[allow(deprecated)] + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + #[allow(deprecated)] + pub fn value(&mut self, value: String) -> &mut Self { + self.value = Some(value); + self + } + + #[allow(deprecated)] + 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 7ab4b9a5d..f94faba72 100644 --- a/src/datadogV1/model/model_delete_shared_dashboard_response.rs +++ b/src/datadogV1/model/model_delete_shared_dashboard_response.rs @@ -19,7 +19,13 @@ impl DeleteSharedDashboardResponse { deleted_public_dashboard_token: None, } } + + 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 b5bc43016..9bab5a937 100644 --- a/src/datadogV1/model/model_deleted_monitor.rs +++ b/src/datadogV1/model/model_deleted_monitor.rs @@ -19,7 +19,13 @@ impl DeletedMonitor { deleted_monitor_id: None, } } + + 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 4aced3d91..5c167f3f2 100644 --- a/src/datadogV1/model/model_distribution_points_series.rs +++ b/src/datadogV1/model/model_distribution_points_series.rs @@ -38,4 +38,19 @@ impl DistributionPointsSeries { type_: None, } } + + pub fn host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + 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 bebd08e92..73701cc51 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,67 @@ impl DistributionWidgetDefinition { yaxis: None, } } + + #[allow(deprecated)] + pub fn custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + #[allow(deprecated)] + pub fn legend_size(&mut self, value: String) -> &mut Self { + self.legend_size = Some(value); + self + } + + #[allow(deprecated)] + pub fn markers(&mut self, value: Vec) -> &mut Self { + self.markers = Some(value); + self + } + + #[allow(deprecated)] + pub fn show_legend(&mut self, value: bool) -> &mut Self { + self.show_legend = Some(value); + self + } + + #[allow(deprecated)] + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + #[allow(deprecated)] + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + #[allow(deprecated)] + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + self + } + + #[allow(deprecated)] + pub fn title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } + + #[allow(deprecated)] + pub fn xaxis(&mut self, value: crate::datadogV1::model::DistributionWidgetXAxis) -> &mut Self { + self.xaxis = Some(value); + self + } + + #[allow(deprecated)] + 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_request.rs b/src/datadogV1/model/model_distribution_widget_request.rs index 9c3b72570..1d969d807 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,7 +67,94 @@ impl DistributionWidgetRequest { style: None, } } + + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn apm_stats_query( + &mut self, + value: crate::datadogV1::model::ApmStatsQueryDefinition, + ) -> &mut Self { + self.apm_stats_query = Some(value); + self + } + + pub fn event_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn query( + &mut self, + value: crate::datadogV1::model::DistributionWidgetHistogramRequestQuery, + ) -> &mut Self { + self.query = Some(value); + self + } + + pub fn request_type( + &mut self, + value: crate::datadogV1::model::DistributionWidgetHistogramRequestType, + ) -> &mut Self { + self.request_type = Some(value); + self + } + + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + 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 4e25e5333..272006f0c 100644 --- a/src/datadogV1/model/model_distribution_widget_x_axis.rs +++ b/src/datadogV1/model/model_distribution_widget_x_axis.rs @@ -31,7 +31,28 @@ impl DistributionWidgetXAxis { scale: None, } } + + pub fn include_zero(&mut self, value: bool) -> &mut Self { + self.include_zero = Some(value); + self + } + + pub fn max(&mut self, value: String) -> &mut Self { + self.max = Some(value); + self + } + + pub fn min(&mut self, value: String) -> &mut Self { + self.min = Some(value); + 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 083a4b38e..8ec7d251f 100644 --- a/src/datadogV1/model/model_distribution_widget_y_axis.rs +++ b/src/datadogV1/model/model_distribution_widget_y_axis.rs @@ -35,7 +35,33 @@ impl DistributionWidgetYAxis { scale: None, } } + + pub fn include_zero(&mut self, value: bool) -> &mut Self { + self.include_zero = Some(value); + self + } + + pub fn label(&mut self, value: String) -> &mut Self { + self.label = Some(value); + self + } + + pub fn max(&mut self, value: String) -> &mut Self { + self.max = Some(value); + self + } + + pub fn min(&mut self, value: String) -> &mut Self { + self.min = Some(value); + 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 0e9f9ca68..5d4899672 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,7 +141,120 @@ impl Downtime { updater_id: None, } } + + pub fn active(&mut self, value: bool) -> &mut Self { + self.active = Some(value); + self + } + + pub fn active_child( + &mut self, + value: Option, + ) -> &mut Self { + self.active_child = Some(value); + self + } + + pub fn canceled(&mut self, value: Option) -> &mut Self { + self.canceled = Some(value); + self + } + + pub fn creator_id(&mut self, value: i32) -> &mut Self { + self.creator_id = Some(value); + self + } + + pub fn disabled(&mut self, value: bool) -> &mut Self { + self.disabled = Some(value); + self + } + + pub fn downtime_type(&mut self, value: i32) -> &mut Self { + self.downtime_type = Some(value); + self + } + + pub fn end(&mut self, value: Option) -> &mut Self { + self.end = Some(value); + self + } + + pub fn id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn message(&mut self, value: Option) -> &mut Self { + self.message = Some(value); + self + } + + pub fn monitor_id(&mut self, value: Option) -> &mut Self { + self.monitor_id = Some(value); + self + } + + pub fn monitor_tags(&mut self, value: Vec) -> &mut Self { + self.monitor_tags = Some(value); + self + } + + pub fn mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { + self.mute_first_recovery_notification = Some(value); + self + } + + pub fn notify_end_states( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_states = Some(value); + self + } + + pub fn notify_end_types( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_types = Some(value); + self + } + + pub fn parent_id(&mut self, value: Option) -> &mut Self { + self.parent_id = Some(value); + self + } + + pub fn recurrence( + &mut self, + value: Option, + ) -> &mut Self { + self.recurrence = Some(value); + self + } + + pub fn scope(&mut self, value: Vec) -> &mut Self { + self.scope = Some(value); + self + } + + pub fn start(&mut self, value: i64) -> &mut Self { + self.start = Some(value); + self + } + + pub fn timezone(&mut self, value: String) -> &mut Self { + self.timezone = Some(value); + 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 74b9ec986..32e62c48d 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,7 +130,112 @@ impl DowntimeChild { updater_id: None, } } + + pub fn active(&mut self, value: bool) -> &mut Self { + self.active = Some(value); + self + } + + pub fn canceled(&mut self, value: Option) -> &mut Self { + self.canceled = Some(value); + self + } + + pub fn creator_id(&mut self, value: i32) -> &mut Self { + self.creator_id = Some(value); + self + } + + pub fn disabled(&mut self, value: bool) -> &mut Self { + self.disabled = Some(value); + self + } + + pub fn downtime_type(&mut self, value: i32) -> &mut Self { + self.downtime_type = Some(value); + self + } + + pub fn end(&mut self, value: Option) -> &mut Self { + self.end = Some(value); + self + } + + pub fn id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn message(&mut self, value: Option) -> &mut Self { + self.message = Some(value); + self + } + + pub fn monitor_id(&mut self, value: Option) -> &mut Self { + self.monitor_id = Some(value); + self + } + + pub fn monitor_tags(&mut self, value: Vec) -> &mut Self { + self.monitor_tags = Some(value); + self + } + + pub fn mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { + self.mute_first_recovery_notification = Some(value); + self + } + + pub fn notify_end_states( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_states = Some(value); + self + } + + pub fn notify_end_types( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_types = Some(value); + self + } + + pub fn parent_id(&mut self, value: Option) -> &mut Self { + self.parent_id = Some(value); + self + } + + pub fn recurrence( + &mut self, + value: Option, + ) -> &mut Self { + self.recurrence = Some(value); + self + } + + pub fn scope(&mut self, value: Vec) -> &mut Self { + self.scope = Some(value); + self + } + + pub fn start(&mut self, value: i64) -> &mut Self { + self.start = Some(value); + self + } + + pub fn timezone(&mut self, value: String) -> &mut Self { + self.timezone = Some(value); + 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 a39bd07d5..2fc36ee96 100644 --- a/src/datadogV1/model/model_downtime_recurrence.rs +++ b/src/datadogV1/model/model_downtime_recurrence.rs @@ -60,7 +60,38 @@ impl DowntimeRecurrence { week_days: None, } } + + pub fn period(&mut self, value: i32) -> &mut Self { + self.period = Some(value); + self + } + + pub fn rrule(&mut self, value: String) -> &mut Self { + self.rrule = Some(value); + self + } + + pub fn type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + self + } + + pub fn until_date(&mut self, value: Option) -> &mut Self { + self.until_date = Some(value); + self + } + + pub fn until_occurrences(&mut self, value: Option) -> &mut Self { + self.until_occurrences = Some(value); + 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 81b96ad81..8799f3e1b 100644 --- a/src/datadogV1/model/model_event.rs +++ b/src/datadogV1/model/model_event.rs @@ -79,7 +79,73 @@ impl Event { url: None, } } + + pub fn alert_type(&mut self, value: crate::datadogV1::model::EventAlertType) -> &mut Self { + self.alert_type = Some(value); + self + } + + pub fn date_happened(&mut self, value: i64) -> &mut Self { + self.date_happened = Some(value); + self + } + + pub fn device_name(&mut self, value: String) -> &mut Self { + self.device_name = Some(value); + self + } + + pub fn host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn id_str(&mut self, value: String) -> &mut Self { + self.id_str = Some(value); + self + } + + pub fn payload(&mut self, value: String) -> &mut Self { + self.payload = Some(value); + self + } + + pub fn priority(&mut self, value: Option) -> &mut Self { + self.priority = Some(value); + self + } + + pub fn source_type_name(&mut self, value: String) -> &mut Self { + self.source_type_name = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn text(&mut self, value: String) -> &mut Self { + self.text = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + 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 4507bf35c..557c1e600 100644 --- a/src/datadogV1/model/model_event_create_request.rs +++ b/src/datadogV1/model/model_event_create_request.rs @@ -71,4 +71,49 @@ impl EventCreateRequest { title, } } + + pub fn aggregation_key(&mut self, value: String) -> &mut Self { + self.aggregation_key = Some(value); + self + } + + pub fn alert_type(&mut self, value: crate::datadogV1::model::EventAlertType) -> &mut Self { + self.alert_type = Some(value); + self + } + + pub fn date_happened(&mut self, value: i64) -> &mut Self { + self.date_happened = Some(value); + self + } + + pub fn device_name(&mut self, value: String) -> &mut Self { + self.device_name = Some(value); + self + } + + pub fn host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn priority(&mut self, value: Option) -> &mut Self { + self.priority = Some(value); + self + } + + pub fn related_event_id(&mut self, value: i64) -> &mut Self { + self.related_event_id = Some(value); + self + } + + pub fn source_type_name(&mut self, value: String) -> &mut Self { + self.source_type_name = Some(value); + 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 18a04bd03..f56003510 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,7 +23,18 @@ impl EventCreateResponse { status: None, } } + + pub fn event(&mut self, value: crate::datadogV1::model::Event) -> &mut Self { + self.event = Some(value); + 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 7f661d536..75e9ef999 100644 --- a/src/datadogV1/model/model_event_list_response.rs +++ b/src/datadogV1/model/model_event_list_response.rs @@ -23,7 +23,18 @@ impl EventListResponse { status: None, } } + + pub fn events(&mut self, value: Vec) -> &mut Self { + self.events = Some(value); + 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 7e23977bb..d789a8273 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,7 +23,18 @@ impl EventResponse { status: None, } } + + pub fn event(&mut self, value: crate::datadogV1::model::Event) -> &mut Self { + self.event = Some(value); + 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 3fbab8588..d402e0d23 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,34 @@ impl EventStreamWidgetDefinition { type_, } } + + pub fn event_size(&mut self, value: crate::datadogV1::model::WidgetEventSize) -> &mut Self { + self.event_size = Some(value); + self + } + + pub fn tags_execution(&mut self, value: String) -> &mut Self { + self.tags_execution = Some(value); + self + } + + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + 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 57a927087..e624c997c 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,29 @@ impl EventTimelineWidgetDefinition { type_, } } + + pub fn tags_execution(&mut self, value: String) -> &mut Self { + self.tags_execution = Some(value); + self + } + + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + 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 4bcbed5a3..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 @@ -63,4 +63,19 @@ impl FormulaAndFunctionApmDependencyStatsQueryDefinition { stat, } } + + pub fn is_upstream(&mut self, value: bool) -> &mut Self { + self.is_upstream = Some(value); + self + } + + pub fn primary_tag_name(&mut self, value: String) -> &mut Self { + self.primary_tag_name = Some(value); + 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 ad5fa0b72..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 @@ -61,4 +61,29 @@ impl FormulaAndFunctionApmResourceStatsQueryDefinition { stat, } } + + pub fn group_by(&mut self, value: Vec) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn operation_name(&mut self, value: String) -> &mut Self { + self.operation_name = Some(value); + self + } + + pub fn primary_tag_name(&mut self, value: String) -> &mut Self { + self.primary_tag_name = Some(value); + self + } + + pub fn primary_tag_value(&mut self, value: String) -> &mut Self { + self.primary_tag_value = Some(value); + 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 b4ed6928f..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 @@ -35,4 +35,9 @@ impl FormulaAndFunctionCloudCostQueryDefinition { query, } } + + 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 3d986f0ed..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 @@ -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 group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn indexes(&mut self, value: Vec) -> &mut Self { + self.indexes = Some(value); + self + } + + pub fn search( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionEventQueryDefinitionSearch, + ) -> &mut Self { + self.search = Some(value); + 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 29efe3fb4..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 @@ -29,4 +29,14 @@ impl FormulaAndFunctionEventQueryDefinitionCompute { metric: None, } } + + pub fn interval(&mut self, value: i64) -> &mut Self { + self.interval = Some(value); + 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 17c4af0ee..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 @@ -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 limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn 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..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 @@ -29,4 +29,14 @@ impl FormulaAndFunctionEventQueryGroupBySort { order: None, } } + + pub fn metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + 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 5404e3ffa..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 @@ -35,4 +35,12 @@ impl FormulaAndFunctionMetricQueryDefinition { query, } } + + pub fn 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..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 @@ -55,4 +55,37 @@ impl FormulaAndFunctionProcessQueryDefinition { text_filter: None, } } + + pub fn aggregator( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionMetricAggregation, + ) -> &mut Self { + self.aggregator = Some(value); + self + } + + pub fn is_normalized_cpu(&mut self, value: bool) -> &mut Self { + self.is_normalized_cpu = Some(value); + self + } + + pub fn limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn sort(&mut self, value: crate::datadogV1::model::QuerySortOrder) -> &mut Self { + self.sort = Some(value); + self + } + + pub fn tag_filters(&mut self, value: Vec) -> &mut Self { + self.tag_filters = Some(value); + 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_slo_query_definition.rs b/src/datadogV1/model/model_formula_and_function_slo_query_definition.rs index f9d3144d2..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 @@ -47,4 +47,30 @@ impl FormulaAndFunctionSLOQueryDefinition { slo_query_type: None, } } + + pub fn additional_query_filters(&mut self, value: String) -> &mut Self { + self.additional_query_filters = Some(value); + self + } + + pub fn group_mode( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionSLOGroupMode, + ) -> &mut Self { + self.group_mode = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn 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..e5cab0171 100644 --- a/src/datadogV1/model/model_free_text_widget_definition.rs +++ b/src/datadogV1/model/model_free_text_widget_definition.rs @@ -38,4 +38,19 @@ impl FreeTextWidgetDefinition { type_, } } + + pub fn color(&mut self, value: String) -> &mut Self { + self.color = Some(value); + self + } + + pub fn font_size(&mut self, value: String) -> &mut Self { + self.font_size = Some(value); + 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 3b6d60f09..f43e8d851 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,24 @@ impl FunnelWidgetDefinition { type_, } } + + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn 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..eaf0ad206 100644 --- a/src/datadogV1/model/model_gcp_account.rs +++ b/src/datadogV1/model/model_gcp_account.rs @@ -81,7 +81,88 @@ impl GCPAccount { type_: None, } } + + pub fn auth_provider_x509_cert_url(&mut self, value: String) -> &mut Self { + self.auth_provider_x509_cert_url = Some(value); + self + } + + pub fn auth_uri(&mut self, value: String) -> &mut Self { + self.auth_uri = Some(value); + self + } + + pub fn automute(&mut self, value: bool) -> &mut Self { + self.automute = Some(value); + self + } + + pub fn client_email(&mut self, value: String) -> &mut Self { + self.client_email = Some(value); + self + } + + pub fn client_id(&mut self, value: String) -> &mut Self { + self.client_id = Some(value); + self + } + + pub fn client_x509_cert_url(&mut self, value: String) -> &mut Self { + self.client_x509_cert_url = Some(value); + self + } + + pub fn errors(&mut self, value: Vec) -> &mut Self { + self.errors = Some(value); + self + } + + pub fn host_filters(&mut self, value: String) -> &mut Self { + self.host_filters = Some(value); + self + } + + pub fn is_cspm_enabled(&mut self, value: bool) -> &mut Self { + self.is_cspm_enabled = Some(value); + 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 private_key(&mut self, value: String) -> &mut Self { + self.private_key = Some(value); + self + } + + pub fn private_key_id(&mut self, value: String) -> &mut Self { + self.private_key_id = Some(value); + self + } + + pub fn project_id(&mut self, value: String) -> &mut Self { + self.project_id = Some(value); + self + } + + pub fn resource_collection_enabled(&mut self, value: bool) -> &mut Self { + self.resource_collection_enabled = Some(value); + self + } + + pub fn token_uri(&mut self, value: String) -> &mut Self { + self.token_uri = Some(value); + 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 b626fff5b..dd24d4a94 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,32 @@ impl GeomapWidgetDefinition { view, } } + + pub fn custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + 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 b22b02cc4..7d6bdcb7d 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,7 +51,62 @@ impl GeomapWidgetRequest { security_query: None, } } + + pub fn columns(&mut self, value: Vec) -> &mut Self { + self.columns = Some(value); + self + } + + pub fn formulas(&mut self, value: Vec) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn query(&mut self, value: crate::datadogV1::model::ListStreamQuery) -> &mut Self { + self.query = Some(value); + self + } + + pub fn response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + self + } + + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + 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 14b17cc06..f82d0defd 100644 --- a/src/datadogV1/model/model_graph_snapshot.rs +++ b/src/datadogV1/model/model_graph_snapshot.rs @@ -29,7 +29,23 @@ impl GraphSnapshot { snapshot_url: None, } } + + pub fn graph_def(&mut self, value: String) -> &mut Self { + self.graph_def = Some(value); + self + } + + pub fn metric_query(&mut self, value: String) -> &mut Self { + self.metric_query = Some(value); + 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 95e3535b5..169e2761f 100644 --- a/src/datadogV1/model/model_group_widget_definition.rs +++ b/src/datadogV1/model/model_group_widget_definition.rs @@ -51,4 +51,29 @@ impl GroupWidgetDefinition { widgets, } } + + pub fn background_color(&mut self, value: String) -> &mut Self { + self.background_color = Some(value); + self + } + + pub fn banner_img(&mut self, value: String) -> &mut Self { + self.banner_img = Some(value); + self + } + + pub fn show_title(&mut self, value: bool) -> &mut Self { + self.show_title = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + 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 6754c6935..2632a1681 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,52 @@ impl HeatMapWidgetDefinition { yaxis: None, } } + + pub fn custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn events(&mut self, value: Vec) -> &mut Self { + self.events = Some(value); + self + } + + pub fn legend_size(&mut self, value: String) -> &mut Self { + self.legend_size = Some(value); + self + } + + pub fn show_legend(&mut self, value: bool) -> &mut Self { + self.show_legend = Some(value); + self + } + + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + 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 a161511db..306cffdae 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,7 +67,94 @@ impl HeatMapWidgetRequest { style: None, } } + + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn event_query( + &mut self, + value: crate::datadogV1::model::EventQueryDefinition, + ) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn formulas(&mut self, value: Vec) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + self + } + + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + 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 23281967a..7c5374750 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,7 +75,81 @@ impl Host { up: None, } } + + pub fn aliases(&mut self, value: Vec) -> &mut Self { + self.aliases = Some(value); + self + } + + pub fn apps(&mut self, value: Vec) -> &mut Self { + self.apps = Some(value); + self + } + + pub fn aws_name(&mut self, value: String) -> &mut Self { + self.aws_name = Some(value); + self + } + + pub fn host_name(&mut self, value: String) -> &mut Self { + self.host_name = Some(value); + self + } + + pub fn id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn is_muted(&mut self, value: bool) -> &mut Self { + self.is_muted = Some(value); + self + } + + pub fn last_reported_time(&mut self, value: i64) -> &mut Self { + self.last_reported_time = Some(value); + self + } + + pub fn meta(&mut self, value: crate::datadogV1::model::HostMeta) -> &mut Self { + self.meta = Some(value); + self + } + + pub fn metrics(&mut self, value: crate::datadogV1::model::HostMetrics) -> &mut Self { + self.metrics = Some(value); + self + } + + pub fn mute_timeout(&mut self, value: Option) -> &mut Self { + self.mute_timeout = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn sources(&mut self, value: Vec) -> &mut Self { + self.sources = Some(value); + self + } + + pub fn tags_by_source( + &mut self, + value: std::collections::BTreeMap>, + ) -> &mut Self { + self.tags_by_source = Some(value); + 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 48312d5ec..031e6e58f 100644 --- a/src/datadogV1/model/model_host_list_response.rs +++ b/src/datadogV1/model/model_host_list_response.rs @@ -27,7 +27,23 @@ impl HostListResponse { total_returned: None, } } + + pub fn host_list(&mut self, value: Vec) -> &mut Self { + self.host_list = Some(value); + self + } + + pub fn total_matching(&mut self, value: i64) -> &mut Self { + self.total_matching = Some(value); + 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 56172eb6f..e83cc97ef 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,7 +51,65 @@ impl HostMapRequest { security_query: None, } } + + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn event_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + 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 a08e15eeb..bcc188af8 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,65 @@ impl HostMapWidgetDefinition { type_, } } + + pub fn custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn group(&mut self, value: Vec) -> &mut Self { + self.group = Some(value); + self + } + + pub fn no_group_hosts(&mut self, value: bool) -> &mut Self { + self.no_group_hosts = Some(value); + self + } + + pub fn no_metric_hosts(&mut self, value: bool) -> &mut Self { + self.no_metric_hosts = Some(value); + self + } + + pub fn node_type(&mut self, value: crate::datadogV1::model::WidgetNodeType) -> &mut Self { + self.node_type = Some(value); + self + } + + pub fn notes(&mut self, value: String) -> &mut Self { + self.notes = Some(value); + self + } + + pub fn scope(&mut self, value: Vec) -> &mut Self { + self.scope = Some(value); + self + } + + pub fn style( + &mut self, + value: crate::datadogV1::model::HostMapWidgetDefinitionStyle, + ) -> &mut Self { + self.style = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + 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 5ba6c4c62..641dae84f 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,7 +23,18 @@ impl HostMapWidgetDefinitionRequests { size: None, } } + + pub fn fill(&mut self, value: crate::datadogV1::model::HostMapRequest) -> &mut Self { + self.fill = Some(value); + 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 94b6a1dbb..1d03ea98a 100644 --- a/src/datadogV1/model/model_host_map_widget_definition_style.rs +++ b/src/datadogV1/model/model_host_map_widget_definition_style.rs @@ -31,7 +31,28 @@ impl HostMapWidgetDefinitionStyle { palette_flip: None, } } + + pub fn fill_max(&mut self, value: String) -> &mut Self { + self.fill_max = Some(value); + self + } + + pub fn fill_min(&mut self, value: String) -> &mut Self { + self.fill_min = Some(value); + self + } + + pub fn palette(&mut self, value: String) -> &mut Self { + self.palette = Some(value); + 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 cd6ee492c..8df7fe9cd 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,7 +75,86 @@ impl HostMeta { win_v: None, } } + + pub fn agent_checks(&mut self, value: Vec>) -> &mut Self { + self.agent_checks = Some(value); + self + } + + pub fn agent_version(&mut self, value: String) -> &mut Self { + self.agent_version = Some(value); + self + } + + pub fn cpu_cores(&mut self, value: i64) -> &mut Self { + self.cpu_cores = Some(value); + self + } + + pub fn fbsd_v(&mut self, value: Vec) -> &mut Self { + self.fbsd_v = Some(value); + self + } + + pub fn gohai(&mut self, value: String) -> &mut Self { + self.gohai = Some(value); + self + } + + pub fn install_method( + &mut self, + value: crate::datadogV1::model::HostMetaInstallMethod, + ) -> &mut Self { + self.install_method = Some(value); + self + } + + pub fn mac_v(&mut self, value: Vec) -> &mut Self { + self.mac_v = Some(value); + self + } + + pub fn machine(&mut self, value: String) -> &mut Self { + self.machine = Some(value); + self + } + + pub fn nix_v(&mut self, value: Vec) -> &mut Self { + self.nix_v = Some(value); + self + } + + pub fn platform(&mut self, value: String) -> &mut Self { + self.platform = Some(value); + self + } + + pub fn processor(&mut self, value: String) -> &mut Self { + self.processor = Some(value); + self + } + + pub fn python_v(&mut self, value: String) -> &mut Self { + self.python_v = Some(value); + self + } + + pub fn socket_fqdn(&mut self, value: String) -> &mut Self { + self.socket_fqdn = Some(value); + self + } + + pub fn socket_hostname(&mut self, value: String) -> &mut Self { + self.socket_hostname = Some(value); + 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 429d146fb..ec96aa4c7 100644 --- a/src/datadogV1/model/model_host_meta_install_method.rs +++ b/src/datadogV1/model/model_host_meta_install_method.rs @@ -27,7 +27,23 @@ impl HostMetaInstallMethod { tool_version: None, } } + + pub fn installer_version(&mut self, value: String) -> &mut Self { + self.installer_version = Some(value); + self + } + + pub fn tool(&mut self, value: String) -> &mut Self { + self.tool = Some(value); + 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 441c46340..c4c735fbb 100644 --- a/src/datadogV1/model/model_host_metrics.rs +++ b/src/datadogV1/model/model_host_metrics.rs @@ -27,7 +27,23 @@ impl HostMetrics { load: None, } } + + pub fn cpu(&mut self, value: f64) -> &mut Self { + self.cpu = Some(value); + self + } + + pub fn iowait(&mut self, value: f64) -> &mut Self { + self.iowait = Some(value); + 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 409533011..c08746f4e 100644 --- a/src/datadogV1/model/model_host_mute_response.rs +++ b/src/datadogV1/model/model_host_mute_response.rs @@ -31,7 +31,28 @@ impl HostMuteResponse { message: None, } } + + pub fn action(&mut self, value: String) -> &mut Self { + self.action = Some(value); + self + } + + pub fn end(&mut self, value: i64) -> &mut Self { + self.end = Some(value); + self + } + + pub fn hostname(&mut self, value: String) -> &mut Self { + self.hostname = Some(value); + 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 880568f55..d90f2089b 100644 --- a/src/datadogV1/model/model_host_mute_settings.rs +++ b/src/datadogV1/model/model_host_mute_settings.rs @@ -27,7 +27,23 @@ impl HostMuteSettings { override_: None, } } + + pub fn end(&mut self, value: i64) -> &mut Self { + self.end = Some(value); + self + } + + pub fn message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + 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 ea5da71a2..3783b8ee4 100644 --- a/src/datadogV1/model/model_host_tags.rs +++ b/src/datadogV1/model/model_host_tags.rs @@ -23,7 +23,18 @@ impl HostTags { tags: None, } } + + pub fn host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + 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 e0c452c7f..304437d54 100644 --- a/src/datadogV1/model/model_host_totals.rs +++ b/src/datadogV1/model/model_host_totals.rs @@ -23,7 +23,18 @@ impl HostTotals { total_up: None, } } + + pub fn total_active(&mut self, value: i64) -> &mut Self { + self.total_active = Some(value); + 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 bdec5614c..079846d1c 100644 --- a/src/datadogV1/model/model_hourly_usage_attribution_body.rs +++ b/src/datadogV1/model/model_hourly_usage_attribution_body.rs @@ -55,7 +55,59 @@ impl HourlyUsageAttributionBody { usage_type: None, } } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } + + pub fn tag_config_source(&mut self, value: String) -> &mut Self { + self.tag_config_source = Some(value); + self + } + + pub fn tags( + &mut self, + value: Option>>>, + ) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn total_usage_sum(&mut self, value: f64) -> &mut Self { + self.total_usage_sum = Some(value); + self + } + + pub fn updated_at(&mut self, value: String) -> &mut Self { + self.updated_at = Some(value); + self + } + + pub fn usage_type( + &mut self, + value: crate::datadogV1::model::HourlyUsageAttributionUsageType, + ) -> &mut Self { + self.usage_type = Some(value); + 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 51b172e46..939263e66 100644 --- a/src/datadogV1/model/model_hourly_usage_attribution_metadata.rs +++ b/src/datadogV1/model/model_hourly_usage_attribution_metadata.rs @@ -10,14 +10,23 @@ 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 pagination( + &mut self, + value: crate::datadogV1::model::HourlyUsageAttributionPagination, + ) -> &mut Self { + self.pagination = Some(value); + 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 fe66c254d..ad1991b80 100644 --- a/src/datadogV1/model/model_hourly_usage_attribution_pagination.rs +++ b/src/datadogV1/model/model_hourly_usage_attribution_pagination.rs @@ -23,7 +23,13 @@ impl HourlyUsageAttributionPagination { next_record_id: None, } } + + 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 5cb4baae8..b15e9016b 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,7 +23,24 @@ impl HourlyUsageAttributionResponse { usage: None, } } + + pub fn metadata( + &mut self, + value: crate::datadogV1::model::HourlyUsageAttributionMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 3dbb2f1f8..5105039e7 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 ddsource(&mut self, value: String) -> &mut Self { + self.ddsource = Some(value); + self + } + + pub fn ddtags(&mut self, value: String) -> &mut Self { + self.ddtags = Some(value); + self + } + + pub fn hostname(&mut self, value: String) -> &mut Self { + self.hostname = Some(value); + 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 f23e66a99..69929ff07 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 has_background(&mut self, value: bool) -> &mut Self { + self.has_background = Some(value); + self + } + + pub fn has_border(&mut self, value: bool) -> &mut Self { + self.has_border = Some(value); + self + } + + pub fn horizontal_align( + &mut self, + value: crate::datadogV1::model::WidgetHorizontalAlign, + ) -> &mut Self { + self.horizontal_align = Some(value); + self + } + + pub fn margin(&mut self, value: crate::datadogV1::model::WidgetMargin) -> &mut Self { + self.margin = Some(value); + self + } + + pub fn sizing(&mut self, value: crate::datadogV1::model::WidgetImageSizing) -> &mut Self { + self.sizing = Some(value); + self + } + + pub fn url_dark_theme(&mut self, value: String) -> &mut Self { + self.url_dark_theme = Some(value); + self + } + + pub fn 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..08f9373a0 100644 --- a/src/datadogV1/model/model_intake_payload_accepted.rs +++ b/src/datadogV1/model/model_intake_payload_accepted.rs @@ -17,7 +17,13 @@ impl IntakePayloadAccepted { pub fn new() -> IntakePayloadAccepted { IntakePayloadAccepted { status: None } } + + 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 ad4ec4114..287e109e6 100644 --- a/src/datadogV1/model/model_ip_prefixes_agents.rs +++ b/src/datadogV1/model/model_ip_prefixes_agents.rs @@ -23,7 +23,18 @@ impl IPPrefixesAgents { prefixes_ipv6: None, } } + + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + 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 e05f46404..4fdbadbbb 100644 --- a/src/datadogV1/model/model_ip_prefixes_api.rs +++ b/src/datadogV1/model/model_ip_prefixes_api.rs @@ -23,7 +23,18 @@ impl IPPrefixesAPI { prefixes_ipv6: None, } } + + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + 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 a5ed80cf5..93ee80049 100644 --- a/src/datadogV1/model/model_ip_prefixes_apm.rs +++ b/src/datadogV1/model/model_ip_prefixes_apm.rs @@ -23,7 +23,18 @@ impl IPPrefixesAPM { prefixes_ipv6: None, } } + + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + 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 3713c2088..eb7581f50 100644 --- a/src/datadogV1/model/model_ip_prefixes_global.rs +++ b/src/datadogV1/model/model_ip_prefixes_global.rs @@ -23,7 +23,18 @@ impl IPPrefixesGlobal { prefixes_ipv6: None, } } + + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + 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 7e2ec735f..49f24868f 100644 --- a/src/datadogV1/model/model_ip_prefixes_logs.rs +++ b/src/datadogV1/model/model_ip_prefixes_logs.rs @@ -23,7 +23,18 @@ impl IPPrefixesLogs { prefixes_ipv6: None, } } + + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + 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 4da6a396d..0a95c5bc1 100644 --- a/src/datadogV1/model/model_ip_prefixes_orchestrator.rs +++ b/src/datadogV1/model/model_ip_prefixes_orchestrator.rs @@ -23,7 +23,18 @@ impl IPPrefixesOrchestrator { prefixes_ipv6: None, } } + + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + 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 f3ccbd0a3..0b6ce4657 100644 --- a/src/datadogV1/model/model_ip_prefixes_process.rs +++ b/src/datadogV1/model/model_ip_prefixes_process.rs @@ -23,7 +23,18 @@ impl IPPrefixesProcess { prefixes_ipv6: None, } } + + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + 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 14af9a1ac..e3094f185 100644 --- a/src/datadogV1/model/model_ip_prefixes_remote_configuration.rs +++ b/src/datadogV1/model/model_ip_prefixes_remote_configuration.rs @@ -23,7 +23,18 @@ impl IPPrefixesRemoteConfiguration { prefixes_ipv6: None, } } + + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + 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 452675920..ce8aee954 100644 --- a/src/datadogV1/model/model_ip_prefixes_synthetics.rs +++ b/src/datadogV1/model/model_ip_prefixes_synthetics.rs @@ -31,7 +31,34 @@ impl IPPrefixesSynthetics { prefixes_ipv6_by_location: None, } } + + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + self + } + + pub fn prefixes_ipv4_by_location( + &mut self, + value: std::collections::BTreeMap>, + ) -> &mut Self { + self.prefixes_ipv4_by_location = Some(value); + self + } + + pub fn prefixes_ipv6(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv6 = Some(value); + self + } + + pub fn 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 { 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 7946e3bb5..aecfaf8dc 100644 --- a/src/datadogV1/model/model_ip_prefixes_synthetics_private_locations.rs +++ b/src/datadogV1/model/model_ip_prefixes_synthetics_private_locations.rs @@ -23,7 +23,18 @@ impl IPPrefixesSyntheticsPrivateLocations { prefixes_ipv6: None, } } + + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + 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 1469bbb43..ad15998f7 100644 --- a/src/datadogV1/model/model_ip_prefixes_webhooks.rs +++ b/src/datadogV1/model/model_ip_prefixes_webhooks.rs @@ -23,7 +23,18 @@ impl IPPrefixesWebhooks { prefixes_ipv6: None, } } + + pub fn prefixes_ipv4(&mut self, value: Vec) -> &mut Self { + self.prefixes_ipv4 = Some(value); + 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 685695881..5f69c6540 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,7 +68,85 @@ impl IPRanges { webhooks: None, } } + + pub fn agents(&mut self, value: crate::datadogV1::model::IPPrefixesAgents) -> &mut Self { + self.agents = Some(value); + self + } + + pub fn api(&mut self, value: crate::datadogV1::model::IPPrefixesAPI) -> &mut Self { + self.api = Some(value); + self + } + + pub fn apm(&mut self, value: crate::datadogV1::model::IPPrefixesAPM) -> &mut Self { + self.apm = Some(value); + self + } + + pub fn global(&mut self, value: crate::datadogV1::model::IPPrefixesGlobal) -> &mut Self { + self.global = Some(value); + self + } + + pub fn logs(&mut self, value: crate::datadogV1::model::IPPrefixesLogs) -> &mut Self { + self.logs = Some(value); + self + } + + pub fn modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn orchestrator( + &mut self, + value: crate::datadogV1::model::IPPrefixesOrchestrator, + ) -> &mut Self { + self.orchestrator = Some(value); + self + } + + pub fn process(&mut self, value: crate::datadogV1::model::IPPrefixesProcess) -> &mut Self { + self.process = Some(value); + self + } + + pub fn remote_configuration( + &mut self, + value: crate::datadogV1::model::IPPrefixesRemoteConfiguration, + ) -> &mut Self { + self.remote_configuration = Some(value); + self + } + + pub fn synthetics( + &mut self, + value: crate::datadogV1::model::IPPrefixesSynthetics, + ) -> &mut Self { + self.synthetics = Some(value); + self + } + + pub fn synthetics_private_locations( + &mut self, + value: crate::datadogV1::model::IPPrefixesSyntheticsPrivateLocations, + ) -> &mut Self { + self.synthetics_private_locations = Some(value); + self + } + + pub fn version(&mut self, value: i64) -> &mut Self { + self.version = Some(value); + 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 4267fcfee..938a8341f 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 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..3fd040f12 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,40 @@ impl ListStreamQuery { storage: None, } } + + pub fn compute( + &mut self, + value: Vec, + ) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn event_size(&mut self, value: crate::datadogV1::model::WidgetEventSize) -> &mut Self { + self.event_size = Some(value); + self + } + + pub fn group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn indexes(&mut self, value: Vec) -> &mut Self { + self.indexes = Some(value); + self + } + + pub fn sort(&mut self, value: crate::datadogV1::model::WidgetFieldSort) -> &mut Self { + self.sort = Some(value); + 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 60cb0cffa..3942d36df 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,34 @@ impl ListStreamWidgetDefinition { type_, } } + + pub fn legend_size(&mut self, value: String) -> &mut Self { + self.legend_size = Some(value); + self + } + + pub fn show_legend(&mut self, value: bool) -> &mut Self { + self.show_legend = Some(value); + self + } + + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn 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..1c19d585c 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,7 +23,18 @@ impl Log { id: None, } } + + pub fn content(&mut self, value: crate::datadogV1::model::LogContent) -> &mut Self { + self.content = Some(value); + 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 8bad1259a..f9c7b5c6a 100644 --- a/src/datadogV1/model/model_log_content.rs +++ b/src/datadogV1/model/model_log_content.rs @@ -43,7 +43,41 @@ impl LogContent { timestamp: None, } } + + pub fn attributes( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn service(&mut self, value: String) -> &mut Self { + self.service = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + 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 a00120cec..bf8aa6b7a 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,7 +35,42 @@ impl LogQueryDefinition { search: None, } } + + pub fn compute(&mut self, value: crate::datadogV1::model::LogsQueryCompute) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn index(&mut self, value: String) -> &mut Self { + self.index = Some(value); + self + } + + pub fn multi_compute( + &mut self, + value: Vec, + ) -> &mut Self { + self.multi_compute = Some(value); + self + } + + pub fn search( + &mut self, + value: crate::datadogV1::model::LogQueryDefinitionSearch, + ) -> &mut Self { + self.search = Some(value); + 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 f2f482d6e..dd72947c0 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 limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn 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..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 @@ -30,4 +30,9 @@ impl LogQueryDefinitionGroupBySort { order, } } + + 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 c385874ef..c2a3b3283 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,79 @@ impl LogStreamWidgetDefinition { type_, } } + + #[allow(deprecated)] + pub fn columns(&mut self, value: Vec) -> &mut Self { + self.columns = Some(value); + self + } + + #[allow(deprecated)] + pub fn indexes(&mut self, value: Vec) -> &mut Self { + self.indexes = Some(value); + self + } + + #[allow(deprecated)] + pub fn logset(&mut self, value: String) -> &mut Self { + self.logset = Some(value); + self + } + + #[allow(deprecated)] + pub fn message_display( + &mut self, + value: crate::datadogV1::model::WidgetMessageDisplay, + ) -> &mut Self { + self.message_display = Some(value); + self + } + + #[allow(deprecated)] + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + #[allow(deprecated)] + pub fn show_date_column(&mut self, value: bool) -> &mut Self { + self.show_date_column = Some(value); + self + } + + #[allow(deprecated)] + pub fn show_message_column(&mut self, value: bool) -> &mut Self { + self.show_message_column = Some(value); + self + } + + #[allow(deprecated)] + pub fn sort(&mut self, value: crate::datadogV1::model::WidgetFieldSort) -> &mut Self { + self.sort = Some(value); + self + } + + #[allow(deprecated)] + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + #[allow(deprecated)] + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + #[allow(deprecated)] + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + self + } + + #[allow(deprecated)] + 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 351598de3..241f56003 100644 --- a/src/datadogV1/model/model_logs_api_error.rs +++ b/src/datadogV1/model/model_logs_api_error.rs @@ -27,7 +27,23 @@ impl LogsAPIError { message: None, } } + + pub fn code(&mut self, value: String) -> &mut Self { + self.code = Some(value); + self + } + + pub fn details(&mut self, value: Vec) -> &mut Self { + self.details = Some(value); + 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 7817fecb1..884d2a558 100644 --- a/src/datadogV1/model/model_logs_api_error_response.rs +++ b/src/datadogV1/model/model_logs_api_error_response.rs @@ -10,14 +10,20 @@ 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 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 027cc5af4..eec07a63c 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 is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn is_replace_missing(&mut self, value: bool) -> &mut Self { + self.is_replace_missing = Some(value); + 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 a587d41a2..f88c10397 100644 --- a/src/datadogV1/model/model_logs_attribute_remapper.rs +++ b/src/datadogV1/model/model_logs_attribute_remapper.rs @@ -63,4 +63,39 @@ impl LogsAttributeRemapper { type_, } } + + pub fn is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn override_on_conflict(&mut self, value: bool) -> &mut Self { + self.override_on_conflict = Some(value); + self + } + + pub fn preserve_source(&mut self, value: bool) -> &mut Self { + self.preserve_source = Some(value); + self + } + + pub fn source_type(&mut self, value: String) -> &mut Self { + self.source_type = Some(value); + self + } + + pub fn target_format(&mut self, value: crate::datadogV1::model::TargetFormatType) -> &mut Self { + self.target_format = Some(value); + 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 a353ce5ee..6ce211039 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,7 +27,29 @@ impl LogsByRetention { usage_by_month: None, } } + + pub fn orgs(&mut self, value: crate::datadogV1::model::LogsByRetentionOrgs) -> &mut Self { + self.orgs = Some(value); + self + } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + self + } + + pub fn 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 { 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 0f2d92f89..70d8d4a5e 100644 --- a/src/datadogV1/model/model_logs_by_retention_monthly_usage.rs +++ b/src/datadogV1/model/model_logs_by_retention_monthly_usage.rs @@ -23,7 +23,21 @@ impl LogsByRetentionMonthlyUsage { usage: None, } } + + pub fn date(&mut self, value: String) -> &mut Self { + self.date = Some(value); + self + } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 d54d6068c..277a14ad2 100644 --- a/src/datadogV1/model/model_logs_by_retention_org_usage.rs +++ b/src/datadogV1/model/model_logs_by_retention_org_usage.rs @@ -17,7 +17,16 @@ impl LogsByRetentionOrgUsage { pub fn new() -> LogsByRetentionOrgUsage { LogsByRetentionOrgUsage { usage: None } } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 0fbc33c5b..184d42593 100644 --- a/src/datadogV1/model/model_logs_by_retention_orgs.rs +++ b/src/datadogV1/model/model_logs_by_retention_orgs.rs @@ -17,7 +17,16 @@ impl LogsByRetentionOrgs { pub fn new() -> LogsByRetentionOrgs { LogsByRetentionOrgs { usage: None } } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 e149f7f4f..b2191a8c9 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 is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + 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 06f9b0ab7..faad4051d 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,7 +23,18 @@ impl LogsCategoryProcessorCategory { name: None, } } + + pub fn filter(&mut self, value: crate::datadogV1::model::LogsFilter) -> &mut Self { + self.filter = Some(value); + 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 004ab9b11..af7a87c46 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 is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + 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 dfb57c695..c8a8e4988 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,14 @@ impl LogsExclusion { name, } } + + pub fn filter(&mut self, value: crate::datadogV1::model::LogsExclusionFilter) -> &mut Self { + self.filter = Some(value); + 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 1c679e7ae..904a29395 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 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..aa7fc56f2 100644 --- a/src/datadogV1/model/model_logs_filter.rs +++ b/src/datadogV1/model/model_logs_filter.rs @@ -17,7 +17,13 @@ impl LogsFilter { pub fn new() -> LogsFilter { LogsFilter { query: None } } + + 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 c3c67f8e9..7a23ec1df 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 is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + 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 22e7267b9..fc61bd2ed 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 is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 5f4e640cf..933cf95cb 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 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..e8af61f1f 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 daily_limit(&mut self, value: i64) -> &mut Self { + self.daily_limit = Some(value); + self + } + + pub fn exclusion_filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.exclusion_filters = Some(value); + self + } + + pub fn is_rate_limited(&mut self, value: bool) -> &mut Self { + self.is_rate_limited = Some(value); + 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 9454876a1..7d430f79a 100644 --- a/src/datadogV1/model/model_logs_index_list_response.rs +++ b/src/datadogV1/model/model_logs_index_list_response.rs @@ -17,7 +17,13 @@ impl LogsIndexListResponse { pub fn new() -> LogsIndexListResponse { LogsIndexListResponse { indexes: None } } + + 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 4419a5c93..a95124e7c 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 daily_limit(&mut self, value: i64) -> &mut Self { + self.daily_limit = Some(value); + self + } + + pub fn disable_daily_limit(&mut self, value: bool) -> &mut Self { + self.disable_daily_limit = Some(value); + self + } + + pub fn exclusion_filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.exclusion_filters = Some(value); + 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 cbc2a0191..00e2892e2 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 index(&mut self, value: String) -> &mut Self { + self.index = Some(value); + self + } + + pub fn limit(&mut self, value: i32) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn sort(&mut self, value: crate::datadogV1::model::LogsSort) -> &mut Self { + self.sort = Some(value); + 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 73faa94b9..86c65cfb7 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 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..09e783adc 100644 --- a/src/datadogV1/model/model_logs_list_response.rs +++ b/src/datadogV1/model/model_logs_list_response.rs @@ -32,7 +32,23 @@ impl LogsListResponse { status: None, } } + + pub fn logs(&mut self, value: Vec) -> &mut Self { + self.logs = Some(value); + self + } + + pub fn next_log_id(&mut self, value: Option) -> &mut Self { + self.next_log_id = Some(value); + 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 60154b343..245427005 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 default_lookup(&mut self, value: String) -> &mut Self { + self.default_lookup = Some(value); + self + } + + pub fn is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + 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 bf9cc02f9..f7166c6d0 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 is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + 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 fab57bc9b..b5a757fee 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,34 @@ impl LogsPipeline { type_: None, } } + + pub fn filter(&mut self, value: crate::datadogV1::model::LogsFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn is_read_only(&mut self, value: bool) -> &mut Self { + self.is_read_only = Some(value); + self + } + + pub fn processors(&mut self, value: Vec) -> &mut Self { + self.processors = Some(value); + 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 4378cd390..b8fe13e76 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,24 @@ impl LogsPipelineProcessor { type_, } } + + pub fn filter(&mut self, value: crate::datadogV1::model::LogsFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn processors(&mut self, value: Vec) -> &mut Self { + self.processors = Some(value); + self + } } diff --git a/src/datadogV1/model/model_logs_query_compute.rs b/src/datadogV1/model/model_logs_query_compute.rs index 08483f932..41a3046e8 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 facet(&mut self, value: String) -> &mut Self { + self.facet = Some(value); + 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 d80e07a4f..a1eb9c5c4 100644 --- a/src/datadogV1/model/model_logs_retention_agg_sum_usage.rs +++ b/src/datadogV1/model/model_logs_retention_agg_sum_usage.rs @@ -31,7 +31,28 @@ impl LogsRetentionAggSumUsage { retention: None, } } + + 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 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 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 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 423282fd4..16531764f 100644 --- a/src/datadogV1/model/model_logs_retention_sum_usage.rs +++ b/src/datadogV1/model/model_logs_retention_sum_usage.rs @@ -31,7 +31,28 @@ impl LogsRetentionSumUsage { retention: None, } } + + pub fn logs_indexed_logs_usage_sum(&mut self, value: i64) -> &mut Self { + self.logs_indexed_logs_usage_sum = Some(value); + 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 logs_rehydrated_indexed_logs_usage_sum(&mut self, value: i64) -> &mut Self { + self.logs_rehydrated_indexed_logs_usage_sum = Some(value); + 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 47d1c78f3..13039cae9 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 is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + 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 37759d85f..edf62e256 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 is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + 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 37314e44a..28e1ae6ff 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 is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn is_replace_missing(&mut self, value: bool) -> &mut Self { + self.is_replace_missing = Some(value); + 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 ded0bbeea..61d437e85 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 is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 6366b5101..1ae208e6f 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 is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 76bd81bd2..ec7f44599 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 is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn is_encoded(&mut self, value: bool) -> &mut Self { + self.is_encoded = Some(value); + 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 52d69878a..cd2bb694a 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 end(&mut self, value: Option) -> &mut Self { + self.end = Some(value); + self + } + + pub fn scope(&mut self, value: Vec) -> &mut Self { + self.scope = Some(value); + 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 d35a549fc..02500c8b2 100644 --- a/src/datadogV1/model/model_metric_metadata.rs +++ b/src/datadogV1/model/model_metric_metadata.rs @@ -43,7 +43,43 @@ impl MetricMetadata { unit: None, } } + + pub fn description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn integration(&mut self, value: String) -> &mut Self { + self.integration = Some(value); + self + } + + pub fn per_unit(&mut self, value: String) -> &mut Self { + self.per_unit = Some(value); + self + } + + pub fn short_name(&mut self, value: String) -> &mut Self { + self.short_name = Some(value); + self + } + + pub fn statsd_interval(&mut self, value: i64) -> &mut Self { + self.statsd_interval = Some(value); + self + } + + pub fn type_(&mut self, value: String) -> &mut Self { + self.type_ = Some(value); + 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 5a1e83e18..9fa8a559c 100644 --- a/src/datadogV1/model/model_metric_search_response.rs +++ b/src/datadogV1/model/model_metric_search_response.rs @@ -10,14 +10,23 @@ 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 results( + &mut self, + value: crate::datadogV1::model::MetricSearchResponseResults, + ) -> &mut Self { + self.results = Some(value); + 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 fdfb9dc33..59fbc0f20 100644 --- a/src/datadogV1/model/model_metric_search_response_results.rs +++ b/src/datadogV1/model/model_metric_search_response_results.rs @@ -17,7 +17,13 @@ impl MetricSearchResponseResults { pub fn new() -> MetricSearchResponseResults { MetricSearchResponseResults { metrics: None } } + + 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 5f4e53d14..e2c83be9d 100644 --- a/src/datadogV1/model/model_metrics_list_response.rs +++ b/src/datadogV1/model/model_metrics_list_response.rs @@ -23,7 +23,18 @@ impl MetricsListResponse { metrics: None, } } + + pub fn from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + 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 bd823f481..8d659c908 100644 --- a/src/datadogV1/model/model_metrics_query_metadata.rs +++ b/src/datadogV1/model/model_metrics_query_metadata.rs @@ -70,7 +70,76 @@ impl MetricsQueryMetadata { unit: None, } } + + pub fn aggr(&mut self, value: Option) -> &mut Self { + self.aggr = Some(value); + self + } + + pub fn display_name(&mut self, value: String) -> &mut Self { + self.display_name = Some(value); + self + } + + pub fn end(&mut self, value: i64) -> &mut Self { + self.end = Some(value); + self + } + + pub fn expression(&mut self, value: String) -> &mut Self { + self.expression = Some(value); + self + } + + pub fn interval(&mut self, value: i64) -> &mut Self { + self.interval = Some(value); + self + } + + pub fn length(&mut self, value: i64) -> &mut Self { + self.length = Some(value); + self + } + + pub fn metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn pointlist(&mut self, value: Vec>>) -> &mut Self { + self.pointlist = Some(value); + self + } + + pub fn query_index(&mut self, value: i64) -> &mut Self { + self.query_index = Some(value); + self + } + + pub fn scope(&mut self, value: String) -> &mut Self { + self.scope = Some(value); + self + } + + pub fn start(&mut self, value: i64) -> &mut Self { + self.start = Some(value); + self + } + + pub fn tag_set(&mut self, value: Vec) -> &mut Self { + self.tag_set = Some(value); + self + } + + pub fn unit( + &mut self, + value: Vec>, + ) -> &mut Self { + self.unit = Some(value); + 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 c6c4be9ba..9b6ede7ce 100644 --- a/src/datadogV1/model/model_metrics_query_response.rs +++ b/src/datadogV1/model/model_metrics_query_response.rs @@ -51,7 +51,56 @@ impl MetricsQueryResponse { to_date: None, } } + + pub fn error(&mut self, value: String) -> &mut Self { + self.error = Some(value); + self + } + + pub fn from_date(&mut self, value: i64) -> &mut Self { + self.from_date = Some(value); + self + } + + pub fn group_by(&mut self, value: Vec) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn res_type(&mut self, value: String) -> &mut Self { + self.res_type = Some(value); + self + } + + pub fn series( + &mut self, + value: Vec, + ) -> &mut Self { + self.series = Some(value); + self + } + + pub fn status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + 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 43ca3a1e4..daee17b9d 100644 --- a/src/datadogV1/model/model_metrics_query_unit.rs +++ b/src/datadogV1/model/model_metrics_query_unit.rs @@ -35,7 +35,33 @@ impl MetricsQueryUnit { short_name: None, } } + + pub fn family(&mut self, value: String) -> &mut Self { + self.family = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn plural(&mut self, value: String) -> &mut Self { + self.plural = Some(value); + self + } + + pub fn scale_factor(&mut self, value: f64) -> &mut Self { + self.scale_factor = Some(value); + 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 3142e33b7..77f0d5997 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 created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + self.creator = Some(value); + self + } + + pub fn deleted(&mut self, value: Option) -> &mut Self { + self.deleted = Some(value); + self + } + + pub fn id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn matching_downtimes( + &mut self, + value: Vec, + ) -> &mut Self { + self.matching_downtimes = Some(value); + self + } + + pub fn message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn multi(&mut self, value: bool) -> &mut Self { + self.multi = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn options(&mut self, value: crate::datadogV1::model::MonitorOptions) -> &mut Self { + self.options = Some(value); + self + } + + pub fn overall_state( + &mut self, + value: crate::datadogV1::model::MonitorOverallStates, + ) -> &mut Self { + self.overall_state = Some(value); + self + } + + pub fn priority(&mut self, value: Option) -> &mut Self { + self.priority = Some(value); + self + } + + pub fn restricted_roles(&mut self, value: Option>) -> &mut Self { + self.restricted_roles = Some(value); + self + } + + pub fn state(&mut self, value: crate::datadogV1::model::MonitorState) -> &mut Self { + self.state = Some(value); + 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 3595563c3..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 @@ -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 group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn indexes(&mut self, value: Vec) -> &mut Self { + self.indexes = Some(value); + self + } + + pub fn 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..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 @@ -29,4 +29,14 @@ impl MonitorFormulaAndFunctionEventQueryDefinitionCompute { metric: None, } } + + pub fn interval(&mut self, value: i64) -> &mut Self { + self.interval = Some(value); + 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 d058ec6ae..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 @@ -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 limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn 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..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 @@ -29,4 +29,14 @@ impl MonitorFormulaAndFunctionEventQueryGroupBySort { order: None, } } + + pub fn metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + 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_group_search_response.rs b/src/datadogV1/model/model_monitor_group_search_response.rs index 7ee2a2f44..fddb3b63b 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,7 +27,32 @@ impl MonitorGroupSearchResponse { metadata: None, } } + + pub fn counts( + &mut self, + value: crate::datadogV1::model::MonitorGroupSearchResponseCounts, + ) -> &mut Self { + self.counts = Some(value); + self + } + + pub fn groups( + &mut self, + value: Vec, + ) -> &mut Self { + self.groups = Some(value); + self + } + + pub fn metadata( + &mut self, + value: crate::datadogV1::model::MonitorSearchResponseMetadata, + ) -> &mut Self { + self.metadata = Some(value); + 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 2a658d210..145675230 100644 --- a/src/datadogV1/model/model_monitor_group_search_response_counts.rs +++ b/src/datadogV1/model/model_monitor_group_search_response_counts.rs @@ -23,7 +23,24 @@ impl MonitorGroupSearchResponseCounts { type_: None, } } + + pub fn status( + &mut self, + value: Vec, + ) -> &mut Self { + self.status = Some(value); + self + } + + pub fn type_( + &mut self, + value: Vec, + ) -> &mut Self { + self.type_ = Some(value); + 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 48a4b14c6..0675bcae5 100644 --- a/src/datadogV1/model/model_monitor_group_search_result.rs +++ b/src/datadogV1/model/model_monitor_group_search_result.rs @@ -47,7 +47,43 @@ impl MonitorGroupSearchResult { status: None, } } + + pub fn group(&mut self, value: String) -> &mut Self { + self.group = Some(value); + self + } + + pub fn group_tags(&mut self, value: Vec) -> &mut Self { + self.group_tags = Some(value); + self + } + + pub fn last_nodata_ts(&mut self, value: i64) -> &mut Self { + self.last_nodata_ts = Some(value); + self + } + + pub fn last_triggered_ts(&mut self, value: Option) -> &mut Self { + self.last_triggered_ts = Some(value); + self + } + + pub fn monitor_id(&mut self, value: i64) -> &mut Self { + self.monitor_id = Some(value); + self + } + + pub fn monitor_name(&mut self, value: String) -> &mut Self { + self.monitor_name = Some(value); + 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 33a21d8bc..309cf2771 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,7 +226,218 @@ impl MonitorOptions { variables: None, } } + + #[allow(deprecated)] + pub fn aggregation( + &mut self, + value: crate::datadogV1::model::MonitorOptionsAggregation, + ) -> &mut Self { + self.aggregation = Some(value); + self + } + + #[allow(deprecated)] + pub fn device_ids( + &mut self, + value: Vec, + ) -> &mut Self { + self.device_ids = Some(value); + self + } + + #[allow(deprecated)] + pub fn enable_logs_sample(&mut self, value: bool) -> &mut Self { + self.enable_logs_sample = Some(value); + self + } + + #[allow(deprecated)] + pub fn enable_samples(&mut self, value: bool) -> &mut Self { + self.enable_samples = Some(value); + self + } + + #[allow(deprecated)] + pub fn escalation_message(&mut self, value: String) -> &mut Self { + self.escalation_message = Some(value); + self + } + + #[allow(deprecated)] + pub fn evaluation_delay(&mut self, value: Option) -> &mut Self { + self.evaluation_delay = Some(value); + self + } + + #[allow(deprecated)] + pub fn group_retention_duration(&mut self, value: String) -> &mut Self { + self.group_retention_duration = Some(value); + self + } + + #[allow(deprecated)] + pub fn groupby_simple_monitor(&mut self, value: bool) -> &mut Self { + self.groupby_simple_monitor = Some(value); + self + } + + #[allow(deprecated)] + pub fn include_tags(&mut self, value: bool) -> &mut Self { + self.include_tags = Some(value); + self + } + + #[allow(deprecated)] + pub fn locked(&mut self, value: bool) -> &mut Self { + self.locked = Some(value); + self + } + + #[allow(deprecated)] + pub fn min_failure_duration(&mut self, value: Option) -> &mut Self { + self.min_failure_duration = Some(value); + self + } + + #[allow(deprecated)] + pub fn min_location_failed(&mut self, value: Option) -> &mut Self { + self.min_location_failed = Some(value); + self + } + + #[allow(deprecated)] + pub fn new_group_delay(&mut self, value: Option) -> &mut Self { + self.new_group_delay = Some(value); + self + } + + #[allow(deprecated)] + pub fn new_host_delay(&mut self, value: Option) -> &mut Self { + self.new_host_delay = Some(value); + self + } + + #[allow(deprecated)] + pub fn no_data_timeframe(&mut self, value: Option) -> &mut Self { + self.no_data_timeframe = Some(value); + self + } + + #[allow(deprecated)] + pub fn notification_preset_name( + &mut self, + value: crate::datadogV1::model::MonitorOptionsNotificationPresets, + ) -> &mut Self { + self.notification_preset_name = Some(value); + self + } + + #[allow(deprecated)] + pub fn notify_audit(&mut self, value: bool) -> &mut Self { + self.notify_audit = Some(value); + self + } + + #[allow(deprecated)] + pub fn notify_by(&mut self, value: Vec) -> &mut Self { + self.notify_by = Some(value); + self + } + + #[allow(deprecated)] + pub fn notify_no_data(&mut self, value: bool) -> &mut Self { + self.notify_no_data = Some(value); + self + } + + #[allow(deprecated)] + pub fn on_missing_data( + &mut self, + value: crate::datadogV1::model::OnMissingDataOption, + ) -> &mut Self { + self.on_missing_data = Some(value); + self + } + + #[allow(deprecated)] + pub fn renotify_interval(&mut self, value: Option) -> &mut Self { + self.renotify_interval = Some(value); + self + } + + #[allow(deprecated)] + pub fn renotify_occurrences(&mut self, value: Option) -> &mut Self { + self.renotify_occurrences = Some(value); + self + } + + #[allow(deprecated)] + pub fn renotify_statuses( + &mut self, + value: Option>, + ) -> &mut Self { + self.renotify_statuses = Some(value); + self + } + + #[allow(deprecated)] + pub fn require_full_window(&mut self, value: bool) -> &mut Self { + self.require_full_window = Some(value); + self + } + + #[allow(deprecated)] + pub fn scheduling_options( + &mut self, + value: crate::datadogV1::model::MonitorOptionsSchedulingOptions, + ) -> &mut Self { + self.scheduling_options = Some(value); + self + } + + #[allow(deprecated)] + pub fn silenced(&mut self, value: std::collections::BTreeMap) -> &mut Self { + self.silenced = Some(value); + self + } + + #[allow(deprecated)] + pub fn synthetics_check_id(&mut self, value: Option) -> &mut Self { + self.synthetics_check_id = Some(value); + self + } + + #[allow(deprecated)] + pub fn threshold_windows( + &mut self, + value: crate::datadogV1::model::MonitorThresholdWindowOptions, + ) -> &mut Self { + self.threshold_windows = Some(value); + self + } + + #[allow(deprecated)] + pub fn thresholds(&mut self, value: crate::datadogV1::model::MonitorThresholds) -> &mut Self { + self.thresholds = Some(value); + self + } + + #[allow(deprecated)] + pub fn timeout_h(&mut self, value: Option) -> &mut Self { + self.timeout_h = Some(value); + self + } + + #[allow(deprecated)] + pub fn variables( + &mut self, + value: Vec, + ) -> &mut Self { + self.variables = Some(value); + 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 c0d307113..e99382bd3 100644 --- a/src/datadogV1/model/model_monitor_options_aggregation.rs +++ b/src/datadogV1/model/model_monitor_options_aggregation.rs @@ -27,7 +27,23 @@ impl MonitorOptionsAggregation { type_: None, } } + + pub fn group_by(&mut self, value: String) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + 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 70ef8b3ac..ef1e85d2a 100644 --- a/src/datadogV1/model/model_monitor_options_custom_schedule.rs +++ b/src/datadogV1/model/model_monitor_options_custom_schedule.rs @@ -17,7 +17,16 @@ impl MonitorOptionsCustomSchedule { pub fn new() -> MonitorOptionsCustomSchedule { MonitorOptionsCustomSchedule { recurrences: None } } + + pub fn recurrences( + &mut self, + value: Vec, + ) -> &mut Self { + self.recurrences = Some(value); + 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 b20200e03..8206b325d 100644 --- a/src/datadogV1/model/model_monitor_options_custom_schedule_recurrence.rs +++ b/src/datadogV1/model/model_monitor_options_custom_schedule_recurrence.rs @@ -27,7 +27,23 @@ impl MonitorOptionsCustomScheduleRecurrence { timezone: None, } } + + pub fn rrule(&mut self, value: String) -> &mut Self { + self.rrule = Some(value); + self + } + + pub fn start(&mut self, value: String) -> &mut Self { + self.start = Some(value); + 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 87aa7c608..b589de0d1 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,7 +24,24 @@ impl MonitorOptionsSchedulingOptions { evaluation_window: None, } } + + pub fn custom_schedule( + &mut self, + value: crate::datadogV1::model::MonitorOptionsCustomSchedule, + ) -> &mut Self { + self.custom_schedule = Some(value); + self + } + + pub fn evaluation_window( + &mut self, + value: crate::datadogV1::model::MonitorOptionsSchedulingOptionsEvaluationWindow, + ) -> &mut Self { + self.evaluation_window = Some(value); + 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 9297ee523..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 @@ -27,7 +27,23 @@ impl MonitorOptionsSchedulingOptionsEvaluationWindow { month_starts: None, } } + + pub fn day_starts(&mut self, value: String) -> &mut Self { + self.day_starts = Some(value); + self + } + + pub fn hour_starts(&mut self, value: i32) -> &mut Self { + self.hour_starts = Some(value); + 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 10fdb43fb..f3a69c8e6 100644 --- a/src/datadogV1/model/model_monitor_search_count_item.rs +++ b/src/datadogV1/model/model_monitor_search_count_item.rs @@ -23,7 +23,18 @@ impl MonitorSearchCountItem { name: None, } } + + pub fn count(&mut self, value: i64) -> &mut Self { + self.count = Some(value); + 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 86384c3e5..37c4beb42 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,7 +27,32 @@ impl MonitorSearchResponse { monitors: None, } } + + pub fn counts( + &mut self, + value: crate::datadogV1::model::MonitorSearchResponseCounts, + ) -> &mut Self { + self.counts = Some(value); + self + } + + pub fn metadata( + &mut self, + value: crate::datadogV1::model::MonitorSearchResponseMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn monitors( + &mut self, + value: Vec, + ) -> &mut Self { + self.monitors = Some(value); + 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 72263e5ad..7a88bcf2e 100644 --- a/src/datadogV1/model/model_monitor_search_response_counts.rs +++ b/src/datadogV1/model/model_monitor_search_response_counts.rs @@ -31,7 +31,40 @@ impl MonitorSearchResponseCounts { type_: None, } } + + pub fn muted( + &mut self, + value: Vec, + ) -> &mut Self { + self.muted = Some(value); + self + } + + pub fn status( + &mut self, + value: Vec, + ) -> &mut Self { + self.status = Some(value); + self + } + + pub fn tag( + &mut self, + value: Vec, + ) -> &mut Self { + self.tag = Some(value); + self + } + + pub fn type_( + &mut self, + value: Vec, + ) -> &mut Self { + self.type_ = Some(value); + 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 d2d9f084d..b048fc3dd 100644 --- a/src/datadogV1/model/model_monitor_search_response_metadata.rs +++ b/src/datadogV1/model/model_monitor_search_response_metadata.rs @@ -31,7 +31,28 @@ impl MonitorSearchResponseMetadata { total_count: None, } } + + pub fn page(&mut self, value: i64) -> &mut Self { + self.page = Some(value); + self + } + + pub fn page_count(&mut self, value: i64) -> &mut Self { + self.page_count = Some(value); + self + } + + pub fn per_page(&mut self, value: i64) -> &mut Self { + self.per_page = Some(value); + 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 ef43470df..aa1b49d4b 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,7 +74,76 @@ impl MonitorSearchResult { type_: None, } } + + pub fn classification(&mut self, value: String) -> &mut Self { + self.classification = Some(value); + self + } + + pub fn creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + self.creator = Some(value); + self + } + + pub fn id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn last_triggered_ts(&mut self, value: Option) -> &mut Self { + self.last_triggered_ts = Some(value); + self + } + + pub fn metrics(&mut self, value: Vec) -> &mut Self { + self.metrics = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn notifications( + &mut self, + value: Vec, + ) -> &mut Self { + self.notifications = Some(value); + self + } + + pub fn org_id(&mut self, value: i64) -> &mut Self { + self.org_id = Some(value); + self + } + + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn scopes(&mut self, value: Vec) -> &mut Self { + self.scopes = Some(value); + self + } + + pub fn status(&mut self, value: crate::datadogV1::model::MonitorOverallStates) -> &mut Self { + self.status = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + 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 24f464361..6ea9e597c 100644 --- a/src/datadogV1/model/model_monitor_search_result_notification.rs +++ b/src/datadogV1/model/model_monitor_search_result_notification.rs @@ -23,7 +23,18 @@ impl MonitorSearchResultNotification { name: None, } } + + pub fn handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + 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 4eb3a0572..b210f0985 100644 --- a/src/datadogV1/model/model_monitor_state.rs +++ b/src/datadogV1/model/model_monitor_state.rs @@ -19,7 +19,16 @@ impl MonitorState { pub fn new() -> MonitorState { MonitorState { groups: None } } + + pub fn groups( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.groups = Some(value); + 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 1a033168f..2d287188f 100644 --- a/src/datadogV1/model/model_monitor_state_group.rs +++ b/src/datadogV1/model/model_monitor_state_group.rs @@ -39,7 +39,38 @@ impl MonitorStateGroup { status: None, } } + + pub fn last_nodata_ts(&mut self, value: i64) -> &mut Self { + self.last_nodata_ts = Some(value); + self + } + + pub fn last_notified_ts(&mut self, value: i64) -> &mut Self { + self.last_notified_ts = Some(value); + self + } + + pub fn last_resolved_ts(&mut self, value: i64) -> &mut Self { + self.last_resolved_ts = Some(value); + self + } + + pub fn last_triggered_ts(&mut self, value: i64) -> &mut Self { + self.last_triggered_ts = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 d21267e86..27c419f18 100644 --- a/src/datadogV1/model/model_monitor_summary_widget_definition.rs +++ b/src/datadogV1/model/model_monitor_summary_widget_definition.rs @@ -77,4 +77,82 @@ impl MonitorSummaryWidgetDefinition { type_, } } + + #[allow(deprecated)] + pub fn color_preference( + &mut self, + value: crate::datadogV1::model::WidgetColorPreference, + ) -> &mut Self { + self.color_preference = Some(value); + self + } + + #[allow(deprecated)] + pub fn count(&mut self, value: i64) -> &mut Self { + self.count = Some(value); + self + } + + #[allow(deprecated)] + pub fn display_format( + &mut self, + value: crate::datadogV1::model::WidgetMonitorSummaryDisplayFormat, + ) -> &mut Self { + self.display_format = Some(value); + self + } + + #[allow(deprecated)] + pub fn hide_zero_counts(&mut self, value: bool) -> &mut Self { + self.hide_zero_counts = Some(value); + self + } + + #[allow(deprecated)] + pub fn show_last_triggered(&mut self, value: bool) -> &mut Self { + self.show_last_triggered = Some(value); + self + } + + #[allow(deprecated)] + pub fn show_priority(&mut self, value: bool) -> &mut Self { + self.show_priority = Some(value); + self + } + + #[allow(deprecated)] + pub fn sort(&mut self, value: crate::datadogV1::model::WidgetMonitorSummarySort) -> &mut Self { + self.sort = Some(value); + self + } + + #[allow(deprecated)] + pub fn start(&mut self, value: i64) -> &mut Self { + self.start = Some(value); + self + } + + #[allow(deprecated)] + pub fn summary_type(&mut self, value: crate::datadogV1::model::WidgetSummaryType) -> &mut Self { + self.summary_type = Some(value); + self + } + + #[allow(deprecated)] + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + #[allow(deprecated)] + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + self + } + + #[allow(deprecated)] + 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 1cbd9cd1d..57696a9bb 100644 --- a/src/datadogV1/model/model_monitor_threshold_window_options.rs +++ b/src/datadogV1/model/model_monitor_threshold_window_options.rs @@ -31,7 +31,18 @@ impl MonitorThresholdWindowOptions { trigger_window: None, } } + + pub fn recovery_window(&mut self, value: Option) -> &mut Self { + self.recovery_window = Some(value); + 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 833e08907..d2e07a3a5 100644 --- a/src/datadogV1/model/model_monitor_thresholds.rs +++ b/src/datadogV1/model/model_monitor_thresholds.rs @@ -55,7 +55,38 @@ impl MonitorThresholds { warning_recovery: None, } } + + pub fn critical(&mut self, value: f64) -> &mut Self { + self.critical = Some(value); + self + } + + pub fn critical_recovery(&mut self, value: Option) -> &mut Self { + self.critical_recovery = Some(value); + self + } + + pub fn ok(&mut self, value: Option) -> &mut Self { + self.ok = Some(value); + self + } + + pub fn unknown(&mut self, value: Option) -> &mut Self { + self.unknown = Some(value); + self + } + + pub fn warning(&mut self, value: Option) -> &mut Self { + self.warning = Some(value); + 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 fca72de61..2c0637641 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,7 +87,91 @@ impl MonitorUpdateRequest { type_: None, } } + + pub fn created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + self.creator = Some(value); + self + } + + pub fn deleted(&mut self, value: Option) -> &mut Self { + self.deleted = Some(value); + self + } + + pub fn id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn multi(&mut self, value: bool) -> &mut Self { + self.multi = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn options(&mut self, value: crate::datadogV1::model::MonitorOptions) -> &mut Self { + self.options = Some(value); + self + } + + pub fn overall_state( + &mut self, + value: crate::datadogV1::model::MonitorOverallStates, + ) -> &mut Self { + self.overall_state = Some(value); + self + } + + pub fn priority(&mut self, value: i64) -> &mut Self { + self.priority = Some(value); + self + } + + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn restricted_roles(&mut self, value: Option>) -> &mut Self { + self.restricted_roles = Some(value); + self + } + + pub fn state(&mut self, value: crate::datadogV1::model::MonitorState) -> &mut Self { + self.state = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + 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 6bdd07be4..d2d26310d 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,7 +51,54 @@ impl MonthlyUsageAttributionBody { values: None, } } + + pub fn month(&mut self, value: String) -> &mut Self { + self.month = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } + + pub fn tag_config_source(&mut self, value: String) -> &mut Self { + self.tag_config_source = Some(value); + self + } + + pub fn tags( + &mut self, + value: Option>>>, + ) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn updated_at(&mut self, value: String) -> &mut Self { + self.updated_at = Some(value); + self + } + + pub fn values( + &mut self, + value: crate::datadogV1::model::MonthlyUsageAttributionValues, + ) -> &mut Self { + self.values = Some(value); + 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 f781631aa..f69f9e289 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,7 +23,24 @@ impl MonthlyUsageAttributionMetadata { pagination: None, } } + + pub fn aggregates( + &mut self, + value: Vec, + ) -> &mut Self { + self.aggregates = Some(value); + self + } + + pub fn pagination( + &mut self, + value: crate::datadogV1::model::MonthlyUsageAttributionPagination, + ) -> &mut Self { + self.pagination = Some(value); + 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 1157d9315..09fa08430 100644 --- a/src/datadogV1/model/model_monthly_usage_attribution_pagination.rs +++ b/src/datadogV1/model/model_monthly_usage_attribution_pagination.rs @@ -23,7 +23,13 @@ impl MonthlyUsageAttributionPagination { next_record_id: None, } } + + 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 c742b6b23..42a69c33d 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,7 +23,24 @@ impl MonthlyUsageAttributionResponse { usage: None, } } + + pub fn metadata( + &mut self, + value: crate::datadogV1::model::MonthlyUsageAttributionMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 bd10675ee..3707e067b 100644 --- a/src/datadogV1/model/model_monthly_usage_attribution_values.rs +++ b/src/datadogV1/model/model_monthly_usage_attribution_values.rs @@ -495,7 +495,608 @@ impl MonthlyUsageAttributionValues { vuln_management_hosts_usage: None, } } + + pub fn api_percentage(&mut self, value: f64) -> &mut Self { + self.api_percentage = Some(value); + self + } + + pub fn api_usage(&mut self, value: f64) -> &mut Self { + self.api_usage = Some(value); + self + } + + pub fn apm_fargate_percentage(&mut self, value: f64) -> &mut Self { + self.apm_fargate_percentage = Some(value); + self + } + + pub fn apm_fargate_usage(&mut self, value: f64) -> &mut Self { + self.apm_fargate_usage = Some(value); + self + } + + pub fn apm_host_percentage(&mut self, value: f64) -> &mut Self { + self.apm_host_percentage = Some(value); + self + } + + pub fn apm_host_usage(&mut self, value: f64) -> &mut Self { + self.apm_host_usage = Some(value); + self + } + + pub fn apm_usm_percentage(&mut self, value: f64) -> &mut Self { + self.apm_usm_percentage = Some(value); + self + } + + pub fn apm_usm_usage(&mut self, value: f64) -> &mut Self { + self.apm_usm_usage = Some(value); + self + } + + pub fn appsec_fargate_percentage(&mut self, value: f64) -> &mut Self { + self.appsec_fargate_percentage = Some(value); + self + } + + pub fn appsec_fargate_usage(&mut self, value: f64) -> &mut Self { + self.appsec_fargate_usage = Some(value); + self + } + + pub fn appsec_percentage(&mut self, value: f64) -> &mut Self { + self.appsec_percentage = Some(value); + self + } + + pub fn appsec_usage(&mut self, value: f64) -> &mut Self { + self.appsec_usage = Some(value); + self + } + + pub fn browser_percentage(&mut self, value: f64) -> &mut Self { + self.browser_percentage = Some(value); + self + } + + pub fn browser_usage(&mut self, value: f64) -> &mut Self { + self.browser_usage = Some(value); + 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 ci_pipeline_indexed_spans_usage(&mut self, value: f64) -> &mut Self { + self.ci_pipeline_indexed_spans_usage = Some(value); + 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 ci_test_indexed_spans_usage(&mut self, value: f64) -> &mut Self { + self.ci_test_indexed_spans_usage = Some(value); + self + } + + pub fn ci_visibility_itr_percentage(&mut self, value: f64) -> &mut Self { + self.ci_visibility_itr_percentage = Some(value); + self + } + + pub fn ci_visibility_itr_usage(&mut self, value: f64) -> &mut Self { + self.ci_visibility_itr_usage = Some(value); + self + } + + pub fn cloud_siem_percentage(&mut self, value: f64) -> &mut Self { + self.cloud_siem_percentage = Some(value); + self + } + + pub fn cloud_siem_usage(&mut self, value: f64) -> &mut Self { + self.cloud_siem_usage = Some(value); + self + } + + pub fn container_excl_agent_percentage(&mut self, value: f64) -> &mut Self { + self.container_excl_agent_percentage = Some(value); + self + } + + pub fn container_excl_agent_usage(&mut self, value: f64) -> &mut Self { + self.container_excl_agent_usage = Some(value); + self + } + + pub fn container_percentage(&mut self, value: f64) -> &mut Self { + self.container_percentage = Some(value); + self + } + + pub fn container_usage(&mut self, value: f64) -> &mut Self { + self.container_usage = Some(value); + self + } + + pub fn cspm_containers_percentage(&mut self, value: f64) -> &mut Self { + self.cspm_containers_percentage = Some(value); + self + } + + pub fn cspm_containers_usage(&mut self, value: f64) -> &mut Self { + self.cspm_containers_usage = Some(value); + self + } + + pub fn cspm_hosts_percentage(&mut self, value: f64) -> &mut Self { + self.cspm_hosts_percentage = Some(value); + self + } + + pub fn cspm_hosts_usage(&mut self, value: f64) -> &mut Self { + self.cspm_hosts_usage = Some(value); + self + } + + pub fn custom_event_percentage(&mut self, value: f64) -> &mut Self { + self.custom_event_percentage = Some(value); + self + } + + pub fn custom_event_usage(&mut self, value: f64) -> &mut Self { + self.custom_event_usage = Some(value); + self + } + + pub fn custom_ingested_timeseries_percentage(&mut self, value: f64) -> &mut Self { + self.custom_ingested_timeseries_percentage = Some(value); + self + } + + pub fn custom_ingested_timeseries_usage(&mut self, value: f64) -> &mut Self { + self.custom_ingested_timeseries_usage = Some(value); + self + } + + pub fn custom_timeseries_percentage(&mut self, value: f64) -> &mut Self { + self.custom_timeseries_percentage = Some(value); + self + } + + pub fn custom_timeseries_usage(&mut self, value: f64) -> &mut Self { + self.custom_timeseries_usage = Some(value); + self + } + + pub fn cws_containers_percentage(&mut self, value: f64) -> &mut Self { + self.cws_containers_percentage = Some(value); + self + } + + pub fn cws_containers_usage(&mut self, value: f64) -> &mut Self { + self.cws_containers_usage = Some(value); + self + } + + pub fn cws_hosts_percentage(&mut self, value: f64) -> &mut Self { + self.cws_hosts_percentage = Some(value); + self + } + + pub fn cws_hosts_usage(&mut self, value: f64) -> &mut Self { + self.cws_hosts_usage = Some(value); + self + } + + pub fn dbm_hosts_percentage(&mut self, value: f64) -> &mut Self { + self.dbm_hosts_percentage = Some(value); + self + } + + pub fn dbm_hosts_usage(&mut self, value: f64) -> &mut Self { + self.dbm_hosts_usage = Some(value); + self + } + + pub fn dbm_queries_percentage(&mut self, value: f64) -> &mut Self { + self.dbm_queries_percentage = Some(value); + self + } + + pub fn dbm_queries_usage(&mut self, value: f64) -> &mut Self { + self.dbm_queries_usage = Some(value); + self + } + + pub fn estimated_indexed_logs_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_indexed_logs_percentage = Some(value); + self + } + + pub fn estimated_indexed_logs_usage(&mut self, value: f64) -> &mut Self { + self.estimated_indexed_logs_usage = Some(value); + self + } + + pub fn estimated_indexed_spans_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_indexed_spans_percentage = Some(value); + self + } + + pub fn estimated_indexed_spans_usage(&mut self, value: f64) -> &mut Self { + self.estimated_indexed_spans_usage = Some(value); + self + } + + pub fn estimated_ingested_logs_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_ingested_logs_percentage = Some(value); + self + } + + pub fn estimated_ingested_logs_usage(&mut self, value: f64) -> &mut Self { + self.estimated_ingested_logs_usage = Some(value); + self + } + + pub fn estimated_ingested_spans_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_ingested_spans_percentage = Some(value); + self + } + + pub fn estimated_ingested_spans_usage(&mut self, value: f64) -> &mut Self { + self.estimated_ingested_spans_usage = Some(value); + self + } + + pub fn estimated_rum_sessions_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_rum_sessions_percentage = Some(value); + self + } + + pub fn estimated_rum_sessions_usage(&mut self, value: f64) -> &mut Self { + self.estimated_rum_sessions_usage = Some(value); + self + } + + pub fn fargate_percentage(&mut self, value: f64) -> &mut Self { + self.fargate_percentage = Some(value); + self + } + + pub fn fargate_usage(&mut self, value: f64) -> &mut Self { + self.fargate_usage = Some(value); + self + } + + pub fn functions_percentage(&mut self, value: f64) -> &mut Self { + self.functions_percentage = Some(value); + self + } + + pub fn functions_usage(&mut self, value: f64) -> &mut Self { + self.functions_usage = Some(value); + self + } + + pub fn indexed_spans_percentage(&mut self, value: f64) -> &mut Self { + self.indexed_spans_percentage = Some(value); + self + } + + pub fn indexed_spans_usage(&mut self, value: f64) -> &mut Self { + self.indexed_spans_usage = Some(value); + self + } + + pub fn infra_host_percentage(&mut self, value: f64) -> &mut Self { + self.infra_host_percentage = Some(value); + self + } + + pub fn infra_host_usage(&mut self, value: f64) -> &mut Self { + self.infra_host_usage = Some(value); + self + } + + pub fn ingested_logs_bytes_percentage(&mut self, value: f64) -> &mut Self { + self.ingested_logs_bytes_percentage = Some(value); + self + } + + pub fn ingested_logs_bytes_usage(&mut self, value: f64) -> &mut Self { + self.ingested_logs_bytes_usage = Some(value); + self + } + + pub fn ingested_spans_bytes_percentage(&mut self, value: f64) -> &mut Self { + self.ingested_spans_bytes_percentage = Some(value); + self + } + + pub fn ingested_spans_bytes_usage(&mut self, value: f64) -> &mut Self { + self.ingested_spans_bytes_usage = Some(value); + self + } + + pub fn invocations_percentage(&mut self, value: f64) -> &mut Self { + self.invocations_percentage = Some(value); + self + } + + pub fn invocations_usage(&mut self, value: f64) -> &mut Self { + self.invocations_usage = Some(value); + self + } + + pub fn lambda_traced_invocations_percentage(&mut self, value: f64) -> &mut Self { + self.lambda_traced_invocations_percentage = Some(value); + self + } + + pub fn lambda_traced_invocations_usage(&mut self, value: f64) -> &mut Self { + self.lambda_traced_invocations_usage = Some(value); + self + } + + pub fn logs_indexed_15day_percentage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_15day_percentage = Some(value); + self + } + + pub fn logs_indexed_15day_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_15day_usage = Some(value); + self + } + + pub fn logs_indexed_180day_percentage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_180day_percentage = Some(value); + self + } + + pub fn logs_indexed_180day_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_180day_usage = Some(value); + self + } + + pub fn logs_indexed_30day_percentage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_30day_percentage = Some(value); + self + } + + pub fn logs_indexed_30day_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_30day_usage = Some(value); + self + } + + pub fn logs_indexed_360day_percentage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_360day_percentage = Some(value); + self + } + + pub fn logs_indexed_360day_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_360day_usage = Some(value); + self + } + + pub fn logs_indexed_3day_percentage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_3day_percentage = Some(value); + self + } + + pub fn logs_indexed_3day_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_3day_usage = Some(value); + self + } + + pub fn logs_indexed_45day_percentage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_45day_percentage = Some(value); + self + } + + pub fn logs_indexed_45day_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_45day_usage = Some(value); + self + } + + pub fn logs_indexed_60day_percentage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_60day_percentage = Some(value); + self + } + + pub fn logs_indexed_60day_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_60day_usage = Some(value); + self + } + + pub fn logs_indexed_7day_percentage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_7day_percentage = Some(value); + self + } + + pub fn logs_indexed_7day_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_7day_usage = Some(value); + self + } + + pub fn logs_indexed_90day_percentage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_90day_percentage = Some(value); + self + } + + pub fn logs_indexed_90day_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_90day_usage = Some(value); + 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 logs_indexed_custom_retention_usage(&mut self, value: f64) -> &mut Self { + self.logs_indexed_custom_retention_usage = Some(value); + self + } + + pub fn mobile_app_testing_percentage(&mut self, value: f64) -> &mut Self { + self.mobile_app_testing_percentage = Some(value); + self + } + + pub fn mobile_app_testing_usage(&mut self, value: f64) -> &mut Self { + self.mobile_app_testing_usage = Some(value); + self + } + + pub fn ndm_netflow_percentage(&mut self, value: f64) -> &mut Self { + self.ndm_netflow_percentage = Some(value); + self + } + + pub fn ndm_netflow_usage(&mut self, value: f64) -> &mut Self { + self.ndm_netflow_usage = Some(value); + self + } + + pub fn npm_host_percentage(&mut self, value: f64) -> &mut Self { + self.npm_host_percentage = Some(value); + self + } + + pub fn npm_host_usage(&mut self, value: f64) -> &mut Self { + self.npm_host_usage = Some(value); + self + } + + pub fn obs_pipeline_bytes_percentage(&mut self, value: f64) -> &mut Self { + self.obs_pipeline_bytes_percentage = Some(value); + self + } + + pub fn obs_pipeline_bytes_usage(&mut self, value: f64) -> &mut Self { + self.obs_pipeline_bytes_usage = Some(value); + self + } + + pub fn profiled_container_percentage(&mut self, value: f64) -> &mut Self { + self.profiled_container_percentage = Some(value); + self + } + + pub fn profiled_container_usage(&mut self, value: f64) -> &mut Self { + self.profiled_container_usage = Some(value); + self + } + + pub fn profiled_fargate_percentage(&mut self, value: f64) -> &mut Self { + self.profiled_fargate_percentage = Some(value); + self + } + + pub fn profiled_fargate_usage(&mut self, value: f64) -> &mut Self { + self.profiled_fargate_usage = Some(value); + self + } + + pub fn profiled_host_percentage(&mut self, value: f64) -> &mut Self { + self.profiled_host_percentage = Some(value); + self + } + + pub fn profiled_host_usage(&mut self, value: f64) -> &mut Self { + self.profiled_host_usage = Some(value); + 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 rum_browser_mobile_sessions_usage(&mut self, value: f64) -> &mut Self { + self.rum_browser_mobile_sessions_usage = Some(value); + self + } + + pub fn rum_replay_sessions_percentage(&mut self, value: f64) -> &mut Self { + self.rum_replay_sessions_percentage = Some(value); + self + } + + pub fn rum_replay_sessions_usage(&mut self, value: f64) -> &mut Self { + self.rum_replay_sessions_usage = Some(value); + self + } + + pub fn sds_scanned_bytes_percentage(&mut self, value: f64) -> &mut Self { + self.sds_scanned_bytes_percentage = Some(value); + self + } + + pub fn sds_scanned_bytes_usage(&mut self, value: f64) -> &mut Self { + self.sds_scanned_bytes_usage = Some(value); + self + } + + pub fn serverless_apps_percentage(&mut self, value: f64) -> &mut Self { + self.serverless_apps_percentage = Some(value); + self + } + + pub fn serverless_apps_usage(&mut self, value: f64) -> &mut Self { + self.serverless_apps_usage = Some(value); + self + } + + pub fn siem_ingested_bytes_percentage(&mut self, value: f64) -> &mut Self { + self.siem_ingested_bytes_percentage = Some(value); + self + } + + pub fn siem_ingested_bytes_usage(&mut self, value: f64) -> &mut Self { + self.siem_ingested_bytes_usage = Some(value); + self + } + + pub fn snmp_percentage(&mut self, value: f64) -> &mut Self { + self.snmp_percentage = Some(value); + self + } + + pub fn snmp_usage(&mut self, value: f64) -> &mut Self { + self.snmp_usage = Some(value); + self + } + + pub fn universal_service_monitoring_percentage(&mut self, value: f64) -> &mut Self { + self.universal_service_monitoring_percentage = Some(value); + self + } + + pub fn universal_service_monitoring_usage(&mut self, value: f64) -> &mut Self { + self.universal_service_monitoring_usage = Some(value); + self + } + + pub fn vuln_management_hosts_percentage(&mut self, value: f64) -> &mut Self { + self.vuln_management_hosts_percentage = Some(value); + 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 a70338a95..c59ecb0cd 100644 --- a/src/datadogV1/model/model_note_widget_definition.rs +++ b/src/datadogV1/model/model_note_widget_definition.rs @@ -58,4 +58,47 @@ impl NoteWidgetDefinition { vertical_align: None, } } + + pub fn background_color(&mut self, value: String) -> &mut Self { + self.background_color = Some(value); + self + } + + pub fn font_size(&mut self, value: String) -> &mut Self { + self.font_size = Some(value); + self + } + + pub fn has_padding(&mut self, value: bool) -> &mut Self { + self.has_padding = Some(value); + self + } + + pub fn show_tick(&mut self, value: bool) -> &mut Self { + self.show_tick = Some(value); + self + } + + pub fn text_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.text_align = Some(value); + self + } + + pub fn tick_edge(&mut self, value: crate::datadogV1::model::WidgetTickEdge) -> &mut Self { + self.tick_edge = Some(value); + self + } + + pub fn tick_pos(&mut self, value: String) -> &mut Self { + self.tick_pos = Some(value); + self + } + + pub fn 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..ab3915f00 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 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..11c0742f0 100644 --- a/src/datadogV1/model/model_notebook_author.rs +++ b/src/datadogV1/model/model_notebook_author.rs @@ -51,7 +51,53 @@ impl NotebookAuthor { verified: None, } } + + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn disabled(&mut self, value: bool) -> &mut Self { + self.disabled = Some(value); + self + } + + pub fn email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + self + } + + pub fn icon(&mut self, value: String) -> &mut Self { + self.icon = Some(value); + self + } + + pub fn name(&mut self, value: Option) -> &mut Self { + self.name = Some(value); + self + } + + pub fn status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + self + } + + pub fn title(&mut self, value: Option) -> &mut Self { + self.title = Some(value); + 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.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_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_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_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..9f2a414b5 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 metadata(&mut self, value: crate::datadogV1::model::NotebookMetadata) -> &mut Self { + self.metadata = Some(value); + 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_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..3c88d3c81 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,19 @@ impl NotebookDistributionCellAttributes { time: None, } } + + pub fn graph_size(&mut self, value: crate::datadogV1::model::NotebookGraphSize) -> &mut Self { + self.graph_size = Some(value); + self + } + + pub fn split_by(&mut self, value: crate::datadogV1::model::NotebookSplitBy) -> &mut Self { + self.split_by = Some(value); + self + } + + pub fn time(&mut self, value: Option) -> &mut Self { + self.time = Some(value); + self + } } 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..86650b9f3 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,19 @@ impl NotebookHeatMapCellAttributes { time: None, } } + + pub fn graph_size(&mut self, value: crate::datadogV1::model::NotebookGraphSize) -> &mut Self { + self.graph_size = Some(value); + self + } + + pub fn split_by(&mut self, value: crate::datadogV1::model::NotebookSplitBy) -> &mut Self { + self.split_by = Some(value); + 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 b506a5e2b..e89d96f15 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,14 @@ impl NotebookLogStreamCellAttributes { time: None, } } + + pub fn graph_size(&mut self, value: crate::datadogV1::model::NotebookGraphSize) -> &mut Self { + self.graph_size = Some(value); + self + } + + pub fn 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..044617e61 100644 --- a/src/datadogV1/model/model_notebook_metadata.rs +++ b/src/datadogV1/model/model_notebook_metadata.rs @@ -27,7 +27,26 @@ impl NotebookMetadata { type_: None, } } + + pub fn is_template(&mut self, value: bool) -> &mut Self { + self.is_template = Some(value); + self + } + + pub fn take_snapshots(&mut self, value: bool) -> &mut Self { + self.take_snapshots = Some(value); + self + } + + pub fn type_( + &mut self, + value: Option, + ) -> &mut Self { + self.type_ = Some(value); + 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 0295082f3..026fa1bb0 100644 --- a/src/datadogV1/model/model_notebook_response.rs +++ b/src/datadogV1/model/model_notebook_response.rs @@ -10,14 +10,20 @@ 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 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.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..435b3b6e9 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 author(&mut self, value: crate::datadogV1::model::NotebookAuthor) -> &mut Self { + self.author = Some(value); + self + } + + pub fn created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn metadata(&mut self, value: crate::datadogV1::model::NotebookMetadata) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + 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 3927cfcb4..fbdb0b4f2 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,19 @@ impl NotebookTimeseriesCellAttributes { time: None, } } + + pub fn graph_size(&mut self, value: crate::datadogV1::model::NotebookGraphSize) -> &mut Self { + self.graph_size = Some(value); + self + } + + pub fn split_by(&mut self, value: crate::datadogV1::model::NotebookSplitBy) -> &mut Self { + self.split_by = Some(value); + 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 e8d5043bb..971e1fb4a 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,19 @@ impl NotebookToplistCellAttributes { time: None, } } + + pub fn graph_size(&mut self, value: crate::datadogV1::model::NotebookGraphSize) -> &mut Self { + self.graph_size = Some(value); + self + } + + pub fn split_by(&mut self, value: crate::datadogV1::model::NotebookSplitBy) -> &mut Self { + self.split_by = Some(value); + self + } + + pub fn time(&mut self, value: Option) -> &mut Self { + self.time = Some(value); + self + } } 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..5dd8e7096 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 metadata(&mut self, value: crate::datadogV1::model::NotebookMetadata) -> &mut Self { + self.metadata = Some(value); + 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_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..7860b5803 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,7 +23,21 @@ impl NotebooksResponse { meta: None, } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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.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..c8e0e0791 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 author(&mut self, value: crate::datadogV1::model::NotebookAuthor) -> &mut Self { + self.author = Some(value); + self + } + + pub fn cells( + &mut self, + value: Vec, + ) -> &mut Self { + self.cells = Some(value); + self + } + + pub fn created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn metadata(&mut self, value: crate::datadogV1::model::NotebookMetadata) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn status(&mut self, value: crate::datadogV1::model::NotebookStatus) -> &mut Self { + self.status = Some(value); + 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 768e4e4f5..5640ef0cd 100644 --- a/src/datadogV1/model/model_notebooks_response_meta.rs +++ b/src/datadogV1/model/model_notebooks_response_meta.rs @@ -10,14 +10,20 @@ 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 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 f48e39de4..cf420a32c 100644 --- a/src/datadogV1/model/model_notebooks_response_page.rs +++ b/src/datadogV1/model/model_notebooks_response_page.rs @@ -23,7 +23,18 @@ impl NotebooksResponsePage { total_filtered_count: None, } } + + pub fn total_count(&mut self, value: i64) -> &mut Self { + self.total_count = Some(value); + 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 12b602c73..4bfdcf97b 100644 --- a/src/datadogV1/model/model_org_downgraded_response.rs +++ b/src/datadogV1/model/model_org_downgraded_response.rs @@ -17,7 +17,13 @@ impl OrgDowngradedResponse { pub fn new() -> OrgDowngradedResponse { OrgDowngradedResponse { message: None } } + + 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 c612e73c7..184afd05b 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,7 +50,59 @@ impl Organization { trial: None, } } + + #[allow(deprecated)] + pub fn billing(&mut self, value: crate::datadogV1::model::OrganizationBilling) -> &mut Self { + self.billing = Some(value); + self + } + + #[allow(deprecated)] + pub fn created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + #[allow(deprecated)] + pub fn description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + #[allow(deprecated)] + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + #[allow(deprecated)] + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + #[allow(deprecated)] + pub fn settings(&mut self, value: crate::datadogV1::model::OrganizationSettings) -> &mut Self { + self.settings = Some(value); + self + } + + #[allow(deprecated)] + pub fn subscription( + &mut self, + value: crate::datadogV1::model::OrganizationSubscription, + ) -> &mut Self { + self.subscription = Some(value); + self + } + + #[allow(deprecated)] + 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 e8293d233..797d97b8c 100644 --- a/src/datadogV1/model/model_organization_billing.rs +++ b/src/datadogV1/model/model_organization_billing.rs @@ -17,7 +17,13 @@ impl OrganizationBilling { pub fn new() -> OrganizationBilling { OrganizationBilling { type_: None } } + + 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 52129c57b..b1625cb25 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,19 @@ impl OrganizationCreateBody { subscription: None, } } + + #[allow(deprecated)] + pub fn billing(&mut self, value: crate::datadogV1::model::OrganizationBilling) -> &mut Self { + self.billing = Some(value); + self + } + + #[allow(deprecated)] + pub fn 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..4165c62d0 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,7 +31,28 @@ impl OrganizationCreateResponse { user: None, } } + + pub fn api_key(&mut self, value: crate::datadogV1::model::ApiKey) -> &mut Self { + self.api_key = Some(value); + self + } + + pub fn application_key(&mut self, value: crate::datadogV1::model::ApplicationKey) -> &mut Self { + self.application_key = Some(value); + self + } + + pub fn org(&mut self, value: crate::datadogV1::model::Organization) -> &mut Self { + self.org = Some(value); + 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 8876f1900..d603b6b55 100644 --- a/src/datadogV1/model/model_organization_list_response.rs +++ b/src/datadogV1/model/model_organization_list_response.rs @@ -17,7 +17,13 @@ impl OrganizationListResponse { pub fn new() -> OrganizationListResponse { OrganizationListResponse { orgs: None } } + + 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 ad41821ed..045b2a50d 100644 --- a/src/datadogV1/model/model_organization_response.rs +++ b/src/datadogV1/model/model_organization_response.rs @@ -10,14 +10,20 @@ 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 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 7f8efae01..71a73b137 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,7 +62,70 @@ impl OrganizationSettings { saml_strict_mode: None, } } + + pub fn private_widget_share(&mut self, value: bool) -> &mut Self { + self.private_widget_share = Some(value); + self + } + + pub fn saml(&mut self, value: crate::datadogV1::model::OrganizationSettingsSaml) -> &mut Self { + self.saml = Some(value); + self + } + + pub fn saml_autocreate_access_role( + &mut self, + value: Option, + ) -> &mut Self { + self.saml_autocreate_access_role = Some(value); + self + } + + pub fn saml_autocreate_users_domains( + &mut self, + value: crate::datadogV1::model::OrganizationSettingsSamlAutocreateUsersDomains, + ) -> &mut Self { + self.saml_autocreate_users_domains = Some(value); + self + } + + pub fn saml_can_be_enabled(&mut self, value: bool) -> &mut Self { + self.saml_can_be_enabled = Some(value); + self + } + + pub fn saml_idp_endpoint(&mut self, value: String) -> &mut Self { + self.saml_idp_endpoint = Some(value); + self + } + + pub fn saml_idp_initiated_login( + &mut self, + value: crate::datadogV1::model::OrganizationSettingsSamlIdpInitiatedLogin, + ) -> &mut Self { + self.saml_idp_initiated_login = Some(value); + self + } + + pub fn saml_idp_metadata_uploaded(&mut self, value: bool) -> &mut Self { + self.saml_idp_metadata_uploaded = Some(value); + self + } + + pub fn saml_login_url(&mut self, value: String) -> &mut Self { + self.saml_login_url = Some(value); + self + } + + pub fn 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 { Self::new() diff --git a/src/datadogV1/model/model_organization_settings_saml.rs b/src/datadogV1/model/model_organization_settings_saml.rs index 9afe36a58..e2572031d 100644 --- a/src/datadogV1/model/model_organization_settings_saml.rs +++ b/src/datadogV1/model/model_organization_settings_saml.rs @@ -18,7 +18,13 @@ impl OrganizationSettingsSaml { pub fn new() -> OrganizationSettingsSaml { OrganizationSettingsSaml { enabled: None } } + + 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 4acbf097b..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 @@ -23,7 +23,18 @@ impl OrganizationSettingsSamlAutocreateUsersDomains { enabled: None, } } + + pub fn domains(&mut self, value: Vec) -> &mut Self { + self.domains = Some(value); + 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 ae482f117..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 @@ -18,7 +18,13 @@ impl OrganizationSettingsSamlIdpInitiatedLogin { pub fn new() -> OrganizationSettingsSamlIdpInitiatedLogin { OrganizationSettingsSamlIdpInitiatedLogin { enabled: None } } + + 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 f2008540f..95ce8e083 100644 --- a/src/datadogV1/model/model_organization_settings_saml_strict_mode.rs +++ b/src/datadogV1/model/model_organization_settings_saml_strict_mode.rs @@ -18,7 +18,13 @@ impl OrganizationSettingsSamlStrictMode { pub fn new() -> OrganizationSettingsSamlStrictMode { OrganizationSettingsSamlStrictMode { enabled: None } } + + 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 98ccf49b6..dfb867ab6 100644 --- a/src/datadogV1/model/model_organization_subscription.rs +++ b/src/datadogV1/model/model_organization_subscription.rs @@ -17,7 +17,13 @@ impl OrganizationSubscription { pub fn new() -> OrganizationSubscription { OrganizationSubscription { type_: None } } + + 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 dbbe59bca..e5e97e1e1 100644 --- a/src/datadogV1/model/model_pagination.rs +++ b/src/datadogV1/model/model_pagination.rs @@ -23,7 +23,18 @@ impl Pagination { total_filtered_count: None, } } + + pub fn total_count(&mut self, value: i64) -> &mut Self { + self.total_count = Some(value); + 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 557b45bba..75175a3ca 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 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..892861427 100644 --- a/src/datadogV1/model/model_powerpack_template_variables.rs +++ b/src/datadogV1/model/model_powerpack_template_variables.rs @@ -25,7 +25,24 @@ impl PowerpackTemplateVariables { controlled_externally: None, } } + + pub fn controlled_by_powerpack( + &mut self, + value: Vec, + ) -> &mut Self { + self.controlled_by_powerpack = Some(value); + self + } + + pub fn controlled_externally( + &mut self, + value: Vec, + ) -> &mut Self { + self.controlled_externally = Some(value); + 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 ace4febb7..f59e5eebe 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 background_color(&mut self, value: String) -> &mut Self { + self.background_color = Some(value); + self + } + + pub fn banner_img(&mut self, value: String) -> &mut Self { + self.banner_img = Some(value); + self + } + + pub fn show_title(&mut self, value: bool) -> &mut Self { + self.show_title = Some(value); + self + } + + pub fn template_variables( + &mut self, + value: crate::datadogV1::model::PowerpackTemplateVariables, + ) -> &mut Self { + self.template_variables = Some(value); + 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 cfc7bb576..bb8edfabf 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 filter_by(&mut self, value: Vec) -> &mut Self { + self.filter_by = Some(value); + self + } + + pub fn limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + 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 fc59385f4..b114a2ac7 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,60 @@ impl QueryValueWidgetDefinition { type_, } } + + pub fn autoscale(&mut self, value: bool) -> &mut Self { + self.autoscale = Some(value); + self + } + + pub fn custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn custom_unit(&mut self, value: String) -> &mut Self { + self.custom_unit = Some(value); + self + } + + pub fn precision(&mut self, value: i64) -> &mut Self { + self.precision = Some(value); + self + } + + pub fn text_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.text_align = Some(value); + self + } + + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn timeseries_background( + &mut self, + value: crate::datadogV1::model::TimeseriesBackground, + ) -> &mut Self { + self.timeseries_background = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + 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 bc43a6885..0cec9092b 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,7 +75,104 @@ impl QueryValueWidgetRequest { security_query: None, } } + + pub fn aggregator(&mut self, value: crate::datadogV1::model::WidgetAggregator) -> &mut Self { + self.aggregator = Some(value); + self + } + + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn audit_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.audit_query = Some(value); + self + } + + pub fn conditional_formats( + &mut self, + value: Vec, + ) -> &mut Self { + self.conditional_formats = Some(value); + self + } + + pub fn event_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn formulas(&mut self, value: Vec) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + self + } + + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + 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 09e9a97d0..64841686b 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 is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + 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 17056f88d..25f3c261d 100644 --- a/src/datadogV1/model/model_response_meta_attributes.rs +++ b/src/datadogV1/model/model_response_meta_attributes.rs @@ -10,14 +10,20 @@ 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 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 ed5d98127..164ad19a7 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,40 @@ impl RunWorkflowWidgetDefinition { workflow_id, } } + + pub fn custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn inputs( + &mut self, + value: Vec, + ) -> &mut Self { + self.inputs = Some(value); + self + } + + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + 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 6783dfab7..f7a289293 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,7 +55,73 @@ impl ScatterPlotRequest { security_query: None, } } + + pub fn aggregator( + &mut self, + value: crate::datadogV1::model::ScatterplotWidgetAggregator, + ) -> &mut Self { + self.aggregator = Some(value); + self + } + + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn event_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + 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 54c18d411..b77689e45 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,47 @@ impl ScatterPlotWidgetDefinition { yaxis: None, } } + + pub fn color_by_groups(&mut self, value: Vec) -> &mut Self { + self.color_by_groups = Some(value); + self + } + + pub fn custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + self + } + + pub fn xaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { + self.xaxis = Some(value); + 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 d06115da8..7e37013d9 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,7 +27,23 @@ impl ScatterPlotWidgetDefinitionRequests { y: None, } } + + pub fn table(&mut self, value: crate::datadogV1::model::ScatterplotTableRequest) -> &mut Self { + self.table = Some(value); + self + } + + pub fn x(&mut self, value: crate::datadogV1::model::ScatterPlotRequest) -> &mut Self { + self.x = Some(value); + 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 c8f33999a..40c9b7810 100644 --- a/src/datadogV1/model/model_scatterplot_table_request.rs +++ b/src/datadogV1/model/model_scatterplot_table_request.rs @@ -27,7 +27,32 @@ impl ScatterplotTableRequest { response_format: None, } } + + pub fn formulas( + &mut self, + value: Vec, + ) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + 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 83818db2b..bc6ebc50e 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 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..6c30b6a49 100644 --- a/src/datadogV1/model/model_search_service_level_objective.rs +++ b/src/datadogV1/model/model_search_service_level_objective.rs @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: crate::datadogV1::model::SearchServiceLevelObjectiveData, + ) -> &mut Self { + self.data = Some(value); + 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 e00f9a0a5..afefa05e8 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,7 +105,94 @@ impl SearchServiceLevelObjectiveAttributes { thresholds: None, } } + + pub fn all_tags(&mut self, value: Vec) -> &mut Self { + self.all_tags = Some(value); + self + } + + pub fn created_at(&mut self, value: i64) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn creator(&mut self, value: Option) -> &mut Self { + self.creator = Some(value); + self + } + + pub fn description(&mut self, value: Option) -> &mut Self { + self.description = Some(value); + self + } + + pub fn env_tags(&mut self, value: Vec) -> &mut Self { + self.env_tags = Some(value); + self + } + + pub fn groups(&mut self, value: Option>) -> &mut Self { + self.groups = Some(value); + self + } + + pub fn modified_at(&mut self, value: i64) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn monitor_ids(&mut self, value: Option>) -> &mut Self { + self.monitor_ids = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn overall_status( + &mut self, + value: Vec, + ) -> &mut Self { + self.overall_status = Some(value); + self + } + + pub fn query(&mut self, value: Option) -> &mut Self { + self.query = Some(value); + self + } + + pub fn service_tags(&mut self, value: Vec) -> &mut Self { + self.service_tags = Some(value); + self + } + + pub fn slo_type(&mut self, value: crate::datadogV1::model::SLOType) -> &mut Self { + self.slo_type = Some(value); + self + } + + pub fn status(&mut self, value: crate::datadogV1::model::SLOStatus) -> &mut Self { + self.status = Some(value); + self + } + + pub fn team_tags(&mut self, value: Vec) -> &mut Self { + self.team_tags = Some(value); + self + } + + pub fn thresholds( + &mut self, + value: Vec, + ) -> &mut Self { + self.thresholds = Some(value); + 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 e9aa6d766..d4d0f08e5 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,7 +30,26 @@ impl SearchServiceLevelObjectiveData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV1::model::SearchServiceLevelObjectiveAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 eefd50b4c..0a4767771 100644 --- a/src/datadogV1/model/model_search_slo_query.rs +++ b/src/datadogV1/model/model_search_slo_query.rs @@ -34,7 +34,23 @@ impl SearchSLOQuery { numerator: None, } } + + pub fn denominator(&mut self, value: String) -> &mut Self { + self.denominator = Some(value); + self + } + + pub fn metrics(&mut self, value: Option>) -> &mut Self { + self.metrics = Some(value); + 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 9fab48ea4..6b9ac65c4 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,7 +27,23 @@ impl SearchSLOResponse { meta: None, } } + + pub fn data(&mut self, value: crate::datadogV1::model::SearchSLOResponseData) -> &mut Self { + self.data = Some(value); + self + } + + pub fn links(&mut self, value: crate::datadogV1::model::SearchSLOResponseLinks) -> &mut Self { + self.links = Some(value); + 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 14bbe5f09..a3747f59f 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,7 +23,21 @@ impl SearchSLOResponseData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV1::model::SearchSLOResponseDataAttributes, + ) -> &mut Self { + self.attributes = Some(value); + 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 ea5cc24e1..21aee476b 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,7 +23,24 @@ impl SearchSLOResponseDataAttributes { slos: None, } } + + pub fn facets( + &mut self, + value: crate::datadogV1::model::SearchSLOResponseDataAttributesFacets, + ) -> &mut Self { + self.facets = Some(value); + self + } + + pub fn slos( + &mut self, + value: Vec, + ) -> &mut Self { + self.slos = Some(value); + 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 720cce66b..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 @@ -55,7 +55,72 @@ impl SearchSLOResponseDataAttributesFacets { timeframe: None, } } + + pub fn all_tags( + &mut self, + value: Vec, + ) -> &mut Self { + self.all_tags = Some(value); + self + } + + pub fn creator_name( + &mut self, + value: Vec, + ) -> &mut Self { + self.creator_name = Some(value); + self + } + + pub fn env_tags( + &mut self, + value: Vec, + ) -> &mut Self { + self.env_tags = Some(value); + self + } + + pub fn service_tags( + &mut self, + value: Vec, + ) -> &mut Self { + self.service_tags = Some(value); + self + } + + pub fn slo_type( + &mut self, + value: Vec, + ) -> &mut Self { + self.slo_type = Some(value); + self + } + + pub fn target( + &mut self, + value: Vec, + ) -> &mut Self { + self.target = Some(value); + self + } + + pub fn team_tags( + &mut self, + value: Vec, + ) -> &mut Self { + self.team_tags = Some(value); + self + } + + pub fn timeframe( + &mut self, + value: Vec, + ) -> &mut Self { + self.timeframe = Some(value); + 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 c27ae1e23..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 @@ -23,7 +23,18 @@ impl SearchSLOResponseDataAttributesFacetsObjectInt { name: None, } } + + pub fn count(&mut self, value: i64) -> &mut Self { + self.count = Some(value); + 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 c46e9d0a4..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 @@ -23,7 +23,18 @@ impl SearchSLOResponseDataAttributesFacetsObjectString { name: None, } } + + pub fn count(&mut self, value: i64) -> &mut Self { + self.count = Some(value); + 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 87b7eef1e..2dad89362 100644 --- a/src/datadogV1/model/model_search_slo_response_links.rs +++ b/src/datadogV1/model/model_search_slo_response_links.rs @@ -35,7 +35,33 @@ impl SearchSLOResponseLinks { self_: None, } } + + pub fn first(&mut self, value: String) -> &mut Self { + self.first = Some(value); + self + } + + pub fn last(&mut self, value: Option) -> &mut Self { + self.last = Some(value); + self + } + + pub fn next(&mut self, value: String) -> &mut Self { + self.next = Some(value); + self + } + + pub fn prev(&mut self, value: Option) -> &mut Self { + self.prev = Some(value); + 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 4039304af..d3dfad7a9 100644 --- a/src/datadogV1/model/model_search_slo_response_meta.rs +++ b/src/datadogV1/model/model_search_slo_response_meta.rs @@ -10,14 +10,23 @@ 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 pagination( + &mut self, + value: crate::datadogV1::model::SearchSLOResponseMetaPage, + ) -> &mut Self { + self.pagination = Some(value); + 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 7ff0ebf85..b817aebee 100644 --- a/src/datadogV1/model/model_search_slo_response_meta_page.rs +++ b/src/datadogV1/model/model_search_slo_response_meta_page.rs @@ -47,7 +47,48 @@ impl SearchSLOResponseMetaPage { type_: None, } } + + pub fn first_number(&mut self, value: i64) -> &mut Self { + self.first_number = Some(value); + self + } + + pub fn last_number(&mut self, value: i64) -> &mut Self { + self.last_number = Some(value); + self + } + + pub fn next_number(&mut self, value: i64) -> &mut Self { + self.next_number = Some(value); + self + } + + pub fn number(&mut self, value: i64) -> &mut Self { + self.number = Some(value); + self + } + + pub fn prev_number(&mut self, value: i64) -> &mut Self { + self.prev_number = Some(value); + self + } + + pub fn size(&mut self, value: i64) -> &mut Self { + self.size = Some(value); + self + } + + pub fn total(&mut self, value: i64) -> &mut Self { + self.total = Some(value); + 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 2573d1864..9cf193b68 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 target_display(&mut self, value: String) -> &mut Self { + self.target_display = Some(value); + self + } + + pub fn warning(&mut self, value: Option) -> &mut Self { + self.warning = Some(value); + 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 cc5a7bb3a..d19b55237 100644 --- a/src/datadogV1/model/model_selectable_template_variable_items.rs +++ b/src/datadogV1/model/model_selectable_template_variable_items.rs @@ -35,7 +35,28 @@ impl SelectableTemplateVariableItems { visible_tags: None, } } + + pub fn default_value(&mut self, value: String) -> &mut Self { + self.default_value = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn prefix(&mut self, value: String) -> &mut Self { + self.prefix = Some(value); + 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 0ad12ceab..7119fda5e 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 host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn interval(&mut self, value: Option) -> &mut Self { + self.interval = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + 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 a2528b561..b4027a3ec 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 message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + 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 a1ab44fda..5be0353d5 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 created_at(&mut self, value: i64) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + self.creator = Some(value); + self + } + + pub fn description(&mut self, value: Option) -> &mut Self { + self.description = Some(value); + self + } + + pub fn groups(&mut self, value: Vec) -> &mut Self { + self.groups = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn modified_at(&mut self, value: i64) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn monitor_ids(&mut self, value: Vec) -> &mut Self { + self.monitor_ids = Some(value); + self + } + + pub fn monitor_tags(&mut self, value: Vec) -> &mut Self { + self.monitor_tags = Some(value); + self + } + + pub fn query( + &mut self, + value: crate::datadogV1::model::ServiceLevelObjectiveQuery, + ) -> &mut Self { + self.query = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn target_threshold(&mut self, value: f64) -> &mut Self { + self.target_threshold = Some(value); + self + } + + pub fn timeframe(&mut self, value: crate::datadogV1::model::SLOTimeframe) -> &mut Self { + self.timeframe = Some(value); + 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 450c1b834..c4982d13d 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 description(&mut self, value: Option) -> &mut Self { + self.description = Some(value); + self + } + + pub fn groups(&mut self, value: Vec) -> &mut Self { + self.groups = Some(value); + self + } + + pub fn monitor_ids(&mut self, value: Vec) -> &mut Self { + self.monitor_ids = Some(value); + self + } + + pub fn query( + &mut self, + value: crate::datadogV1::model::ServiceLevelObjectiveQuery, + ) -> &mut Self { + self.query = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn target_threshold(&mut self, value: f64) -> &mut Self { + self.target_threshold = Some(value); + self + } + + pub fn timeframe(&mut self, value: crate::datadogV1::model::SLOTimeframe) -> &mut Self { + self.timeframe = Some(value); + 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 646025ae8..18651ee06 100644 --- a/src/datadogV1/model/model_service_map_widget_definition.rs +++ b/src/datadogV1/model/model_service_map_widget_definition.rs @@ -47,4 +47,27 @@ impl ServiceMapWidgetDefinition { type_, } } + + pub fn custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + 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 b1057cd35..b3d226326 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,67 @@ impl ServiceSummaryWidgetDefinition { type_, } } + + pub fn display_format( + &mut self, + value: crate::datadogV1::model::WidgetServiceSummaryDisplayFormat, + ) -> &mut Self { + self.display_format = Some(value); + self + } + + pub fn show_breakdown(&mut self, value: bool) -> &mut Self { + self.show_breakdown = Some(value); + self + } + + pub fn show_distribution(&mut self, value: bool) -> &mut Self { + self.show_distribution = Some(value); + self + } + + pub fn show_errors(&mut self, value: bool) -> &mut Self { + self.show_errors = Some(value); + self + } + + pub fn show_hits(&mut self, value: bool) -> &mut Self { + self.show_hits = Some(value); + self + } + + pub fn show_latency(&mut self, value: bool) -> &mut Self { + self.show_latency = Some(value); + self + } + + pub fn show_resource_list(&mut self, value: bool) -> &mut Self { + self.show_resource_list = Some(value); + self + } + + pub fn size_format(&mut self, value: crate::datadogV1::model::WidgetSizeFormat) -> &mut Self { + self.size_format = Some(value); + self + } + + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + 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 893d46d74..0b6e52716 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,58 @@ impl SharedDashboard { token: None, } } + + pub fn author(&mut self, value: crate::datadogV1::model::SharedDashboardAuthor) -> &mut Self { + self.author = Some(value); + self + } + + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn global_time( + &mut self, + value: crate::datadogV1::model::DashboardGlobalTime, + ) -> &mut Self { + self.global_time = Some(value); + self + } + + pub fn global_time_selectable_enabled(&mut self, value: Option) -> &mut Self { + self.global_time_selectable_enabled = Some(value); + self + } + + pub fn public_url(&mut self, value: String) -> &mut Self { + self.public_url = Some(value); + self + } + + pub fn selectable_template_vars( + &mut self, + value: Option>, + ) -> &mut Self { + self.selectable_template_vars = Some(value); + self + } + + pub fn share_list(&mut self, value: Option>) -> &mut Self { + self.share_list = Some(value); + self + } + + pub fn share_type( + &mut self, + value: Option, + ) -> &mut Self { + self.share_type = Some(value); + 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 aa4809a30..9f8ed9540 100644 --- a/src/datadogV1/model/model_shared_dashboard_author.rs +++ b/src/datadogV1/model/model_shared_dashboard_author.rs @@ -23,7 +23,18 @@ impl SharedDashboardAuthor { name: None, } } + + pub fn handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + 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 c590702da..52cca47e5 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 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_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..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 @@ -43,7 +43,38 @@ impl SharedDashboardInvitesDataObjectAttributes { share_token: None, } } + + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn has_session(&mut self, value: bool) -> &mut Self { + self.has_session = Some(value); + self + } + + pub fn invitation_expiry(&mut self, value: String) -> &mut Self { + self.invitation_expiry = Some(value); + self + } + + pub fn session_expiry(&mut self, value: Option) -> &mut Self { + self.session_expiry = Some(value); + 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 5ae18301a..f4e9fbe04 100644 --- a/src/datadogV1/model/model_shared_dashboard_invites_meta.rs +++ b/src/datadogV1/model/model_shared_dashboard_invites_meta.rs @@ -10,14 +10,23 @@ 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 page( + &mut self, + value: crate::datadogV1::model::SharedDashboardInvitesMetaPage, + ) -> &mut Self { + self.page = Some(value); + 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 dad2753d7..cc2b35082 100644 --- a/src/datadogV1/model/model_shared_dashboard_invites_meta_page.rs +++ b/src/datadogV1/model/model_shared_dashboard_invites_meta_page.rs @@ -17,7 +17,13 @@ impl SharedDashboardInvitesMetaPage { pub fn new() -> SharedDashboardInvitesMetaPage { SharedDashboardInvitesMetaPage { total_count: None } } + + 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 7d7ecd3ba..dd48ab143 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 global_time_selectable_enabled(&mut self, value: Option) -> &mut Self { + self.global_time_selectable_enabled = Some(value); + self + } + + pub fn selectable_template_vars( + &mut self, + value: Option>, + ) -> &mut Self { + self.selectable_template_vars = Some(value); + self + } + + pub fn share_list(&mut self, value: Option>) -> &mut Self { + self.share_list = Some(value); + self + } + + pub fn 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..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 @@ -17,7 +17,16 @@ impl SharedDashboardUpdateRequestGlobalTime { pub fn new() -> SharedDashboardUpdateRequestGlobalTime { SharedDashboardUpdateRequestGlobalTime { live_span: None } } + + pub fn live_span( + &mut self, + value: crate::datadogV1::model::DashboardGlobalTimeLiveSpan, + ) -> &mut Self { + self.live_span = Some(value); + 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 c562c1c11..db556d0c9 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 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..29e15bb5c 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 archive_comment(&mut self, value: String) -> &mut Self { + self.archive_comment = Some(value); + self + } + + pub fn archive_reason( + &mut self, + value: crate::datadogV1::model::SignalArchiveReason, + ) -> &mut Self { + self.archive_reason = Some(value); + 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 e31add1a4..4397f7ef7 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,7 +23,21 @@ impl SlackIntegrationChannel { name: None, } } + + pub fn display( + &mut self, + value: crate::datadogV1::model::SlackIntegrationChannelDisplay, + ) -> &mut Self { + self.display = Some(value); + 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 5636a199a..34841198b 100644 --- a/src/datadogV1/model/model_slack_integration_channel_display.rs +++ b/src/datadogV1/model/model_slack_integration_channel_display.rs @@ -31,7 +31,28 @@ impl SlackIntegrationChannelDisplay { tags: None, } } + + pub fn message(&mut self, value: bool) -> &mut Self { + self.message = Some(value); + self + } + + pub fn notified(&mut self, value: bool) -> &mut Self { + self.notified = Some(value); + self + } + + pub fn snapshot(&mut self, value: bool) -> &mut Self { + self.snapshot = Some(value); + 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 ccdfb0b75..4905b531f 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,7 +28,18 @@ impl SLOBulkDeleteResponse { errors: None, } } + + pub fn data(&mut self, value: crate::datadogV1::model::SLOBulkDeleteResponseData) -> &mut Self { + self.data = Some(value); + 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 55cc37cf2..7fd6c20f6 100644 --- a/src/datadogV1/model/model_slo_bulk_delete_response_data.rs +++ b/src/datadogV1/model/model_slo_bulk_delete_response_data.rs @@ -26,7 +26,18 @@ impl SLOBulkDeleteResponseData { updated: None, } } + + pub fn deleted(&mut self, value: Vec) -> &mut Self { + self.deleted = Some(value); + 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 89368c422..d31e34b7e 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,7 +27,26 @@ impl SLOCorrection { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV1::model::SLOCorrectionResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 5811d1ec3..7f8e8cd63 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 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..1c90dfe33 100644 --- a/src/datadogV1/model/model_slo_correction_create_request.rs +++ b/src/datadogV1/model/model_slo_correction_create_request.rs @@ -10,14 +10,20 @@ 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 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 3b15c579f..0b8dd4061 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 description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn duration(&mut self, value: i64) -> &mut Self { + self.duration = Some(value); + self + } + + pub fn end(&mut self, value: i64) -> &mut Self { + self.end = Some(value); + self + } + + pub fn rrule(&mut self, value: String) -> &mut Self { + self.rrule = Some(value); + 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 dad68b46f..97a349b47 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,7 +23,18 @@ impl SLOCorrectionListResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + 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 9d075b224..4571a6abd 100644 --- a/src/datadogV1/model/model_slo_correction_response.rs +++ b/src/datadogV1/model/model_slo_correction_response.rs @@ -10,14 +10,20 @@ 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 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 c0bbeff15..9a6f5e58f 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,7 +80,71 @@ impl SLOCorrectionResponseAttributes { timezone: None, } } + + pub fn category(&mut self, value: crate::datadogV1::model::SLOCorrectionCategory) -> &mut Self { + self.category = Some(value); + self + } + + pub fn created_at(&mut self, value: Option) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + self.creator = Some(value); + self + } + + pub fn description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn duration(&mut self, value: Option) -> &mut Self { + self.duration = Some(value); + self + } + + pub fn end(&mut self, value: Option) -> &mut Self { + self.end = Some(value); + self + } + + pub fn modified_at(&mut self, value: Option) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn modifier( + &mut self, + value: Option, + ) -> &mut Self { + self.modifier = Some(value); + self + } + + pub fn rrule(&mut self, value: Option) -> &mut Self { + self.rrule = Some(value); + self + } + + pub fn slo_id(&mut self, value: String) -> &mut Self { + self.slo_id = Some(value); + self + } + + pub fn start(&mut self, value: i64) -> &mut Self { + self.start = Some(value); + 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 46fec9c24..edc508b00 100644 --- a/src/datadogV1/model/model_slo_correction_response_attributes_modifier.rs +++ b/src/datadogV1/model/model_slo_correction_response_attributes_modifier.rs @@ -27,7 +27,23 @@ impl SLOCorrectionResponseAttributesModifier { name: None, } } + + pub fn email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + 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 d9def594b..e47e4e5f6 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,7 +23,21 @@ impl SLOCorrectionUpdateData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV1::model::SLOCorrectionUpdateRequestAttributes, + ) -> &mut Self { + self.attributes = Some(value); + 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 75983717a..019fde484 100644 --- a/src/datadogV1/model/model_slo_correction_update_request.rs +++ b/src/datadogV1/model/model_slo_correction_update_request.rs @@ -10,14 +10,20 @@ 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 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 a2cea1dd6..8a970d09c 100644 --- a/src/datadogV1/model/model_slo_correction_update_request_attributes.rs +++ b/src/datadogV1/model/model_slo_correction_update_request_attributes.rs @@ -44,7 +44,43 @@ impl SLOCorrectionUpdateRequestAttributes { timezone: None, } } + + pub fn category(&mut self, value: crate::datadogV1::model::SLOCorrectionCategory) -> &mut Self { + self.category = Some(value); + self + } + + pub fn description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn duration(&mut self, value: i64) -> &mut Self { + self.duration = Some(value); + self + } + + pub fn end(&mut self, value: i64) -> &mut Self { + self.end = Some(value); + self + } + + pub fn rrule(&mut self, value: String) -> &mut Self { + self.rrule = Some(value); + self + } + + pub fn start(&mut self, value: i64) -> &mut Self { + self.start = Some(value); + 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 c15bb54b6..fe5d63f6e 100644 --- a/src/datadogV1/model/model_slo_creator.rs +++ b/src/datadogV1/model/model_slo_creator.rs @@ -27,7 +27,23 @@ impl SLOCreator { name: None, } } + + pub fn email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + 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 9fc32243d..c70746228 100644 --- a/src/datadogV1/model/model_slo_delete_response.rs +++ b/src/datadogV1/model/model_slo_delete_response.rs @@ -23,7 +23,18 @@ impl SLODeleteResponse { errors: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + 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 84bd524a1..d6fab6d97 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 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..d644f222e 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 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..3fcd14b01 100644 --- a/src/datadogV1/model/model_slo_history_metrics_series_metadata.rs +++ b/src/datadogV1/model/model_slo_history_metrics_series_metadata.rs @@ -42,7 +42,41 @@ impl SLOHistoryMetricsSeriesMetadata { unit: None, } } + + pub fn aggr(&mut self, value: String) -> &mut Self { + self.aggr = Some(value); + self + } + + pub fn expression(&mut self, value: String) -> &mut Self { + self.expression = Some(value); + self + } + + pub fn metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn query_index(&mut self, value: i64) -> &mut Self { + self.query_index = Some(value); + self + } + + pub fn scope(&mut self, value: String) -> &mut Self { + self.scope = Some(value); + self + } + + pub fn unit( + &mut self, + value: Option>>, + ) -> &mut Self { + self.unit = Some(value); + 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 8a49ab23b..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 @@ -43,7 +43,38 @@ impl SLOHistoryMetricsSeriesMetadataUnit { short_name: None, } } + + pub fn family(&mut self, value: String) -> &mut Self { + self.family = Some(value); + self + } + + pub fn id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn plural(&mut self, value: Option) -> &mut Self { + self.plural = Some(value); + self + } + + pub fn scale_factor(&mut self, value: f64) -> &mut Self { + self.scale_factor = Some(value); + 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 dfdc11fa6..319758a0c 100644 --- a/src/datadogV1/model/model_slo_history_monitor.rs +++ b/src/datadogV1/model/model_slo_history_monitor.rs @@ -72,7 +72,86 @@ impl SLOHistoryMonitor { uptime: None, } } + + #[allow(deprecated)] + pub fn error_budget_remaining( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.error_budget_remaining = Some(value); + self + } + + #[allow(deprecated)] + pub fn errors( + &mut self, + value: Vec, + ) -> &mut Self { + self.errors = Some(value); + self + } + + #[allow(deprecated)] + pub fn group(&mut self, value: String) -> &mut Self { + self.group = Some(value); + self + } + + #[allow(deprecated)] + pub fn history(&mut self, value: Vec>) -> &mut Self { + self.history = Some(value); + self + } + + #[allow(deprecated)] + pub fn monitor_modified(&mut self, value: i64) -> &mut Self { + self.monitor_modified = Some(value); + self + } + + #[allow(deprecated)] + pub fn monitor_type(&mut self, value: String) -> &mut Self { + self.monitor_type = Some(value); + self + } + + #[allow(deprecated)] + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + #[allow(deprecated)] + pub fn precision(&mut self, value: f64) -> &mut Self { + self.precision = Some(value); + self + } + + #[allow(deprecated)] + pub fn preview(&mut self, value: bool) -> &mut Self { + self.preview = Some(value); + self + } + + #[allow(deprecated)] + pub fn sli_value(&mut self, value: Option) -> &mut Self { + self.sli_value = Some(value); + self + } + + #[allow(deprecated)] + pub fn span_precision(&mut self, value: f64) -> &mut Self { + self.span_precision = Some(value); + self + } + + #[allow(deprecated)] + 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 0ba522784..34164671a 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,7 +23,21 @@ impl SLOHistoryResponse { errors: None, } } + + pub fn data(&mut self, value: crate::datadogV1::model::SLOHistoryResponseData) -> &mut Self { + self.data = Some(value); + self + } + + pub fn errors( + &mut self, + value: Option>, + ) -> &mut Self { + self.errors = Some(value); + 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 99abd960b..cfd8cf675 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,7 +67,64 @@ impl SLOHistoryResponseData { type_id: None, } } + + pub fn from_ts(&mut self, value: i64) -> &mut Self { + self.from_ts = Some(value); + self + } + + pub fn group_by(&mut self, value: Vec) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn groups(&mut self, value: Vec) -> &mut Self { + self.groups = Some(value); + self + } + + pub fn monitors( + &mut self, + value: Vec, + ) -> &mut Self { + self.monitors = Some(value); + self + } + + pub fn overall(&mut self, value: crate::datadogV1::model::SLOHistorySLIData) -> &mut Self { + self.overall = Some(value); + self + } + + pub fn series(&mut self, value: crate::datadogV1::model::SLOHistoryMetrics) -> &mut Self { + self.series = Some(value); + self + } + + pub fn thresholds( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.thresholds = Some(value); + self + } + + pub fn to_ts(&mut self, value: i64) -> &mut Self { + self.to_ts = Some(value); + self + } + + pub fn type_(&mut self, value: crate::datadogV1::model::SLOType) -> &mut Self { + self.type_ = Some(value); + 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 5cd9b3919..ab67236b3 100644 --- a/src/datadogV1/model/model_slo_history_response_error.rs +++ b/src/datadogV1/model/model_slo_history_response_error.rs @@ -17,7 +17,13 @@ impl SLOHistoryResponseError { pub fn new() -> SLOHistoryResponseError { SLOHistoryResponseError { error: None } } + + 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 5870abd30..c408b3adb 100644 --- a/src/datadogV1/model/model_slo_history_sli_data.rs +++ b/src/datadogV1/model/model_slo_history_sli_data.rs @@ -71,7 +71,86 @@ impl SLOHistorySLIData { uptime: None, } } + + #[allow(deprecated)] + pub fn error_budget_remaining( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.error_budget_remaining = Some(value); + self + } + + #[allow(deprecated)] + pub fn errors( + &mut self, + value: Vec, + ) -> &mut Self { + self.errors = Some(value); + self + } + + #[allow(deprecated)] + pub fn group(&mut self, value: String) -> &mut Self { + self.group = Some(value); + self + } + + #[allow(deprecated)] + pub fn history(&mut self, value: Vec>) -> &mut Self { + self.history = Some(value); + self + } + + #[allow(deprecated)] + pub fn monitor_modified(&mut self, value: i64) -> &mut Self { + self.monitor_modified = Some(value); + self + } + + #[allow(deprecated)] + pub fn monitor_type(&mut self, value: String) -> &mut Self { + self.monitor_type = Some(value); + self + } + + #[allow(deprecated)] + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + #[allow(deprecated)] + pub fn precision(&mut self, value: std::collections::BTreeMap) -> &mut Self { + self.precision = Some(value); + self + } + + #[allow(deprecated)] + pub fn preview(&mut self, value: bool) -> &mut Self { + self.preview = Some(value); + self + } + + #[allow(deprecated)] + pub fn sli_value(&mut self, value: Option) -> &mut Self { + self.sli_value = Some(value); + self + } + + #[allow(deprecated)] + pub fn span_precision(&mut self, value: f64) -> &mut Self { + self.span_precision = Some(value); + self + } + + #[allow(deprecated)] + 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 12f3d3a11..25b81fa3a 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,7 +28,29 @@ impl SLOListResponse { metadata: None, } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn errors(&mut self, value: Vec) -> &mut Self { + self.errors = Some(value); + self + } + + pub fn metadata( + &mut self, + value: crate::datadogV1::model::SLOListResponseMetadata, + ) -> &mut Self { + self.metadata = Some(value); + 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 8b43808e5..72462533e 100644 --- a/src/datadogV1/model/model_slo_list_response_metadata.rs +++ b/src/datadogV1/model/model_slo_list_response_metadata.rs @@ -10,14 +10,23 @@ 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 page( + &mut self, + value: crate::datadogV1::model::SLOListResponseMetadataPage, + ) -> &mut Self { + self.page = Some(value); + 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 a5fb035b7..9c7ed9d38 100644 --- a/src/datadogV1/model/model_slo_list_response_metadata_page.rs +++ b/src/datadogV1/model/model_slo_list_response_metadata_page.rs @@ -23,7 +23,18 @@ impl SLOListResponseMetadataPage { total_filtered_count: None, } } + + pub fn total_count(&mut self, value: i64) -> &mut Self { + self.total_count = Some(value); + 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 b82ffd4dc..b13eeded0 100644 --- a/src/datadogV1/model/model_slo_list_widget_definition.rs +++ b/src/datadogV1/model/model_slo_list_widget_definition.rs @@ -38,4 +38,19 @@ impl SLOListWidgetDefinition { type_, } } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + 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 740947f96..adc5f858b 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 limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn 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..0dead8824 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,7 +65,56 @@ impl SLOOverallStatuses { timeframe: None, } } + + pub fn error(&mut self, value: Option) -> &mut Self { + self.error = Some(value); + self + } + + pub fn error_budget_remaining(&mut self, value: Option) -> &mut Self { + self.error_budget_remaining = Some(value); + self + } + + pub fn indexed_at(&mut self, value: i64) -> &mut Self { + self.indexed_at = Some(value); + self + } + + pub fn raw_error_budget_remaining( + &mut self, + value: Option, + ) -> &mut Self { + self.raw_error_budget_remaining = Some(value); + self + } + + pub fn span_precision(&mut self, value: Option) -> &mut Self { + self.span_precision = Some(value); + self + } + + pub fn state(&mut self, value: crate::datadogV1::model::SLOState) -> &mut Self { + self.state = Some(value); + self + } + + pub fn status(&mut self, value: Option) -> &mut Self { + self.status = Some(value); + self + } + + pub fn target(&mut self, value: f64) -> &mut Self { + self.target = Some(value); + 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 e9091249f..6b3282d16 100644 --- a/src/datadogV1/model/model_slo_raw_error_budget_remaining.rs +++ b/src/datadogV1/model/model_slo_raw_error_budget_remaining.rs @@ -23,7 +23,18 @@ impl SLORawErrorBudgetRemaining { value: None, } } + + pub fn unit(&mut self, value: String) -> &mut Self { + self.unit = Some(value); + 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 8fad69c2d..cb828856a 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,7 +25,18 @@ impl SLOResponse { errors: None, } } + + pub fn data(&mut self, value: crate::datadogV1::model::SLOResponseData) -> &mut Self { + self.data = Some(value); + 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 a539cf64e..5b3bd168a 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,7 +116,96 @@ impl SLOResponseData { warning_threshold: None, } } + + pub fn configured_alert_ids(&mut self, value: Vec) -> &mut Self { + self.configured_alert_ids = Some(value); + self + } + + pub fn created_at(&mut self, value: i64) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + self.creator = Some(value); + self + } + + pub fn description(&mut self, value: Option) -> &mut Self { + self.description = Some(value); + self + } + + pub fn groups(&mut self, value: Vec) -> &mut Self { + self.groups = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn modified_at(&mut self, value: i64) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn monitor_ids(&mut self, value: Vec) -> &mut Self { + self.monitor_ids = Some(value); + self + } + + pub fn monitor_tags(&mut self, value: Vec) -> &mut Self { + self.monitor_tags = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn query( + &mut self, + value: crate::datadogV1::model::ServiceLevelObjectiveQuery, + ) -> &mut Self { + self.query = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn target_threshold(&mut self, value: f64) -> &mut Self { + self.target_threshold = Some(value); + self + } + + pub fn thresholds(&mut self, value: Vec) -> &mut Self { + self.thresholds = Some(value); + self + } + + pub fn timeframe(&mut self, value: crate::datadogV1::model::SLOTimeframe) -> &mut Self { + self.timeframe = Some(value); + self + } + + pub fn type_(&mut self, value: crate::datadogV1::model::SLOType) -> &mut Self { + self.type_ = Some(value); + 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 25831f70f..0180ef155 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,7 +61,46 @@ impl SLOStatus { state: None, } } + + pub fn calculation_error(&mut self, value: Option) -> &mut Self { + self.calculation_error = Some(value); + self + } + + pub fn error_budget_remaining(&mut self, value: Option) -> &mut Self { + self.error_budget_remaining = Some(value); + self + } + + pub fn indexed_at(&mut self, value: i64) -> &mut Self { + self.indexed_at = Some(value); + self + } + + pub fn raw_error_budget_remaining( + &mut self, + value: Option, + ) -> &mut Self { + self.raw_error_budget_remaining = Some(value); + self + } + + pub fn sli(&mut self, value: Option) -> &mut Self { + self.sli = Some(value); + self + } + + pub fn span_precision(&mut self, value: Option) -> &mut Self { + self.span_precision = Some(value); + 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 d52c4ce60..72f00067b 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 target_display(&mut self, value: String) -> &mut Self { + self.target_display = Some(value); + self + } + + pub fn warning(&mut self, value: f64) -> &mut Self { + self.warning = Some(value); + 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 ad483fae0..2676b5014 100644 --- a/src/datadogV1/model/model_slo_widget_definition.rs +++ b/src/datadogV1/model/model_slo_widget_definition.rs @@ -62,4 +62,52 @@ impl SLOWidgetDefinition { view_type, } } + + pub fn additional_query_filters(&mut self, value: String) -> &mut Self { + self.additional_query_filters = Some(value); + self + } + + pub fn global_time_target(&mut self, value: String) -> &mut Self { + self.global_time_target = Some(value); + self + } + + pub fn show_error_budget(&mut self, value: bool) -> &mut Self { + self.show_error_budget = Some(value); + self + } + + pub fn slo_id(&mut self, value: String) -> &mut Self { + self.slo_id = Some(value); + self + } + + pub fn time_windows( + &mut self, + value: Vec, + ) -> &mut Self { + self.time_windows = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + 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 dcc3b5ca5..e2bb0c0df 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 static_splits( + &mut self, + value: Vec>, + ) -> &mut Self { + self.static_splits = Some(value); + self + } } diff --git a/src/datadogV1/model/model_split_graph_widget_definition.rs b/src/datadogV1/model/model_split_graph_widget_definition.rs index c219235b3..5486b48fe 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 has_uniform_y_axes(&mut self, value: bool) -> &mut Self { + self.has_uniform_y_axes = Some(value); + self + } + + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + 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 0da04465f..928c694d3 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,9 @@ impl SplitSort { order, } } + + 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 b4dd3e168..9844c53e2 100644 --- a/src/datadogV1/model/model_successful_signal_update_response.rs +++ b/src/datadogV1/model/model_successful_signal_update_response.rs @@ -17,7 +17,13 @@ impl SuccessfulSignalUpdateResponse { pub fn new() -> SuccessfulSignalUpdateResponse { SuccessfulSignalUpdateResponse { status: None } } + + 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 0733158a5..914bf0974 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,42 @@ impl SunburstWidgetDefinition { type_, } } + + pub fn custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn hide_total(&mut self, value: bool) -> &mut Self { + self.hide_total = Some(value); + self + } + + pub fn legend(&mut self, value: crate::datadogV1::model::SunburstWidgetLegend) -> &mut Self { + self.legend = Some(value); + self + } + + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + 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_inline_automatic.rs b/src/datadogV1/model/model_sunburst_widget_legend_inline_automatic.rs index 4560246f8..45fc13f7a 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 hide_percent(&mut self, value: bool) -> &mut Self { + self.hide_percent = Some(value); + 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 830daa55a..c9f9dc3d3 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,7 +71,96 @@ impl SunburstWidgetRequest { style: None, } } + + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn audit_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.audit_query = Some(value); + self + } + + pub fn event_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn formulas(&mut self, value: Vec) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + self + } + + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + 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 93722cc54..26181f9fa 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 allow_failure(&mut self, value: bool) -> &mut Self { + self.allow_failure = Some(value); + self + } + + pub fn extracted_values( + &mut self, + value: Vec, + ) -> &mut Self { + self.extracted_values = Some(value); + self + } + + pub fn is_critical(&mut self, value: bool) -> &mut Self { + self.is_critical = Some(value); + self + } + + pub fn 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..454c8f3e1 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 monitor_id(&mut self, value: i64) -> &mut Self { + self.monitor_id = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn status( + &mut self, + value: crate::datadogV1::model::SyntheticsTestPauseStatus, + ) -> &mut Self { + self.status = Some(value); + self + } + + pub fn subtype( + &mut self, + value: crate::datadogV1::model::SyntheticsTestDetailsSubType, + ) -> &mut Self { + self.subtype = Some(value); + 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 c905ad8ee..ba564f205 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,7 +31,34 @@ impl SyntheticsAPITestConfig { steps: None, } } + + pub fn assertions( + &mut self, + value: Vec, + ) -> &mut Self { + self.assertions = Some(value); + self + } + + pub fn config_variables( + &mut self, + value: Vec, + ) -> &mut Self { + self.config_variables = Some(value); + self + } + + pub fn request(&mut self, value: crate::datadogV1::model::SyntheticsTestRequest) -> &mut Self { + self.request = Some(value); + 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 9486d933f..6bfbe6d29 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,7 +54,68 @@ impl SyntheticsAPITestResultData { timings: None, } } + + pub fn cert(&mut self, value: crate::datadogV1::model::SyntheticsSSLCertificate) -> &mut Self { + self.cert = Some(value); + self + } + + pub fn event_type( + &mut self, + value: crate::datadogV1::model::SyntheticsTestProcessStatus, + ) -> &mut Self { + self.event_type = Some(value); + self + } + + pub fn failure( + &mut self, + value: crate::datadogV1::model::SyntheticsApiTestResultFailure, + ) -> &mut Self { + self.failure = Some(value); + self + } + + pub fn http_status_code(&mut self, value: i64) -> &mut Self { + self.http_status_code = Some(value); + self + } + + pub fn request_headers( + &mut self, + value: std::collections::BTreeMap< + String, + std::collections::BTreeMap, + >, + ) -> &mut Self { + self.request_headers = Some(value); + self + } + + pub fn response_body(&mut self, value: String) -> &mut Self { + self.response_body = Some(value); + self + } + + pub fn response_headers( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.response_headers = Some(value); + self + } + + pub fn response_size(&mut self, value: i64) -> &mut Self { + self.response_size = Some(value); + 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 e1034eeb8..e99b70af2 100644 --- a/src/datadogV1/model/model_synthetics_api_test_result_failure.rs +++ b/src/datadogV1/model/model_synthetics_api_test_result_failure.rs @@ -23,7 +23,21 @@ impl SyntheticsApiTestResultFailure { message: None, } } + + pub fn code( + &mut self, + value: crate::datadogV1::model::SyntheticsApiTestFailureCode, + ) -> &mut Self { + self.code = Some(value); + 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 4af29f641..4d95d6739 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,7 +46,52 @@ impl SyntheticsAPITestResultFull { status: None, } } + + pub fn check( + &mut self, + value: crate::datadogV1::model::SyntheticsAPITestResultFullCheck, + ) -> &mut Self { + self.check = Some(value); + self + } + + pub fn check_time(&mut self, value: f64) -> &mut Self { + self.check_time = Some(value); + self + } + + pub fn check_version(&mut self, value: i64) -> &mut Self { + self.check_version = Some(value); + self + } + + pub fn probe_dc(&mut self, value: String) -> &mut Self { + self.probe_dc = Some(value); + self + } + + pub fn result( + &mut self, + value: crate::datadogV1::model::SyntheticsAPITestResultData, + ) -> &mut Self { + self.result = Some(value); + self + } + + pub fn result_id(&mut self, value: String) -> &mut Self { + self.result_id = Some(value); + self + } + + pub fn status( + &mut self, + value: crate::datadogV1::model::SyntheticsTestMonitorStatus, + ) -> &mut Self { + self.status = Some(value); + self + } } + impl Default for SyntheticsAPITestResultFull { fn default() -> Self { Self::new() 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..11b9933dc 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,7 +38,39 @@ impl SyntheticsAPITestResultShort { status: None, } } + + pub fn check_time(&mut self, value: f64) -> &mut Self { + self.check_time = Some(value); + self + } + + pub fn probe_dc(&mut self, value: String) -> &mut Self { + self.probe_dc = Some(value); + self + } + + pub fn result( + &mut self, + value: crate::datadogV1::model::SyntheticsAPITestResultShortResult, + ) -> &mut Self { + self.result = Some(value); + self + } + + pub fn result_id(&mut self, value: String) -> &mut Self { + self.result_id = Some(value); + self + } + + pub fn status( + &mut self, + value: crate::datadogV1::model::SyntheticsTestMonitorStatus, + ) -> &mut Self { + self.status = Some(value); + 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 b5de0822c..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 @@ -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,7 +24,18 @@ impl SyntheticsAPITestResultShortResult { timings: None, } } + + pub fn passed(&mut self, value: bool) -> &mut Self { + self.passed = Some(value); + 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_json_path_target.rs b/src/datadogV1/model/model_synthetics_assertion_json_path_target.rs index 54ff40bfe..252bd9e96 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 property(&mut self, value: String) -> &mut Self { + self.property = Some(value); + self + } + + pub fn 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..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 @@ -27,7 +27,23 @@ impl SyntheticsAssertionJSONPathTargetTarget { target_value: None, } } + + pub fn json_path(&mut self, value: String) -> &mut Self { + self.json_path = Some(value); + self + } + + pub fn operator(&mut self, value: String) -> &mut Self { + self.operator = Some(value); + 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 224cd35dd..8ef7a5222 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 property(&mut self, value: String) -> &mut Self { + self.property = Some(value); + self + } + + pub fn 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..a3a07619b 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 property(&mut self, value: String) -> &mut Self { + self.property = Some(value); + self + } + + pub fn 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..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 @@ -27,7 +27,23 @@ impl SyntheticsAssertionXPathTargetTarget { x_path: None, } } + + pub fn operator(&mut self, value: String) -> &mut Self { + self.operator = Some(value); + self + } + + pub fn target_value(&mut self, value: serde_json::Value) -> &mut Self { + self.target_value = Some(value); + 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_digest.rs b/src/datadogV1/model/model_synthetics_basic_auth_digest.rs index cc9cafffe..9fcaa87ba 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 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..9cdd4985c 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 domain(&mut self, value: String) -> &mut Self { + self.domain = Some(value); + self + } + + pub fn password(&mut self, value: String) -> &mut Self { + self.password = Some(value); + self + } + + pub fn username(&mut self, value: String) -> &mut Self { + self.username = Some(value); + 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 d82e87f93..131a4d41c 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 audience(&mut self, value: String) -> &mut Self { + self.audience = Some(value); + self + } + + pub fn resource(&mut self, value: String) -> &mut Self { + self.resource = Some(value); + self + } + + pub fn scope(&mut self, value: String) -> &mut Self { + self.scope = Some(value); + self + } + + pub fn 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..ccc3e3049 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 audience(&mut self, value: String) -> &mut Self { + self.audience = Some(value); + self + } + + pub fn client_id(&mut self, value: String) -> &mut Self { + self.client_id = Some(value); + self + } + + pub fn client_secret(&mut self, value: String) -> &mut Self { + self.client_secret = Some(value); + self + } + + pub fn resource(&mut self, value: String) -> &mut Self { + self.resource = Some(value); + self + } + + pub fn scope(&mut self, value: String) -> &mut Self { + self.scope = Some(value); + self + } + + pub fn 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..daed3bee4 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 region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } + + pub fn service_name(&mut self, value: String) -> &mut Self { + self.service_name = Some(value); + 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 2fb8c290a..259192f0a 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 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..7354e72f4 100644 --- a/src/datadogV1/model/model_synthetics_batch_details.rs +++ b/src/datadogV1/model/model_synthetics_batch_details.rs @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: crate::datadogV1::model::SyntheticsBatchDetailsData, + ) -> &mut Self { + self.data = Some(value); + 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 82f841764..6234a13f0 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,7 +27,29 @@ impl SyntheticsBatchDetailsData { status: None, } } + + pub fn metadata( + &mut self, + value: crate::datadogV1::model::SyntheticsCIBatchMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn results( + &mut self, + value: Vec, + ) -> &mut Self { + self.results = Some(value); + 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 14cc9a0a0..96e76fa67 100644 --- a/src/datadogV1/model/model_synthetics_batch_result.rs +++ b/src/datadogV1/model/model_synthetics_batch_result.rs @@ -55,7 +55,64 @@ impl SyntheticsBatchResult { test_type: None, } } + + pub fn device(&mut self, value: crate::datadogV1::model::SyntheticsDeviceID) -> &mut Self { + self.device = Some(value); + self + } + + pub fn duration(&mut self, value: f64) -> &mut Self { + self.duration = Some(value); + self + } + + pub fn execution_rule( + &mut self, + value: crate::datadogV1::model::SyntheticsTestExecutionRule, + ) -> &mut Self { + self.execution_rule = Some(value); + self + } + + pub fn location(&mut self, value: String) -> &mut Self { + self.location = Some(value); + self + } + + pub fn result_id(&mut self, value: String) -> &mut Self { + self.result_id = Some(value); + self + } + + pub fn retries(&mut self, value: f64) -> &mut Self { + self.retries = Some(value); + self + } + + pub fn status(&mut self, value: crate::datadogV1::model::SyntheticsStatus) -> &mut Self { + self.status = Some(value); + self + } + + pub fn test_name(&mut self, value: String) -> &mut Self { + self.test_name = Some(value); + self + } + + pub fn test_public_id(&mut self, value: String) -> &mut Self { + self.test_public_id = Some(value); + self + } + + pub fn test_type( + &mut self, + value: crate::datadogV1::model::SyntheticsTestDetailsType, + ) -> &mut Self { + self.test_type = Some(value); + 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 8ff3a1335..e96325ad8 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 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..bbf8755f5 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 monitor_id(&mut self, value: i64) -> &mut Self { + self.monitor_id = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn status( + &mut self, + value: crate::datadogV1::model::SyntheticsTestPauseStatus, + ) -> &mut Self { + self.status = Some(value); + self + } + + pub fn steps(&mut self, value: Vec) -> &mut Self { + self.steps = Some(value); + 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 5e865db0b..5653cef13 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 config_variables( + &mut self, + value: Vec, + ) -> &mut Self { + self.config_variables = Some(value); + self + } + + pub fn set_cookie(&mut self, value: String) -> &mut Self { + self.set_cookie = Some(value); + self + } + + pub fn 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..dc0ec9955 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,7 +64,74 @@ impl SyntheticsBrowserTestResultData { time_to_interactive: None, } } + + pub fn browser_type(&mut self, value: String) -> &mut Self { + self.browser_type = Some(value); + self + } + + pub fn browser_version(&mut self, value: String) -> &mut Self { + self.browser_version = Some(value); + self + } + + pub fn device(&mut self, value: crate::datadogV1::model::SyntheticsDevice) -> &mut Self { + self.device = Some(value); + self + } + + pub fn duration(&mut self, value: f64) -> &mut Self { + self.duration = Some(value); + self + } + + pub fn error(&mut self, value: String) -> &mut Self { + self.error = Some(value); + self + } + + pub fn failure( + &mut self, + value: crate::datadogV1::model::SyntheticsBrowserTestResultFailure, + ) -> &mut Self { + self.failure = Some(value); + self + } + + pub fn passed(&mut self, value: bool) -> &mut Self { + self.passed = Some(value); + self + } + + pub fn received_email_count(&mut self, value: i64) -> &mut Self { + self.received_email_count = Some(value); + self + } + + pub fn start_url(&mut self, value: String) -> &mut Self { + self.start_url = Some(value); + self + } + + pub fn step_details( + &mut self, + value: Vec, + ) -> &mut Self { + self.step_details = Some(value); + self + } + + pub fn thumbnails_bucket_key(&mut self, value: bool) -> &mut Self { + self.thumbnails_bucket_key = Some(value); + 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 5a0e9f320..b5c992741 100644 --- a/src/datadogV1/model/model_synthetics_browser_test_result_failure.rs +++ b/src/datadogV1/model/model_synthetics_browser_test_result_failure.rs @@ -23,7 +23,21 @@ impl SyntheticsBrowserTestResultFailure { message: None, } } + + pub fn code( + &mut self, + value: crate::datadogV1::model::SyntheticsBrowserTestFailureCode, + ) -> &mut Self { + self.code = Some(value); + 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 d74d9c48d..f053526ae 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,7 +46,52 @@ impl SyntheticsBrowserTestResultFull { status: None, } } + + pub fn check( + &mut self, + value: crate::datadogV1::model::SyntheticsBrowserTestResultFullCheck, + ) -> &mut Self { + self.check = Some(value); + self + } + + pub fn check_time(&mut self, value: f64) -> &mut Self { + self.check_time = Some(value); + self + } + + pub fn check_version(&mut self, value: i64) -> &mut Self { + self.check_version = Some(value); + self + } + + pub fn probe_dc(&mut self, value: String) -> &mut Self { + self.probe_dc = Some(value); + self + } + + pub fn result( + &mut self, + value: crate::datadogV1::model::SyntheticsBrowserTestResultData, + ) -> &mut Self { + self.result = Some(value); + self + } + + pub fn result_id(&mut self, value: String) -> &mut Self { + self.result_id = Some(value); + self + } + + pub fn status( + &mut self, + value: crate::datadogV1::model::SyntheticsTestMonitorStatus, + ) -> &mut Self { + self.status = Some(value); + self + } } + impl Default for SyntheticsBrowserTestResultFull { fn default() -> Self { Self::new() 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..624ae68b9 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,7 +38,39 @@ impl SyntheticsBrowserTestResultShort { status: None, } } + + pub fn check_time(&mut self, value: f64) -> &mut Self { + self.check_time = Some(value); + self + } + + pub fn probe_dc(&mut self, value: String) -> &mut Self { + self.probe_dc = Some(value); + self + } + + pub fn result( + &mut self, + value: crate::datadogV1::model::SyntheticsBrowserTestResultShortResult, + ) -> &mut Self { + self.result = Some(value); + self + } + + pub fn result_id(&mut self, value: String) -> &mut Self { + self.result_id = Some(value); + self + } + + pub fn status( + &mut self, + value: crate::datadogV1::model::SyntheticsTestMonitorStatus, + ) -> &mut Self { + self.status = Some(value); + 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 11fb96f04..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 @@ -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,7 +35,33 @@ impl SyntheticsBrowserTestResultShortResult { step_count_total: None, } } + + pub fn device(&mut self, value: crate::datadogV1::model::SyntheticsDevice) -> &mut Self { + self.device = Some(value); + self + } + + pub fn duration(&mut self, value: f64) -> &mut Self { + self.duration = Some(value); + self + } + + pub fn error_count(&mut self, value: i64) -> &mut Self { + self.error_count = Some(value); + self + } + + pub fn step_count_completed(&mut self, value: i64) -> &mut Self { + self.step_count_completed = Some(value); + 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 98ce5125f..c339e0004 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 application_id(&mut self, value: String) -> &mut Self { + self.application_id = Some(value); + 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 e28a007a9..debce806f 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 example(&mut self, value: String) -> &mut Self { + self.example = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn pattern(&mut self, value: String) -> &mut Self { + self.pattern = Some(value); + 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 62f37574f..8224f9e22 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,7 +23,21 @@ impl SyntheticsCIBatchMetadata { git: None, } } + + pub fn ci(&mut self, value: crate::datadogV1::model::SyntheticsCIBatchMetadataCI) -> &mut Self { + self.ci = Some(value); + self + } + + pub fn git( + &mut self, + value: crate::datadogV1::model::SyntheticsCIBatchMetadataGit, + ) -> &mut Self { + self.git = Some(value); + 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 5372d30d5..154ab83cf 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,7 +23,24 @@ impl SyntheticsCIBatchMetadataCI { provider: None, } } + + pub fn pipeline( + &mut self, + value: crate::datadogV1::model::SyntheticsCIBatchMetadataPipeline, + ) -> &mut Self { + self.pipeline = Some(value); + self + } + + pub fn provider( + &mut self, + value: crate::datadogV1::model::SyntheticsCIBatchMetadataProvider, + ) -> &mut Self { + self.provider = Some(value); + 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 5539b4d30..360975ee2 100644 --- a/src/datadogV1/model/model_synthetics_ci_batch_metadata_git.rs +++ b/src/datadogV1/model/model_synthetics_ci_batch_metadata_git.rs @@ -23,7 +23,18 @@ impl SyntheticsCIBatchMetadataGit { commit_sha: None, } } + + pub fn branch(&mut self, value: String) -> &mut Self { + self.branch = Some(value); + 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 f56775610..2b281302b 100644 --- a/src/datadogV1/model/model_synthetics_ci_batch_metadata_pipeline.rs +++ b/src/datadogV1/model/model_synthetics_ci_batch_metadata_pipeline.rs @@ -17,7 +17,13 @@ impl SyntheticsCIBatchMetadataPipeline { pub fn new() -> SyntheticsCIBatchMetadataPipeline { SyntheticsCIBatchMetadataPipeline { url: None } } + + 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 77f3cd28d..e844d6a36 100644 --- a/src/datadogV1/model/model_synthetics_ci_batch_metadata_provider.rs +++ b/src/datadogV1/model/model_synthetics_ci_batch_metadata_provider.rs @@ -17,7 +17,13 @@ impl SyntheticsCIBatchMetadataProvider { pub fn new() -> SyntheticsCIBatchMetadataProvider { SyntheticsCIBatchMetadataProvider { name: None } } + + 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 96faf4c85..3c18fde5d 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,78 @@ impl SyntheticsCITest { variables: None, } } + + pub fn allow_insecure_certificates(&mut self, value: bool) -> &mut Self { + self.allow_insecure_certificates = Some(value); + self + } + + pub fn basic_auth(&mut self, value: crate::datadogV1::model::SyntheticsBasicAuth) -> &mut Self { + self.basic_auth = Some(value); + self + } + + pub fn body(&mut self, value: String) -> &mut Self { + self.body = Some(value); + self + } + + pub fn body_type(&mut self, value: String) -> &mut Self { + self.body_type = Some(value); + self + } + + pub fn cookies(&mut self, value: String) -> &mut Self { + self.cookies = Some(value); + self + } + + pub fn device_ids( + &mut self, + value: Vec, + ) -> &mut Self { + self.device_ids = Some(value); + self + } + + pub fn follow_redirects(&mut self, value: bool) -> &mut Self { + self.follow_redirects = Some(value); + self + } + + pub fn headers(&mut self, value: std::collections::BTreeMap) -> &mut Self { + self.headers = Some(value); + self + } + + pub fn locations(&mut self, value: Vec) -> &mut Self { + self.locations = Some(value); + self + } + + pub fn metadata( + &mut self, + value: crate::datadogV1::model::SyntheticsCIBatchMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn retry( + &mut self, + value: crate::datadogV1::model::SyntheticsTestOptionsRetry, + ) -> &mut Self { + self.retry = Some(value); + self + } + + pub fn start_url(&mut self, value: String) -> &mut Self { + self.start_url = Some(value); + 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 c98b9a636..fa4d4f16d 100644 --- a/src/datadogV1/model/model_synthetics_ci_test_body.rs +++ b/src/datadogV1/model/model_synthetics_ci_test_body.rs @@ -17,7 +17,13 @@ impl SyntheticsCITestBody { pub fn new() -> SyntheticsCITestBody { SyntheticsCITestBody { tests: None } } + + 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 53ce8fbde..dc1343d58 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 example(&mut self, value: String) -> &mut Self { + self.example = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn pattern(&mut self, value: String) -> &mut Self { + self.pattern = Some(value); + 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 20c3512bc..11460fc6a 100644 --- a/src/datadogV1/model/model_synthetics_core_web_vitals.rs +++ b/src/datadogV1/model/model_synthetics_core_web_vitals.rs @@ -27,7 +27,23 @@ impl SyntheticsCoreWebVitals { url: None, } } + + pub fn cls(&mut self, value: f64) -> &mut Self { + self.cls = Some(value); + self + } + + pub fn lcp(&mut self, value: f64) -> &mut Self { + self.lcp = Some(value); + 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 529dcf228..0fd53683b 100644 --- a/src/datadogV1/model/model_synthetics_delete_tests_payload.rs +++ b/src/datadogV1/model/model_synthetics_delete_tests_payload.rs @@ -18,7 +18,13 @@ impl SyntheticsDeleteTestsPayload { pub fn new() -> SyntheticsDeleteTestsPayload { SyntheticsDeleteTestsPayload { public_ids: None } } + + 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 4454734e7..a0326d56b 100644 --- a/src/datadogV1/model/model_synthetics_delete_tests_response.rs +++ b/src/datadogV1/model/model_synthetics_delete_tests_response.rs @@ -20,7 +20,16 @@ impl SyntheticsDeleteTestsResponse { deleted_tests: None, } } + + pub fn deleted_tests( + &mut self, + value: Vec, + ) -> &mut Self { + self.deleted_tests = Some(value); + 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 6bd3fd867..89d9a685c 100644 --- a/src/datadogV1/model/model_synthetics_deleted_test.rs +++ b/src/datadogV1/model/model_synthetics_deleted_test.rs @@ -24,7 +24,18 @@ impl SyntheticsDeletedTest { public_id: None, } } + + pub fn deleted_at(&mut self, value: String) -> &mut Self { + self.deleted_at = Some(value); + 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 3d4f3374a..64de6f01f 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 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..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 @@ -23,7 +23,21 @@ impl SyntheticsGetAPITestLatestResultsResponse { results: None, } } + + pub fn last_timestamp_fetched(&mut self, value: i64) -> &mut Self { + self.last_timestamp_fetched = Some(value); + self + } + + pub fn results( + &mut self, + value: Vec, + ) -> &mut Self { + self.results = Some(value); + 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 ca286939f..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 @@ -23,7 +23,21 @@ impl SyntheticsGetBrowserTestLatestResultsResponse { results: None, } } + + pub fn last_timestamp_fetched(&mut self, value: i64) -> &mut Self { + self.last_timestamp_fetched = Some(value); + self + } + + pub fn results( + &mut self, + value: Vec, + ) -> &mut Self { + self.results = Some(value); + 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 4c1c76e43..789621ec8 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 attributes( + &mut self, + value: crate::datadogV1::model::SyntheticsGlobalVariableAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn parse_test_options( + &mut self, + value: crate::datadogV1::model::SyntheticsGlobalVariableParseTestOptions, + ) -> &mut Self { + self.parse_test_options = Some(value); + 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 d67c12b37..e92d28922 100644 --- a/src/datadogV1/model/model_synthetics_global_variable_attributes.rs +++ b/src/datadogV1/model/model_synthetics_global_variable_attributes.rs @@ -19,7 +19,13 @@ impl SyntheticsGlobalVariableAttributes { restricted_roles: None, } } + + 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 ee007fa75..2f0c70e68 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,7 +19,16 @@ impl SyntheticsGlobalVariableOptions { totp_parameters: None, } } + + pub fn totp_parameters( + &mut self, + value: crate::datadogV1::model::SyntheticsGlobalVariableTOTPParameters, + ) -> &mut Self { + self.totp_parameters = Some(value); + 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 99d13eaed..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 @@ -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 field(&mut self, value: String) -> &mut Self { + self.field = Some(value); + self + } + + pub fn local_variable_name(&mut self, value: String) -> &mut Self { + self.local_variable_name = Some(value); + self + } + + pub fn 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..7a87f87f9 100644 --- a/src/datadogV1/model/model_synthetics_global_variable_totp_parameters.rs +++ b/src/datadogV1/model/model_synthetics_global_variable_totp_parameters.rs @@ -23,7 +23,18 @@ impl SyntheticsGlobalVariableTOTPParameters { refresh_interval: None, } } + + pub fn digits(&mut self, value: i32) -> &mut Self { + self.digits = Some(value); + 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 54cc2cb32..0751648cf 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,7 +28,26 @@ impl SyntheticsGlobalVariableValue { value: None, } } + + pub fn options( + &mut self, + value: crate::datadogV1::model::SyntheticsGlobalVariableOptions, + ) -> &mut Self { + self.options = Some(value); + self + } + + pub fn secure(&mut self, value: bool) -> &mut Self { + self.secure = Some(value); + 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 92eb562ac..94a0101e5 100644 --- a/src/datadogV1/model/model_synthetics_list_global_variables_response.rs +++ b/src/datadogV1/model/model_synthetics_list_global_variables_response.rs @@ -17,7 +17,16 @@ impl SyntheticsListGlobalVariablesResponse { pub fn new() -> SyntheticsListGlobalVariablesResponse { SyntheticsListGlobalVariablesResponse { variables: None } } + + pub fn variables( + &mut self, + value: Vec, + ) -> &mut Self { + self.variables = Some(value); + 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 f10e23a86..1431089cc 100644 --- a/src/datadogV1/model/model_synthetics_list_tests_response.rs +++ b/src/datadogV1/model/model_synthetics_list_tests_response.rs @@ -17,7 +17,16 @@ impl SyntheticsListTestsResponse { pub fn new() -> SyntheticsListTestsResponse { SyntheticsListTestsResponse { tests: None } } + + pub fn tests( + &mut self, + value: Vec, + ) -> &mut Self { + self.tests = Some(value); + 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 7d5fa67fe..89331ddbf 100644 --- a/src/datadogV1/model/model_synthetics_location.rs +++ b/src/datadogV1/model/model_synthetics_location.rs @@ -24,7 +24,18 @@ impl SyntheticsLocation { name: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 a9613ccdf..b7ce7fdff 100644 --- a/src/datadogV1/model/model_synthetics_locations.rs +++ b/src/datadogV1/model/model_synthetics_locations.rs @@ -17,7 +17,16 @@ impl SyntheticsLocations { pub fn new() -> SyntheticsLocations { SyntheticsLocations { locations: None } } + + pub fn locations( + &mut self, + value: Vec, + ) -> &mut Self { + self.locations = Some(value); + 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 92e65b944..670d934c1 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,7 +35,39 @@ impl SyntheticsParsingOptions { type_: None, } } + + pub fn field(&mut self, value: String) -> &mut Self { + self.field = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn parser( + &mut self, + value: crate::datadogV1::model::SyntheticsVariableParser, + ) -> &mut Self { + self.parser = Some(value); + self + } + + pub fn secure(&mut self, value: bool) -> &mut Self { + self.secure = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV1::model::SyntheticsGlobalVariableParseTestOptionsType, + ) -> &mut Self { + self.type_ = Some(value); + 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 5b47f0cc2..8479b8323 100644 --- a/src/datadogV1/model/model_synthetics_patch_test_body.rs +++ b/src/datadogV1/model/model_synthetics_patch_test_body.rs @@ -17,7 +17,16 @@ impl SyntheticsPatchTestBody { pub fn new() -> SyntheticsPatchTestBody { SyntheticsPatchTestBody { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 559e40342..8dff46cfe 100644 --- a/src/datadogV1/model/model_synthetics_patch_test_operation.rs +++ b/src/datadogV1/model/model_synthetics_patch_test_operation.rs @@ -27,7 +27,26 @@ impl SyntheticsPatchTestOperation { value: None, } } + + pub fn op( + &mut self, + value: crate::datadogV1::model::SyntheticsPatchTestOperationName, + ) -> &mut Self { + self.op = Some(value); + self + } + + pub fn path(&mut self, value: String) -> &mut Self { + self.path = Some(value); + 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 7bfa36107..d64539a10 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 id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn metadata( + &mut self, + value: crate::datadogV1::model::SyntheticsPrivateLocationMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn 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..cd4c53273 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,7 +28,32 @@ impl SyntheticsPrivateLocationCreationResponse { result_encryption: None, } } + + pub fn config( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.config = Some(value); + self + } + + pub fn private_location( + &mut self, + value: crate::datadogV1::model::SyntheticsPrivateLocation, + ) -> &mut Self { + self.private_location = Some(value); + self + } + + pub fn result_encryption( + &mut self, + value: crate::datadogV1::model::SyntheticsPrivateLocationCreationResponseResultEncryption, + ) -> &mut Self { + self.result_encryption = Some(value); + 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 fe5d3aea1..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 @@ -23,7 +23,18 @@ impl SyntheticsPrivateLocationCreationResponseResultEncryption { key: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 3a45786fd..062829989 100644 --- a/src/datadogV1/model/model_synthetics_private_location_metadata.rs +++ b/src/datadogV1/model/model_synthetics_private_location_metadata.rs @@ -19,7 +19,13 @@ impl SyntheticsPrivateLocationMetadata { restricted_roles: None, } } + + 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 dfdd11622..89fbaf96c 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,7 +25,24 @@ impl SyntheticsPrivateLocationSecrets { config_decryption: None, } } + + pub fn authentication( + &mut self, + value: crate::datadogV1::model::SyntheticsPrivateLocationSecretsAuthentication, + ) -> &mut Self { + self.authentication = Some(value); + self + } + + pub fn config_decryption( + &mut self, + value: crate::datadogV1::model::SyntheticsPrivateLocationSecretsConfigDecryption, + ) -> &mut Self { + self.config_decryption = Some(value); + 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 15bd5519c..c53dc00dc 100644 --- a/src/datadogV1/model/model_synthetics_private_location_secrets_authentication.rs +++ b/src/datadogV1/model/model_synthetics_private_location_secrets_authentication.rs @@ -23,7 +23,18 @@ impl SyntheticsPrivateLocationSecretsAuthentication { key: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 dbaeb8b1e..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 @@ -17,7 +17,13 @@ impl SyntheticsPrivateLocationSecretsConfigDecryption { pub fn new() -> SyntheticsPrivateLocationSecretsConfigDecryption { SyntheticsPrivateLocationSecretsConfigDecryption { key: None } } + + 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 719d5df76..f254eaca6 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,7 +63,74 @@ impl SyntheticsSSLCertificate { valid_to: None, } } + + pub fn cipher(&mut self, value: String) -> &mut Self { + self.cipher = Some(value); + self + } + + pub fn exponent(&mut self, value: f64) -> &mut Self { + self.exponent = Some(value); + self + } + + pub fn ext_key_usage(&mut self, value: Vec) -> &mut Self { + self.ext_key_usage = Some(value); + self + } + + pub fn fingerprint(&mut self, value: String) -> &mut Self { + self.fingerprint = Some(value); + self + } + + pub fn fingerprint256(&mut self, value: String) -> &mut Self { + self.fingerprint256 = Some(value); + self + } + + pub fn issuer( + &mut self, + value: crate::datadogV1::model::SyntheticsSSLCertificateIssuer, + ) -> &mut Self { + self.issuer = Some(value); + self + } + + pub fn modulus(&mut self, value: String) -> &mut Self { + self.modulus = Some(value); + self + } + + pub fn protocol(&mut self, value: String) -> &mut Self { + self.protocol = Some(value); + self + } + + pub fn serial_number(&mut self, value: String) -> &mut Self { + self.serial_number = Some(value); + self + } + + pub fn subject( + &mut self, + value: crate::datadogV1::model::SyntheticsSSLCertificateSubject, + ) -> &mut Self { + self.subject = Some(value); + self + } + + pub fn valid_from(&mut self, value: String) -> &mut Self { + self.valid_from = Some(value); + 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 a68378041..8dbfb7e32 100644 --- a/src/datadogV1/model/model_synthetics_ssl_certificate_issuer.rs +++ b/src/datadogV1/model/model_synthetics_ssl_certificate_issuer.rs @@ -39,7 +39,38 @@ impl SyntheticsSSLCertificateIssuer { st: None, } } + + pub fn c(&mut self, value: String) -> &mut Self { + self.c = Some(value); + self + } + + pub fn cn(&mut self, value: String) -> &mut Self { + self.cn = Some(value); + self + } + + pub fn l(&mut self, value: String) -> &mut Self { + self.l = Some(value); + self + } + + pub fn o(&mut self, value: String) -> &mut Self { + self.o = Some(value); + self + } + + pub fn ou(&mut self, value: String) -> &mut Self { + self.ou = Some(value); + 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 ed03f882c..d78b2b045 100644 --- a/src/datadogV1/model/model_synthetics_ssl_certificate_subject.rs +++ b/src/datadogV1/model/model_synthetics_ssl_certificate_subject.rs @@ -43,7 +43,43 @@ impl SyntheticsSSLCertificateSubject { alt_name: None, } } + + pub fn c(&mut self, value: String) -> &mut Self { + self.c = Some(value); + self + } + + pub fn cn(&mut self, value: String) -> &mut Self { + self.cn = Some(value); + self + } + + pub fn l(&mut self, value: String) -> &mut Self { + self.l = Some(value); + self + } + + pub fn o(&mut self, value: String) -> &mut Self { + self.o = Some(value); + self + } + + pub fn ou(&mut self, value: String) -> &mut Self { + self.ou = Some(value); + self + } + + pub fn st(&mut self, value: String) -> &mut Self { + self.st = Some(value); + 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 35b1b0cf3..e8d33f05b 100644 --- a/src/datadogV1/model/model_synthetics_step.rs +++ b/src/datadogV1/model/model_synthetics_step.rs @@ -43,7 +43,46 @@ impl SyntheticsStep { type_: None, } } + + pub fn allow_failure(&mut self, value: bool) -> &mut Self { + self.allow_failure = Some(value); + self + } + + pub fn is_critical(&mut self, value: bool) -> &mut Self { + self.is_critical = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn no_screenshot(&mut self, value: bool) -> &mut Self { + self.no_screenshot = Some(value); + self + } + + pub fn params( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.params = Some(value); + self + } + + pub fn timeout(&mut self, value: i64) -> &mut Self { + self.timeout = Some(value); + 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 5544ca208..b057a0f1f 100644 --- a/src/datadogV1/model/model_synthetics_step_detail.rs +++ b/src/datadogV1/model/model_synthetics_step_detail.rs @@ -84,7 +84,108 @@ impl SyntheticsStepDetail { warnings: None, } } + + pub fn browser_errors( + &mut self, + value: Vec, + ) -> &mut Self { + self.browser_errors = Some(value); + self + } + + pub fn check_type(&mut self, value: crate::datadogV1::model::SyntheticsCheckType) -> &mut Self { + self.check_type = Some(value); + self + } + + pub fn description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn duration(&mut self, value: f64) -> &mut Self { + self.duration = Some(value); + self + } + + pub fn error(&mut self, value: String) -> &mut Self { + self.error = Some(value); + self + } + + pub fn playing_tab( + &mut self, + value: crate::datadogV1::model::SyntheticsPlayingTab, + ) -> &mut Self { + self.playing_tab = Some(value); + self + } + + pub fn screenshot_bucket_key(&mut self, value: bool) -> &mut Self { + self.screenshot_bucket_key = Some(value); + self + } + + pub fn skipped(&mut self, value: bool) -> &mut Self { + self.skipped = Some(value); + self + } + + pub fn snapshot_bucket_key(&mut self, value: bool) -> &mut Self { + self.snapshot_bucket_key = Some(value); + self + } + + pub fn step_id(&mut self, value: i64) -> &mut Self { + self.step_id = Some(value); + self + } + + pub fn sub_test_step_details( + &mut self, + value: Vec, + ) -> &mut Self { + self.sub_test_step_details = Some(value); + self + } + + pub fn time_to_interactive(&mut self, value: f64) -> &mut Self { + self.time_to_interactive = Some(value); + self + } + + pub fn type_(&mut self, value: crate::datadogV1::model::SyntheticsStepType) -> &mut Self { + self.type_ = Some(value); + self + } + + pub fn url(&mut self, value: String) -> &mut Self { + self.url = Some(value); + self + } + + pub fn value(&mut self, value: serde_json::Value) -> &mut Self { + self.value = Some(value); + self + } + + pub fn vitals_metrics( + &mut self, + value: Vec, + ) -> &mut Self { + self.vitals_metrics = Some(value); + self + } + + pub fn warnings( + &mut self, + value: Vec, + ) -> &mut Self { + self.warnings = Some(value); + 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 4b1382648..8fe11df11 100644 --- a/src/datadogV1/model/model_synthetics_test_ci_options.rs +++ b/src/datadogV1/model/model_synthetics_test_ci_options.rs @@ -19,7 +19,16 @@ impl SyntheticsTestCiOptions { execution_rule: None, } } + + pub fn execution_rule( + &mut self, + value: crate::datadogV1::model::SyntheticsTestExecutionRule, + ) -> &mut Self { + self.execution_rule = Some(value); + 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 6518d0459..5df333a96 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,7 +31,37 @@ impl SyntheticsTestConfig { variables: None, } } + + pub fn assertions( + &mut self, + value: Vec, + ) -> &mut Self { + self.assertions = Some(value); + self + } + + pub fn config_variables( + &mut self, + value: Vec, + ) -> &mut Self { + self.config_variables = Some(value); + self + } + + pub fn request(&mut self, value: crate::datadogV1::model::SyntheticsTestRequest) -> &mut Self { + self.request = Some(value); + self + } + + pub fn variables( + &mut self, + value: Vec, + ) -> &mut Self { + self.variables = Some(value); + 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 a55fff02e..24b2562a2 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,7 +69,82 @@ impl SyntheticsTestDetails { type_: None, } } + + pub fn config(&mut self, value: crate::datadogV1::model::SyntheticsTestConfig) -> &mut Self { + self.config = Some(value); + self + } + + pub fn creator(&mut self, value: crate::datadogV1::model::Creator) -> &mut Self { + self.creator = Some(value); + self + } + + pub fn locations(&mut self, value: Vec) -> &mut Self { + self.locations = Some(value); + self + } + + pub fn message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn monitor_id(&mut self, value: i64) -> &mut Self { + self.monitor_id = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn options(&mut self, value: crate::datadogV1::model::SyntheticsTestOptions) -> &mut Self { + self.options = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn status( + &mut self, + value: crate::datadogV1::model::SyntheticsTestPauseStatus, + ) -> &mut Self { + self.status = Some(value); + self + } + + pub fn steps(&mut self, value: Vec) -> &mut Self { + self.steps = Some(value); + self + } + + pub fn subtype( + &mut self, + value: crate::datadogV1::model::SyntheticsTestDetailsSubType, + ) -> &mut Self { + self.subtype = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV1::model::SyntheticsTestDetailsType, + ) -> &mut Self { + self.type_ = Some(value); + 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 7a0cca632..c6ad169f6 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,7 +116,136 @@ impl SyntheticsTestOptions { tick_every: None, } } + + pub fn accept_self_signed(&mut self, value: bool) -> &mut Self { + self.accept_self_signed = Some(value); + self + } + + pub fn allow_insecure(&mut self, value: bool) -> &mut Self { + self.allow_insecure = Some(value); + self + } + + pub fn check_certificate_revocation(&mut self, value: bool) -> &mut Self { + self.check_certificate_revocation = Some(value); + self + } + + pub fn ci(&mut self, value: crate::datadogV1::model::SyntheticsTestCiOptions) -> &mut Self { + self.ci = Some(value); + self + } + + pub fn device_ids( + &mut self, + value: Vec, + ) -> &mut Self { + self.device_ids = Some(value); + self + } + + pub fn disable_cors(&mut self, value: bool) -> &mut Self { + self.disable_cors = Some(value); + self + } + + pub fn disable_csp(&mut self, value: bool) -> &mut Self { + self.disable_csp = Some(value); + self + } + + pub fn follow_redirects(&mut self, value: bool) -> &mut Self { + self.follow_redirects = Some(value); + self + } + + pub fn http_version( + &mut self, + value: crate::datadogV1::model::SyntheticsTestOptionsHTTPVersion, + ) -> &mut Self { + self.http_version = Some(value); + self + } + + pub fn ignore_server_certificate_error(&mut self, value: bool) -> &mut Self { + self.ignore_server_certificate_error = Some(value); + self + } + + pub fn initial_navigation_timeout(&mut self, value: i64) -> &mut Self { + self.initial_navigation_timeout = Some(value); + self + } + + pub fn min_failure_duration(&mut self, value: i64) -> &mut Self { + self.min_failure_duration = Some(value); + self + } + + pub fn min_location_failed(&mut self, value: i64) -> &mut Self { + self.min_location_failed = Some(value); + self + } + + pub fn monitor_name(&mut self, value: String) -> &mut Self { + self.monitor_name = Some(value); + self + } + + pub fn monitor_options( + &mut self, + value: crate::datadogV1::model::SyntheticsTestOptionsMonitorOptions, + ) -> &mut Self { + self.monitor_options = Some(value); + self + } + + pub fn monitor_priority(&mut self, value: i32) -> &mut Self { + self.monitor_priority = Some(value); + self + } + + pub fn no_screenshot(&mut self, value: bool) -> &mut Self { + self.no_screenshot = Some(value); + self + } + + pub fn restricted_roles(&mut self, value: Vec) -> &mut Self { + self.restricted_roles = Some(value); + self + } + + pub fn retry( + &mut self, + value: crate::datadogV1::model::SyntheticsTestOptionsRetry, + ) -> &mut Self { + self.retry = Some(value); + self + } + + pub fn rum_settings( + &mut self, + value: crate::datadogV1::model::SyntheticsBrowserTestRumSettings, + ) -> &mut Self { + self.rum_settings = Some(value); + self + } + + pub fn scheduling( + &mut self, + value: crate::datadogV1::model::SyntheticsTestOptionsScheduling, + ) -> &mut Self { + self.scheduling = Some(value); + 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 da9ca66b9..287e2cd3b 100644 --- a/src/datadogV1/model/model_synthetics_test_options_monitor_options.rs +++ b/src/datadogV1/model/model_synthetics_test_options_monitor_options.rs @@ -21,7 +21,13 @@ impl SyntheticsTestOptionsMonitorOptions { renotify_interval: None, } } + + 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 d0bec6aea..af229cbaf 100644 --- a/src/datadogV1/model/model_synthetics_test_options_retry.rs +++ b/src/datadogV1/model/model_synthetics_test_options_retry.rs @@ -25,7 +25,18 @@ impl SyntheticsTestOptionsRetry { interval: None, } } + + pub fn count(&mut self, value: i64) -> &mut Self { + self.count = Some(value); + 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 607313fb1..e43a95763 100644 --- a/src/datadogV1/model/model_synthetics_test_options_scheduling.rs +++ b/src/datadogV1/model/model_synthetics_test_options_scheduling.rs @@ -23,7 +23,21 @@ impl SyntheticsTestOptionsScheduling { timezone: None, } } + + pub fn timeframes( + &mut self, + value: Vec, + ) -> &mut Self { + self.timeframes = Some(value); + 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 6457aa1a2..24b3eba48 100644 --- a/src/datadogV1/model/model_synthetics_test_options_scheduling_timeframe.rs +++ b/src/datadogV1/model/model_synthetics_test_options_scheduling_timeframe.rs @@ -27,7 +27,23 @@ impl SyntheticsTestOptionsSchedulingTimeframe { to: None, } } + + pub fn day(&mut self, value: i32) -> &mut Self { + self.day = Some(value); + self + } + + pub fn from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + 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 63527b442..7c19fc136 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,7 +125,158 @@ impl SyntheticsTestRequest { url: None, } } + + pub fn allow_insecure(&mut self, value: bool) -> &mut Self { + self.allow_insecure = Some(value); + self + } + + pub fn basic_auth(&mut self, value: crate::datadogV1::model::SyntheticsBasicAuth) -> &mut Self { + self.basic_auth = Some(value); + self + } + + pub fn body(&mut self, value: String) -> &mut Self { + self.body = Some(value); + self + } + + pub fn body_type( + &mut self, + value: crate::datadogV1::model::SyntheticsTestRequestBodyType, + ) -> &mut Self { + self.body_type = Some(value); + self + } + + pub fn call_type( + &mut self, + value: crate::datadogV1::model::SyntheticsTestCallType, + ) -> &mut Self { + self.call_type = Some(value); + self + } + + pub fn certificate( + &mut self, + value: crate::datadogV1::model::SyntheticsTestRequestCertificate, + ) -> &mut Self { + self.certificate = Some(value); + self + } + + pub fn certificate_domains(&mut self, value: Vec) -> &mut Self { + self.certificate_domains = Some(value); + self + } + + pub fn compressed_json_descriptor(&mut self, value: String) -> &mut Self { + self.compressed_json_descriptor = Some(value); + self + } + + pub fn dns_server(&mut self, value: String) -> &mut Self { + self.dns_server = Some(value); + self + } + + pub fn dns_server_port(&mut self, value: i32) -> &mut Self { + self.dns_server_port = Some(value); + self + } + + pub fn follow_redirects(&mut self, value: bool) -> &mut Self { + self.follow_redirects = Some(value); + self + } + + pub fn headers(&mut self, value: std::collections::BTreeMap) -> &mut Self { + self.headers = Some(value); + self + } + + pub fn host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn metadata(&mut self, value: std::collections::BTreeMap) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn method(&mut self, value: String) -> &mut Self { + self.method = Some(value); + self + } + + pub fn no_saving_response_body(&mut self, value: bool) -> &mut Self { + self.no_saving_response_body = Some(value); + self + } + + pub fn number_of_packets(&mut self, value: i32) -> &mut Self { + self.number_of_packets = Some(value); + self + } + + pub fn persist_cookies(&mut self, value: bool) -> &mut Self { + self.persist_cookies = Some(value); + self + } + + pub fn port(&mut self, value: i64) -> &mut Self { + self.port = Some(value); + self + } + + pub fn proxy( + &mut self, + value: crate::datadogV1::model::SyntheticsTestRequestProxy, + ) -> &mut Self { + self.proxy = Some(value); + self + } + + pub fn query( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.query = Some(value); + self + } + + pub fn servername(&mut self, value: String) -> &mut Self { + self.servername = Some(value); + self + } + + pub fn service(&mut self, value: String) -> &mut Self { + self.service = Some(value); + self + } + + pub fn should_track_hops(&mut self, value: bool) -> &mut Self { + self.should_track_hops = Some(value); + self + } + + pub fn timeout(&mut self, value: f64) -> &mut Self { + self.timeout = Some(value); + 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 aba1c9951..b468e614a 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,7 +23,24 @@ impl SyntheticsTestRequestCertificate { key: None, } } + + pub fn cert( + &mut self, + value: crate::datadogV1::model::SyntheticsTestRequestCertificateItem, + ) -> &mut Self { + self.cert = Some(value); + self + } + + pub fn key( + &mut self, + value: crate::datadogV1::model::SyntheticsTestRequestCertificateItem, + ) -> &mut Self { + self.key = Some(value); + 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 241c2ddb6..eeb28713e 100644 --- a/src/datadogV1/model/model_synthetics_test_request_certificate_item.rs +++ b/src/datadogV1/model/model_synthetics_test_request_certificate_item.rs @@ -27,7 +27,23 @@ impl SyntheticsTestRequestCertificateItem { updated_at: None, } } + + pub fn content(&mut self, value: String) -> &mut Self { + self.content = Some(value); + self + } + + pub fn filename(&mut self, value: String) -> &mut Self { + self.filename = Some(value); + 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 66cfdb381..20b6c650c 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 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..bab44b05d 100644 --- a/src/datadogV1/model/model_synthetics_timing.rs +++ b/src/datadogV1/model/model_synthetics_timing.rs @@ -52,7 +52,53 @@ impl SyntheticsTiming { wait: None, } } + + pub fn dns(&mut self, value: f64) -> &mut Self { + self.dns = Some(value); + self + } + + pub fn download(&mut self, value: f64) -> &mut Self { + self.download = Some(value); + self + } + + pub fn first_byte(&mut self, value: f64) -> &mut Self { + self.first_byte = Some(value); + self + } + + pub fn handshake(&mut self, value: f64) -> &mut Self { + self.handshake = Some(value); + self + } + + pub fn redirect(&mut self, value: f64) -> &mut Self { + self.redirect = Some(value); + self + } + + pub fn ssl(&mut self, value: f64) -> &mut Self { + self.ssl = Some(value); + self + } + + pub fn tcp(&mut self, value: f64) -> &mut Self { + self.tcp = Some(value); + self + } + + pub fn total(&mut self, value: f64) -> &mut Self { + self.total = Some(value); + 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 93a19f884..0120eea4d 100644 --- a/src/datadogV1/model/model_synthetics_trigger_ci_test_location.rs +++ b/src/datadogV1/model/model_synthetics_trigger_ci_test_location.rs @@ -23,7 +23,18 @@ impl SyntheticsTriggerCITestLocation { name: None, } } + + pub fn id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + 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 240713986..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 @@ -31,7 +31,28 @@ impl SyntheticsTriggerCITestRunResult { result_id: None, } } + + pub fn device(&mut self, value: crate::datadogV1::model::SyntheticsDeviceID) -> &mut Self { + self.device = Some(value); + self + } + + pub fn location(&mut self, value: i64) -> &mut Self { + self.location = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + 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 d6676c203..b6c0e6437 100644 --- a/src/datadogV1/model/model_synthetics_trigger_ci_tests_response.rs +++ b/src/datadogV1/model/model_synthetics_trigger_ci_tests_response.rs @@ -35,7 +35,34 @@ impl SyntheticsTriggerCITestsResponse { triggered_check_ids: None, } } + + pub fn batch_id(&mut self, value: Option) -> &mut Self { + self.batch_id = Some(value); + self + } + + pub fn locations( + &mut self, + value: Vec, + ) -> &mut Self { + self.locations = Some(value); + self + } + + pub fn results( + &mut self, + value: Vec, + ) -> &mut Self { + self.results = Some(value); + 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 9c33e9562..a120998c9 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 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..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 @@ -18,7 +18,16 @@ impl SyntheticsUpdateTestPauseStatusPayload { pub fn new() -> SyntheticsUpdateTestPauseStatusPayload { SyntheticsUpdateTestPauseStatusPayload { new_status: None } } + + pub fn new_status( + &mut self, + value: crate::datadogV1::model::SyntheticsTestPauseStatus, + ) -> &mut Self { + self.new_status = Some(value); + 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 a8818674a..43bb96435 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 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..b2a1302a5 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,40 @@ impl TableWidgetDefinition { type_, } } + + pub fn custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn has_search_bar( + &mut self, + value: crate::datadogV1::model::TableWidgetHasSearchBar, + ) -> &mut Self { + self.has_search_bar = Some(value); + self + } + + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + 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 afe427f21..ae592aecf 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,7 +91,130 @@ impl TableWidgetRequest { security_query: None, } } + + pub fn aggregator(&mut self, value: crate::datadogV1::model::WidgetAggregator) -> &mut Self { + self.aggregator = Some(value); + self + } + + pub fn alias(&mut self, value: String) -> &mut Self { + self.alias = Some(value); + self + } + + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn apm_stats_query( + &mut self, + value: crate::datadogV1::model::ApmStatsQueryDefinition, + ) -> &mut Self { + self.apm_stats_query = Some(value); + self + } + + pub fn cell_display_mode( + &mut self, + value: Vec, + ) -> &mut Self { + self.cell_display_mode = Some(value); + self + } + + pub fn conditional_formats( + &mut self, + value: Vec, + ) -> &mut Self { + self.conditional_formats = Some(value); + self + } + + pub fn event_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn formulas(&mut self, value: Vec) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn order(&mut self, value: crate::datadogV1::model::WidgetSort) -> &mut Self { + self.order = Some(value); + self + } + + pub fn process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + self + } + + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + 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 5390cfaaf..276785992 100644 --- a/src/datadogV1/model/model_tag_to_hosts.rs +++ b/src/datadogV1/model/model_tag_to_hosts.rs @@ -17,7 +17,13 @@ impl TagToHosts { pub fn new() -> TagToHosts { TagToHosts { tags: None } } + + 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 7479ac647..a5b180550 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 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..2d44302bc 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,78 @@ impl TimeseriesWidgetDefinition { yaxis: None, } } + + pub fn custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn events(&mut self, value: Vec) -> &mut Self { + self.events = Some(value); + self + } + + pub fn legend_columns( + &mut self, + value: Vec, + ) -> &mut Self { + self.legend_columns = Some(value); + self + } + + pub fn legend_layout( + &mut self, + value: crate::datadogV1::model::TimeseriesWidgetLegendLayout, + ) -> &mut Self { + self.legend_layout = Some(value); + self + } + + pub fn legend_size(&mut self, value: String) -> &mut Self { + self.legend_size = Some(value); + self + } + + pub fn markers(&mut self, value: Vec) -> &mut Self { + self.markers = Some(value); + self + } + + pub fn right_yaxis(&mut self, value: crate::datadogV1::model::WidgetAxis) -> &mut Self { + self.right_yaxis = Some(value); + self + } + + pub fn show_legend(&mut self, value: bool) -> &mut Self { + self.show_legend = Some(value); + self + } + + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + self + } + + pub fn title_size(&mut self, value: String) -> &mut Self { + self.title_size = Some(value); + 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 61a072d0d..6b9884469 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 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..df873c533 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,7 +83,114 @@ impl TimeseriesWidgetRequest { style: None, } } + + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn audit_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.audit_query = Some(value); + self + } + + pub fn display_type(&mut self, value: crate::datadogV1::model::WidgetDisplayType) -> &mut Self { + self.display_type = Some(value); + self + } + + pub fn event_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn formulas(&mut self, value: Vec) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn metadata( + &mut self, + value: Vec, + ) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn on_right_yaxis(&mut self, value: bool) -> &mut Self { + self.on_right_yaxis = Some(value); + self + } + + pub fn process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + self + } + + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + 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 4a9e28322..007daee5b 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,37 @@ impl ToplistWidgetDefinition { type_, } } + + pub fn custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn style(&mut self, value: crate::datadogV1::model::ToplistWidgetStyle) -> &mut Self { + self.style = Some(value); + self + } + + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + 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_request.rs b/src/datadogV1/model/model_toplist_widget_request.rs index 700764672..9e946e69c 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,7 +75,104 @@ impl ToplistWidgetRequest { style: None, } } + + pub fn apm_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.apm_query = Some(value); + self + } + + pub fn audit_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.audit_query = Some(value); + self + } + + pub fn conditional_formats( + &mut self, + value: Vec, + ) -> &mut Self { + self.conditional_formats = Some(value); + self + } + + pub fn event_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.event_query = Some(value); + self + } + + pub fn formulas(&mut self, value: Vec) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn log_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.log_query = Some(value); + self + } + + pub fn network_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.network_query = Some(value); + self + } + + pub fn process_query( + &mut self, + value: crate::datadogV1::model::ProcessQueryDefinition, + ) -> &mut Self { + self.process_query = Some(value); + self + } + + pub fn profile_metrics_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.profile_metrics_query = Some(value); + self + } + + pub fn q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + self + } + + pub fn rum_query(&mut self, value: crate::datadogV1::model::LogQueryDefinition) -> &mut Self { + self.rum_query = Some(value); + self + } + + pub fn security_query( + &mut self, + value: crate::datadogV1::model::LogQueryDefinition, + ) -> &mut Self { + self.security_query = Some(value); + 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 4d00aa07d..701258fb3 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,7 +23,18 @@ impl ToplistWidgetStyle { scaling: None, } } + + pub fn display(&mut self, value: crate::datadogV1::model::ToplistWidgetDisplay) -> &mut Self { + self.display = Some(value); + 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 71fa2ced9..c2ad808d9 100644 --- a/src/datadogV1/model/model_topology_map_widget_definition.rs +++ b/src/datadogV1/model/model_topology_map_widget_definition.rs @@ -42,4 +42,27 @@ impl TopologyMapWidgetDefinition { type_, } } + + pub fn custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn title_align(&mut self, value: crate::datadogV1::model::WidgetTextAlign) -> &mut Self { + self.title_align = Some(value); + 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 5c3637e21..5f8c8d735 100644 --- a/src/datadogV1/model/model_topology_query.rs +++ b/src/datadogV1/model/model_topology_query.rs @@ -27,7 +27,26 @@ impl TopologyQuery { service: None, } } + + pub fn data_source( + &mut self, + value: crate::datadogV1::model::TopologyQueryDataSource, + ) -> &mut Self { + self.data_source = Some(value); + self + } + + pub fn filters(&mut self, value: Vec) -> &mut Self { + self.filters = Some(value); + 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 cbd253297..2ab5a0c36 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,7 +23,21 @@ impl TopologyRequest { request_type: None, } } + + pub fn query(&mut self, value: crate::datadogV1::model::TopologyQuery) -> &mut Self { + self.query = Some(value); + self + } + + pub fn request_type( + &mut self, + value: crate::datadogV1::model::TopologyRequestType, + ) -> &mut Self { + self.request_type = Some(value); + 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 f2de3d377..6f42c13dc 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 color_by(&mut self, value: crate::datadogV1::model::TreeMapColorBy) -> &mut Self { + self.color_by = Some(value); + self + } + + #[allow(deprecated)] + pub fn custom_links( + &mut self, + value: Vec, + ) -> &mut Self { + self.custom_links = Some(value); + self + } + + #[allow(deprecated)] + pub fn group_by(&mut self, value: crate::datadogV1::model::TreeMapGroupBy) -> &mut Self { + self.group_by = Some(value); + self + } + + #[allow(deprecated)] + pub fn size_by(&mut self, value: crate::datadogV1::model::TreeMapSizeBy) -> &mut Self { + self.size_by = Some(value); + self + } + + #[allow(deprecated)] + pub fn time(&mut self, value: crate::datadogV1::model::WidgetTime) -> &mut Self { + self.time = Some(value); + self + } + + #[allow(deprecated)] + 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 3987ef91a..a239cbfff 100644 --- a/src/datadogV1/model/model_tree_map_widget_request.rs +++ b/src/datadogV1/model/model_tree_map_widget_request.rs @@ -31,7 +31,34 @@ impl TreeMapWidgetRequest { response_format: None, } } + + pub fn formulas(&mut self, value: Vec) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn q(&mut self, value: String) -> &mut Self { + self.q = Some(value); + self + } + + pub fn queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn response_format( + &mut self, + value: crate::datadogV1::model::FormulaAndFunctionResponseFormat, + ) -> &mut Self { + self.response_format = Some(value); + 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 2c2f32731..03a6dae38 100644 --- a/src/datadogV1/model/model_usage_analyzed_logs_hour.rs +++ b/src/datadogV1/model/model_usage_analyzed_logs_hour.rs @@ -35,7 +35,28 @@ impl UsageAnalyzedLogsHour { public_id: None, } } + + pub fn analyzed_logs(&mut self, value: Option) -> &mut Self { + self.analyzed_logs = Some(value); + self + } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 3ee01de79..bc5da7f3c 100644 --- a/src/datadogV1/model/model_usage_analyzed_logs_response.rs +++ b/src/datadogV1/model/model_usage_analyzed_logs_response.rs @@ -17,7 +17,16 @@ impl UsageAnalyzedLogsResponse { pub fn new() -> UsageAnalyzedLogsResponse { UsageAnalyzedLogsResponse { usage: None } } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 f5be3d3f9..e2fdb821f 100644 --- a/src/datadogV1/model/model_usage_attribution_aggregates_body.rs +++ b/src/datadogV1/model/model_usage_attribution_aggregates_body.rs @@ -27,7 +27,23 @@ impl UsageAttributionAggregatesBody { value: None, } } + + pub fn agg_type(&mut self, value: String) -> &mut Self { + self.agg_type = Some(value); + self + } + + pub fn field(&mut self, value: String) -> &mut Self { + self.field = Some(value); + 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 29b3dab00..095ecc61a 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,7 +47,46 @@ impl UsageAttributionBody { values: None, } } + + pub fn month(&mut self, value: String) -> &mut Self { + self.month = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn tag_config_source(&mut self, value: String) -> &mut Self { + self.tag_config_source = Some(value); + self + } + + pub fn tags( + &mut self, + value: Option>>>, + ) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn updated_at(&mut self, value: String) -> &mut Self { + self.updated_at = Some(value); + 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 9722d02ff..16b2a7cc2 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,7 +23,24 @@ impl UsageAttributionMetadata { pagination: None, } } + + pub fn aggregates( + &mut self, + value: Vec, + ) -> &mut Self { + self.aggregates = Some(value); + self + } + + pub fn pagination( + &mut self, + value: crate::datadogV1::model::UsageAttributionPagination, + ) -> &mut Self { + self.pagination = Some(value); + 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 49fce7104..bfe2a50b9 100644 --- a/src/datadogV1/model/model_usage_attribution_pagination.rs +++ b/src/datadogV1/model/model_usage_attribution_pagination.rs @@ -35,7 +35,33 @@ impl UsageAttributionPagination { total_number_of_records: None, } } + + pub fn limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn offset(&mut self, value: i64) -> &mut Self { + self.offset = Some(value); + self + } + + pub fn sort_direction(&mut self, value: String) -> &mut Self { + self.sort_direction = Some(value); + self + } + + pub fn sort_name(&mut self, value: String) -> &mut Self { + self.sort_name = Some(value); + 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 ec9bb6c02..b198a1e9c 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,7 +23,24 @@ impl UsageAttributionResponse { usage: None, } } + + pub fn metadata( + &mut self, + value: crate::datadogV1::model::UsageAttributionMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 e6d3f1b95..91ce5df02 100644 --- a/src/datadogV1/model/model_usage_attribution_values.rs +++ b/src/datadogV1/model/model_usage_attribution_values.rs @@ -223,7 +223,268 @@ impl UsageAttributionValues { snmp_usage: None, } } + + pub fn api_percentage(&mut self, value: f64) -> &mut Self { + self.api_percentage = Some(value); + self + } + + pub fn api_usage(&mut self, value: f64) -> &mut Self { + self.api_usage = Some(value); + self + } + + pub fn apm_fargate_percentage(&mut self, value: f64) -> &mut Self { + self.apm_fargate_percentage = Some(value); + self + } + + pub fn apm_fargate_usage(&mut self, value: f64) -> &mut Self { + self.apm_fargate_usage = Some(value); + self + } + + pub fn apm_host_percentage(&mut self, value: f64) -> &mut Self { + self.apm_host_percentage = Some(value); + self + } + + pub fn apm_host_usage(&mut self, value: f64) -> &mut Self { + self.apm_host_usage = Some(value); + self + } + + pub fn appsec_fargate_percentage(&mut self, value: f64) -> &mut Self { + self.appsec_fargate_percentage = Some(value); + self + } + + pub fn appsec_fargate_usage(&mut self, value: f64) -> &mut Self { + self.appsec_fargate_usage = Some(value); + self + } + + pub fn appsec_percentage(&mut self, value: f64) -> &mut Self { + self.appsec_percentage = Some(value); + self + } + + pub fn appsec_usage(&mut self, value: f64) -> &mut Self { + self.appsec_usage = Some(value); + self + } + + pub fn browser_percentage(&mut self, value: f64) -> &mut Self { + self.browser_percentage = Some(value); + self + } + + pub fn browser_usage(&mut self, value: f64) -> &mut Self { + self.browser_usage = Some(value); + self + } + + pub fn container_percentage(&mut self, value: f64) -> &mut Self { + self.container_percentage = Some(value); + self + } + + pub fn container_usage(&mut self, value: f64) -> &mut Self { + self.container_usage = Some(value); + self + } + + pub fn cspm_container_percentage(&mut self, value: f64) -> &mut Self { + self.cspm_container_percentage = Some(value); + self + } + + pub fn cspm_container_usage(&mut self, value: f64) -> &mut Self { + self.cspm_container_usage = Some(value); + self + } + + pub fn cspm_host_percentage(&mut self, value: f64) -> &mut Self { + self.cspm_host_percentage = Some(value); + self + } + + pub fn cspm_host_usage(&mut self, value: f64) -> &mut Self { + self.cspm_host_usage = Some(value); + self + } + + pub fn custom_timeseries_percentage(&mut self, value: f64) -> &mut Self { + self.custom_timeseries_percentage = Some(value); + self + } + + pub fn custom_timeseries_usage(&mut self, value: f64) -> &mut Self { + self.custom_timeseries_usage = Some(value); + self + } + + pub fn cws_container_percentage(&mut self, value: f64) -> &mut Self { + self.cws_container_percentage = Some(value); + self + } + + pub fn cws_container_usage(&mut self, value: f64) -> &mut Self { + self.cws_container_usage = Some(value); + self + } + + pub fn cws_host_percentage(&mut self, value: f64) -> &mut Self { + self.cws_host_percentage = Some(value); + self + } + + pub fn cws_host_usage(&mut self, value: f64) -> &mut Self { + self.cws_host_usage = Some(value); + self + } + + pub fn dbm_hosts_percentage(&mut self, value: f64) -> &mut Self { + self.dbm_hosts_percentage = Some(value); + self + } + + pub fn dbm_hosts_usage(&mut self, value: f64) -> &mut Self { + self.dbm_hosts_usage = Some(value); + self + } + + pub fn dbm_queries_percentage(&mut self, value: f64) -> &mut Self { + self.dbm_queries_percentage = Some(value); + self + } + + pub fn dbm_queries_usage(&mut self, value: f64) -> &mut Self { + self.dbm_queries_usage = Some(value); + self + } + + pub fn estimated_indexed_logs_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_indexed_logs_percentage = Some(value); + self + } + + pub fn estimated_indexed_logs_usage(&mut self, value: f64) -> &mut Self { + self.estimated_indexed_logs_usage = Some(value); + self + } + + pub fn estimated_indexed_spans_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_indexed_spans_percentage = Some(value); + self + } + + pub fn estimated_indexed_spans_usage(&mut self, value: f64) -> &mut Self { + self.estimated_indexed_spans_usage = Some(value); + self + } + + pub fn estimated_ingested_logs_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_ingested_logs_percentage = Some(value); + self + } + + pub fn estimated_ingested_logs_usage(&mut self, value: f64) -> &mut Self { + self.estimated_ingested_logs_usage = Some(value); + self + } + + pub fn estimated_ingested_spans_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_ingested_spans_percentage = Some(value); + self + } + + pub fn estimated_ingested_spans_usage(&mut self, value: f64) -> &mut Self { + self.estimated_ingested_spans_usage = Some(value); + self + } + + pub fn estimated_rum_sessions_percentage(&mut self, value: f64) -> &mut Self { + self.estimated_rum_sessions_percentage = Some(value); + self + } + + pub fn estimated_rum_sessions_usage(&mut self, value: f64) -> &mut Self { + self.estimated_rum_sessions_usage = Some(value); + self + } + + pub fn infra_host_percentage(&mut self, value: f64) -> &mut Self { + self.infra_host_percentage = Some(value); + self + } + + pub fn infra_host_usage(&mut self, value: f64) -> &mut Self { + self.infra_host_usage = Some(value); + self + } + + pub fn lambda_functions_percentage(&mut self, value: f64) -> &mut Self { + self.lambda_functions_percentage = Some(value); + self + } + + pub fn lambda_functions_usage(&mut self, value: f64) -> &mut Self { + self.lambda_functions_usage = Some(value); + self + } + + pub fn lambda_invocations_percentage(&mut self, value: f64) -> &mut Self { + self.lambda_invocations_percentage = Some(value); + self + } + + pub fn lambda_invocations_usage(&mut self, value: f64) -> &mut Self { + self.lambda_invocations_usage = Some(value); + self + } + + pub fn npm_host_percentage(&mut self, value: f64) -> &mut Self { + self.npm_host_percentage = Some(value); + self + } + + pub fn npm_host_usage(&mut self, value: f64) -> &mut Self { + self.npm_host_usage = Some(value); + self + } + + pub fn profiled_container_percentage(&mut self, value: f64) -> &mut Self { + self.profiled_container_percentage = Some(value); + self + } + + pub fn profiled_container_usage(&mut self, value: f64) -> &mut Self { + self.profiled_container_usage = Some(value); + self + } + + pub fn profiled_hosts_percentage(&mut self, value: f64) -> &mut Self { + self.profiled_hosts_percentage = Some(value); + self + } + + pub fn profiled_hosts_usage(&mut self, value: f64) -> &mut Self { + self.profiled_hosts_usage = Some(value); + self + } + + pub fn snmp_percentage(&mut self, value: f64) -> &mut Self { + self.snmp_percentage = Some(value); + 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 bf1dd5a18..05b1f5178 100644 --- a/src/datadogV1/model/model_usage_audit_logs_hour.rs +++ b/src/datadogV1/model/model_usage_audit_logs_hour.rs @@ -35,7 +35,28 @@ impl UsageAuditLogsHour { public_id: None, } } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn lines_indexed(&mut self, value: Option) -> &mut Self { + self.lines_indexed = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 8df57c7fc..015ef3756 100644 --- a/src/datadogV1/model/model_usage_audit_logs_response.rs +++ b/src/datadogV1/model/model_usage_audit_logs_response.rs @@ -17,7 +17,13 @@ impl UsageAuditLogsResponse { pub fn new() -> UsageAuditLogsResponse { UsageAuditLogsResponse { usage: None } } + + 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 a32afb399..359761324 100644 --- a/src/datadogV1/model/model_usage_billable_summary_body.rs +++ b/src/datadogV1/model/model_usage_billable_summary_body.rs @@ -43,7 +43,43 @@ impl UsageBillableSummaryBody { usage_unit: None, } } + + pub fn account_billable_usage(&mut self, value: i64) -> &mut Self { + self.account_billable_usage = Some(value); + self + } + + pub fn elapsed_usage_hours(&mut self, value: i64) -> &mut Self { + self.elapsed_usage_hours = Some(value); + self + } + + pub fn first_billable_usage_hour(&mut self, value: String) -> &mut Self { + self.first_billable_usage_hour = Some(value); + self + } + + pub fn last_billable_usage_hour(&mut self, value: String) -> &mut Self { + self.last_billable_usage_hour = Some(value); + self + } + + pub fn org_billable_usage(&mut self, value: i64) -> &mut Self { + self.org_billable_usage = Some(value); + self + } + + pub fn percentage_in_account(&mut self, value: f64) -> &mut Self { + self.percentage_in_account = Some(value); + 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 ecde186d1..ff9860000 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,7 +51,53 @@ impl UsageBillableSummaryHour { usage: None, } } + + pub fn billing_plan(&mut self, value: String) -> &mut Self { + self.billing_plan = Some(value); + self + } + + pub fn end_date(&mut self, value: String) -> &mut Self { + self.end_date = Some(value); + self + } + + pub fn num_orgs(&mut self, value: i64) -> &mut Self { + self.num_orgs = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn ratio_in_month(&mut self, value: f64) -> &mut Self { + self.ratio_in_month = Some(value); + self + } + + pub fn region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } + + pub fn start_date(&mut self, value: String) -> &mut Self { + self.start_date = Some(value); + 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 aa73a323d..4d96d8d04 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,7 +372,712 @@ impl UsageBillableSummaryKeys { timeseries_sum: None, } } + + pub fn apm_fargate_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.apm_fargate_average = Some(value); + self + } + + pub fn apm_fargate_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.apm_fargate_sum = Some(value); + self + } + + pub fn apm_host_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.apm_host_sum = Some(value); + self + } + + pub fn apm_host_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.apm_host_top99p = Some(value); + self + } + + pub fn apm_profiler_host_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.apm_profiler_host_sum = Some(value); + self + } + + pub fn apm_profiler_host_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.apm_profiler_host_top99p = Some(value); + self + } + + pub fn apm_trace_search_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.apm_trace_search_sum = Some(value); + self + } + + pub fn application_security_fargate_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.application_security_fargate_average = Some(value); + self + } + + pub fn application_security_host_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.application_security_host_sum = Some(value); + self + } + + pub fn application_security_host_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.application_security_host_top99p = Some(value); + self + } + + pub fn 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 ci_pipeline_maximum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.ci_pipeline_maximum = Some(value); + self + } + + pub fn ci_pipeline_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.ci_pipeline_sum = Some(value); + self + } + + pub fn 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 ci_testing_maximum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.ci_testing_maximum = Some(value); + self + } + + pub fn ci_testing_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.ci_testing_sum = Some(value); + self + } + + pub fn cloud_cost_management_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.cloud_cost_management_average = Some(value); + self + } + + pub fn cloud_cost_management_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.cloud_cost_management_sum = Some(value); + self + } + + pub fn cspm_container_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.cspm_container_sum = Some(value); + self + } + + pub fn cspm_host_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.cspm_host_sum = Some(value); + self + } + + pub fn cspm_host_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.cspm_host_top99p = Some(value); + self + } + + pub fn custom_event_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.custom_event_sum = Some(value); + self + } + + pub fn cws_container_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.cws_container_sum = Some(value); + self + } + + pub fn cws_host_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.cws_host_sum = Some(value); + self + } + + pub fn cws_host_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.cws_host_top99p = Some(value); + self + } + + pub fn dbm_host_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.dbm_host_sum = Some(value); + self + } + + pub fn dbm_host_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.dbm_host_top99p = Some(value); + self + } + + pub fn dbm_normalized_queries_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.dbm_normalized_queries_average = Some(value); + self + } + + pub fn dbm_normalized_queries_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.dbm_normalized_queries_sum = Some(value); + self + } + + pub fn 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 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 fargate_container_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.fargate_container_average = Some(value); + self + } + + pub fn fargate_container_profiler_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.fargate_container_profiler_average = Some(value); + self + } + + pub fn fargate_container_profiler_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.fargate_container_profiler_sum = Some(value); + self + } + + pub fn fargate_container_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.fargate_container_sum = Some(value); + self + } + + pub fn incident_management_maximum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.incident_management_maximum = Some(value); + self + } + + pub fn incident_management_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.incident_management_sum = Some(value); + self + } + + pub fn 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 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 infra_container_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.infra_container_sum = Some(value); + self + } + + pub fn infra_host_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.infra_host_sum = Some(value); + self + } + + pub fn infra_host_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.infra_host_top99p = Some(value); + self + } + + pub fn ingested_spans_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.ingested_spans_sum = Some(value); + self + } + + pub fn ingested_timeseries_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.ingested_timeseries_average = Some(value); + self + } + + pub fn ingested_timeseries_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.ingested_timeseries_sum = Some(value); + self + } + + pub fn iot_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.iot_sum = Some(value); + self + } + + pub fn iot_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.iot_top99p = Some(value); + self + } + + pub fn lambda_function_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.lambda_function_average = Some(value); + self + } + + pub fn lambda_function_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.lambda_function_sum = Some(value); + self + } + + pub fn logs_forwarding_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_forwarding_sum = Some(value); + self + } + + pub fn logs_indexed_15day_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_15day_sum = Some(value); + self + } + + pub fn logs_indexed_180day_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_180day_sum = Some(value); + self + } + + pub fn logs_indexed_30day_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_30day_sum = Some(value); + self + } + + pub fn logs_indexed_360day_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_360day_sum = Some(value); + self + } + + pub fn logs_indexed_3day_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_3day_sum = Some(value); + self + } + + pub fn logs_indexed_45day_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_45day_sum = Some(value); + self + } + + pub fn logs_indexed_60day_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_60day_sum = Some(value); + self + } + + pub fn logs_indexed_7day_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_7day_sum = Some(value); + self + } + + pub fn logs_indexed_90day_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_90day_sum = Some(value); + self + } + + pub fn 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 logs_indexed_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_indexed_sum = Some(value); + self + } + + pub fn logs_ingested_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.logs_ingested_sum = Some(value); + self + } + + pub fn network_device_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.network_device_sum = Some(value); + self + } + + pub fn network_device_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.network_device_top99p = Some(value); + self + } + + pub fn npm_flow_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.npm_flow_sum = Some(value); + self + } + + pub fn npm_host_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.npm_host_sum = Some(value); + self + } + + pub fn npm_host_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.npm_host_top99p = Some(value); + self + } + + pub fn observability_pipeline_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.observability_pipeline_sum = Some(value); + self + } + + pub fn online_archive_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.online_archive_sum = Some(value); + self + } + + pub fn prof_container_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.prof_container_sum = Some(value); + self + } + + pub fn prof_host_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.prof_host_sum = Some(value); + self + } + + pub fn prof_host_top99p( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.prof_host_top99p = Some(value); + self + } + + pub fn rum_lite_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.rum_lite_sum = Some(value); + self + } + + pub fn rum_replay_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.rum_replay_sum = Some(value); + self + } + + pub fn rum_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.rum_sum = Some(value); + self + } + + pub fn rum_units_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.rum_units_sum = Some(value); + self + } + + pub fn sensitive_data_scanner_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.sensitive_data_scanner_sum = Some(value); + self + } + + pub fn serverless_apm_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.serverless_apm_sum = Some(value); + self + } + + pub fn serverless_infra_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.serverless_infra_average = Some(value); + self + } + + pub fn serverless_infra_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.serverless_infra_sum = Some(value); + self + } + + pub fn serverless_invocation_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.serverless_invocation_sum = Some(value); + self + } + + pub fn siem_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.siem_sum = Some(value); + self + } + + pub fn standard_timeseries_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.standard_timeseries_average = Some(value); + self + } + + pub fn synthetics_api_tests_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.synthetics_api_tests_sum = Some(value); + self + } + + pub fn synthetics_app_testing_maximum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.synthetics_app_testing_maximum = Some(value); + self + } + + pub fn synthetics_browser_checks_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.synthetics_browser_checks_sum = Some(value); + self + } + + pub fn timeseries_average( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.timeseries_average = Some(value); + self + } + + pub fn timeseries_sum( + &mut self, + value: crate::datadogV1::model::UsageBillableSummaryBody, + ) -> &mut Self { + self.timeseries_sum = Some(value); + 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 df90583cc..5763796eb 100644 --- a/src/datadogV1/model/model_usage_billable_summary_response.rs +++ b/src/datadogV1/model/model_usage_billable_summary_response.rs @@ -17,7 +17,16 @@ impl UsageBillableSummaryResponse { pub fn new() -> UsageBillableSummaryResponse { UsageBillableSummaryResponse { usage: None } } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 c0a99d349..5c2267816 100644 --- a/src/datadogV1/model/model_usage_ci_visibility_hour.rs +++ b/src/datadogV1/model/model_usage_ci_visibility_hour.rs @@ -63,7 +63,43 @@ impl UsageCIVisibilityHour { public_id: None, } } + + pub fn ci_pipeline_indexed_spans(&mut self, value: Option) -> &mut Self { + self.ci_pipeline_indexed_spans = Some(value); + self + } + + pub fn ci_test_indexed_spans(&mut self, value: Option) -> &mut Self { + self.ci_test_indexed_spans = Some(value); + self + } + + pub fn ci_visibility_itr_committers(&mut self, value: Option) -> &mut Self { + self.ci_visibility_itr_committers = Some(value); + self + } + + pub fn ci_visibility_pipeline_committers(&mut self, value: Option) -> &mut Self { + self.ci_visibility_pipeline_committers = Some(value); + self + } + + pub fn ci_visibility_test_committers(&mut self, value: Option) -> &mut Self { + self.ci_visibility_test_committers = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 ac0851596..bfbf9f847 100644 --- a/src/datadogV1/model/model_usage_ci_visibility_response.rs +++ b/src/datadogV1/model/model_usage_ci_visibility_response.rs @@ -17,7 +17,16 @@ impl UsageCIVisibilityResponse { pub fn new() -> UsageCIVisibilityResponse { UsageCIVisibilityResponse { usage: None } } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 a80ab46c5..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 @@ -83,7 +83,58 @@ impl UsageCloudSecurityPostureManagementHour { public_id: None, } } + + pub fn aas_host_count(&mut self, value: Option) -> &mut Self { + self.aas_host_count = Some(value); + self + } + + pub fn aws_host_count(&mut self, value: Option) -> &mut Self { + self.aws_host_count = Some(value); + self + } + + pub fn azure_host_count(&mut self, value: Option) -> &mut Self { + self.azure_host_count = Some(value); + self + } + + pub fn compliance_host_count(&mut self, value: Option) -> &mut Self { + self.compliance_host_count = Some(value); + self + } + + pub fn container_count(&mut self, value: Option) -> &mut Self { + self.container_count = Some(value); + self + } + + pub fn gcp_host_count(&mut self, value: Option) -> &mut Self { + self.gcp_host_count = Some(value); + self + } + + pub fn host_count(&mut self, value: Option) -> &mut Self { + self.host_count = Some(value); + self + } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 e2a5973d8..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 @@ -17,7 +17,16 @@ impl UsageCloudSecurityPostureManagementResponse { pub fn new() -> UsageCloudSecurityPostureManagementResponse { UsageCloudSecurityPostureManagementResponse { usage: None } } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 457fc47b8..b1d9e7960 100644 --- a/src/datadogV1/model/model_usage_custom_reports_attributes.rs +++ b/src/datadogV1/model/model_usage_custom_reports_attributes.rs @@ -35,7 +35,33 @@ impl UsageCustomReportsAttributes { tags: None, } } + + pub fn computed_on(&mut self, value: String) -> &mut Self { + self.computed_on = Some(value); + self + } + + pub fn end_date(&mut self, value: String) -> &mut Self { + self.end_date = Some(value); + self + } + + pub fn size(&mut self, value: i64) -> &mut Self { + self.size = Some(value); + self + } + + pub fn start_date(&mut self, value: String) -> &mut Self { + self.start_date = Some(value); + 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 12ed91edd..dfb9c2959 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,7 +27,26 @@ impl UsageCustomReportsData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV1::model::UsageCustomReportsAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 2194794ef..4293f9c14 100644 --- a/src/datadogV1/model/model_usage_custom_reports_meta.rs +++ b/src/datadogV1/model/model_usage_custom_reports_meta.rs @@ -10,14 +10,20 @@ 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 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 2d3d32fab..95948977f 100644 --- a/src/datadogV1/model/model_usage_custom_reports_page.rs +++ b/src/datadogV1/model/model_usage_custom_reports_page.rs @@ -17,7 +17,13 @@ impl UsageCustomReportsPage { pub fn new() -> UsageCustomReportsPage { UsageCustomReportsPage { total_count: None } } + + 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 5181dc864..568a64d3d 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,7 +23,21 @@ impl UsageCustomReportsResponse { meta: None, } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 69ad8f001..45a183536 100644 --- a/src/datadogV1/model/model_usage_cws_hour.rs +++ b/src/datadogV1/model/model_usage_cws_hour.rs @@ -43,7 +43,33 @@ impl UsageCWSHour { public_id: None, } } + + pub fn cws_container_count(&mut self, value: Option) -> &mut Self { + self.cws_container_count = Some(value); + self + } + + pub fn cws_host_count(&mut self, value: Option) -> &mut Self { + self.cws_host_count = Some(value); + self + } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 d2c24dde8..a019fdebc 100644 --- a/src/datadogV1/model/model_usage_cws_response.rs +++ b/src/datadogV1/model/model_usage_cws_response.rs @@ -17,7 +17,13 @@ impl UsageCWSResponse { pub fn new() -> UsageCWSResponse { UsageCWSResponse { usage: None } } + + 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 f6f1ebdab..81a731a76 100644 --- a/src/datadogV1/model/model_usage_dbm_hour.rs +++ b/src/datadogV1/model/model_usage_dbm_hour.rs @@ -43,7 +43,33 @@ impl UsageDBMHour { public_id: None, } } + + pub fn dbm_host_count(&mut self, value: Option) -> &mut Self { + self.dbm_host_count = Some(value); + self + } + + pub fn dbm_queries_count(&mut self, value: Option) -> &mut Self { + self.dbm_queries_count = Some(value); + self + } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 23cfd5894..3829262dd 100644 --- a/src/datadogV1/model/model_usage_dbm_response.rs +++ b/src/datadogV1/model/model_usage_dbm_response.rs @@ -17,7 +17,13 @@ impl UsageDBMResponse { pub fn new() -> UsageDBMResponse { UsageDBMResponse { usage: None } } + + 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 2cf6156f4..04ffcb4e5 100644 --- a/src/datadogV1/model/model_usage_fargate_hour.rs +++ b/src/datadogV1/model/model_usage_fargate_hour.rs @@ -59,7 +59,43 @@ impl UsageFargateHour { tasks_count: None, } } + + pub fn apm_fargate_count(&mut self, value: Option) -> &mut Self { + self.apm_fargate_count = Some(value); + self + } + + pub fn appsec_fargate_count(&mut self, value: Option) -> &mut Self { + self.appsec_fargate_count = Some(value); + self + } + + pub fn avg_profiled_fargate_tasks(&mut self, value: Option) -> &mut Self { + self.avg_profiled_fargate_tasks = Some(value); + self + } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + 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 9d35cec27..a1313ac4c 100644 --- a/src/datadogV1/model/model_usage_fargate_response.rs +++ b/src/datadogV1/model/model_usage_fargate_response.rs @@ -17,7 +17,13 @@ impl UsageFargateResponse { pub fn new() -> UsageFargateResponse { UsageFargateResponse { usage: None } } + + 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 3cc400b6a..d0bb980d6 100644 --- a/src/datadogV1/model/model_usage_host_hour.rs +++ b/src/datadogV1/model/model_usage_host_hour.rs @@ -148,7 +148,93 @@ impl UsageHostHour { vsphere_host_count: None, } } + + pub fn agent_host_count(&mut self, value: Option) -> &mut Self { + self.agent_host_count = Some(value); + self + } + + pub fn alibaba_host_count(&mut self, value: Option) -> &mut Self { + self.alibaba_host_count = Some(value); + 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 apm_host_count(&mut self, value: Option) -> &mut Self { + self.apm_host_count = Some(value); + self + } + + pub fn aws_host_count(&mut self, value: Option) -> &mut Self { + self.aws_host_count = Some(value); + self + } + + pub fn azure_host_count(&mut self, value: Option) -> &mut Self { + self.azure_host_count = Some(value); + self + } + + pub fn container_count(&mut self, value: Option) -> &mut Self { + self.container_count = Some(value); + self + } + + pub fn gcp_host_count(&mut self, value: Option) -> &mut Self { + self.gcp_host_count = Some(value); + self + } + + pub fn heroku_host_count(&mut self, value: Option) -> &mut Self { + self.heroku_host_count = Some(value); + self + } + + pub fn host_count(&mut self, value: Option) -> &mut Self { + self.host_count = Some(value); + self + } + + pub fn hour(&mut self, value: Option) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn infra_azure_app_service(&mut self, value: Option) -> &mut Self { + self.infra_azure_app_service = Some(value); + self + } + + pub fn opentelemetry_apm_host_count(&mut self, value: Option) -> &mut Self { + self.opentelemetry_apm_host_count = Some(value); + self + } + + pub fn opentelemetry_host_count(&mut self, value: Option) -> &mut Self { + self.opentelemetry_host_count = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + 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 fefe352ef..d0e0bf6c7 100644 --- a/src/datadogV1/model/model_usage_hosts_response.rs +++ b/src/datadogV1/model/model_usage_hosts_response.rs @@ -17,7 +17,13 @@ impl UsageHostsResponse { pub fn new() -> UsageHostsResponse { UsageHostsResponse { usage: None } } + + 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 348047aeb..40b5dc803 100644 --- a/src/datadogV1/model/model_usage_incident_management_hour.rs +++ b/src/datadogV1/model/model_usage_incident_management_hour.rs @@ -35,7 +35,28 @@ impl UsageIncidentManagementHour { public_id: None, } } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn monthly_active_users(&mut self, value: Option) -> &mut Self { + self.monthly_active_users = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 dfeeed42e..d29d49874 100644 --- a/src/datadogV1/model/model_usage_incident_management_response.rs +++ b/src/datadogV1/model/model_usage_incident_management_response.rs @@ -17,7 +17,16 @@ impl UsageIncidentManagementResponse { pub fn new() -> UsageIncidentManagementResponse { UsageIncidentManagementResponse { usage: None } } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 9df233311..ae57f5753 100644 --- a/src/datadogV1/model/model_usage_indexed_spans_hour.rs +++ b/src/datadogV1/model/model_usage_indexed_spans_hour.rs @@ -35,7 +35,28 @@ impl UsageIndexedSpansHour { public_id: None, } } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn indexed_events_count(&mut self, value: Option) -> &mut Self { + self.indexed_events_count = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 b5712ea2d..5d7c979c7 100644 --- a/src/datadogV1/model/model_usage_indexed_spans_response.rs +++ b/src/datadogV1/model/model_usage_indexed_spans_response.rs @@ -17,7 +17,16 @@ impl UsageIndexedSpansResponse { pub fn new() -> UsageIndexedSpansResponse { UsageIndexedSpansResponse { usage: None } } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 c6c779234..3652d9119 100644 --- a/src/datadogV1/model/model_usage_ingested_spans_hour.rs +++ b/src/datadogV1/model/model_usage_ingested_spans_hour.rs @@ -35,7 +35,28 @@ impl UsageIngestedSpansHour { public_id: None, } } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn ingested_events_bytes(&mut self, value: Option) -> &mut Self { + self.ingested_events_bytes = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 2f68db4e8..9b86ac4d9 100644 --- a/src/datadogV1/model/model_usage_ingested_spans_response.rs +++ b/src/datadogV1/model/model_usage_ingested_spans_response.rs @@ -17,7 +17,16 @@ impl UsageIngestedSpansResponse { pub fn new() -> UsageIngestedSpansResponse { UsageIngestedSpansResponse { usage: None } } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 95fd93b55..674261045 100644 --- a/src/datadogV1/model/model_usage_io_t_hour.rs +++ b/src/datadogV1/model/model_usage_io_t_hour.rs @@ -35,7 +35,28 @@ impl UsageIoTHour { public_id: None, } } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn iot_device_count(&mut self, value: Option) -> &mut Self { + self.iot_device_count = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 de17aca5e..446fec2e5 100644 --- a/src/datadogV1/model/model_usage_io_t_response.rs +++ b/src/datadogV1/model/model_usage_io_t_response.rs @@ -17,7 +17,13 @@ impl UsageIoTResponse { pub fn new() -> UsageIoTResponse { UsageIoTResponse { usage: None } } + + 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 cc3bfcdd6..adf212027 100644 --- a/src/datadogV1/model/model_usage_lambda_hour.rs +++ b/src/datadogV1/model/model_usage_lambda_hour.rs @@ -44,7 +44,33 @@ impl UsageLambdaHour { public_id: None, } } + + pub fn func_count(&mut self, value: Option) -> &mut Self { + self.func_count = Some(value); + self + } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn invocations_sum(&mut self, value: Option) -> &mut Self { + self.invocations_sum = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 627010b8d..a82d59e0e 100644 --- a/src/datadogV1/model/model_usage_lambda_response.rs +++ b/src/datadogV1/model/model_usage_lambda_response.rs @@ -18,7 +18,13 @@ impl UsageLambdaResponse { pub fn new() -> UsageLambdaResponse { UsageLambdaResponse { usage: None } } + + 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 5dfed955c..d95dc6271 100644 --- a/src/datadogV1/model/model_usage_logs_by_index_hour.rs +++ b/src/datadogV1/model/model_usage_logs_by_index_hour.rs @@ -43,7 +43,43 @@ impl UsageLogsByIndexHour { retention: None, } } + + pub fn event_count(&mut self, value: i64) -> &mut Self { + self.event_count = Some(value); + self + } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn index_id(&mut self, value: String) -> &mut Self { + self.index_id = Some(value); + self + } + + pub fn index_name(&mut self, value: String) -> &mut Self { + self.index_name = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + 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 da8875db8..7385997ea 100644 --- a/src/datadogV1/model/model_usage_logs_by_index_response.rs +++ b/src/datadogV1/model/model_usage_logs_by_index_response.rs @@ -17,7 +17,16 @@ impl UsageLogsByIndexResponse { pub fn new() -> UsageLogsByIndexResponse { UsageLogsByIndexResponse { usage: None } } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 ddc591043..560e505b0 100644 --- a/src/datadogV1/model/model_usage_logs_by_retention_hour.rs +++ b/src/datadogV1/model/model_usage_logs_by_retention_hour.rs @@ -55,7 +55,38 @@ impl UsageLogsByRetentionHour { retention: None, } } + + pub fn indexed_events_count(&mut self, value: Option) -> &mut Self { + self.indexed_events_count = Some(value); + self + } + + pub fn live_indexed_events_count(&mut self, value: Option) -> &mut Self { + self.live_indexed_events_count = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn rehydrated_indexed_events_count(&mut self, value: Option) -> &mut Self { + self.rehydrated_indexed_events_count = Some(value); + 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 78da0a76d..e1afdc96f 100644 --- a/src/datadogV1/model/model_usage_logs_by_retention_response.rs +++ b/src/datadogV1/model/model_usage_logs_by_retention_response.rs @@ -17,7 +17,16 @@ impl UsageLogsByRetentionResponse { pub fn new() -> UsageLogsByRetentionResponse { UsageLogsByRetentionResponse { usage: None } } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 bf449f5e0..28b78f871 100644 --- a/src/datadogV1/model/model_usage_logs_hour.rs +++ b/src/datadogV1/model/model_usage_logs_hour.rs @@ -91,7 +91,63 @@ impl UsageLogsHour { public_id: None, } } + + pub fn billable_ingested_bytes(&mut self, value: Option) -> &mut Self { + self.billable_ingested_bytes = Some(value); + self + } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn indexed_events_count(&mut self, value: Option) -> &mut Self { + self.indexed_events_count = Some(value); + self + } + + pub fn ingested_events_bytes(&mut self, value: Option) -> &mut Self { + self.ingested_events_bytes = Some(value); + self + } + + pub fn logs_forwarding_events_bytes(&mut self, value: Option) -> &mut Self { + self.logs_forwarding_events_bytes = Some(value); + self + } + + pub fn logs_live_indexed_count(&mut self, value: Option) -> &mut Self { + self.logs_live_indexed_count = Some(value); + self + } + + pub fn logs_live_ingested_bytes(&mut self, value: Option) -> &mut Self { + self.logs_live_ingested_bytes = Some(value); + self + } + + pub fn logs_rehydrated_indexed_count(&mut self, value: Option) -> &mut Self { + self.logs_rehydrated_indexed_count = Some(value); + self + } + + pub fn logs_rehydrated_ingested_bytes(&mut self, value: Option) -> &mut Self { + self.logs_rehydrated_ingested_bytes = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 d377b6b50..02663e441 100644 --- a/src/datadogV1/model/model_usage_logs_response.rs +++ b/src/datadogV1/model/model_usage_logs_response.rs @@ -17,7 +17,13 @@ impl UsageLogsResponse { pub fn new() -> UsageLogsResponse { UsageLogsResponse { usage: None } } + + 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 16add087d..702935dee 100644 --- a/src/datadogV1/model/model_usage_network_flows_hour.rs +++ b/src/datadogV1/model/model_usage_network_flows_hour.rs @@ -35,7 +35,28 @@ impl UsageNetworkFlowsHour { public_id: None, } } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn indexed_events_count(&mut self, value: Option) -> &mut Self { + self.indexed_events_count = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 daad4815e..c66198e58 100644 --- a/src/datadogV1/model/model_usage_network_flows_response.rs +++ b/src/datadogV1/model/model_usage_network_flows_response.rs @@ -17,7 +17,16 @@ impl UsageNetworkFlowsResponse { pub fn new() -> UsageNetworkFlowsResponse { UsageNetworkFlowsResponse { usage: None } } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 2d5b6dce2..1e6dd708e 100644 --- a/src/datadogV1/model/model_usage_network_hosts_hour.rs +++ b/src/datadogV1/model/model_usage_network_hosts_hour.rs @@ -35,7 +35,28 @@ impl UsageNetworkHostsHour { public_id: None, } } + + pub fn host_count(&mut self, value: Option) -> &mut Self { + self.host_count = Some(value); + self + } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 dbe88bcbf..809775424 100644 --- a/src/datadogV1/model/model_usage_network_hosts_response.rs +++ b/src/datadogV1/model/model_usage_network_hosts_response.rs @@ -17,7 +17,16 @@ impl UsageNetworkHostsResponse { pub fn new() -> UsageNetworkHostsResponse { UsageNetworkHostsResponse { usage: None } } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 290a763c5..3165830b7 100644 --- a/src/datadogV1/model/model_usage_online_archive_hour.rs +++ b/src/datadogV1/model/model_usage_online_archive_hour.rs @@ -35,7 +35,28 @@ impl UsageOnlineArchiveHour { public_id: None, } } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn online_archive_events_count(&mut self, value: Option) -> &mut Self { + self.online_archive_events_count = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 0d9fc4a2e..3a7388c25 100644 --- a/src/datadogV1/model/model_usage_online_archive_response.rs +++ b/src/datadogV1/model/model_usage_online_archive_response.rs @@ -17,7 +17,16 @@ impl UsageOnlineArchiveResponse { pub fn new() -> UsageOnlineArchiveResponse { UsageOnlineArchiveResponse { usage: None } } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 fceeefd92..5d856ce0e 100644 --- a/src/datadogV1/model/model_usage_profiling_hour.rs +++ b/src/datadogV1/model/model_usage_profiling_hour.rs @@ -51,7 +51,38 @@ impl UsageProfilingHour { public_id: None, } } + + pub fn aas_count(&mut self, value: Option) -> &mut Self { + self.aas_count = Some(value); + self + } + + pub fn avg_container_agent_count(&mut self, value: Option) -> &mut Self { + self.avg_container_agent_count = Some(value); + self + } + + pub fn host_count(&mut self, value: Option) -> &mut Self { + self.host_count = Some(value); + self + } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 b673ae2a8..91982ea5c 100644 --- a/src/datadogV1/model/model_usage_profiling_response.rs +++ b/src/datadogV1/model/model_usage_profiling_response.rs @@ -17,7 +17,13 @@ impl UsageProfilingResponse { pub fn new() -> UsageProfilingResponse { UsageProfilingResponse { usage: None } } + + 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 e148e2f4c..12bc38693 100644 --- a/src/datadogV1/model/model_usage_rum_sessions_hour.rs +++ b/src/datadogV1/model/model_usage_rum_sessions_hour.rs @@ -71,7 +71,53 @@ impl UsageRumSessionsHour { session_count_reactnative: None, } } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn replay_session_count(&mut self, value: i64) -> &mut Self { + self.replay_session_count = Some(value); + self + } + + pub fn session_count(&mut self, value: Option) -> &mut Self { + self.session_count = Some(value); + self + } + + pub fn session_count_android(&mut self, value: Option) -> &mut Self { + self.session_count_android = Some(value); + self + } + + pub fn session_count_flutter(&mut self, value: Option) -> &mut Self { + self.session_count_flutter = Some(value); + self + } + + pub fn session_count_ios(&mut self, value: Option) -> &mut Self { + self.session_count_ios = Some(value); + 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 a885f15c4..9e54e8831 100644 --- a/src/datadogV1/model/model_usage_rum_sessions_response.rs +++ b/src/datadogV1/model/model_usage_rum_sessions_response.rs @@ -17,7 +17,16 @@ impl UsageRumSessionsResponse { pub fn new() -> UsageRumSessionsResponse { UsageRumSessionsResponse { usage: None } } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 474e32003..8a91cd891 100644 --- a/src/datadogV1/model/model_usage_rum_units_hour.rs +++ b/src/datadogV1/model/model_usage_rum_units_hour.rs @@ -47,7 +47,33 @@ impl UsageRumUnitsHour { rum_units: None, } } + + pub fn browser_rum_units(&mut self, value: Option) -> &mut Self { + self.browser_rum_units = Some(value); + self + } + + pub fn mobile_rum_units(&mut self, value: Option) -> &mut Self { + self.mobile_rum_units = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + 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 3d7ba65f3..7b9a38e8f 100644 --- a/src/datadogV1/model/model_usage_rum_units_response.rs +++ b/src/datadogV1/model/model_usage_rum_units_response.rs @@ -17,7 +17,13 @@ impl UsageRumUnitsResponse { pub fn new() -> UsageRumUnitsResponse { UsageRumUnitsResponse { usage: None } } + + 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 8e425436f..a9554208d 100644 --- a/src/datadogV1/model/model_usage_sds_hour.rs +++ b/src/datadogV1/model/model_usage_sds_hour.rs @@ -67,7 +67,48 @@ impl UsageSDSHour { total_scanned_bytes: None, } } + + pub fn apm_scanned_bytes(&mut self, value: Option) -> &mut Self { + self.apm_scanned_bytes = Some(value); + self + } + + pub fn events_scanned_bytes(&mut self, value: Option) -> &mut Self { + self.events_scanned_bytes = Some(value); + self + } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn logs_scanned_bytes(&mut self, value: Option) -> &mut Self { + self.logs_scanned_bytes = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn rum_scanned_bytes(&mut self, value: Option) -> &mut Self { + self.rum_scanned_bytes = Some(value); + 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 eebbf6baa..11cd5bd43 100644 --- a/src/datadogV1/model/model_usage_sds_response.rs +++ b/src/datadogV1/model/model_usage_sds_response.rs @@ -17,7 +17,13 @@ impl UsageSDSResponse { pub fn new() -> UsageSDSResponse { UsageSDSResponse { usage: None } } + + 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 d215af582..8c78fbb35 100644 --- a/src/datadogV1/model/model_usage_snmp_hour.rs +++ b/src/datadogV1/model/model_usage_snmp_hour.rs @@ -35,7 +35,28 @@ impl UsageSNMPHour { snmp_devices: None, } } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + 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 32a58f604..19e49e5bc 100644 --- a/src/datadogV1/model/model_usage_snmp_response.rs +++ b/src/datadogV1/model/model_usage_snmp_response.rs @@ -17,7 +17,13 @@ impl UsageSNMPResponse { pub fn new() -> UsageSNMPResponse { UsageSNMPResponse { usage: None } } + + 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 0a5300cea..854c75466 100644 --- a/src/datadogV1/model/model_usage_specified_custom_reports_attributes.rs +++ b/src/datadogV1/model/model_usage_specified_custom_reports_attributes.rs @@ -39,7 +39,38 @@ impl UsageSpecifiedCustomReportsAttributes { tags: None, } } + + pub fn computed_on(&mut self, value: String) -> &mut Self { + self.computed_on = Some(value); + self + } + + pub fn end_date(&mut self, value: String) -> &mut Self { + self.end_date = Some(value); + self + } + + pub fn location(&mut self, value: String) -> &mut Self { + self.location = Some(value); + self + } + + pub fn size(&mut self, value: i64) -> &mut Self { + self.size = Some(value); + self + } + + pub fn start_date(&mut self, value: String) -> &mut Self { + self.start_date = Some(value); + 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 8f0b1c46f..db998aec1 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,7 +27,26 @@ impl UsageSpecifiedCustomReportsData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV1::model::UsageSpecifiedCustomReportsAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 db476ddeb..f9d92c8f4 100644 --- a/src/datadogV1/model/model_usage_specified_custom_reports_meta.rs +++ b/src/datadogV1/model/model_usage_specified_custom_reports_meta.rs @@ -10,14 +10,23 @@ 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 page( + &mut self, + value: crate::datadogV1::model::UsageSpecifiedCustomReportsPage, + ) -> &mut Self { + self.page = Some(value); + 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 c595be67d..8513ab095 100644 --- a/src/datadogV1/model/model_usage_specified_custom_reports_page.rs +++ b/src/datadogV1/model/model_usage_specified_custom_reports_page.rs @@ -17,7 +17,13 @@ impl UsageSpecifiedCustomReportsPage { pub fn new() -> UsageSpecifiedCustomReportsPage { UsageSpecifiedCustomReportsPage { total_count: None } } + + 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 103918f90..b46749939 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,7 +23,24 @@ impl UsageSpecifiedCustomReportsResponse { meta: None, } } + + pub fn data( + &mut self, + value: crate::datadogV1::model::UsageSpecifiedCustomReportsData, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn meta( + &mut self, + value: crate::datadogV1::model::UsageSpecifiedCustomReportsMeta, + ) -> &mut Self { + self.meta = Some(value); + 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 eced71d68..dccaa07d2 100644 --- a/src/datadogV1/model/model_usage_summary_date.rs +++ b/src/datadogV1/model/model_usage_summary_date.rs @@ -425,7 +425,620 @@ impl UsageSummaryDate { workflow_executions_usage_sum: None, } } + + #[allow(deprecated)] + pub fn agent_host_top99p(&mut self, value: i64) -> &mut Self { + self.agent_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + 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 apm_fargate_count_avg(&mut self, value: i64) -> &mut Self { + self.apm_fargate_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn apm_host_top99p(&mut self, value: i64) -> &mut Self { + self.apm_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn appsec_fargate_count_avg(&mut self, value: i64) -> &mut Self { + self.appsec_fargate_count_avg = Some(value); + self + } + + #[allow(deprecated)] + 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 audit_trail_enabled_hwm(&mut self, value: i64) -> &mut Self { + self.audit_trail_enabled_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn avg_profiled_fargate_tasks(&mut self, value: i64) -> &mut Self { + self.avg_profiled_fargate_tasks = Some(value); + self + } + + #[allow(deprecated)] + pub fn aws_host_top99p(&mut self, value: i64) -> &mut Self { + self.aws_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn aws_lambda_func_count(&mut self, value: i64) -> &mut Self { + self.aws_lambda_func_count = Some(value); + self + } + + #[allow(deprecated)] + pub fn aws_lambda_invocations_sum(&mut self, value: i64) -> &mut Self { + self.aws_lambda_invocations_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn azure_app_service_top99p(&mut self, value: i64) -> &mut Self { + self.azure_app_service_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn billable_ingested_bytes_sum(&mut self, value: i64) -> &mut Self { + self.billable_ingested_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 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 browser_rum_units_sum(&mut self, value: i64) -> &mut Self { + self.browser_rum_units_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 ci_test_indexed_spans_sum(&mut self, value: i64) -> &mut Self { + self.ci_test_indexed_spans_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 ci_visibility_pipeline_committers_hwm(&mut self, value: i64) -> &mut Self { + self.ci_visibility_pipeline_committers_hwm = Some(value); + self + } + + #[allow(deprecated)] + 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 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 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 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 cloud_siem_events_sum(&mut self, value: i64) -> &mut Self { + self.cloud_siem_events_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn container_avg(&mut self, value: i64) -> &mut Self { + self.container_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn container_excl_agent_avg(&mut self, value: i64) -> &mut Self { + self.container_excl_agent_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn container_hwm(&mut self, value: i64) -> &mut Self { + self.container_hwm = Some(value); + self + } + + #[allow(deprecated)] + 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 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 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 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 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 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 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 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 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 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 cspm_aas_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_aas_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn cspm_aws_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_aws_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn cspm_azure_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_azure_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn cspm_container_avg(&mut self, value: i64) -> &mut Self { + self.cspm_container_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn cspm_container_hwm(&mut self, value: i64) -> &mut Self { + self.cspm_container_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn cspm_gcp_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_gcp_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn cspm_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn custom_ts_avg(&mut self, value: i64) -> &mut Self { + self.custom_ts_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn cws_container_count_avg(&mut self, value: i64) -> &mut Self { + self.cws_container_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn cws_host_top99p(&mut self, value: i64) -> &mut Self { + self.cws_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn date(&mut self, value: String) -> &mut Self { + self.date = Some(value); + self + } + + #[allow(deprecated)] + pub fn dbm_host_top99p(&mut self, value: i64) -> &mut Self { + self.dbm_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn dbm_queries_count_avg(&mut self, value: i64) -> &mut Self { + self.dbm_queries_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn fargate_tasks_count_avg(&mut self, value: i64) -> &mut Self { + self.fargate_tasks_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn fargate_tasks_count_hwm(&mut self, value: i64) -> &mut Self { + self.fargate_tasks_count_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn forwarding_events_bytes_sum(&mut self, value: i64) -> &mut Self { + self.forwarding_events_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn gcp_host_top99p(&mut self, value: i64) -> &mut Self { + self.gcp_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn heroku_host_top99p(&mut self, value: i64) -> &mut Self { + self.heroku_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + 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 indexed_events_count_sum(&mut self, value: i64) -> &mut Self { + self.indexed_events_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn infra_host_top99p(&mut self, value: i64) -> &mut Self { + self.infra_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn ingested_events_bytes_sum(&mut self, value: i64) -> &mut Self { + self.ingested_events_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn iot_device_sum(&mut self, value: i64) -> &mut Self { + self.iot_device_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn iot_device_top99p(&mut self, value: i64) -> &mut Self { + self.iot_device_top99p = Some(value); + self + } + + #[allow(deprecated)] + 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 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 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 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 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 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 mobile_rum_session_count_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn mobile_rum_units_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_units_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn ndm_netflow_events_sum(&mut self, value: i64) -> &mut Self { + self.ndm_netflow_events_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 npm_host_top99p(&mut self, value: i64) -> &mut Self { + self.npm_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + 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 online_archive_events_count_sum(&mut self, value: i64) -> &mut Self { + self.online_archive_events_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn opentelemetry_apm_host_top99p(&mut self, value: i64) -> &mut Self { + self.opentelemetry_apm_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn opentelemetry_host_top99p(&mut self, value: i64) -> &mut Self { + self.opentelemetry_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn orgs(&mut self, value: Vec) -> &mut Self { + self.orgs = Some(value); + self + } + + #[allow(deprecated)] + pub fn profiling_aas_count_top99p(&mut self, value: i64) -> &mut Self { + self.profiling_aas_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn profiling_host_top99p(&mut self, value: i64) -> &mut Self { + self.profiling_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + 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 rum_session_count_sum(&mut self, value: i64) -> &mut Self { + self.rum_session_count_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 rum_units_sum(&mut self, value: i64) -> &mut Self { + self.rum_units_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 sds_events_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_events_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 sds_rum_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_rum_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 serverless_apps_azure_count_avg(&mut self, value: i64) -> &mut Self { + self.serverless_apps_azure_count_avg = Some(value); + self + } + + #[allow(deprecated)] + 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 serverless_apps_total_count_avg(&mut self, value: i64) -> &mut Self { + self.serverless_apps_total_count_avg = Some(value); + self + } + + #[allow(deprecated)] + 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 synthetics_check_calls_count_sum(&mut self, value: i64) -> &mut Self { + self.synthetics_check_calls_count_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 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 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 twol_ingested_events_bytes_sum(&mut self, value: i64) -> &mut Self { + self.twol_ingested_events_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 vsphere_host_top99p(&mut self, value: i64) -> &mut Self { + self.vsphere_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + 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 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 a7c41ebf7..3780e7c71 100644 --- a/src/datadogV1/model/model_usage_summary_date_org.rs +++ b/src/datadogV1/model/model_usage_summary_date_org.rs @@ -441,7 +441,644 @@ impl UsageSummaryDateOrg { workflow_executions_usage_sum: None, } } + + #[allow(deprecated)] + pub fn agent_host_top99p(&mut self, value: i64) -> &mut Self { + self.agent_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + 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 apm_fargate_count_avg(&mut self, value: i64) -> &mut Self { + self.apm_fargate_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn apm_host_top99p(&mut self, value: i64) -> &mut Self { + self.apm_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn appsec_fargate_count_avg(&mut self, value: i64) -> &mut Self { + self.appsec_fargate_count_avg = Some(value); + self + } + + #[allow(deprecated)] + 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 audit_trail_enabled_hwm(&mut self, value: i64) -> &mut Self { + self.audit_trail_enabled_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn avg_profiled_fargate_tasks(&mut self, value: i64) -> &mut Self { + self.avg_profiled_fargate_tasks = Some(value); + self + } + + #[allow(deprecated)] + pub fn aws_host_top99p(&mut self, value: i64) -> &mut Self { + self.aws_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn aws_lambda_func_count(&mut self, value: i64) -> &mut Self { + self.aws_lambda_func_count = Some(value); + self + } + + #[allow(deprecated)] + pub fn aws_lambda_invocations_sum(&mut self, value: i64) -> &mut Self { + self.aws_lambda_invocations_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn azure_app_service_top99p(&mut self, value: i64) -> &mut Self { + self.azure_app_service_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn billable_ingested_bytes_sum(&mut self, value: i64) -> &mut Self { + self.billable_ingested_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 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 browser_rum_units_sum(&mut self, value: i64) -> &mut Self { + self.browser_rum_units_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 ci_test_indexed_spans_sum(&mut self, value: i64) -> &mut Self { + self.ci_test_indexed_spans_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 ci_visibility_pipeline_committers_hwm(&mut self, value: i64) -> &mut Self { + self.ci_visibility_pipeline_committers_hwm = Some(value); + self + } + + #[allow(deprecated)] + 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 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 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 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 cloud_siem_events_sum(&mut self, value: i64) -> &mut Self { + self.cloud_siem_events_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn container_avg(&mut self, value: i64) -> &mut Self { + self.container_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn container_excl_agent_avg(&mut self, value: i64) -> &mut Self { + self.container_excl_agent_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn container_hwm(&mut self, value: i64) -> &mut Self { + self.container_hwm = Some(value); + self + } + + #[allow(deprecated)] + 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 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 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 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 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 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 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 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 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 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 cspm_aas_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_aas_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn cspm_aws_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_aws_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn cspm_azure_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_azure_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn cspm_container_avg(&mut self, value: i64) -> &mut Self { + self.cspm_container_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn cspm_container_hwm(&mut self, value: i64) -> &mut Self { + self.cspm_container_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn cspm_gcp_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_gcp_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn cspm_host_top99p(&mut self, value: i64) -> &mut Self { + self.cspm_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn custom_historical_ts_avg(&mut self, value: i64) -> &mut Self { + self.custom_historical_ts_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn custom_live_ts_avg(&mut self, value: i64) -> &mut Self { + self.custom_live_ts_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn custom_ts_avg(&mut self, value: i64) -> &mut Self { + self.custom_ts_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn cws_container_count_avg(&mut self, value: i64) -> &mut Self { + self.cws_container_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn cws_host_top99p(&mut self, value: i64) -> &mut Self { + self.cws_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn dbm_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.dbm_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn dbm_queries_avg_sum(&mut self, value: i64) -> &mut Self { + self.dbm_queries_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn fargate_tasks_count_avg(&mut self, value: i64) -> &mut Self { + self.fargate_tasks_count_avg = Some(value); + self + } + + #[allow(deprecated)] + pub fn fargate_tasks_count_hwm(&mut self, value: i64) -> &mut Self { + self.fargate_tasks_count_hwm = Some(value); + self + } + + #[allow(deprecated)] + pub fn forwarding_events_bytes_sum(&mut self, value: i64) -> &mut Self { + self.forwarding_events_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn gcp_host_top99p(&mut self, value: i64) -> &mut Self { + self.gcp_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn heroku_host_top99p(&mut self, value: i64) -> &mut Self { + self.heroku_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + #[allow(deprecated)] + 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 indexed_events_count_sum(&mut self, value: i64) -> &mut Self { + self.indexed_events_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn infra_host_top99p(&mut self, value: i64) -> &mut Self { + self.infra_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn ingested_events_bytes_sum(&mut self, value: i64) -> &mut Self { + self.ingested_events_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn iot_device_agg_sum(&mut self, value: i64) -> &mut Self { + self.iot_device_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn iot_device_top99p_sum(&mut self, value: i64) -> &mut Self { + self.iot_device_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 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 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 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 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 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 mobile_rum_session_count_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_session_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn mobile_rum_units_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_units_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + #[allow(deprecated)] + pub fn ndm_netflow_events_sum(&mut self, value: i64) -> &mut Self { + self.ndm_netflow_events_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 npm_host_top99p(&mut self, value: i64) -> &mut Self { + self.npm_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + 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 online_archive_events_count_sum(&mut self, value: i64) -> &mut Self { + self.online_archive_events_count_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn opentelemetry_apm_host_top99p(&mut self, value: i64) -> &mut Self { + self.opentelemetry_apm_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn opentelemetry_host_top99p(&mut self, value: i64) -> &mut Self { + self.opentelemetry_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn profiling_aas_count_top99p(&mut self, value: i64) -> &mut Self { + self.profiling_aas_count_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn profiling_host_top99p(&mut self, value: i64) -> &mut Self { + self.profiling_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + #[allow(deprecated)] + pub fn region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } + + #[allow(deprecated)] + 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 rum_session_count_sum(&mut self, value: i64) -> &mut Self { + self.rum_session_count_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 rum_units_sum(&mut self, value: i64) -> &mut Self { + self.rum_units_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 sds_events_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_events_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 sds_rum_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_rum_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 serverless_apps_azure_count_avg(&mut self, value: i64) -> &mut Self { + self.serverless_apps_azure_count_avg = Some(value); + self + } + + #[allow(deprecated)] + 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 serverless_apps_total_count_avg(&mut self, value: i64) -> &mut Self { + self.serverless_apps_total_count_avg = Some(value); + self + } + + #[allow(deprecated)] + 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 synthetics_check_calls_count_sum(&mut self, value: i64) -> &mut Self { + self.synthetics_check_calls_count_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 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 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 twol_ingested_events_bytes_sum(&mut self, value: i64) -> &mut Self { + self.twol_ingested_events_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 vsphere_host_top99p(&mut self, value: i64) -> &mut Self { + self.vsphere_host_top99p = Some(value); + self + } + + #[allow(deprecated)] + 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 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 8280d1456..331c2e45e 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,7 +469,692 @@ impl UsageSummaryResponse { workflow_executions_usage_agg_sum: None, } } + + #[allow(deprecated)] + pub fn agent_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.agent_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 apm_fargate_count_avg_sum(&mut self, value: i64) -> &mut Self { + self.apm_fargate_count_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn apm_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.apm_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 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 audit_trail_enabled_hwm_sum(&mut self, value: i64) -> &mut Self { + self.audit_trail_enabled_hwm_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 aws_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.aws_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn aws_lambda_func_count(&mut self, value: i64) -> &mut Self { + self.aws_lambda_func_count = Some(value); + self + } + + #[allow(deprecated)] + pub fn aws_lambda_invocations_sum(&mut self, value: i64) -> &mut Self { + self.aws_lambda_invocations_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 azure_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.azure_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 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 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 browser_rum_units_agg_sum(&mut self, value: i64) -> &mut Self { + self.browser_rum_units_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 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 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 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 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 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 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 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 cloud_siem_events_agg_sum(&mut self, value: i64) -> &mut Self { + self.cloud_siem_events_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn container_avg_sum(&mut self, value: i64) -> &mut Self { + self.container_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 container_hwm_sum(&mut self, value: i64) -> &mut Self { + self.container_hwm_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 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 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 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 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 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 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 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 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 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 cspm_aas_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.cspm_aas_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 cspm_azure_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.cspm_azure_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn cspm_container_avg_sum(&mut self, value: i64) -> &mut Self { + self.cspm_container_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn cspm_container_hwm_sum(&mut self, value: i64) -> &mut Self { + self.cspm_container_hwm_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 cspm_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.cspm_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn custom_historical_ts_sum(&mut self, value: i64) -> &mut Self { + self.custom_historical_ts_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn custom_live_ts_sum(&mut self, value: i64) -> &mut Self { + self.custom_live_ts_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn custom_ts_sum(&mut self, value: i64) -> &mut Self { + self.custom_ts_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn cws_containers_avg_sum(&mut self, value: i64) -> &mut Self { + self.cws_containers_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn cws_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.cws_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn dbm_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.dbm_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn dbm_queries_avg_sum(&mut self, value: i64) -> &mut Self { + self.dbm_queries_avg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn end_date(&mut self, value: String) -> &mut Self { + self.end_date = Some(value); + self + } + + #[allow(deprecated)] + 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 fargate_tasks_count_hwm_sum(&mut self, value: i64) -> &mut Self { + self.fargate_tasks_count_hwm_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 gcp_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.gcp_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn heroku_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.heroku_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 indexed_events_count_agg_sum(&mut self, value: i64) -> &mut Self { + self.indexed_events_count_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn infra_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.infra_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 iot_device_agg_sum(&mut self, value: i64) -> &mut Self { + self.iot_device_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn iot_device_top99p_sum(&mut self, value: i64) -> &mut Self { + self.iot_device_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn last_updated(&mut self, value: String) -> &mut Self { + self.last_updated = Some(value); + self + } + + #[allow(deprecated)] + 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 live_ingested_bytes_agg_sum(&mut self, value: i64) -> &mut Self { + self.live_ingested_bytes_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn logs_by_retention( + &mut self, + value: crate::datadogV1::model::LogsByRetention, + ) -> &mut Self { + self.logs_by_retention = Some(value); + self + } + + #[allow(deprecated)] + 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 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 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 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 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 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 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 mobile_rum_units_agg_sum(&mut self, value: i64) -> &mut Self { + self.mobile_rum_units_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 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 npm_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.npm_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 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 opentelemetry_apm_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.opentelemetry_apm_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + pub fn opentelemetry_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.opentelemetry_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 profiling_container_agent_count_avg(&mut self, value: i64) -> &mut Self { + self.profiling_container_agent_count_avg = Some(value); + self + } + + #[allow(deprecated)] + 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 rehydrated_indexed_events_agg_sum(&mut self, value: i64) -> &mut Self { + self.rehydrated_indexed_events_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 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 rum_session_count_agg_sum(&mut self, value: i64) -> &mut Self { + self.rum_session_count_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 rum_units_agg_sum(&mut self, value: i64) -> &mut Self { + self.rum_units_agg_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 sds_events_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_events_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 sds_rum_scanned_bytes_sum(&mut self, value: i64) -> &mut Self { + self.sds_rum_scanned_bytes_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 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 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 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 start_date(&mut self, value: String) -> &mut Self { + self.start_date = Some(value); + self + } + + #[allow(deprecated)] + 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 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 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 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 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 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 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 usage(&mut self, value: Vec) -> &mut Self { + self.usage = Some(value); + self + } + + #[allow(deprecated)] + pub fn vsphere_host_top99p_sum(&mut self, value: i64) -> &mut Self { + self.vsphere_host_top99p_sum = Some(value); + self + } + + #[allow(deprecated)] + 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 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 651fc6771..c61758b25 100644 --- a/src/datadogV1/model/model_usage_synthetics_api_hour.rs +++ b/src/datadogV1/model/model_usage_synthetics_api_hour.rs @@ -35,7 +35,28 @@ impl UsageSyntheticsAPIHour { public_id: None, } } + + pub fn check_calls_count(&mut self, value: Option) -> &mut Self { + self.check_calls_count = Some(value); + self + } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 9e76b51a8..e79761399 100644 --- a/src/datadogV1/model/model_usage_synthetics_api_response.rs +++ b/src/datadogV1/model/model_usage_synthetics_api_response.rs @@ -17,7 +17,16 @@ impl UsageSyntheticsAPIResponse { pub fn new() -> UsageSyntheticsAPIResponse { UsageSyntheticsAPIResponse { usage: None } } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 48cf67e16..49e99ea76 100644 --- a/src/datadogV1/model/model_usage_synthetics_browser_hour.rs +++ b/src/datadogV1/model/model_usage_synthetics_browser_hour.rs @@ -35,7 +35,28 @@ impl UsageSyntheticsBrowserHour { public_id: None, } } + + pub fn browser_check_calls_count(&mut self, value: Option) -> &mut Self { + self.browser_check_calls_count = Some(value); + self + } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 5da7567f7..5f720aae0 100644 --- a/src/datadogV1/model/model_usage_synthetics_browser_response.rs +++ b/src/datadogV1/model/model_usage_synthetics_browser_response.rs @@ -17,7 +17,16 @@ impl UsageSyntheticsBrowserResponse { pub fn new() -> UsageSyntheticsBrowserResponse { UsageSyntheticsBrowserResponse { usage: None } } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 e5f44f96b..ec6dd99e2 100644 --- a/src/datadogV1/model/model_usage_synthetics_hour.rs +++ b/src/datadogV1/model/model_usage_synthetics_hour.rs @@ -31,7 +31,28 @@ impl UsageSyntheticsHour { public_id: None, } } + + pub fn check_calls_count(&mut self, value: i64) -> &mut Self { + self.check_calls_count = Some(value); + self + } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 d76855dbd..30e65a570 100644 --- a/src/datadogV1/model/model_usage_synthetics_response.rs +++ b/src/datadogV1/model/model_usage_synthetics_response.rs @@ -17,7 +17,13 @@ impl UsageSyntheticsResponse { pub fn new() -> UsageSyntheticsResponse { UsageSyntheticsResponse { usage: None } } + + 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 796149133..e72f7f3a1 100644 --- a/src/datadogV1/model/model_usage_timeseries_hour.rs +++ b/src/datadogV1/model/model_usage_timeseries_hour.rs @@ -39,7 +39,38 @@ impl UsageTimeseriesHour { public_id: None, } } + + pub fn hour(&mut self, value: String) -> &mut Self { + self.hour = Some(value); + self + } + + pub fn num_custom_input_timeseries(&mut self, value: i64) -> &mut Self { + self.num_custom_input_timeseries = Some(value); + self + } + + pub fn num_custom_output_timeseries(&mut self, value: i64) -> &mut Self { + self.num_custom_output_timeseries = Some(value); + self + } + + pub fn num_custom_timeseries(&mut self, value: i64) -> &mut Self { + self.num_custom_timeseries = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + 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 7affaf206..641c4833a 100644 --- a/src/datadogV1/model/model_usage_timeseries_response.rs +++ b/src/datadogV1/model/model_usage_timeseries_response.rs @@ -17,7 +17,13 @@ impl UsageTimeseriesResponse { pub fn new() -> UsageTimeseriesResponse { UsageTimeseriesResponse { usage: None } } + + 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 c1b923f86..c46cb2a40 100644 --- a/src/datadogV1/model/model_usage_top_avg_metrics_hour.rs +++ b/src/datadogV1/model/model_usage_top_avg_metrics_hour.rs @@ -31,7 +31,31 @@ impl UsageTopAvgMetricsHour { metric_name: None, } } + + pub fn avg_metric_hour(&mut self, value: i64) -> &mut Self { + self.avg_metric_hour = Some(value); + self + } + + pub fn max_metric_hour(&mut self, value: i64) -> &mut Self { + self.max_metric_hour = Some(value); + self + } + + pub fn metric_category( + &mut self, + value: crate::datadogV1::model::UsageMetricCategory, + ) -> &mut Self { + self.metric_category = Some(value); + 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 35122e08e..1edccf4f7 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,7 +27,26 @@ impl UsageTopAvgMetricsMetadata { pagination: None, } } + + pub fn day(&mut self, value: String) -> &mut Self { + self.day = Some(value); + self + } + + pub fn month(&mut self, value: String) -> &mut Self { + self.month = Some(value); + self + } + + pub fn pagination( + &mut self, + value: crate::datadogV1::model::UsageTopAvgMetricsPagination, + ) -> &mut Self { + self.pagination = Some(value); + 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 8741d78b3..53fb8bf06 100644 --- a/src/datadogV1/model/model_usage_top_avg_metrics_pagination.rs +++ b/src/datadogV1/model/model_usage_top_avg_metrics_pagination.rs @@ -35,7 +35,23 @@ impl UsageTopAvgMetricsPagination { total_number_of_records: None, } } + + pub fn limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn next_record_id(&mut self, value: Option) -> &mut Self { + self.next_record_id = Some(value); + 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 ad8e08193..b63b25ac9 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,7 +23,24 @@ impl UsageTopAvgMetricsResponse { usage: None, } } + + pub fn metadata( + &mut self, + value: crate::datadogV1::model::UsageTopAvgMetricsMetadata, + ) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn usage( + &mut self, + value: Vec, + ) -> &mut Self { + self.usage = Some(value); + 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 cb5192b66..24fc6e8da 100644 --- a/src/datadogV1/model/model_user.rs +++ b/src/datadogV1/model/model_user.rs @@ -47,7 +47,43 @@ impl User { verified: None, } } + + pub fn access_role(&mut self, value: Option) -> &mut Self { + self.access_role = Some(value); + self + } + + pub fn disabled(&mut self, value: bool) -> &mut Self { + self.disabled = Some(value); + self + } + + pub fn email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + self + } + + pub fn icon(&mut self, value: String) -> &mut Self { + self.icon = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 c7062dc9f..337465b64 100644 --- a/src/datadogV1/model/model_user_disable_response.rs +++ b/src/datadogV1/model/model_user_disable_response.rs @@ -17,7 +17,13 @@ impl UserDisableResponse { pub fn new() -> UserDisableResponse { UserDisableResponse { message: None } } + + 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 7f6726f8d..64a2479f3 100644 --- a/src/datadogV1/model/model_user_list_response.rs +++ b/src/datadogV1/model/model_user_list_response.rs @@ -17,7 +17,13 @@ impl UserListResponse { pub fn new() -> UserListResponse { UserListResponse { users: None } } + + 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 e3fa2a536..e2e4f0738 100644 --- a/src/datadogV1/model/model_user_response.rs +++ b/src/datadogV1/model/model_user_response.rs @@ -10,14 +10,20 @@ 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 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 d780c57e1..435734de3 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 custom_headers(&mut self, value: Option) -> &mut Self { + self.custom_headers = Some(value); + self + } + + pub fn encode_as( + &mut self, + value: crate::datadogV1::model::WebhooksIntegrationEncoding, + ) -> &mut Self { + self.encode_as = Some(value); + 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 b1d5c4cd3..e38de78fd 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 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..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 @@ -30,7 +30,23 @@ impl WebhooksIntegrationCustomVariableUpdateRequest { value: None, } } + + pub fn is_secret(&mut self, value: bool) -> &mut Self { + self.is_secret = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 149f43c6e..d6a51a6e4 100644 --- a/src/datadogV1/model/model_webhooks_integration_update_request.rs +++ b/src/datadogV1/model/model_webhooks_integration_update_request.rs @@ -47,7 +47,36 @@ impl WebhooksIntegrationUpdateRequest { url: None, } } + + pub fn custom_headers(&mut self, value: String) -> &mut Self { + self.custom_headers = Some(value); + self + } + + pub fn encode_as( + &mut self, + value: crate::datadogV1::model::WebhooksIntegrationEncoding, + ) -> &mut Self { + self.encode_as = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn payload(&mut self, value: Option) -> &mut Self { + self.payload = Some(value); + 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 038bbd054..c53a109ae 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 id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + 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 e2bfb4f83..112a3231b 100644 --- a/src/datadogV1/model/model_widget_axis.rs +++ b/src/datadogV1/model/model_widget_axis.rs @@ -35,7 +35,33 @@ impl WidgetAxis { scale: None, } } + + pub fn include_zero(&mut self, value: bool) -> &mut Self { + self.include_zero = Some(value); + self + } + + pub fn label(&mut self, value: String) -> &mut Self { + self.label = Some(value); + self + } + + pub fn max(&mut self, value: String) -> &mut Self { + self.max = Some(value); + self + } + + pub fn min(&mut self, value: String) -> &mut Self { + self.min = Some(value); + 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 c4c705e8a..a40d2d817 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 custom_bg_color(&mut self, value: String) -> &mut Self { + self.custom_bg_color = Some(value); + self + } + + pub fn custom_fg_color(&mut self, value: String) -> &mut Self { + self.custom_fg_color = Some(value); + self + } + + pub fn hide_value(&mut self, value: bool) -> &mut Self { + self.hide_value = Some(value); + self + } + + pub fn image_url(&mut self, value: String) -> &mut Self { + self.image_url = Some(value); + self + } + + pub fn metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + 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 7011dfedd..3f9126a47 100644 --- a/src/datadogV1/model/model_widget_custom_link.rs +++ b/src/datadogV1/model/model_widget_custom_link.rs @@ -31,7 +31,28 @@ impl WidgetCustomLink { override_label: None, } } + + pub fn is_hidden(&mut self, value: bool) -> &mut Self { + self.is_hidden = Some(value); + self + } + + pub fn label(&mut self, value: String) -> &mut Self { + self.label = Some(value); + self + } + + pub fn link(&mut self, value: String) -> &mut Self { + self.link = Some(value); + 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_event.rs b/src/datadogV1/model/model_widget_event.rs index 8d171f71d..729e1ecc0 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 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..c4ba59d03 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 alias(&mut self, value: String) -> &mut Self { + self.alias = Some(value); + self + } + + pub fn cell_display_mode( + &mut self, + value: crate::datadogV1::model::TableWidgetCellDisplayMode, + ) -> &mut Self { + self.cell_display_mode = Some(value); + self + } + + pub fn conditional_formats( + &mut self, + value: Vec, + ) -> &mut Self { + self.conditional_formats = Some(value); + self + } + + pub fn limit(&mut self, value: crate::datadogV1::model::WidgetFormulaLimit) -> &mut Self { + self.limit = Some(value); + 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 a007fd7f0..5ce562e4a 100644 --- a/src/datadogV1/model/model_widget_formula_limit.rs +++ b/src/datadogV1/model/model_widget_formula_limit.rs @@ -23,7 +23,18 @@ impl WidgetFormulaLimit { order: None, } } + + pub fn count(&mut self, value: i64) -> &mut Self { + self.count = Some(value); + 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 7b7adfdb0..5c62ec973 100644 --- a/src/datadogV1/model/model_widget_formula_style.rs +++ b/src/datadogV1/model/model_widget_formula_style.rs @@ -23,7 +23,18 @@ impl WidgetFormulaStyle { palette_index: None, } } + + pub fn palette(&mut self, value: String) -> &mut Self { + self.palette = Some(value); + 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 e6b677c3c..97b86c3b1 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 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..4b18fc18a 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 display_type(&mut self, value: String) -> &mut Self { + self.display_type = Some(value); + self + } + + pub fn label(&mut self, value: String) -> &mut Self { + self.label = Some(value); + 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 499d57190..493d2af6c 100644 --- a/src/datadogV1/model/model_widget_request_style.rs +++ b/src/datadogV1/model/model_widget_request_style.rs @@ -27,7 +27,23 @@ impl WidgetRequestStyle { palette: None, } } + + pub fn line_type(&mut self, value: crate::datadogV1::model::WidgetLineType) -> &mut Self { + self.line_type = Some(value); + self + } + + pub fn line_width(&mut self, value: crate::datadogV1::model::WidgetLineWidth) -> &mut Self { + self.line_width = Some(value); + 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 39c3a30b4..0a2d53d1b 100644 --- a/src/datadogV1/model/model_widget_style.rs +++ b/src/datadogV1/model/model_widget_style.rs @@ -17,7 +17,13 @@ impl WidgetStyle { pub fn new() -> WidgetStyle { WidgetStyle { palette: None } } + + 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 726ee65f7..6c1ceff1f 100644 --- a/src/datadogV1/model/model_widget_time.rs +++ b/src/datadogV1/model/model_widget_time.rs @@ -17,7 +17,13 @@ impl WidgetTime { pub fn new() -> WidgetTime { WidgetTime { live_span: None } } + + 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_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..dcdf5e818 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`] -#[derive(Clone, Debug)] -pub struct ListAuditLogsParams { +/// ListAuditLogsOptionalParams is a struct for passing parameters to the method [`AuditAPI::list_audit_logs`] +#[derive(Clone, Default, Debug)] +pub struct ListAuditLogsOptionalParams { /// Search query following Audit Logs syntax. pub filter_query: Option, /// Minimum timestamp for requested events. @@ -22,10 +22,53 @@ pub struct ListAuditLogsParams { pub page_limit: Option, } -/// SearchAuditLogsParams is a struct for passing parameters to the method [`AuditAPI::search_audit_logs`] -#[derive(Clone, Debug)] -pub struct SearchAuditLogsParams { - pub body: 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, 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`] @@ -77,7 +120,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 +137,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 +158,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 +231,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 +248,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..69bc3d29e 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`] -#[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 { +/// ListAuthNMappingsOptionalParams is a struct for passing parameters to the method [`AuthNMappingsAPI::list_auth_n_mappings`] +#[derive(Clone, Default, Debug)] +pub struct ListAuthNMappingsOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, /// Specific page number to return. @@ -38,12 +18,27 @@ 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, +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`] @@ -123,10 +118,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 +130,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 +193,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 +207,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 +262,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 +277,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 +337,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 +349,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 +368,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 +428,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 +444,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..223da8e52 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`] -#[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 { +/// ListCIAppPipelineEventsOptionalParams is a struct for passing parameters to the method [`CIVisibilityPipelinesAPI::list_ci_app_pipeline_events`] +#[derive(Clone, Default, Debug)] +pub struct ListCIAppPipelineEventsOptionalParams { /// Search query following log syntax. pub filter_query: Option, /// Minimum timestamp for requested events. @@ -34,10 +22,53 @@ pub struct ListCIAppPipelineEventsParams { pub page_limit: Option, } -/// SearchCIAppPipelineEventsParams is a struct for passing parameters to the method [`CIVisibilityPipelinesAPI::search_ci_app_pipeline_events`] -#[derive(Clone, Debug)] -pub struct SearchCIAppPipelineEventsParams { - pub body: 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, 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`] @@ -109,13 +140,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 +157,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 +226,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 +242,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 +305,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 +325,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 +349,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 +420,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 +440,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..71dc0b27c 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`] -#[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 { +/// ListCIAppTestEventsOptionalParams is a struct for passing parameters to the method [`CIVisibilityTestsAPI::list_ci_app_test_events`] +#[derive(Clone, Default, Debug)] +pub struct ListCIAppTestEventsOptionalParams { /// Search query following log syntax. pub filter_query: Option, /// Minimum timestamp for requested events. @@ -28,10 +22,50 @@ pub struct ListCIAppTestEventsParams { pub page_limit: Option, } -/// SearchCIAppTestEventsParams is a struct for passing parameters to the method [`CIVisibilityTestsAPI::search_ci_app_test_events`] -#[derive(Clone, Debug)] -pub struct SearchCIAppTestEventsParams { - pub body: 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, 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`] @@ -88,15 +122,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 +136,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 +206,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 +223,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 +244,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 +315,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 +332,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..7fbe6c939 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`] -#[derive(Clone, Debug)] -pub struct ListContainerImagesParams { +/// ListContainerImagesOptionalParams is a struct for passing parameters to the method [`ContainerImagesAPI::list_container_images`] +#[derive(Clone, Default, Debug)] +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. @@ -21,6 +21,35 @@ pub struct ListContainerImagesParams { 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)] @@ -55,7 +84,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 +98,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 +118,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..4f6c735b6 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`] -#[derive(Clone, Debug)] -pub struct ListContainersParams { +/// ListContainersOptionalParams is a struct for passing parameters to the method [`ContainersAPI::list_containers`] +#[derive(Clone, Default, Debug)] +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. @@ -21,6 +21,35 @@ pub struct ListContainersParams { 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)] @@ -55,7 +84,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 +96,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 +116,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..6d6166ca7 100644 --- a/src/datadogV2/api/api_downtimes.rs +++ b/src/datadogV2/api/api_downtimes.rs @@ -5,33 +5,26 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CancelDowntimeParams is a struct for passing parameters to the method [`DowntimesAPI::cancel_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, +/// GetDowntimeOptionalParams is a struct for passing parameters to the method [`DowntimesAPI::get_downtime`] +#[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, } -/// 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, +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 include: Option, + pub fn include(&mut self, value: String) -> &mut Self { + self.include = Some(value); + self + } } -/// ListDowntimesParams is a struct for passing parameters to the method [`DowntimesAPI::list_downtimes`] -#[derive(Clone, Debug)] -pub struct ListDowntimesParams { +/// ListDowntimesOptionalParams is a struct for passing parameters to the method [`DowntimesAPI::list_downtimes`] +#[derive(Clone, Default, Debug)] +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,24 +36,50 @@ pub struct ListDowntimesParams { pub page_limit: 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, +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, Default, Debug)] +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, +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`] @@ -147,9 +166,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 +177,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 +232,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 +243,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 +306,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 +318,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 +337,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 +384,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 +396,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 +415,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 +475,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 +493,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 +515,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 +567,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 +579,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..7da890bbd 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`] -#[derive(Clone, Debug)] -pub struct ListEventsParams { +/// ListEventsOptionalParams is a struct for passing parameters to the method [`EventsAPI::list_events`] +#[derive(Clone, Default, Debug)] +pub struct ListEventsOptionalParams { /// Search query following events syntax. pub filter_query: Option, /// Minimum timestamp for requested events. @@ -22,10 +22,50 @@ pub struct ListEventsParams { pub page_limit: Option, } -/// SearchEventsParams is a struct for passing parameters to the method [`EventsAPI::search_events`] -#[derive(Clone, Debug)] -pub struct SearchEventsParams { - pub body: 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, 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`] @@ -75,7 +115,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 +129,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 +148,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 +218,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 +232,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..b7709bc21 100644 --- a/src/datadogV2/api/api_gcp_integration.rs +++ b/src/datadogV2/api/api_gcp_integration.rs @@ -5,32 +5,22 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateGCPSTSAccountParams is a struct for passing parameters to the method [`GCPIntegrationAPI::create_gcpsts_account`] -#[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 { +/// MakeGCPSTSDelegateOptionalParams is a struct for passing parameters to the method [`GCPIntegrationAPI::make_gcpsts_delegate`] +#[derive(Clone, Default, Debug)] +pub struct MakeGCPSTSDelegateOptionalParams { /// Create a delegate service account within Datadog. - pub body: Option>>, + 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, +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`] @@ -119,12 +109,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 +123,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 +189,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 +200,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 +274,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 +345,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 +397,7 @@ impl GCPIntegrationAPI { /// Create a Datadog GCP principal. pub async fn make_gcpsts_delegate( &self, - params: MakeGCPSTSDelegateParams, + params: MakeGCPSTSDelegateOptionalParams, ) -> Result< Option, Error, @@ -431,14 +411,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 +480,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 +498,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..4490ffbcb 100644 --- a/src/datadogV2/api/api_incident_services.rs +++ b/src/datadogV2/api/api_incident_services.rs @@ -5,32 +5,24 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateIncidentServiceParams is a struct for passing parameters to the method [`IncidentServicesAPI::create_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, +/// GetIncidentServiceOptionalParams is a struct for passing parameters to the method [`IncidentServicesAPI::get_incident_service`] +#[derive(Clone, Default, Debug)] +pub struct GetIncidentServiceOptionalParams { + /// Specifies which types of related objects should be included in the response. + pub include: Option, } -/// 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, +impl GetIncidentServiceOptionalParams { /// Specifies which types of related objects should be included in the response. - pub include: Option, + pub fn include(&mut self, value: crate::datadogV2::model::IncidentRelatedObject) -> &mut Self { + self.include = Some(value); + self + } } -/// ListIncidentServicesParams is a struct for passing parameters to the method [`IncidentServicesAPI::list_incident_services`] -#[derive(Clone, Debug)] -pub struct ListIncidentServicesParams { +/// ListIncidentServicesOptionalParams is a struct for passing parameters to the method [`IncidentServicesAPI::list_incident_services`] +#[derive(Clone, Default, Debug)] +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,13 +33,27 @@ 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, +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`] @@ -134,12 +140,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 +154,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 +217,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 +231,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 +287,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 +306,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 +327,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 +375,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 +389,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 +408,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 +468,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 +486,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..d88f0fbf5 100644 --- a/src/datadogV2/api/api_incident_teams.rs +++ b/src/datadogV2/api/api_incident_teams.rs @@ -5,32 +5,24 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateIncidentTeamParams is a struct for passing parameters to the method [`IncidentTeamsAPI::create_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, +/// GetIncidentTeamOptionalParams is a struct for passing parameters to the method [`IncidentTeamsAPI::get_incident_team`] +#[derive(Clone, Default, Debug)] +pub struct GetIncidentTeamOptionalParams { + /// Specifies which types of related objects should be included in the response. + pub include: Option, } -/// 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, +impl GetIncidentTeamOptionalParams { /// Specifies which types of related objects should be included in the response. - pub include: Option, + pub fn include(&mut self, value: crate::datadogV2::model::IncidentRelatedObject) -> &mut Self { + self.include = Some(value); + self + } } -/// ListIncidentTeamsParams is a struct for passing parameters to the method [`IncidentTeamsAPI::list_incident_teams`] -#[derive(Clone, Debug)] -pub struct ListIncidentTeamsParams { +/// ListIncidentTeamsOptionalParams is a struct for passing parameters to the method [`IncidentTeamsAPI::list_incident_teams`] +#[derive(Clone, Default, Debug)] +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,13 +33,27 @@ 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, +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`] @@ -134,10 +140,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 +152,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 +215,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 +226,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 +282,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 +296,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 +317,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 +365,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 +377,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 +396,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 +456,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 +472,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..9289b61ae 100644 --- a/src/datadogV2/api/api_incidents.rs +++ b/src/datadogV2/api/api_incidents.rs @@ -5,88 +5,27 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateIncidentParams is a struct for passing parameters to the method [`IncidentsAPI::create_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, +/// GetIncidentOptionalParams is a struct for passing parameters to the method [`IncidentsAPI::get_incident`] +#[derive(Clone, Default, Debug)] +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, +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 + } } -/// ListIncidentAttachmentsParams 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, +/// ListIncidentAttachmentsOptionalParams is a struct for passing parameters to the method [`IncidentsAPI::list_incident_attachments`] +#[derive(Clone, Default, Debug)] +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 +33,28 @@ pub struct ListIncidentAttachmentsParams { Option>, } -/// ListIncidentIntegrationsParams is a struct for passing parameters to the method [`IncidentsAPI::list_incident_integrations`] -#[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, +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 + } } -/// ListIncidentsParams is a struct for passing parameters to the method [`IncidentsAPI::list_incidents`] -#[derive(Clone, Debug)] -pub struct ListIncidentsParams { +/// ListIncidentsOptionalParams is a struct for passing parameters to the method [`IncidentsAPI::list_incidents`] +#[derive(Clone, Default, Debug)] +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 +63,30 @@ pub struct ListIncidentsParams { pub page_offset: Option, } -/// SearchIncidentsParams 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, +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, Default, Debug)] +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,48 +97,63 @@ pub struct SearchIncidentsParams { pub page_offset: Option, } -/// UpdateIncidentParams 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, +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, Default, Debug)] +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`] -#[derive(Clone, Debug)] -pub struct UpdateIncidentAttachmentsParams { - /// The UUID of the incident. - pub incident_id: String, - /// Incident Attachment Payload. - pub body: crate::datadogV2::model::IncidentAttachmentUpdateRequest, - /// Specifies which types of related objects are 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 + } } -/// 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, +/// UpdateIncidentAttachmentsOptionalParams is a struct for passing parameters to the method [`IncidentsAPI::update_incident_attachments`] +#[derive(Clone, Default, Debug)] +pub struct UpdateIncidentAttachmentsOptionalParams { + /// Specifies which types of related objects are included in the response. + pub include: Option>, } -/// 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, +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`] @@ -420,9 +396,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 +407,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 +470,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 +488,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 +556,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 +572,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 +640,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 +651,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 +706,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 +721,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 +779,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 +794,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 +851,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 +863,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 +886,7 @@ impl IncidentsAPI { local_req_builder = local_req_builder.query(&[( "include", &local - .into_iter() + .iter() .map(|p| p.to_string()) .collect::>() .join(",") @@ -967,12 +936,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 +954,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 +1017,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 +1033,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 +1095,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 +1113,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 +1139,7 @@ impl IncidentsAPI { local_req_builder = local_req_builder.query(&[( "include", &local - .into_iter() + .iter() .map(|p| p.to_string()) .collect::>() .join(",") @@ -1175,7 +1150,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 +1201,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 +1218,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 +1279,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 +1293,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 +1353,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 +1364,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 +1386,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 +1445,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 +1458,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 +1479,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 +1539,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 +1555,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 +1581,7 @@ impl IncidentsAPI { local_req_builder = local_req_builder.query(&[( "include", &local - .into_iter() + .iter() .map(|p| p.to_string()) .collect::>() .join(",") @@ -1657,13 +1639,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 +1658,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 +1684,7 @@ impl IncidentsAPI { local_req_builder = local_req_builder.query(&[( "include", &local - .into_iter() + .iter() .map(|p| p.to_string()) .collect::>() .join(",") @@ -1758,13 +1742,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 +1761,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 +1832,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 +1849,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..115837e08 100644 --- a/src/datadogV2/api/api_key_management.rs +++ b/src/datadogV2/api/api_key_management.rs @@ -5,67 +5,39 @@ 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::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, +/// GetAPIKeyOptionalParams is a struct for passing parameters to the method [`KeyManagementAPI::get_api_key`] +#[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, } -/// 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, +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 include: Option, + pub fn include(&mut self, value: String) -> &mut Self { + self.include = Some(value); + self + } } -/// GetApplicationKeyParams 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, +/// GetApplicationKeyOptionalParams is a struct for passing parameters to the method [`KeyManagementAPI::get_application_key`] +#[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, } -/// 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, +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 + } } -/// ListAPIKeysParams is a struct for passing parameters to the method [`KeyManagementAPI::list_api_keys`] -#[derive(Clone, Debug)] -pub struct ListAPIKeysParams { +/// ListAPIKeysOptionalParams is a struct for passing parameters to the method [`KeyManagementAPI::list_api_keys`] +#[derive(Clone, Default, Debug)] +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 +64,69 @@ pub struct ListAPIKeysParams { pub filter_category: Option, } -/// ListApplicationKeysParams is a struct for passing parameters to the method [`KeyManagementAPI::list_application_keys`] -#[derive(Clone, Debug)] -pub struct ListApplicationKeysParams { +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, Default, Debug)] +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 +145,49 @@ pub struct ListApplicationKeysParams { pub include: Option, } -/// ListCurrentUserApplicationKeysParams is a struct for passing parameters to the method [`KeyManagementAPI::list_current_user_application_keys`] -#[derive(Clone, Debug)] -pub struct ListCurrentUserApplicationKeysParams { +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, Default, Debug)] +pub struct ListCurrentUserApplicationKeysOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, /// Specific page number to return. @@ -134,28 +206,44 @@ 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, +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`] @@ -328,9 +416,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 +427,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 +487,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 +504,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 +570,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 +581,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 +635,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 +646,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 +701,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 +715,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 +770,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 +782,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 +801,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 +848,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 +866,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 +887,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 +935,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 +952,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 +1012,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 +1023,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 +1047,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_query_param) = include { + local_req_builder = + 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_str) = filter_category { + if let Some(ref local_query_param) = filter_category { local_req_builder = - local_req_builder.query(&[("filter[category]", &local_str.to_string())]); + local_req_builder.query(&[("filter[category]", &local_query_param.to_string())]); }; // build user agent @@ -1053,7 +1136,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 +1150,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 +1172,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_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) = include { + local_req_builder = + local_req_builder.query(&[("include", &local_query_param.to_string())]); }; // build user agent @@ -1157,7 +1244,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 +1261,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 +1286,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 @@ -1267,9 +1358,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 +1370,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 +1435,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 +1453,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 +1521,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 +1539,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..d4a663e46 100644 --- a/src/datadogV2/api/api_logs.rs +++ b/src/datadogV2/api/api_logs.rs @@ -5,21 +5,22 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// AggregateLogsParams is a struct for passing parameters to the method [`LogsAPI::aggregate_logs`] -#[derive(Clone, Debug)] -pub struct AggregateLogsParams { - pub body: crate::datadogV2::model::LogsAggregateRequest, +/// ListLogsOptionalParams is a struct for passing parameters to the method [`LogsAPI::list_logs`] +#[derive(Clone, Default, Debug)] +pub struct ListLogsOptionalParams { + pub body: Option, } -/// ListLogsParams is a struct for passing parameters to the method [`LogsAPI::list_logs`] -#[derive(Clone, Debug)] -pub struct ListLogsParams { - pub body: Option>, +impl ListLogsOptionalParams { + pub fn body(&mut self, value: crate::datadogV2::model::LogsListRequest) -> &mut Self { + self.body = Some(value); + self + } } -/// ListLogsGetParams is a struct for passing parameters to the method [`LogsAPI::list_logs_get`] -#[derive(Clone, Debug)] -pub struct ListLogsGetParams { +/// ListLogsGetOptionalParams is a struct for passing parameters to the method [`LogsAPI::list_logs_get`] +#[derive(Clone, Default, Debug)] +pub struct ListLogsGetOptionalParams { /// Search query following logs syntax. pub filter_query: Option, /// For customers with multiple indexes, the indexes to search. @@ -39,17 +40,78 @@ pub struct ListLogsGetParams { pub page_limit: Option, } -/// 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, +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, Default, Debug)] +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. 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)] @@ -119,10 +181,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 +193,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 +269,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 +290,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 +366,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 +387,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 +408,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())]); + 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_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_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) = 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 @@ -451,10 +513,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 +549,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 +567,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..e3c30d902 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`] -#[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, +/// EstimateMetricsOutputSeriesOptionalParams is a struct for passing parameters to the method [`MetricsAPI::estimate_metrics_output_series`] +#[derive(Clone, Default, Debug)] +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,54 @@ pub struct EstimateMetricsOutputSeriesParams { pub filter_timespan_h: Option, } -/// ListActiveMetricConfigurationsParams 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, +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, 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, } -/// 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, +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 + } } -/// ListTagConfigurationsParams is a struct for passing parameters to the method [`MetricsAPI::list_tag_configurations`] -#[derive(Clone, Debug)] -pub struct ListTagConfigurationsParams { +/// ListTagConfigurationsOptionalParams is a struct for passing parameters to the method [`MetricsAPI::list_tag_configurations`] +#[derive(Clone, Default, Debug)] +pub struct ListTagConfigurationsOptionalParams { /// Filter custom metrics that have configured tags. pub filter_configured: Option, /// Filter tag configurations by configured tags. @@ -89,46 +88,67 @@ 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`] -#[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, +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 + } } -/// 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, +/// SubmitMetricsOptionalParams is a struct for passing parameters to the method [`MetricsAPI::submit_metrics`] +#[derive(Clone, Default, Debug)] +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, +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`] @@ -313,13 +333,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 +356,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 +426,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 +448,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 +519,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 +539,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 +606,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 +621,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 +676,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 +694,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 +719,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 +783,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 +801,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 +822,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 +871,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 +888,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 +948,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 +962,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 +984,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 +1059,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 +1076,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 +1138,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 +1157,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 +1219,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 +1235,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 +1299,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 +1314,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 +1388,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 +1412,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 +1484,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 +1506,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..eac89dd3a 100644 --- a/src/datadogV2/api/api_organizations.rs +++ b/src/datadogV2/api/api_organizations.rs @@ -5,13 +5,21 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// UploadIdPMetadataParams is a struct for passing parameters to the method [`OrganizationsAPI::upload_id_p_metadata`] -#[derive(Clone, Debug)] -pub struct UploadIdPMetadataParams { +/// UploadIdPMetadataOptionalParams is a struct for passing parameters to the method [`OrganizationsAPI::upload_id_p_metadata`] +#[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)] @@ -48,7 +56,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 +69,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..52a7e5922 100644 --- a/src/datadogV2/api/api_powerpack.rs +++ b/src/datadogV2/api/api_powerpack.rs @@ -5,43 +5,26 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreatePowerpackParams is a struct for passing parameters to the method [`PowerpackAPI::create_powerpack`] -#[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 { +/// ListPowerpacksOptionalParams is a struct for passing parameters to the method [`PowerpackAPI::list_powerpacks`] +#[derive(Clone, Default, Debug)] +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, +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`] @@ -113,10 +96,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 +108,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 +171,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 +182,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 +237,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 +248,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 +305,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 +317,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 +334,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 +386,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 +402,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..0bbc07267 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`] -#[derive(Clone, Debug)] -pub struct ListProcessesParams { +/// ListProcessesOptionalParams is a struct for passing parameters to the method [`ProcessesAPI::list_processes`] +#[derive(Clone, Default, Debug)] +pub struct ListProcessesOptionalParams { /// String to search processes by. pub search: Option, /// Comma-separated list of tags to filter processes by. @@ -27,6 +27,44 @@ pub struct ListProcessesParams { 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)] @@ -61,7 +99,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 +111,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 +132,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..498c2e798 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`] -#[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, +/// ListRoleUsersOptionalParams is a struct for passing parameters to the method [`RolesAPI::list_role_users`] +#[derive(Clone, Default, Debug)] +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,34 @@ pub struct ListRoleUsersParams { pub filter: Option, } -/// ListRolesParams is a struct for passing parameters to the method [`RolesAPI::list_roles`] -#[derive(Clone, Debug)] -pub struct ListRolesParams { +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, Default, Debug)] +pub struct ListRolesOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, /// Specific page number to return. @@ -90,28 +62,34 @@ 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, +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`] @@ -275,10 +253,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 +269,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 +337,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 +349,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 +415,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 +427,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 +491,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 +502,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 +560,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 +570,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 +624,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 +635,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 +708,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 +757,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 +769,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 +829,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 +841,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 +863,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 +923,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 +934,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 +952,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 +1015,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 +1033,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 +1101,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 +1117,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 +1185,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 +1197,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..b7d19d9c7 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`] -#[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 { +/// ListRUMEventsOptionalParams is a struct for passing parameters to the method [`RUMAPI::list_rum_events`] +#[derive(Clone, Default, Debug)] +pub struct ListRUMEventsOptionalParams { /// Search query following RUM syntax. pub filter_query: Option, /// Minimum timestamp for requested events. @@ -48,18 +22,37 @@ 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, +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`] @@ -163,12 +156,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 +170,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 +236,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 +250,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 +313,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 +324,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 +379,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 +393,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 +472,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 +526,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 +542,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 +563,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 +636,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 +653,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 +716,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 +731,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..515fbb037 100644 --- a/src/datadogV2/api/api_security_monitoring.rs +++ b/src/datadogV2/api/api_security_monitoring.rs @@ -5,93 +5,24 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// CreateSecurityFilterParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::create_security_filter`] -#[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, +/// GetFindingOptionalParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::get_finding`] +#[derive(Clone, Default, Debug)] +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`] -#[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, +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 + } } -/// ListFindingsParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::list_findings`] -#[derive(Clone, Debug)] -pub struct ListFindingsParams { +/// ListFindingsOptionalParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::list_findings`] +#[derive(Clone, Default, Debug)] +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 +49,97 @@ pub struct ListFindingsParams { pub filter_status: Option, } -/// ListSecurityMonitoringRulesParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::list_security_monitoring_rules`] -#[derive(Clone, Debug)] -pub struct ListSecurityMonitoringRulesParams { +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, Default, Debug)] +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`] -#[derive(Clone, Debug)] -pub struct ListSecurityMonitoringSignalsParams { +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, Default, Debug)] +pub struct ListSecurityMonitoringSignalsOptionalParams { /// The search query for security signals. pub filter_query: Option, /// The minimum timestamp for requested security signals. @@ -144,44 +154,56 @@ pub struct ListSecurityMonitoringSignalsParams { pub page_limit: Option, } -/// MuteFindingsParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::mute_findings`] -#[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>, +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 + } } -/// 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, +/// SearchSecurityMonitoringSignalsOptionalParams is a struct for passing parameters to the method [`SecurityMonitoringAPI::search_security_monitoring_signals`] +#[derive(Clone, Default, Debug)] +pub struct SearchSecurityMonitoringSignalsOptionalParams { + pub body: Option, } -/// 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, +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`] @@ -409,12 +431,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 +448,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 +514,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 +531,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 +597,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 +611,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 +666,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 +680,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 +735,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 +753,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 +822,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 +840,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 +909,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 +927,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 +996,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 +1008,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 +1027,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 +1077,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 +1097,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 +1157,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 +1174,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 +1234,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 +1251,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 +1341,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 +1383,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 +1413,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 +1527,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 +1579,7 @@ impl SecurityMonitoringAPI { /// List rules. pub async fn list_security_monitoring_rules( &self, - params: ListSecurityMonitoringRulesParams, + params: ListSecurityMonitoringRulesOptionalParams, ) -> Result< Option, Error, @@ -1591,14 +1596,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 +1616,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 +1670,7 @@ impl SecurityMonitoringAPI { /// security signals. pub async fn list_security_monitoring_signals( &self, - params: ListSecurityMonitoringSignalsParams, + params: ListSecurityMonitoringSignalsOptionalParams, ) -> Result< Option, Error, @@ -1683,14 +1689,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 +1713,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 +1782,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 +1794,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 +1861,7 @@ impl SecurityMonitoringAPI { /// security signals. pub async fn search_security_monitoring_signals( &self, - params: SearchSecurityMonitoringSignalsParams, + params: SearchSecurityMonitoringSignalsOptionalParams, ) -> Result< Option, Error, @@ -1874,14 +1880,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 +1951,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 +1970,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 +2040,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 +2060,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..756459dfb 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`] -#[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, +/// ListServiceAccountApplicationKeysOptionalParams is a struct for passing parameters to the method [`ServiceAccountsAPI::list_service_account_application_keys`] +#[derive(Clone, Default, Debug)] +pub struct ListServiceAccountApplicationKeysOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, /// Specific page number to return. @@ -58,14 +24,39 @@ 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, +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`] @@ -154,10 +145,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 +157,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 +220,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 +238,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 +306,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 +321,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 +378,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 +396,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 +458,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 +476,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 +502,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 +570,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 +593,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..1a00f2e0f 100644 --- a/src/datadogV2/api/api_service_definition.rs +++ b/src/datadogV2/api/api_service_definition.rs @@ -5,32 +5,27 @@ 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`] -#[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, +/// GetServiceDefinitionOptionalParams is a struct for passing parameters to the method [`ServiceDefinitionAPI::get_service_definition`] +#[derive(Clone, Default, Debug)] +pub struct GetServiceDefinitionOptionalParams { + /// The schema version desired in the response. + pub schema_version: Option, } -/// 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, +impl GetServiceDefinitionOptionalParams { /// The schema version desired in the response. - pub schema_version: Option, + pub fn schema_version( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionSchemaVersions, + ) -> &mut Self { + self.schema_version = Some(value); + self + } } -/// ListServiceDefinitionsParams is a struct for passing parameters to the method [`ServiceDefinitionAPI::list_service_definitions`] -#[derive(Clone, Debug)] -pub struct ListServiceDefinitionsParams { +/// ListServiceDefinitionsOptionalParams is a struct for passing parameters to the method [`ServiceDefinitionAPI::list_service_definitions`] +#[derive(Clone, Default, Debug)] +pub struct ListServiceDefinitionsOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, /// Specific page number to return. @@ -39,6 +34,27 @@ pub struct ListServiceDefinitionsParams { 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)] @@ -106,13 +122,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 +139,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 +205,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 +219,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 +274,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 +292,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 +313,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 +361,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 +375,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 +396,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..d020349cd 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`] -#[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 { +/// ListScorecardOutcomesOptionalParams is a struct for passing parameters to the method [`ServiceScorecardsAPI::list_scorecard_outcomes`] +#[derive(Clone, Default, Debug)] +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,62 @@ pub struct ListScorecardOutcomesParams { pub filter_rule_name: Option, } -/// ListScorecardRulesParams is a struct for passing parameters to the method [`ServiceScorecardsAPI::list_scorecard_rules`] -#[derive(Clone, Debug)] -pub struct ListScorecardRulesParams { +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, Default, Debug)] +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. @@ -76,6 +108,59 @@ pub struct ListScorecardRulesParams { 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)] @@ -151,13 +236,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 +253,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 +319,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 +331,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 +394,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 +405,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 +460,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 +472,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 +500,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 +586,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 +598,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 +623,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_str) = filter_rule_description { + 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_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..34e40f95f 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`] -#[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 { +/// ListSpansGetOptionalParams is a struct for passing parameters to the method [`SpansAPI::list_spans_get`] +#[derive(Clone, Default, Debug)] +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). @@ -34,6 +22,39 @@ pub struct ListSpansGetParams { 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)] @@ -91,10 +112,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 +125,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 +197,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 +214,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 +283,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 +300,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 +319,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..b3f5d65ed 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`] -#[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, +/// GetTeamMembershipsOptionalParams is a struct for passing parameters to the method [`TeamsAPI::get_team_memberships`] +#[derive(Clone, Default, Debug)] +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,32 @@ 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, +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 + } } -/// ListTeamsParams is a struct for passing parameters to the method [`TeamsAPI::list_teams`] -#[derive(Clone, Debug)] -pub struct ListTeamsParams { +/// ListTeamsOptionalParams is a struct for passing parameters to the method [`TeamsAPI::list_teams`] +#[derive(Clone, Default, Debug)] +pub struct ListTeamsOptionalParams { /// Specific page number to return. pub page_number: Option, /// Size for a given page. The maximum allowed value is 100. @@ -123,42 +60,42 @@ 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, +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`] @@ -358,9 +295,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 +307,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 +367,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 +379,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 +447,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 +463,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 +529,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 +539,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 +593,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 +605,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 +662,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 +677,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 +734,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 +745,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 +801,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 +813,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 +872,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 +883,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 +940,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 +956,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 +980,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 +1040,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 +1057,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 +1117,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 +1129,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 +1190,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 +1202,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 +1222,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 +1308,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 +1321,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 +1386,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 +1402,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 +1472,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 +1489,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 +1559,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 +1578,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..c6fc3d827 100644 --- a/src/datadogV2/api/api_usage_metering.rs +++ b/src/datadogV2/api/api_usage_metering.rs @@ -5,18 +5,24 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; -/// GetCostByOrgParams 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, +/// GetCostByOrgOptionalParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_cost_by_org`] +#[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, } -/// GetEstimatedCostByOrgParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_estimated_cost_by_org`] -#[derive(Clone, Debug)] -pub struct GetEstimatedCostByOrgParams { +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, 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, /// 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 +35,59 @@ pub struct GetEstimatedCostByOrgParams { pub end_date: Option, } -/// GetHistoricalCostByOrgParams 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, +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, 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, /// 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`] -#[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, +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, 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, /// Include child org usage in the response. Defaults to false. @@ -70,19 +104,44 @@ pub struct GetHourlyUsageParams { pub page_next_record_id: Option, } -/// GetMonthlyCostAttributionParams 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, +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, Default, Debug)] +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,43 +155,101 @@ pub struct GetMonthlyCostAttributionParams { pub include_descendants: Option, } -/// GetProjectedCostParams is a struct for passing parameters to the method [`UsageMeteringAPI::get_projected_cost`] -#[derive(Clone, Debug)] -pub struct GetProjectedCostParams { +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, 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, } -/// GetUsageApplicationSecurityMonitoringParams 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, +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, 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, } -/// GetUsageLambdaTracedInvocationsParams 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, +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, 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, } -/// GetUsageObservabilityPipelinesParams 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, +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, 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)] @@ -276,8 +393,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 +449,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 +468,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 +484,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 +534,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 +549,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 +572,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 +637,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 +656,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 +678,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 +730,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 +751,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 +785,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())]); + local_req_builder.query(&[("filter[versions]", &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_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 +868,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 +901,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 +930,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 +996,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 +1010,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 +1029,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 +1078,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 +1097,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 +1118,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 +1168,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 +1187,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 +1208,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 +1258,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 +1277,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 +1298,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..5252084d6 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`] -#[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 { +/// ListUsersOptionalParams is a struct for passing parameters to the method [`UsersAPI::list_users`] +#[derive(Clone, Default, Debug)] +pub struct ListUsersOptionalParams { /// Size for a given page. The maximum allowed value is 100. pub page_size: Option, /// Specific page number to return. @@ -68,18 +27,42 @@ 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, +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`] @@ -198,9 +181,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 +192,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 +253,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 +265,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 +319,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 +334,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 +394,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 +405,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 +462,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 +475,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 +536,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 +549,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 +610,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 +622,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 +641,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 +708,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 +720,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 +784,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 +797,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..443c465b3 100644 --- a/src/datadogV2/model/model_active_billing_dimensions_attributes.rs +++ b/src/datadogV2/model/model_active_billing_dimensions_attributes.rs @@ -23,7 +23,18 @@ impl ActiveBillingDimensionsAttributes { values: None, } } + + pub fn month(&mut self, value: String) -> &mut Self { + self.month = Some(value); + 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 bfd13dee7..7c8a9caee 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,7 +27,29 @@ impl ActiveBillingDimensionsBody { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::ActiveBillingDimensionsAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::ActiveBillingDimensionsType, + ) -> &mut Self { + self.type_ = Some(value); + 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 cdc3b5e24..9906caba3 100644 --- a/src/datadogV2/model/model_active_billing_dimensions_response.rs +++ b/src/datadogV2/model/model_active_billing_dimensions_response.rs @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: crate::datadogV2::model::ActiveBillingDimensionsBody, + ) -> &mut Self { + self.data = Some(value); + self + } } + impl Default for ActiveBillingDimensionsResponse { fn default() -> Self { Self::new() 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..0fbee7a77 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,7 +23,18 @@ impl APIKeyRelationships { modified_by: None, } } + + pub fn created_by(&mut self, value: crate::datadogV2::model::RelationshipToUser) -> &mut Self { + self.created_by = Some(value); + 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 49907b124..fccc96500 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,7 +23,21 @@ impl APIKeyResponse { included: None, } } + + pub fn data(&mut self, value: crate::datadogV2::model::FullAPIKey) -> &mut Self { + self.data = Some(value); + self + } + + pub fn included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } } + impl Default for APIKeyResponse { fn default() -> Self { Self::new() 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..6302648d0 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,7 +27,26 @@ impl APIKeysResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + 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 31d173973..f5f56a450 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,7 +23,18 @@ impl APIKeysResponseMeta { page: None, } } + + pub fn max_allowed(&mut self, value: i64) -> &mut Self { + self.max_allowed = Some(value); + 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 1553f763c..22badee92 100644 --- a/src/datadogV2/model/model_api_keys_response_meta_page.rs +++ b/src/datadogV2/model/model_api_keys_response_meta_page.rs @@ -19,7 +19,13 @@ impl APIKeysResponseMetaPage { total_filtered_count: None, } } + + 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 eb574bc60..b04bd8ac4 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 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..84812089e 100644 --- a/src/datadogV2/model/model_application_key_relationships.rs +++ b/src/datadogV2/model/model_application_key_relationships.rs @@ -10,14 +10,20 @@ 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 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 6800534fa..96ddaf4c4 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,7 +23,21 @@ impl ApplicationKeyResponse { included: None, } } + + pub fn data(&mut self, value: crate::datadogV2::model::FullApplicationKey) -> &mut Self { + self.data = Some(value); + self + } + + pub fn included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } } + impl Default for ApplicationKeyResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_application_key_response_meta.rs b/src/datadogV2/model/model_application_key_response_meta.rs index 2a4956383..d2f9bcd29 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,7 +23,21 @@ impl ApplicationKeyResponseMeta { page: None, } } + + pub fn max_allowed_per_user(&mut self, value: i64) -> &mut Self { + self.max_allowed_per_user = Some(value); + self + } + + pub fn page( + &mut self, + value: crate::datadogV2::model::ApplicationKeyResponseMetaPage, + ) -> &mut Self { + self.page = Some(value); + 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 3c0fb7c9a..c38cfe7cb 100644 --- a/src/datadogV2/model/model_application_key_response_meta_page.rs +++ b/src/datadogV2/model/model_application_key_response_meta_page.rs @@ -19,7 +19,13 @@ impl ApplicationKeyResponseMetaPage { total_filtered_count: None, } } + + 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 aa89e782d..fe9c12217 100644 --- a/src/datadogV2/model/model_application_key_update_attributes.rs +++ b/src/datadogV2/model/model_application_key_update_attributes.rs @@ -23,7 +23,18 @@ impl ApplicationKeyUpdateAttributes { scopes: None, } } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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_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..e48fad30f 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,7 +27,26 @@ impl AuditLogsEvent { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::AuditLogsEventAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 e313bfb6d..0f98c8a67 100644 --- a/src/datadogV2/model/model_audit_logs_event_attributes.rs +++ b/src/datadogV2/model/model_audit_logs_event_attributes.rs @@ -37,7 +37,36 @@ impl AuditLogsEventAttributes { timestamp: None, } } + + pub fn attributes( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn service(&mut self, value: String) -> &mut Self { + self.service = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + 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 df05f7bc9..29446550b 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,7 +27,23 @@ impl AuditLogsEventsResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn links(&mut self, value: crate::datadogV2::model::AuditLogsResponseLinks) -> &mut Self { + self.links = Some(value); + 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 68458c507..1f98fb34f 100644 --- a/src/datadogV2/model/model_audit_logs_query_filter.rs +++ b/src/datadogV2/model/model_audit_logs_query_filter.rs @@ -27,7 +27,23 @@ impl AuditLogsQueryFilter { to: None, } } + + pub fn from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + self + } + + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + 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 a92a3b04b..6bc4cc045 100644 --- a/src/datadogV2/model/model_audit_logs_query_options.rs +++ b/src/datadogV2/model/model_audit_logs_query_options.rs @@ -24,7 +24,18 @@ impl AuditLogsQueryOptions { timezone: None, } } + + pub fn time_offset(&mut self, value: i64) -> &mut Self { + self.time_offset = Some(value); + 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 75d72e7ac..923a0235d 100644 --- a/src/datadogV2/model/model_audit_logs_query_page_options.rs +++ b/src/datadogV2/model/model_audit_logs_query_page_options.rs @@ -23,7 +23,18 @@ impl AuditLogsQueryPageOptions { limit: None, } } + + pub fn cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + 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 373cd1ffa..89851f999 100644 --- a/src/datadogV2/model/model_audit_logs_response_links.rs +++ b/src/datadogV2/model/model_audit_logs_response_links.rs @@ -18,7 +18,13 @@ impl AuditLogsResponseLinks { pub fn new() -> AuditLogsResponseLinks { AuditLogsResponseLinks { next: None } } + + 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 13580aa4f..50746a782 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,7 +36,33 @@ impl AuditLogsResponseMetadata { warnings: None, } } + + pub fn elapsed(&mut self, value: i64) -> &mut Self { + self.elapsed = Some(value); + self + } + + pub fn page(&mut self, value: crate::datadogV2::model::AuditLogsResponsePage) -> &mut Self { + self.page = Some(value); + self + } + + pub fn request_id(&mut self, value: String) -> &mut Self { + self.request_id = Some(value); + self + } + + pub fn status(&mut self, value: crate::datadogV2::model::AuditLogsResponseStatus) -> &mut Self { + self.status = Some(value); + 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 657bcb04f..7b96847b5 100644 --- a/src/datadogV2/model/model_audit_logs_response_page.rs +++ b/src/datadogV2/model/model_audit_logs_response_page.rs @@ -17,7 +17,13 @@ impl AuditLogsResponsePage { pub fn new() -> AuditLogsResponsePage { AuditLogsResponsePage { after: None } } + + 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 1d6e08603..7fe5fd000 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,7 +32,28 @@ impl AuditLogsSearchEventsRequest { sort: None, } } + + pub fn filter(&mut self, value: crate::datadogV2::model::AuditLogsQueryFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn options(&mut self, value: crate::datadogV2::model::AuditLogsQueryOptions) -> &mut Self { + self.options = Some(value); + self + } + + pub fn page(&mut self, value: crate::datadogV2::model::AuditLogsQueryPageOptions) -> &mut Self { + self.page = Some(value); + 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 8de93b7aa..78e609300 100644 --- a/src/datadogV2/model/model_audit_logs_warning.rs +++ b/src/datadogV2/model/model_audit_logs_warning.rs @@ -27,7 +27,23 @@ impl AuditLogsWarning { title: None, } } + + pub fn code(&mut self, value: String) -> &mut Self { + self.code = Some(value); + self + } + + pub fn detail(&mut self, value: String) -> &mut Self { + self.detail = Some(value); + 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 c76107f38..86704108c 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 attributes( + &mut self, + value: crate::datadogV2::model::AuthNMappingAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn 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..582fa6051 100644 --- a/src/datadogV2/model/model_auth_n_mapping_attributes.rs +++ b/src/datadogV2/model/model_auth_n_mapping_attributes.rs @@ -35,7 +35,33 @@ impl AuthNMappingAttributes { saml_assertion_attribute_id: None, } } + + pub fn attribute_key(&mut self, value: String) -> &mut Self { + self.attribute_key = Some(value); + self + } + + pub fn attribute_value(&mut self, value: String) -> &mut Self { + self.attribute_value = Some(value); + self + } + + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + 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 4a0f0003f..ccc6116ef 100644 --- a/src/datadogV2/model/model_auth_n_mapping_create_attributes.rs +++ b/src/datadogV2/model/model_auth_n_mapping_create_attributes.rs @@ -23,7 +23,18 @@ impl AuthNMappingCreateAttributes { attribute_value: None, } } + + pub fn attribute_key(&mut self, value: String) -> &mut Self { + self.attribute_key = Some(value); + 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 a89c10e70..6fdbac364 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 attributes( + &mut self, + value: crate::datadogV2::model::AuthNMappingCreateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn 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..e03902cef 100644 --- a/src/datadogV2/model/model_auth_n_mapping_create_relationships.rs +++ b/src/datadogV2/model/model_auth_n_mapping_create_relationships.rs @@ -10,14 +10,20 @@ 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 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_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_relationships.rs b/src/datadogV2/model/model_auth_n_mapping_relationships.rs index 63bdd4d92..057877d6a 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,7 +24,21 @@ impl AuthNMappingRelationships { saml_assertion_attribute: None, } } + + pub fn role(&mut self, value: crate::datadogV2::model::RelationshipToRole) -> &mut Self { + self.role = Some(value); + self + } + + pub fn 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 { 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 db821415f..b36548019 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,7 +23,21 @@ impl AuthNMappingResponse { included: None, } } + + pub fn data(&mut self, value: crate::datadogV2::model::AuthNMapping) -> &mut Self { + self.data = Some(value); + self + } + + pub fn included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + 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 bd3388cb5..7a920bb48 100644 --- a/src/datadogV2/model/model_auth_n_mapping_update_attributes.rs +++ b/src/datadogV2/model/model_auth_n_mapping_update_attributes.rs @@ -23,7 +23,18 @@ impl AuthNMappingUpdateAttributes { attribute_value: None, } } + + pub fn attribute_key(&mut self, value: String) -> &mut Self { + self.attribute_key = Some(value); + 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 4e98d9dd4..8d1b9f93b 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 attributes( + &mut self, + value: crate::datadogV2::model::AuthNMappingUpdateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn 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..c8eafa44a 100644 --- a/src/datadogV2/model/model_auth_n_mapping_update_relationships.rs +++ b/src/datadogV2/model/model_auth_n_mapping_update_relationships.rs @@ -10,14 +10,20 @@ 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 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_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..408007966 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,7 +27,26 @@ impl AuthNMappingsResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + 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 11b78baea..dd5b7f669 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 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..be65ef076 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 created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + #[allow(deprecated)] + pub fn error_messages(&mut self, value: Vec) -> &mut Self { + self.error_messages = Some(value); + self + } + + #[allow(deprecated)] + pub fn months(&mut self, value: i32) -> &mut Self { + self.months = Some(value); + self + } + + #[allow(deprecated)] + pub fn status_updated_at(&mut self, value: String) -> &mut Self { + self.status_updated_at = Some(value); + self + } + + #[allow(deprecated)] + 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_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..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 @@ -48,4 +48,19 @@ impl AwsCURConfigPostRequestAttributes { report_prefix, } } + + pub fn bucket_region(&mut self, value: String) -> &mut Self { + self.bucket_region = Some(value); + self + } + + pub fn is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + 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 698e3a102..13623fa48 100644 --- a/src/datadogV2/model/model_aws_cur_config_response.rs +++ b/src/datadogV2/model/model_aws_cur_config_response.rs @@ -10,14 +10,20 @@ 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 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 b74320cdf..168095e5c 100644 --- a/src/datadogV2/model/model_aws_cur_configs_response.rs +++ b/src/datadogV2/model/model_aws_cur_configs_response.rs @@ -17,7 +17,13 @@ impl AwsCURConfigsResponse { pub fn new() -> AwsCURConfigsResponse { AwsCURConfigsResponse { data: None } } + + 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 66d4b2ef2..19da2c97d 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 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..711bcfbb5 100644 --- a/src/datadogV2/model/model_aws_related_account_attributes.rs +++ b/src/datadogV2/model/model_aws_related_account_attributes.rs @@ -23,7 +23,18 @@ impl AWSRelatedAccountAttributes { name: None, } } + + pub fn has_datadog_integration(&mut self, value: bool) -> &mut Self { + self.has_datadog_integration = Some(value); + 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 a1c03719b..6b80a16b0 100644 --- a/src/datadogV2/model/model_aws_related_accounts_response.rs +++ b/src/datadogV2/model/model_aws_related_accounts_response.rs @@ -17,7 +17,13 @@ impl AWSRelatedAccountsResponse { pub fn new() -> AWSRelatedAccountsResponse { AWSRelatedAccountsResponse { data: None } } + + 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 a2beb9df4..eb43e5144 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 created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + #[allow(deprecated)] + pub fn error_messages(&mut self, value: Vec) -> &mut Self { + self.error_messages = Some(value); + self + } + + #[allow(deprecated)] + pub fn id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + #[allow(deprecated)] + pub fn months(&mut self, value: i32) -> &mut Self { + self.months = Some(value); + self + } + + #[allow(deprecated)] + pub fn status_updated_at(&mut self, value: String) -> &mut Self { + self.status_updated_at = Some(value); + self + } + + #[allow(deprecated)] + 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 fb61c4116..2f2b2eef9 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 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..de35df5e3 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 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..f65f5cb76 100644 --- a/src/datadogV2/model/model_azure_uc_config_pairs_response.rs +++ b/src/datadogV2/model/model_azure_uc_config_pairs_response.rs @@ -10,14 +10,20 @@ 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 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_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..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 @@ -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 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..9ca4bcd71 100644 --- a/src/datadogV2/model/model_azure_uc_configs_response.rs +++ b/src/datadogV2/model/model_azure_uc_configs_response.rs @@ -17,7 +17,13 @@ impl AzureUCConfigsResponse { pub fn new() -> AzureUCConfigsResponse { AzureUCConfigsResponse { data: None } } + + 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.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..8c249aa9c 100644 --- a/src/datadogV2/model/model_bulk_mute_findings_request_meta.rs +++ b/src/datadogV2/model/model_bulk_mute_findings_request_meta.rs @@ -17,7 +17,16 @@ impl BulkMuteFindingsRequestMeta { pub fn new() -> BulkMuteFindingsRequestMeta { BulkMuteFindingsRequestMeta { findings: None } } + + pub fn findings( + &mut self, + value: Vec, + ) -> &mut Self { + self.findings = Some(value); + 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 d2be07210..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 @@ -17,7 +17,13 @@ impl BulkMuteFindingsRequestMetaFindings { pub fn new() -> BulkMuteFindingsRequestMetaFindings { BulkMuteFindingsRequestMetaFindings { finding_id: None } } + + 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 92afcb74b..8b1a8cc84 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 description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + 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.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..30dc409a0 100644 --- a/src/datadogV2/model/model_bulk_mute_findings_response_data.rs +++ b/src/datadogV2/model/model_bulk_mute_findings_response_data.rs @@ -23,7 +23,18 @@ impl BulkMuteFindingsResponseData { type_: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 6c92f6121..d29cbb6ac 100644 --- a/src/datadogV2/model/model_chargeback_breakdown.rs +++ b/src/datadogV2/model/model_chargeback_breakdown.rs @@ -27,7 +27,23 @@ impl ChargebackBreakdown { product_name: None, } } + + pub fn charge_type(&mut self, value: String) -> &mut Self { + self.charge_type = Some(value); + self + } + + pub fn cost(&mut self, value: f64) -> &mut Self { + self.cost = Some(value); + 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 c84cceda4..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 @@ -23,7 +23,18 @@ impl CIAppAggregateBucketValueTimeseriesPoint { value: None, } } + + pub fn time(&mut self, value: String) -> &mut Self { + self.time = Some(value); + 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 e3596060c..e0507e723 100644 --- a/src/datadogV2/model/model_ci_app_aggregate_sort.rs +++ b/src/datadogV2/model/model_ci_app_aggregate_sort.rs @@ -31,7 +31,31 @@ impl CIAppAggregateSort { type_: None, } } + + pub fn aggregation( + &mut self, + value: crate::datadogV2::model::CIAppAggregationFunction, + ) -> &mut Self { + self.aggregation = Some(value); + self + } + + pub fn metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn order(&mut self, value: crate::datadogV2::model::CIAppSortOrder) -> &mut Self { + self.order = Some(value); + 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 c55201d84..eead5f0e3 100644 --- a/src/datadogV2/model/model_ci_app_ci_error.rs +++ b/src/datadogV2/model/model_ci_app_ci_error.rs @@ -35,7 +35,28 @@ impl CIAppCIError { type_: None, } } + + pub fn domain(&mut self, value: crate::datadogV2::model::CIAppCIErrorDomain) -> &mut Self { + self.domain = Some(value); + self + } + + pub fn message(&mut self, value: Option) -> &mut Self { + self.message = Some(value); + self + } + + pub fn stack(&mut self, value: Option) -> &mut Self { + self.stack = Some(value); + 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 f8e2f3308..d0caec5de 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 interval(&mut self, value: String) -> &mut Self { + self.interval = Some(value); + self + } + + pub fn metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + 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 cb8700839..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 @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: crate::datadogV2::model::CIAppCreatePipelineEventRequestData, + ) -> &mut Self { + self.data = Some(value); + 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 8f60dbe8f..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 @@ -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 env(&mut self, value: String) -> &mut Self { + self.env = Some(value); + 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_data.rs b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_data.rs index f71d5807e..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 @@ -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,7 +23,24 @@ impl CIAppCreatePipelineEventRequestData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::CIAppCreatePipelineEventRequestAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::CIAppCreatePipelineEventRequestDataType, + ) -> &mut Self { + self.type_ = Some(value); + 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 3a8047dc9..eab7b0fb3 100644 --- a/src/datadogV2/model/model_ci_app_event_attributes.rs +++ b/src/datadogV2/model/model_ci_app_event_attributes.rs @@ -27,7 +27,26 @@ impl CIAppEventAttributes { test_level: None, } } + + pub fn attributes( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + 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 79c1bb379..acb685ba0 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 author_name(&mut self, value: Option) -> &mut Self { + self.author_name = Some(value); + self + } + + pub fn author_time(&mut self, value: Option) -> &mut Self { + self.author_time = Some(value); + self + } + + pub fn branch(&mut self, value: Option) -> &mut Self { + self.branch = Some(value); + self + } + + pub fn commit_time(&mut self, value: Option) -> &mut Self { + self.commit_time = Some(value); + self + } + + pub fn committer_email(&mut self, value: Option) -> &mut Self { + self.committer_email = Some(value); + self + } + + pub fn committer_name(&mut self, value: Option) -> &mut Self { + self.committer_name = Some(value); + self + } + + pub fn default_branch(&mut self, value: Option) -> &mut Self { + self.default_branch = Some(value); + self + } + + pub fn message(&mut self, value: Option) -> &mut Self { + self.message = Some(value); + 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 f452705d1..c8873da83 100644 --- a/src/datadogV2/model/model_ci_app_host_info.rs +++ b/src/datadogV2/model/model_ci_app_host_info.rs @@ -31,7 +31,28 @@ impl CIAppHostInfo { workspace: None, } } + + pub fn hostname(&mut self, value: String) -> &mut Self { + self.hostname = Some(value); + self + } + + pub fn labels(&mut self, value: Vec) -> &mut Self { + self.labels = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 be1a3c8b4..b905f700c 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,7 +27,29 @@ impl CIAppPipelineEvent { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::CIAppPipelineEventAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::CIAppPipelineEventTypeName, + ) -> &mut Self { + self.type_ = Some(value); + 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 1dbade366..3191cd2ee 100644 --- a/src/datadogV2/model/model_ci_app_pipeline_event_attributes.rs +++ b/src/datadogV2/model/model_ci_app_pipeline_event_attributes.rs @@ -27,7 +27,26 @@ impl CIAppPipelineEventAttributes { tags: None, } } + + pub fn attributes( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn ci_level(&mut self, value: crate::datadogV2::model::CIAppPipelineLevel) -> &mut Self { + self.ci_level = Some(value); + 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 9a032a5ef..41d273d82 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,57 @@ impl CIAppPipelineEventJob { url, } } + + pub fn dependencies(&mut self, value: Option>) -> &mut Self { + self.dependencies = Some(value); + self + } + + pub fn error(&mut self, value: Option) -> &mut Self { + self.error = Some(value); + self + } + + pub fn git(&mut self, value: Option) -> &mut Self { + self.git = Some(value); + self + } + + pub fn metrics(&mut self, value: Option>) -> &mut Self { + self.metrics = Some(value); + self + } + + pub fn node(&mut self, value: Option) -> &mut Self { + self.node = Some(value); + self + } + + pub fn parameters( + &mut self, + value: Option>, + ) -> &mut Self { + self.parameters = Some(value); + self + } + + pub fn queue_time(&mut self, value: Option) -> &mut Self { + self.queue_time = Some(value); + self + } + + pub fn stage_id(&mut self, value: Option) -> &mut Self { + self.stage_id = Some(value); + self + } + + pub fn stage_name(&mut self, value: Option) -> &mut Self { + self.stage_name = Some(value); + 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 8d1ea4ac8..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 @@ -20,4 +20,9 @@ impl CIAppPipelineEventParentPipeline { pub fn new(id: String) -> CIAppPipelineEventParentPipeline { CIAppPipelineEventParentPipeline { id, url: None } } + + 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 17c3f6e15..e196235a8 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,73 @@ impl CIAppPipelineEventPipeline { url, } } + + pub fn error(&mut self, value: Option) -> &mut Self { + self.error = Some(value); + self + } + + pub fn git(&mut self, value: Option) -> &mut Self { + self.git = Some(value); + self + } + + pub fn is_manual(&mut self, value: Option) -> &mut Self { + self.is_manual = Some(value); + self + } + + pub fn is_resumed(&mut self, value: Option) -> &mut Self { + self.is_resumed = Some(value); + self + } + + pub fn metrics(&mut self, value: Option>) -> &mut Self { + self.metrics = Some(value); + self + } + + pub fn node(&mut self, value: Option) -> &mut Self { + self.node = Some(value); + self + } + + pub fn parameters( + &mut self, + value: Option>, + ) -> &mut Self { + self.parameters = Some(value); + self + } + + pub fn parent_pipeline( + &mut self, + value: Option, + ) -> &mut Self { + self.parent_pipeline = Some(value); + self + } + + pub fn pipeline_id(&mut self, value: String) -> &mut Self { + self.pipeline_id = Some(value); + self + } + + pub fn previous_attempt( + &mut self, + value: Option, + ) -> &mut Self { + self.previous_attempt = Some(value); + self + } + + pub fn queue_time(&mut self, value: Option) -> &mut Self { + self.queue_time = Some(value); + 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 39459cacc..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 @@ -20,4 +20,9 @@ impl CIAppPipelineEventPreviousPipeline { pub fn new(id: String) -> CIAppPipelineEventPreviousPipeline { CIAppPipelineEventPreviousPipeline { id, url: None } } + + 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 5026d123b..4264a43a3 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,47 @@ impl CIAppPipelineEventStage { tags: None, } } + + pub fn dependencies(&mut self, value: Option>) -> &mut Self { + self.dependencies = Some(value); + self + } + + pub fn error(&mut self, value: Option) -> &mut Self { + self.error = Some(value); + self + } + + pub fn git(&mut self, value: Option) -> &mut Self { + self.git = Some(value); + self + } + + pub fn metrics(&mut self, value: Option>) -> &mut Self { + self.metrics = Some(value); + self + } + + pub fn node(&mut self, value: Option) -> &mut Self { + self.node = Some(value); + self + } + + pub fn parameters( + &mut self, + value: Option>, + ) -> &mut Self { + self.parameters = Some(value); + self + } + + pub fn queue_time(&mut self, value: Option) -> &mut Self { + self.queue_time = Some(value); + 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 cb6ec6026..7fdada414 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,62 @@ impl CIAppPipelineEventStep { url: None, } } + + pub fn error(&mut self, value: Option) -> &mut Self { + self.error = Some(value); + self + } + + pub fn git(&mut self, value: Option) -> &mut Self { + self.git = Some(value); + self + } + + pub fn job_id(&mut self, value: Option) -> &mut Self { + self.job_id = Some(value); + self + } + + pub fn job_name(&mut self, value: Option) -> &mut Self { + self.job_name = Some(value); + self + } + + pub fn metrics(&mut self, value: Option>) -> &mut Self { + self.metrics = Some(value); + self + } + + pub fn node(&mut self, value: Option) -> &mut Self { + self.node = Some(value); + self + } + + pub fn parameters( + &mut self, + value: Option>, + ) -> &mut Self { + self.parameters = Some(value); + self + } + + pub fn stage_id(&mut self, value: Option) -> &mut Self { + self.stage_id = Some(value); + self + } + + pub fn stage_name(&mut self, value: Option) -> &mut Self { + self.stage_name = Some(value); + self + } + + pub fn tags(&mut self, value: Option>) -> &mut Self { + self.tags = Some(value); + 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 1f2800502..d9a891331 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,7 +32,31 @@ impl CIAppPipelineEventsRequest { sort: None, } } + + pub fn filter( + &mut self, + value: crate::datadogV2::model::CIAppPipelinesQueryFilter, + ) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn options(&mut self, value: crate::datadogV2::model::CIAppQueryOptions) -> &mut Self { + self.options = Some(value); + self + } + + pub fn page(&mut self, value: crate::datadogV2::model::CIAppQueryPageOptions) -> &mut Self { + self.page = Some(value); + 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 1ad813950..0a005699c 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,7 +27,26 @@ impl CIAppPipelineEventsResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn links(&mut self, value: crate::datadogV2::model::CIAppResponseLinks) -> &mut Self { + self.links = Some(value); + self + } + + pub fn meta( + &mut self, + value: crate::datadogV2::model::CIAppResponseMetadataWithPagination, + ) -> &mut Self { + self.meta = Some(value); + 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 f3aeff674..13547158b 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,7 +32,34 @@ impl CIAppPipelinesAggregateRequest { options: None, } } + + pub fn compute(&mut self, value: Vec) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn filter( + &mut self, + value: crate::datadogV2::model::CIAppPipelinesQueryFilter, + ) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + 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 2016844a2..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 @@ -17,7 +17,16 @@ impl CIAppPipelinesAggregationBucketsResponse { pub fn new() -> CIAppPipelinesAggregationBucketsResponse { CIAppPipelinesAggregationBucketsResponse { buckets: None } } + + pub fn buckets( + &mut self, + value: Vec, + ) -> &mut Self { + self.buckets = Some(value); + 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 34a297ae3..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 @@ -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,7 +27,26 @@ impl CIAppPipelinesAnalyticsAggregateResponse { meta: None, } } + + pub fn data( + &mut self, + value: crate::datadogV2::model::CIAppPipelinesAggregationBucketsResponse, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn links(&mut self, value: crate::datadogV2::model::CIAppResponseLinks) -> &mut Self { + self.links = Some(value); + 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 ff7f46dbc..4d0ba4502 100644 --- a/src/datadogV2/model/model_ci_app_pipelines_bucket_response.rs +++ b/src/datadogV2/model/model_ci_app_pipelines_bucket_response.rs @@ -25,7 +25,27 @@ impl CIAppPipelinesBucketResponse { computes: None, } } + + pub fn by( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.by = Some(value); + self + } + + pub fn 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 { 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 28055abdb..8b04c24c4 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,32 @@ impl CIAppPipelinesGroupBy { total: None, } } + + pub fn histogram( + &mut self, + value: crate::datadogV2::model::CIAppGroupByHistogram, + ) -> &mut Self { + self.histogram = Some(value); + self + } + + pub fn limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn missing(&mut self, value: crate::datadogV2::model::CIAppGroupByMissing) -> &mut Self { + self.missing = Some(value); + self + } + + pub fn sort(&mut self, value: crate::datadogV2::model::CIAppAggregateSort) -> &mut Self { + self.sort = Some(value); + 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 126ff06f1..782ae96e5 100644 --- a/src/datadogV2/model/model_ci_app_pipelines_query_filter.rs +++ b/src/datadogV2/model/model_ci_app_pipelines_query_filter.rs @@ -27,7 +27,23 @@ impl CIAppPipelinesQueryFilter { to: None, } } + + pub fn from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + self + } + + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + 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 5955fbfdd..b64255fe3 100644 --- a/src/datadogV2/model/model_ci_app_query_options.rs +++ b/src/datadogV2/model/model_ci_app_query_options.rs @@ -24,7 +24,18 @@ impl CIAppQueryOptions { timezone: None, } } + + pub fn time_offset(&mut self, value: i64) -> &mut Self { + self.time_offset = Some(value); + 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 5bf76b4cf..e157741df 100644 --- a/src/datadogV2/model/model_ci_app_query_page_options.rs +++ b/src/datadogV2/model/model_ci_app_query_page_options.rs @@ -23,7 +23,18 @@ impl CIAppQueryPageOptions { limit: None, } } + + pub fn cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + 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 1faecb6bd..dda4a4f78 100644 --- a/src/datadogV2/model/model_ci_app_response_links.rs +++ b/src/datadogV2/model/model_ci_app_response_links.rs @@ -18,7 +18,13 @@ impl CIAppResponseLinks { pub fn new() -> CIAppResponseLinks { CIAppResponseLinks { next: None } } + + 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 76c1bb23e..c1e4520c2 100644 --- a/src/datadogV2/model/model_ci_app_response_metadata.rs +++ b/src/datadogV2/model/model_ci_app_response_metadata.rs @@ -32,7 +32,28 @@ impl CIAppResponseMetadata { warnings: None, } } + + pub fn elapsed(&mut self, value: i64) -> &mut Self { + self.elapsed = Some(value); + self + } + + pub fn request_id(&mut self, value: String) -> &mut Self { + self.request_id = Some(value); + self + } + + pub fn status(&mut self, value: crate::datadogV2::model::CIAppResponseStatus) -> &mut Self { + self.status = Some(value); + 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 378963db8..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 @@ -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,7 +36,33 @@ impl CIAppResponseMetadataWithPagination { warnings: None, } } + + pub fn elapsed(&mut self, value: i64) -> &mut Self { + self.elapsed = Some(value); + self + } + + pub fn page(&mut self, value: crate::datadogV2::model::CIAppResponsePage) -> &mut Self { + self.page = Some(value); + self + } + + pub fn request_id(&mut self, value: String) -> &mut Self { + self.request_id = Some(value); + self + } + + pub fn status(&mut self, value: crate::datadogV2::model::CIAppResponseStatus) -> &mut Self { + self.status = Some(value); + 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 f81b6e3b0..d97b9cf18 100644 --- a/src/datadogV2/model/model_ci_app_response_page.rs +++ b/src/datadogV2/model/model_ci_app_response_page.rs @@ -17,7 +17,13 @@ impl CIAppResponsePage { pub fn new() -> CIAppResponsePage { CIAppResponsePage { after: None } } + + 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 062624f92..c2cac6523 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,7 +27,26 @@ impl CIAppTestEvent { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::CIAppEventAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 aa05eb012..4c18256b3 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,7 +32,28 @@ impl CIAppTestEventsRequest { sort: None, } } + + pub fn filter(&mut self, value: crate::datadogV2::model::CIAppTestsQueryFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn options(&mut self, value: crate::datadogV2::model::CIAppQueryOptions) -> &mut Self { + self.options = Some(value); + self + } + + pub fn page(&mut self, value: crate::datadogV2::model::CIAppQueryPageOptions) -> &mut Self { + self.page = Some(value); + 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 77d00b536..a0b28f4ad 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,7 +27,26 @@ impl CIAppTestEventsResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn links(&mut self, value: crate::datadogV2::model::CIAppResponseLinks) -> &mut Self { + self.links = Some(value); + self + } + + pub fn meta( + &mut self, + value: crate::datadogV2::model::CIAppResponseMetadataWithPagination, + ) -> &mut Self { + self.meta = Some(value); + 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 3aa6e21a2..d4c62287f 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,7 +32,31 @@ impl CIAppTestsAggregateRequest { options: None, } } + + pub fn compute(&mut self, value: Vec) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn filter(&mut self, value: crate::datadogV2::model::CIAppTestsQueryFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + 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 ddf0db281..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 @@ -17,7 +17,16 @@ impl CIAppTestsAggregationBucketsResponse { pub fn new() -> CIAppTestsAggregationBucketsResponse { CIAppTestsAggregationBucketsResponse { buckets: None } } + + pub fn buckets( + &mut self, + value: Vec, + ) -> &mut Self { + self.buckets = Some(value); + 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 ed5fbfc91..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 @@ -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,7 +27,29 @@ impl CIAppTestsAnalyticsAggregateResponse { meta: None, } } + + pub fn data( + &mut self, + value: crate::datadogV2::model::CIAppTestsAggregationBucketsResponse, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn links(&mut self, value: crate::datadogV2::model::CIAppResponseLinks) -> &mut Self { + self.links = Some(value); + self + } + + pub fn meta( + &mut self, + value: crate::datadogV2::model::CIAppResponseMetadataWithPagination, + ) -> &mut Self { + self.meta = Some(value); + 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 6ecd84ac2..9c01007e5 100644 --- a/src/datadogV2/model/model_ci_app_tests_bucket_response.rs +++ b/src/datadogV2/model/model_ci_app_tests_bucket_response.rs @@ -25,7 +25,27 @@ impl CIAppTestsBucketResponse { computes: None, } } + + pub fn by( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.by = Some(value); + self + } + + pub fn 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 { 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 a17ccb8f5..643189adc 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,32 @@ impl CIAppTestsGroupBy { total: None, } } + + pub fn histogram( + &mut self, + value: crate::datadogV2::model::CIAppGroupByHistogram, + ) -> &mut Self { + self.histogram = Some(value); + self + } + + pub fn limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn missing(&mut self, value: crate::datadogV2::model::CIAppGroupByMissing) -> &mut Self { + self.missing = Some(value); + self + } + + pub fn sort(&mut self, value: crate::datadogV2::model::CIAppAggregateSort) -> &mut Self { + self.sort = Some(value); + 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 cf409dfff..19f24ea2a 100644 --- a/src/datadogV2/model/model_ci_app_tests_query_filter.rs +++ b/src/datadogV2/model/model_ci_app_tests_query_filter.rs @@ -27,7 +27,23 @@ impl CIAppTestsQueryFilter { to: None, } } + + pub fn from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + self + } + + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + 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 ac4c6fca7..423a1761f 100644 --- a/src/datadogV2/model/model_ci_app_warning.rs +++ b/src/datadogV2/model/model_ci_app_warning.rs @@ -27,7 +27,23 @@ impl CIAppWarning { title: None, } } + + pub fn code(&mut self, value: String) -> &mut Self { + self.code = Some(value); + self + } + + pub fn detail(&mut self, value: String) -> &mut Self { + self.detail = Some(value); + 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 190cd44da..8845dabb7 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,7 +35,26 @@ impl CloudConfigurationComplianceRuleOptions { additional_properties: std::collections::BTreeMap::new(), } } + + pub fn complex_rule(&mut self, value: bool) -> &mut Self { + self.complex_rule = Some(value); + self + } + + pub fn rego_rule( + &mut self, + value: crate::datadogV2::model::CloudConfigurationRegoRule, + ) -> &mut Self { + self.rego_rule = Some(value); + 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 127beda1d..b65aae8ab 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 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..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 @@ -47,7 +47,28 @@ impl CloudConfigurationRuleComplianceSignalOptions { user_group_by_fields: None, } } + + pub fn default_activation_status(&mut self, value: Option) -> &mut Self { + self.default_activation_status = Some(value); + self + } + + pub fn default_group_by_fields(&mut self, value: Option>) -> &mut Self { + self.default_group_by_fields = Some(value); + self + } + + pub fn user_activation_status(&mut self, value: Option) -> &mut Self { + self.user_activation_status = Some(value); + 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 8698b741f..bb131f9be 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 filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.filters = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn 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..24327f13c 100644 --- a/src/datadogV2/model/model_cloud_cost_activity_response.rs +++ b/src/datadogV2/model/model_cloud_cost_activity_response.rs @@ -10,14 +10,20 @@ 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 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 20750a597..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 @@ -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,7 +79,94 @@ impl CloudWorkloadSecurityAgentRuleAttributes { version: None, } } + + pub fn agent_constraint(&mut self, value: String) -> &mut Self { + self.agent_constraint = Some(value); + self + } + + pub fn category(&mut self, value: String) -> &mut Self { + self.category = Some(value); + self + } + + pub fn creation_author_uu_id(&mut self, value: String) -> &mut Self { + self.creation_author_uu_id = Some(value); + self + } + + pub fn creation_date(&mut self, value: i64) -> &mut Self { + self.creation_date = Some(value); + self + } + + pub fn creator( + &mut self, + value: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleCreatorAttributes, + ) -> &mut Self { + self.creator = Some(value); + self + } + + pub fn default_rule(&mut self, value: bool) -> &mut Self { + self.default_rule = Some(value); + self + } + + pub fn description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn enabled(&mut self, value: bool) -> &mut Self { + self.enabled = Some(value); + self + } + + pub fn expression(&mut self, value: String) -> &mut Self { + self.expression = Some(value); + self + } + + pub fn filters(&mut self, value: Vec) -> &mut Self { + self.filters = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn update_author_uu_id(&mut self, value: String) -> &mut Self { + self.update_author_uu_id = Some(value); + self + } + + pub fn update_date(&mut self, value: i64) -> &mut Self { + self.update_date = Some(value); + self + } + + pub fn updated_at(&mut self, value: i64) -> &mut Self { + self.updated_at = Some(value); + self + } + + pub fn updater( + &mut self, + value: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleUpdaterAttributes, + ) -> &mut Self { + self.updater = Some(value); + 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 59e98dbbc..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 @@ -31,4 +31,14 @@ impl CloudWorkloadSecurityAgentRuleCreateAttributes { name, } } + + pub fn description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + 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_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..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 @@ -23,7 +23,18 @@ impl CloudWorkloadSecurityAgentRuleCreatorAttributes { name: None, } } + + pub fn handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + 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 5da415721..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 @@ -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,7 +27,29 @@ impl CloudWorkloadSecurityAgentRuleData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleType, + ) -> &mut Self { + self.type_ = Some(value); + 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 328c5ac55..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 @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleData, + ) -> &mut Self { + self.data = Some(value); + 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 49274d1d8..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 @@ -27,7 +27,23 @@ impl CloudWorkloadSecurityAgentRuleUpdateAttributes { expression: None, } } + + pub fn description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn enabled(&mut self, value: bool) -> &mut Self { + self.enabled = Some(value); + 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_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..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 @@ -23,7 +23,18 @@ impl CloudWorkloadSecurityAgentRuleUpdaterAttributes { name: None, } } + + pub fn handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + 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 5a32d21cc..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 @@ -17,7 +17,16 @@ impl CloudWorkloadSecurityAgentRulesListResponse { pub fn new() -> CloudWorkloadSecurityAgentRulesListResponse { CloudWorkloadSecurityAgentRulesListResponse { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } + impl Default for CloudWorkloadSecurityAgentRulesListResponse { fn default() -> Self { Self::new() 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..a944e0ed2 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 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..56be4a79a 100644 --- a/src/datadogV2/model/model_cloudflare_account_response.rs +++ b/src/datadogV2/model/model_cloudflare_account_response.rs @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: crate::datadogV2::model::CloudflareAccountResponseData, + ) -> &mut Self { + self.data = Some(value); + 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 04dfd1faf..ee7aa26de 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 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..12a2002c4 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 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..e7bdc237a 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,7 +23,21 @@ impl CloudflareAccountUpdateRequestData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::CloudflareAccountUpdateRequestAttributes, + ) -> &mut Self { + self.attributes = Some(value); + 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 3c7eb13d1..be7e2964f 100644 --- a/src/datadogV2/model/model_cloudflare_accounts_response.rs +++ b/src/datadogV2/model/model_cloudflare_accounts_response.rs @@ -17,7 +17,16 @@ impl CloudflareAccountsResponse { pub fn new() -> CloudflareAccountsResponse { CloudflareAccountsResponse { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } + impl Default for CloudflareAccountsResponse { fn default() -> Self { Self::new() 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..254352dbf 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 resources( + &mut self, + value: Vec, + ) -> &mut Self { + self.resources = Some(value); + self + } + + pub fn 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..57dd3250b 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 enable_custom_metrics(&mut self, value: bool) -> &mut Self { + self.enable_custom_metrics = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 1a40328dc..025c08c0a 100644 --- a/src/datadogV2/model/model_confluent_account_response.rs +++ b/src/datadogV2/model/model_confluent_account_response.rs @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: crate::datadogV2::model::ConfluentAccountResponseData, + ) -> &mut Self { + self.data = Some(value); + 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 e7e1112a0..6f5a0ded2 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 resources( + &mut self, + value: Vec, + ) -> &mut Self { + self.resources = Some(value); + 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_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..dbccd4473 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 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..f74f24585 100644 --- a/src/datadogV2/model/model_confluent_accounts_response.rs +++ b/src/datadogV2/model/model_confluent_accounts_response.rs @@ -17,7 +17,16 @@ impl ConfluentAccountsResponse { pub fn new() -> ConfluentAccountsResponse { ConfluentAccountsResponse { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } + impl Default for ConfluentAccountsResponse { fn default() -> Self { Self::new() 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..b0c6969ed 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 enable_custom_metrics(&mut self, value: bool) -> &mut Self { + self.enable_custom_metrics = Some(value); + self + } + + pub fn 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..f1b4f0b47 100644 --- a/src/datadogV2/model/model_confluent_resource_response.rs +++ b/src/datadogV2/model/model_confluent_resource_response.rs @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: crate::datadogV2::model::ConfluentResourceResponseData, + ) -> &mut Self { + self.data = Some(value); + 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 3cd3e77e7..ada75bebe 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 enable_custom_metrics(&mut self, value: bool) -> &mut Self { + self.enable_custom_metrics = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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_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..816a5cbb0 100644 --- a/src/datadogV2/model/model_confluent_resources_response.rs +++ b/src/datadogV2/model/model_confluent_resources_response.rs @@ -17,7 +17,16 @@ impl ConfluentResourcesResponse { pub fn new() -> ConfluentResourcesResponse { ConfluentResourcesResponse { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 5580a7cba..503fd4233 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,7 +27,23 @@ impl Container { type_: None, } } + + pub fn attributes(&mut self, value: crate::datadogV2::model::ContainerAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 03ef77e62..8162bf9a8 100644 --- a/src/datadogV2/model/model_container_attributes.rs +++ b/src/datadogV2/model/model_container_attributes.rs @@ -63,7 +63,58 @@ impl ContainerAttributes { tags: None, } } + + pub fn container_id(&mut self, value: String) -> &mut Self { + self.container_id = Some(value); + self + } + + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn image_digest(&mut self, value: Option) -> &mut Self { + self.image_digest = Some(value); + self + } + + pub fn image_name(&mut self, value: String) -> &mut Self { + self.image_name = Some(value); + self + } + + pub fn image_tags(&mut self, value: Option>) -> &mut Self { + self.image_tags = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn started_at(&mut self, value: String) -> &mut Self { + self.started_at = Some(value); + self + } + + pub fn state(&mut self, value: String) -> &mut Self { + self.state = Some(value); + 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 2249ff6eb..48cf1a44e 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,7 +31,34 @@ impl ContainerGroup { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::ContainerGroupAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::ContainerGroupRelationships, + ) -> &mut Self { + self.relationships = Some(value); + 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 6ff4de2d2..61fa3d8a4 100644 --- a/src/datadogV2/model/model_container_group_attributes.rs +++ b/src/datadogV2/model/model_container_group_attributes.rs @@ -23,7 +23,21 @@ impl ContainerGroupAttributes { tags: None, } } + + pub fn count(&mut self, value: i64) -> &mut Self { + self.count = Some(value); + self + } + + pub fn tags( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.tags = Some(value); + 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 5a2c91a37..89d4cd410 100644 --- a/src/datadogV2/model/model_container_group_relationships.rs +++ b/src/datadogV2/model/model_container_group_relationships.rs @@ -10,14 +10,23 @@ 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 containers( + &mut self, + value: crate::datadogV2::model::ContainerGroupRelationshipsLink, + ) -> &mut Self { + self.containers = Some(value); + 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 2afd819dc..c24fa5136 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,7 +23,21 @@ impl ContainerGroupRelationshipsLink { links: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn links( + &mut self, + value: crate::datadogV2::model::ContainerGroupRelationshipsLinks, + ) -> &mut Self { + self.links = Some(value); + 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 256a5223e..b32494482 100644 --- a/src/datadogV2/model/model_container_group_relationships_links.rs +++ b/src/datadogV2/model/model_container_group_relationships_links.rs @@ -17,7 +17,13 @@ impl ContainerGroupRelationshipsLinks { pub fn new() -> ContainerGroupRelationshipsLinks { ContainerGroupRelationshipsLinks { related: None } } + + 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 01c84da3a..638680e02 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,7 +27,26 @@ impl ContainerImage { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::ContainerImageAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 409394dab..be5d548a7 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,7 +86,99 @@ impl ContainerImageAttributes { vulnerability_count: None, } } + + pub fn container_count(&mut self, value: i64) -> &mut Self { + self.container_count = Some(value); + self + } + + pub fn image_flavors( + &mut self, + value: Vec, + ) -> &mut Self { + self.image_flavors = Some(value); + self + } + + pub fn image_tags(&mut self, value: Vec) -> &mut Self { + self.image_tags = Some(value); + self + } + + pub fn images_built_at(&mut self, value: Vec) -> &mut Self { + self.images_built_at = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn os_architectures(&mut self, value: Vec) -> &mut Self { + self.os_architectures = Some(value); + self + } + + pub fn os_names(&mut self, value: Vec) -> &mut Self { + self.os_names = Some(value); + self + } + + pub fn os_versions(&mut self, value: Vec) -> &mut Self { + self.os_versions = Some(value); + self + } + + pub fn published_at(&mut self, value: String) -> &mut Self { + self.published_at = Some(value); + self + } + + pub fn registry(&mut self, value: String) -> &mut Self { + self.registry = Some(value); + self + } + + pub fn repo_digest(&mut self, value: String) -> &mut Self { + self.repo_digest = Some(value); + self + } + + pub fn repository(&mut self, value: String) -> &mut Self { + self.repository = Some(value); + self + } + + pub fn short_image(&mut self, value: String) -> &mut Self { + self.short_image = Some(value); + self + } + + pub fn sizes(&mut self, value: Vec) -> &mut Self { + self.sizes = Some(value); + self + } + + pub fn sources(&mut self, value: Vec) -> &mut Self { + self.sources = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn vulnerability_count( + &mut self, + value: crate::datadogV2::model::ContainerImageVulnerabilities, + ) -> &mut Self { + self.vulnerability_count = Some(value); + 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 e599b2b86..afba76958 100644 --- a/src/datadogV2/model/model_container_image_flavor.rs +++ b/src/datadogV2/model/model_container_image_flavor.rs @@ -35,7 +35,33 @@ impl ContainerImageFlavor { size: None, } } + + pub fn built_at(&mut self, value: String) -> &mut Self { + self.built_at = Some(value); + self + } + + pub fn os_architecture(&mut self, value: String) -> &mut Self { + self.os_architecture = Some(value); + self + } + + pub fn os_name(&mut self, value: String) -> &mut Self { + self.os_name = Some(value); + self + } + + pub fn os_version(&mut self, value: String) -> &mut Self { + self.os_version = Some(value); + 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 a2cf05aca..77abe07cb 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,7 +31,34 @@ impl ContainerImageGroup { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::ContainerImageGroupAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::ContainerImageGroupRelationships, + ) -> &mut Self { + self.relationships = Some(value); + 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 51ef88384..544c0919a 100644 --- a/src/datadogV2/model/model_container_image_group_attributes.rs +++ b/src/datadogV2/model/model_container_image_group_attributes.rs @@ -27,7 +27,26 @@ impl ContainerImageGroupAttributes { tags: None, } } + + pub fn count(&mut self, value: i64) -> &mut Self { + self.count = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn tags( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.tags = Some(value); + 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 6e0f6c082..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 @@ -13,7 +13,7 @@ pub struct ContainerImageGroupImagesRelationshipsLink { pub data: Option>, /// Links attributes. #[serde(rename = "links")] - pub links: Option>, + pub links: Option, } impl ContainerImageGroupImagesRelationshipsLink { @@ -23,7 +23,21 @@ impl ContainerImageGroupImagesRelationshipsLink { links: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn links( + &mut self, + value: crate::datadogV2::model::ContainerImageGroupRelationshipsLinks, + ) -> &mut Self { + self.links = Some(value); + 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 12d5db6c6..55e288700 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,7 +20,16 @@ impl ContainerImageGroupRelationships { container_images: None, } } + + pub fn container_images( + &mut self, + value: crate::datadogV2::model::ContainerImageGroupImagesRelationshipsLink, + ) -> &mut Self { + self.container_images = Some(value); + 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 8ff52df63..19c011109 100644 --- a/src/datadogV2/model/model_container_image_group_relationships_links.rs +++ b/src/datadogV2/model/model_container_image_group_relationships_links.rs @@ -17,7 +17,13 @@ impl ContainerImageGroupRelationshipsLinks { pub fn new() -> ContainerImageGroupRelationshipsLinks { ContainerImageGroupRelationshipsLinks { related: None } } + + 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_meta.rs b/src/datadogV2/model/model_container_image_meta.rs index c822b4029..0479e5df0 100644 --- a/src/datadogV2/model/model_container_image_meta.rs +++ b/src/datadogV2/model/model_container_image_meta.rs @@ -10,14 +10,23 @@ 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 pagination( + &mut self, + value: crate::datadogV2::model::ContainerImageMetaPage, + ) -> &mut Self { + self.pagination = Some(value); + 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 8ba18ffb5..d797725de 100644 --- a/src/datadogV2/model/model_container_image_meta_page.rs +++ b/src/datadogV2/model/model_container_image_meta_page.rs @@ -43,7 +43,41 @@ impl ContainerImageMetaPage { type_: None, } } + + pub fn cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + self + } + + pub fn limit(&mut self, value: i32) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn next_cursor(&mut self, value: String) -> &mut Self { + self.next_cursor = Some(value); + self + } + + pub fn prev_cursor(&mut self, value: Option) -> &mut Self { + self.prev_cursor = Some(value); + self + } + + pub fn total(&mut self, value: i64) -> &mut Self { + self.total = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::ContainerImageMetaPageType, + ) -> &mut Self { + self.type_ = Some(value); + 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 0c9886dc2..7b175bbff 100644 --- a/src/datadogV2/model/model_container_image_vulnerabilities.rs +++ b/src/datadogV2/model/model_container_image_vulnerabilities.rs @@ -43,7 +43,43 @@ impl ContainerImageVulnerabilities { unknown: None, } } + + pub fn asset_id(&mut self, value: String) -> &mut Self { + self.asset_id = Some(value); + self + } + + pub fn critical(&mut self, value: i64) -> &mut Self { + self.critical = Some(value); + self + } + + pub fn high(&mut self, value: i64) -> &mut Self { + self.high = Some(value); + self + } + + pub fn low(&mut self, value: i64) -> &mut Self { + self.low = Some(value); + self + } + + pub fn medium(&mut self, value: i64) -> &mut Self { + self.medium = Some(value); + self + } + + pub fn none(&mut self, value: i64) -> &mut Self { + self.none = Some(value); + 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 4f90a1520..43c4b138b 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,7 +27,26 @@ impl ContainerImagesResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn links( + &mut self, + value: crate::datadogV2::model::ContainerImagesResponseLinks, + ) -> &mut Self { + self.links = Some(value); + 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 e9db501de..b87b6ddc1 100644 --- a/src/datadogV2/model/model_container_images_response_links.rs +++ b/src/datadogV2/model/model_container_images_response_links.rs @@ -35,7 +35,33 @@ impl ContainerImagesResponseLinks { self_: None, } } + + pub fn first(&mut self, value: String) -> &mut Self { + self.first = Some(value); + self + } + + pub fn last(&mut self, value: Option) -> &mut Self { + self.last = Some(value); + self + } + + pub fn next(&mut self, value: Option) -> &mut Self { + self.next = Some(value); + self + } + + pub fn prev(&mut self, value: Option) -> &mut Self { + self.prev = Some(value); + 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_meta.rs b/src/datadogV2/model/model_container_meta.rs index ff8ea51fb..d029389d1 100644 --- a/src/datadogV2/model/model_container_meta.rs +++ b/src/datadogV2/model/model_container_meta.rs @@ -10,14 +10,20 @@ 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 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 225ada620..6216d1740 100644 --- a/src/datadogV2/model/model_container_meta_page.rs +++ b/src/datadogV2/model/model_container_meta_page.rs @@ -43,7 +43,38 @@ impl ContainerMetaPage { type_: None, } } + + pub fn cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + self + } + + pub fn limit(&mut self, value: i32) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn next_cursor(&mut self, value: String) -> &mut Self { + self.next_cursor = Some(value); + self + } + + pub fn prev_cursor(&mut self, value: Option) -> &mut Self { + self.prev_cursor = Some(value); + self + } + + pub fn total(&mut self, value: i64) -> &mut Self { + self.total = Some(value); + 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 fc84b398b..bb97768ba 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,7 +27,23 @@ impl ContainersResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn links(&mut self, value: crate::datadogV2::model::ContainersResponseLinks) -> &mut Self { + self.links = Some(value); + 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 bd78a3680..bab4554e6 100644 --- a/src/datadogV2/model/model_containers_response_links.rs +++ b/src/datadogV2/model/model_containers_response_links.rs @@ -35,7 +35,33 @@ impl ContainersResponseLinks { self_: None, } } + + pub fn first(&mut self, value: String) -> &mut Self { + self.first = Some(value); + self + } + + pub fn last(&mut self, value: Option) -> &mut Self { + self.last = Some(value); + self + } + + pub fn next(&mut self, value: Option) -> &mut Self { + self.next = Some(value); + self + } + + pub fn prev(&mut self, value: Option) -> &mut Self { + self.prev = Some(value); + 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 c25898502..7c0a8aeba 100644 --- a/src/datadogV2/model/model_cost_attribution_aggregates_body.rs +++ b/src/datadogV2/model/model_cost_attribution_aggregates_body.rs @@ -27,7 +27,23 @@ impl CostAttributionAggregatesBody { value: None, } } + + pub fn agg_type(&mut self, value: String) -> &mut Self { + self.agg_type = Some(value); + self + } + + pub fn field(&mut self, value: String) -> &mut Self { + self.field = Some(value); + 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 e1f98ca36..29581ec37 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,7 +27,23 @@ impl CostByOrg { type_: None, } } + + pub fn attributes(&mut self, value: crate::datadogV2::model::CostByOrgAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 73be882c6..c40bb1504 100644 --- a/src/datadogV2/model/model_cost_by_org_attributes.rs +++ b/src/datadogV2/model/model_cost_by_org_attributes.rs @@ -39,7 +39,41 @@ impl CostByOrgAttributes { total_cost: None, } } + + pub fn charges( + &mut self, + value: Vec, + ) -> &mut Self { + self.charges = Some(value); + self + } + + pub fn date(&mut self, value: String) -> &mut Self { + self.date = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + 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 7ead2cdd3..45775b697 100644 --- a/src/datadogV2/model/model_cost_by_org_response.rs +++ b/src/datadogV2/model/model_cost_by_org_response.rs @@ -17,7 +17,13 @@ impl CostByOrgResponse { pub fn new() -> CostByOrgResponse { CostByOrgResponse { data: None } } + + 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 52522cb06..ab02c51d7 100644 --- a/src/datadogV2/model/model_create_rule_request.rs +++ b/src/datadogV2/model/model_create_rule_request.rs @@ -10,14 +10,20 @@ 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 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 b0f215b41..74e507cd9 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,7 +23,18 @@ impl CreateRuleRequestData { type_: None, } } + + pub fn attributes(&mut self, value: crate::datadogV2::model::RuleAttributes) -> &mut Self { + self.attributes = Some(value); + 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 44d1f8a7d..678ff80bd 100644 --- a/src/datadogV2/model/model_create_rule_response.rs +++ b/src/datadogV2/model/model_create_rule_response.rs @@ -10,14 +10,20 @@ 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 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 d474daefe..7e7e22435 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,7 +31,31 @@ impl CreateRuleResponseData { type_: None, } } + + pub fn attributes(&mut self, value: crate::datadogV2::model::RuleAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::RelationshipToRule, + ) -> &mut Self { + self.relationships = Some(value); + 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 994833fb0..40c4e07c3 100644 --- a/src/datadogV2/model/model_creator.rs +++ b/src/datadogV2/model/model_creator.rs @@ -27,7 +27,23 @@ impl Creator { name: None, } } + + pub fn email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + 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 dd09f11fd..2ece2366b 100644 --- a/src/datadogV2/model/model_dashboard_list_add_items_request.rs +++ b/src/datadogV2/model/model_dashboard_list_add_items_request.rs @@ -17,7 +17,16 @@ impl DashboardListAddItemsRequest { pub fn new() -> DashboardListAddItemsRequest { DashboardListAddItemsRequest { dashboards: None } } + + pub fn dashboards( + &mut self, + value: Vec, + ) -> &mut Self { + self.dashboards = Some(value); + 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 c4c066e06..d4aab1e87 100644 --- a/src/datadogV2/model/model_dashboard_list_add_items_response.rs +++ b/src/datadogV2/model/model_dashboard_list_add_items_response.rs @@ -19,7 +19,16 @@ impl DashboardListAddItemsResponse { added_dashboards_to_list: None, } } + + pub fn 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 { 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 88224fde5..accd38326 100644 --- a/src/datadogV2/model/model_dashboard_list_delete_items_request.rs +++ b/src/datadogV2/model/model_dashboard_list_delete_items_request.rs @@ -17,7 +17,16 @@ impl DashboardListDeleteItemsRequest { pub fn new() -> DashboardListDeleteItemsRequest { DashboardListDeleteItemsRequest { dashboards: None } } + + pub fn dashboards( + &mut self, + value: Vec, + ) -> &mut Self { + self.dashboards = Some(value); + 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 c1ba214bd..bc19d299c 100644 --- a/src/datadogV2/model/model_dashboard_list_delete_items_response.rs +++ b/src/datadogV2/model/model_dashboard_list_delete_items_response.rs @@ -20,7 +20,16 @@ impl DashboardListDeleteItemsResponse { deleted_dashboards_from_list: None, } } + + pub fn 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 { Self::new() diff --git a/src/datadogV2/model/model_dashboard_list_item.rs b/src/datadogV2/model/model_dashboard_list_item.rs index 2bf9b0795..6c731981e 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 author(&mut self, value: crate::datadogV2::model::Creator) -> &mut Self { + self.author = Some(value); + self + } + + pub fn created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn icon(&mut self, value: Option) -> &mut Self { + self.icon = Some(value); + self + } + + pub fn integration_id(&mut self, value: Option) -> &mut Self { + self.integration_id = Some(value); + self + } + + pub fn is_favorite(&mut self, value: bool) -> &mut Self { + self.is_favorite = Some(value); + self + } + + pub fn is_read_only(&mut self, value: bool) -> &mut Self { + self.is_read_only = Some(value); + self + } + + pub fn is_shared(&mut self, value: bool) -> &mut Self { + self.is_shared = Some(value); + self + } + + pub fn modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn popularity(&mut self, value: i32) -> &mut Self { + self.popularity = Some(value); + self + } + + pub fn tags(&mut self, value: Option>) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + 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 cf30363a3..6c36bc394 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 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..874de6821 100644 --- a/src/datadogV2/model/model_dashboard_list_update_items_request.rs +++ b/src/datadogV2/model/model_dashboard_list_update_items_request.rs @@ -17,7 +17,16 @@ impl DashboardListUpdateItemsRequest { pub fn new() -> DashboardListUpdateItemsRequest { DashboardListUpdateItemsRequest { dashboards: None } } + + pub fn dashboards( + &mut self, + value: Vec, + ) -> &mut Self { + self.dashboards = Some(value); + 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 72358ed5c..652b104ef 100644 --- a/src/datadogV2/model/model_dashboard_list_update_items_response.rs +++ b/src/datadogV2/model/model_dashboard_list_update_items_response.rs @@ -17,7 +17,16 @@ impl DashboardListUpdateItemsResponse { pub fn new() -> DashboardListUpdateItemsResponse { DashboardListUpdateItemsResponse { dashboards: None } } + + pub fn dashboards( + &mut self, + value: Vec, + ) -> &mut Self { + self.dashboards = Some(value); + 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 13c100440..c92458a37 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,7 +31,28 @@ impl DataScalarColumn { values: None, } } + + pub fn meta(&mut self, value: crate::datadogV2::model::ScalarMeta) -> &mut Self { + self.meta = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn type_(&mut self, value: crate::datadogV2::model::ScalarColumnTypeNumber) -> &mut Self { + self.type_ = Some(value); + 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 b6d09a21a..4cdc0669d 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,7 +27,26 @@ impl DetailedFinding { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::DetailedFindingAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 c24da0421..c17ff9927 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,7 +59,66 @@ impl DetailedFindingAttributes { tags: None, } } + + pub fn evaluation(&mut self, value: crate::datadogV2::model::FindingEvaluation) -> &mut Self { + self.evaluation = Some(value); + self + } + + pub fn evaluation_changed_at(&mut self, value: i64) -> &mut Self { + self.evaluation_changed_at = Some(value); + self + } + + pub fn message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn mute(&mut self, value: crate::datadogV2::model::FindingMute) -> &mut Self { + self.mute = Some(value); + self + } + + pub fn resource(&mut self, value: String) -> &mut Self { + self.resource = Some(value); + self + } + + pub fn resource_configuration( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.resource_configuration = Some(value); + self + } + + pub fn resource_discovery_date(&mut self, value: i64) -> &mut Self { + self.resource_discovery_date = Some(value); + self + } + + pub fn resource_type(&mut self, value: String) -> &mut Self { + self.resource_type = Some(value); + self + } + + pub fn rule(&mut self, value: crate::datadogV2::model::FindingRule) -> &mut Self { + self.rule = Some(value); + self + } + + pub fn status(&mut self, value: crate::datadogV2::model::FindingStatus) -> &mut Self { + self.status = Some(value); + 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.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..cb9138dfd 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 git(&mut self, value: crate::datadogV2::model::DORAGitInfo) -> &mut Self { + self.git = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn 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..e24585e6a 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 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..542e86be7 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 finished_at(&mut self, value: i64) -> &mut Self { + self.finished_at = Some(value); + self + } + + pub fn git(&mut self, value: crate::datadogV2::model::DORAGitInfo) -> &mut Self { + self.git = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn severity(&mut self, value: String) -> &mut Self { + self.severity = Some(value); + self + } + + pub fn 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..efdf40a56 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 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..0087bb4b5 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 display_timezone(&mut self, value: Option) -> &mut Self { + self.display_timezone = Some(value); + self + } + + pub fn message(&mut self, value: Option) -> &mut Self { + self.message = Some(value); + self + } + + pub fn mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { + self.mute_first_recovery_notification = Some(value); + self + } + + pub fn notify_end_states( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_states = Some(value); + self + } + + pub fn notify_end_types( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_types = Some(value); + self + } + + pub fn 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..d2f6b6af2 100644 --- a/src/datadogV2/model/model_downtime_meta.rs +++ b/src/datadogV2/model/model_downtime_meta.rs @@ -10,14 +10,20 @@ 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 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 cdb22d0ad..ef966df8e 100644 --- a/src/datadogV2/model/model_downtime_meta_page.rs +++ b/src/datadogV2/model/model_downtime_meta_page.rs @@ -19,7 +19,13 @@ impl DowntimeMetaPage { total_filtered_count: None, } } + + 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_included_attributes.rs b/src/datadogV2/model/model_downtime_monitor_included_attributes.rs index 97a4fac35..ab87b362a 100644 --- a/src/datadogV2/model/model_downtime_monitor_included_attributes.rs +++ b/src/datadogV2/model/model_downtime_monitor_included_attributes.rs @@ -17,7 +17,13 @@ impl DowntimeMonitorIncludedAttributes { pub fn new() -> DowntimeMonitorIncludedAttributes { DowntimeMonitorIncludedAttributes { name: None } } + + 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 fe17e4383..4e1da30f3 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,7 +27,29 @@ impl DowntimeMonitorIncludedItem { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::DowntimeMonitorIncludedAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::DowntimeIncludedMonitorType, + ) -> &mut Self { + self.type_ = Some(value); + 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 e252556fd..8f3bbb179 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,7 +23,24 @@ impl DowntimeRelationships { monitor: None, } } + + pub fn created_by( + &mut self, + value: crate::datadogV2::model::DowntimeRelationshipsCreatedBy, + ) -> &mut Self { + self.created_by = Some(value); + self + } + + pub fn monitor( + &mut self, + value: crate::datadogV2::model::DowntimeRelationshipsMonitor, + ) -> &mut Self { + self.monitor = Some(value); + 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 0cc03e878..d1b41d809 100644 --- a/src/datadogV2/model/model_downtime_relationships_created_by.rs +++ b/src/datadogV2/model/model_downtime_relationships_created_by.rs @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: Option, + ) -> &mut Self { + self.data = Some(value); + 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 5bfd3025e..cb72d3764 100644 --- a/src/datadogV2/model/model_downtime_relationships_created_by_data.rs +++ b/src/datadogV2/model/model_downtime_relationships_created_by_data.rs @@ -23,7 +23,18 @@ impl DowntimeRelationshipsCreatedByData { type_: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 293329683..67e5d4b8c 100644 --- a/src/datadogV2/model/model_downtime_relationships_monitor.rs +++ b/src/datadogV2/model/model_downtime_relationships_monitor.rs @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: Option, + ) -> &mut Self { + self.data = Some(value); + 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 e0d7ed892..47d051884 100644 --- a/src/datadogV2/model/model_downtime_relationships_monitor_data.rs +++ b/src/datadogV2/model/model_downtime_relationships_monitor_data.rs @@ -23,7 +23,21 @@ impl DowntimeRelationshipsMonitorData { type_: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::DowntimeIncludedMonitorType, + ) -> &mut Self { + self.type_ = Some(value); + 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 06e5492f7..908ff8940 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,7 +26,21 @@ impl DowntimeResponse { included: None, } } + + pub fn data(&mut self, value: crate::datadogV2::model::DowntimeResponseData) -> &mut Self { + self.data = Some(value); + self + } + + pub fn included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + 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 521229555..3d2db48e3 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,7 +79,80 @@ impl DowntimeResponseAttributes { status: None, } } + + pub fn canceled(&mut self, value: Option) -> &mut Self { + self.canceled = Some(value); + self + } + + pub fn created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn display_timezone(&mut self, value: Option) -> &mut Self { + self.display_timezone = Some(value); + self + } + + pub fn message(&mut self, value: Option) -> &mut Self { + self.message = Some(value); + self + } + + pub fn modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn monitor_identifier( + &mut self, + value: crate::datadogV2::model::DowntimeMonitorIdentifier, + ) -> &mut Self { + self.monitor_identifier = Some(value); + self + } + + pub fn mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { + self.mute_first_recovery_notification = Some(value); + self + } + + pub fn notify_end_states( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_states = Some(value); + self + } + + pub fn notify_end_types( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_types = Some(value); + self + } + + pub fn schedule( + &mut self, + value: crate::datadogV2::model::DowntimeScheduleResponse, + ) -> &mut Self { + self.schedule = Some(value); + self + } + + pub fn scope(&mut self, value: String) -> &mut Self { + self.scope = Some(value); + 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 c39b28a88..381ef75ea 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,7 +31,34 @@ impl DowntimeResponseData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::DowntimeResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::DowntimeRelationships, + ) -> &mut Self { + self.relationships = Some(value); + 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_schedule_current_downtime_response.rs b/src/datadogV2/model/model_downtime_schedule_current_downtime_response.rs index 5f423a1d7..ae040d4e0 100644 --- a/src/datadogV2/model/model_downtime_schedule_current_downtime_response.rs +++ b/src/datadogV2/model/model_downtime_schedule_current_downtime_response.rs @@ -25,7 +25,18 @@ impl DowntimeScheduleCurrentDowntimeResponse { start: None, } } + + pub fn end(&mut self, value: Option) -> &mut Self { + self.end = Some(value); + 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 b36c54775..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 @@ -28,7 +28,18 @@ impl DowntimeScheduleOneTimeCreateUpdateRequest { additional_properties: std::collections::BTreeMap::new(), } } + + pub fn end(&mut self, value: Option) -> &mut Self { + self.end = Some(value); + 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 63b943c59..1df84d724 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 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..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 @@ -36,4 +36,9 @@ impl DowntimeScheduleRecurrenceCreateUpdateRequest { additional_properties: std::collections::BTreeMap::new(), } } + + 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 3b9050628..620680bc5 100644 --- a/src/datadogV2/model/model_downtime_schedule_recurrence_response.rs +++ b/src/datadogV2/model/model_downtime_schedule_recurrence_response.rs @@ -33,7 +33,23 @@ impl DowntimeScheduleRecurrenceResponse { start: None, } } + + pub fn duration(&mut self, value: String) -> &mut Self { + self.duration = Some(value); + self + } + + pub fn rrule(&mut self, value: String) -> &mut Self { + self.rrule = Some(value); + 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 644054ab5..f0dd0bdab 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 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..f62abbf9a 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 current_downtime( + &mut self, + value: crate::datadogV2::model::DowntimeScheduleCurrentDowntimeResponse, + ) -> &mut Self { + self.current_downtime = Some(value); + 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 98b507b51..657fb9d1e 100644 --- a/src/datadogV2/model/model_downtime_schedule_recurrences_update_request.rs +++ b/src/datadogV2/model/model_downtime_schedule_recurrences_update_request.rs @@ -24,7 +24,21 @@ impl DowntimeScheduleRecurrencesUpdateRequest { timezone: None, } } + + pub fn recurrences( + &mut self, + value: Vec, + ) -> &mut Self { + self.recurrences = Some(value); + 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_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..9d4e0d6fe 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,7 +57,60 @@ impl DowntimeUpdateRequestAttributes { scope: None, } } + + pub fn display_timezone(&mut self, value: Option) -> &mut Self { + self.display_timezone = Some(value); + self + } + + pub fn message(&mut self, value: Option) -> &mut Self { + self.message = Some(value); + self + } + + pub fn monitor_identifier( + &mut self, + value: crate::datadogV2::model::DowntimeMonitorIdentifier, + ) -> &mut Self { + self.monitor_identifier = Some(value); + self + } + + pub fn mute_first_recovery_notification(&mut self, value: bool) -> &mut Self { + self.mute_first_recovery_notification = Some(value); + self + } + + pub fn notify_end_states( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_states = Some(value); + self + } + + pub fn notify_end_types( + &mut self, + value: Vec, + ) -> &mut Self { + self.notify_end_types = Some(value); + self + } + + pub fn schedule( + &mut self, + value: crate::datadogV2::model::DowntimeScheduleUpdateRequest, + ) -> &mut Self { + self.schedule = Some(value); + 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_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..27517b2c0 100644 --- a/src/datadogV2/model/model_event.rs +++ b/src/datadogV2/model/model_event.rs @@ -31,7 +31,28 @@ impl Event { type_: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn source_id(&mut self, value: i64) -> &mut Self { + self.source_id = Some(value); + 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 26f145600..ba3399a3b 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,7 +113,103 @@ impl EventAttributes { title: None, } } + + pub fn aggregation_key(&mut self, value: String) -> &mut Self { + self.aggregation_key = Some(value); + self + } + + pub fn date_happened(&mut self, value: i64) -> &mut Self { + self.date_happened = Some(value); + self + } + + pub fn device_name(&mut self, value: String) -> &mut Self { + self.device_name = Some(value); + self + } + + pub fn duration(&mut self, value: i64) -> &mut Self { + self.duration = Some(value); + self + } + + pub fn event_object(&mut self, value: String) -> &mut Self { + self.event_object = Some(value); + self + } + + pub fn evt(&mut self, value: crate::datadogV2::model::Event) -> &mut Self { + self.evt = Some(value); + self + } + + pub fn hostname(&mut self, value: String) -> &mut Self { + self.hostname = Some(value); + self + } + + pub fn monitor(&mut self, value: Option) -> &mut Self { + self.monitor = Some(value); + self + } + + pub fn monitor_groups(&mut self, value: Option>) -> &mut Self { + self.monitor_groups = Some(value); + self + } + + pub fn monitor_id(&mut self, value: Option) -> &mut Self { + self.monitor_id = Some(value); + self + } + + pub fn priority(&mut self, value: Option) -> &mut Self { + self.priority = Some(value); + self + } + + pub fn related_event_id(&mut self, value: i64) -> &mut Self { + self.related_event_id = Some(value); + self + } + + pub fn service(&mut self, value: String) -> &mut Self { + self.service = Some(value); + self + } + + pub fn source_type_name(&mut self, value: String) -> &mut Self { + self.source_type_name = Some(value); + self + } + + pub fn sourcecategory(&mut self, value: String) -> &mut Self { + self.sourcecategory = Some(value); + self + } + + pub fn status(&mut self, value: crate::datadogV2::model::EventStatusType) -> &mut Self { + self.status = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn timestamp(&mut self, value: i64) -> &mut Self { + self.timestamp = Some(value); + 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 60ff0ca4d..ee0dc3199 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,7 +27,26 @@ impl EventResponse { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::EventResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 686518222..c38e4c20b 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,7 +31,28 @@ impl EventResponseAttributes { timestamp: None, } } + + pub fn attributes(&mut self, value: crate::datadogV2::model::EventAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + 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 e1fbedde9..496e6cb27 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 interval(&mut self, value: i64) -> &mut Self { + self.interval = Some(value); + 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 3a3c27684..6c80c58ef 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 limit(&mut self, value: i32) -> &mut Self { + self.limit = Some(value); + 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 99d8eb674..bd81949ab 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 metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn order(&mut self, value: crate::datadogV2::model::QuerySortOrder) -> &mut Self { + self.order = Some(value); + 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 28b0741ae..0f5299b34 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,7 +32,28 @@ impl EventsListRequest { sort: None, } } + + pub fn filter(&mut self, value: crate::datadogV2::model::EventsQueryFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn options(&mut self, value: crate::datadogV2::model::EventsQueryOptions) -> &mut Self { + self.options = Some(value); + self + } + + pub fn page(&mut self, value: crate::datadogV2::model::EventsRequestPage) -> &mut Self { + self.page = Some(value); + 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 02c58a4ab..afb229c96 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,7 +27,23 @@ impl EventsListResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn links(&mut self, value: crate::datadogV2::model::EventsListResponseLinks) -> &mut Self { + self.links = Some(value); + 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 d3271d5ad..a9f36977d 100644 --- a/src/datadogV2/model/model_events_list_response_links.rs +++ b/src/datadogV2/model/model_events_list_response_links.rs @@ -18,7 +18,13 @@ impl EventsListResponseLinks { pub fn new() -> EventsListResponseLinks { EventsListResponseLinks { next: None } } + + 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 045a34d0a..54e840845 100644 --- a/src/datadogV2/model/model_events_query_filter.rs +++ b/src/datadogV2/model/model_events_query_filter.rs @@ -27,7 +27,23 @@ impl EventsQueryFilter { to: None, } } + + pub fn from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + self + } + + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + 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 af4ea649d..a4f527e44 100644 --- a/src/datadogV2/model/model_events_query_options.rs +++ b/src/datadogV2/model/model_events_query_options.rs @@ -24,7 +24,18 @@ impl EventsQueryOptions { timezone: None, } } + + pub fn time_offset(&mut self, value: i64) -> &mut Self { + self.time_offset = Some(value); + 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 c2fb98380..ffe361e45 100644 --- a/src/datadogV2/model/model_events_request_page.rs +++ b/src/datadogV2/model/model_events_request_page.rs @@ -23,7 +23,18 @@ impl EventsRequestPage { limit: None, } } + + pub fn cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + 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 8d69c8c21..dfcebce1e 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,7 +36,36 @@ impl EventsResponseMetadata { warnings: None, } } + + pub fn elapsed(&mut self, value: i64) -> &mut Self { + self.elapsed = Some(value); + self + } + + pub fn page( + &mut self, + value: crate::datadogV2::model::EventsResponseMetadataPage, + ) -> &mut Self { + self.page = Some(value); + self + } + + pub fn request_id(&mut self, value: String) -> &mut Self { + self.request_id = Some(value); + self + } + + pub fn status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + 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 f3d2b570c..d038cae27 100644 --- a/src/datadogV2/model/model_events_response_metadata_page.rs +++ b/src/datadogV2/model/model_events_response_metadata_page.rs @@ -18,7 +18,13 @@ impl EventsResponseMetadataPage { pub fn new() -> EventsResponseMetadataPage { EventsResponseMetadataPage { after: None } } + + 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 b2781049d..ece2860dd 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,24 @@ impl EventsScalarQuery { search: None, } } + + pub fn group_by(&mut self, value: Vec) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn indexes(&mut self, value: Vec) -> &mut Self { + self.indexes = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 dcf3b6498..20dfe683c 100644 --- a/src/datadogV2/model/model_events_search.rs +++ b/src/datadogV2/model/model_events_search.rs @@ -17,7 +17,13 @@ impl EventsSearch { pub fn new() -> EventsSearch { EventsSearch { query: None } } + + 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 0c81a08c1..0d94c06d7 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,24 @@ impl EventsTimeseriesQuery { search: None, } } + + pub fn group_by(&mut self, value: Vec) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn indexes(&mut self, value: Vec) -> &mut Self { + self.indexes = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 4154dfc51..fbe09f938 100644 --- a/src/datadogV2/model/model_events_warning.rs +++ b/src/datadogV2/model/model_events_warning.rs @@ -27,7 +27,23 @@ impl EventsWarning { title: None, } } + + pub fn code(&mut self, value: String) -> &mut Self { + self.code = Some(value); + self + } + + pub fn detail(&mut self, value: String) -> &mut Self { + self.detail = Some(value); + 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 f2b665b11..39ce27088 100644 --- a/src/datadogV2/model/model_fastly_accoun_response_attributes.rs +++ b/src/datadogV2/model/model_fastly_accoun_response_attributes.rs @@ -23,4 +23,9 @@ impl FastlyAccounResponseAttributes { services: None, } } + + 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.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..9dffa434e 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,9 @@ impl FastlyAccountCreateRequestAttributes { services: None, } } + + 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_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..e547f958f 100644 --- a/src/datadogV2/model/model_fastly_account_response.rs +++ b/src/datadogV2/model/model_fastly_account_response.rs @@ -10,14 +10,20 @@ 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 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_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..4a67a71f7 100644 --- a/src/datadogV2/model/model_fastly_account_update_request_attributes.rs +++ b/src/datadogV2/model/model_fastly_account_update_request_attributes.rs @@ -17,7 +17,13 @@ impl FastlyAccountUpdateRequestAttributes { pub fn new() -> FastlyAccountUpdateRequestAttributes { FastlyAccountUpdateRequestAttributes { api_key: None } } + + 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 0f142c58c..4a9edda97 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,7 +23,21 @@ impl FastlyAccountUpdateRequestData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::FastlyAccountUpdateRequestAttributes, + ) -> &mut Self { + self.attributes = Some(value); + 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 47050cc93..bbc9ec70c 100644 --- a/src/datadogV2/model/model_fastly_accounts_response.rs +++ b/src/datadogV2/model/model_fastly_accounts_response.rs @@ -17,7 +17,16 @@ impl FastlyAccountsResponse { pub fn new() -> FastlyAccountsResponse { FastlyAccountsResponse { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 8229082d2..5146cd3c7 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 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..832348614 100644 --- a/src/datadogV2/model/model_fastly_service_attributes.rs +++ b/src/datadogV2/model/model_fastly_service_attributes.rs @@ -17,7 +17,13 @@ impl FastlyServiceAttributes { pub fn new() -> FastlyServiceAttributes { FastlyServiceAttributes { tags: None } } + + 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 398db4cbf..57fc01dd3 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 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..8cdfa2210 100644 --- a/src/datadogV2/model/model_fastly_service_response.rs +++ b/src/datadogV2/model/model_fastly_service_response.rs @@ -10,14 +10,20 @@ 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 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 f744e18e7..0de4a57cf 100644 --- a/src/datadogV2/model/model_fastly_services_response.rs +++ b/src/datadogV2/model/model_fastly_services_response.rs @@ -17,7 +17,16 @@ impl FastlyServicesResponse { pub fn new() -> FastlyServicesResponse { FastlyServicesResponse { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 3829f50b3..4a8e2f62e 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,7 +27,23 @@ impl Finding { type_: None, } } + + pub fn attributes(&mut self, value: crate::datadogV2::model::FindingAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 044cd8900..a3359f2ab 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,7 +51,53 @@ impl FindingAttributes { tags: None, } } + + pub fn evaluation(&mut self, value: crate::datadogV2::model::FindingEvaluation) -> &mut Self { + self.evaluation = Some(value); + self + } + + pub fn evaluation_changed_at(&mut self, value: i64) -> &mut Self { + self.evaluation_changed_at = Some(value); + self + } + + pub fn mute(&mut self, value: crate::datadogV2::model::FindingMute) -> &mut Self { + self.mute = Some(value); + self + } + + pub fn resource(&mut self, value: String) -> &mut Self { + self.resource = Some(value); + self + } + + pub fn resource_discovery_date(&mut self, value: i64) -> &mut Self { + self.resource_discovery_date = Some(value); + self + } + + pub fn resource_type(&mut self, value: String) -> &mut Self { + self.resource_type = Some(value); + self + } + + pub fn rule(&mut self, value: crate::datadogV2::model::FindingRule) -> &mut Self { + self.rule = Some(value); + self + } + + pub fn status(&mut self, value: crate::datadogV2::model::FindingStatus) -> &mut Self { + self.status = Some(value); + 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 10df22a25..211821600 100644 --- a/src/datadogV2/model/model_finding_mute.rs +++ b/src/datadogV2/model/model_finding_mute.rs @@ -39,7 +39,38 @@ impl FindingMute { uuid: None, } } + + pub fn description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn expiration_date(&mut self, value: i64) -> &mut Self { + self.expiration_date = Some(value); + self + } + + pub fn muted(&mut self, value: bool) -> &mut Self { + self.muted = Some(value); + self + } + + pub fn reason(&mut self, value: crate::datadogV2::model::FindingMuteReason) -> &mut Self { + self.reason = Some(value); + self + } + + pub fn start_date(&mut self, value: i64) -> &mut Self { + self.start_date = Some(value); + 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 875e804ea..7b4288a32 100644 --- a/src/datadogV2/model/model_finding_rule.rs +++ b/src/datadogV2/model/model_finding_rule.rs @@ -23,7 +23,18 @@ impl FindingRule { name: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 b8a63af6b..b30b4360e 100644 --- a/src/datadogV2/model/model_formula_limit.rs +++ b/src/datadogV2/model/model_formula_limit.rs @@ -24,7 +24,18 @@ impl FormulaLimit { order: None, } } + + pub fn count(&mut self, value: i32) -> &mut Self { + self.count = Some(value); + 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 63d3ebc1d..9523d23b6 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,7 +31,34 @@ impl FullAPIKey { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::FullAPIKeyAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::APIKeyRelationships, + ) -> &mut Self { + self.relationships = Some(value); + 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 d0d9539c8..821892b9d 100644 --- a/src/datadogV2/model/model_full_api_key_attributes.rs +++ b/src/datadogV2/model/model_full_api_key_attributes.rs @@ -43,7 +43,43 @@ impl FullAPIKeyAttributes { remote_config_read_enabled: None, } } + + pub fn category(&mut self, value: String) -> &mut Self { + self.category = Some(value); + self + } + + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn key(&mut self, value: String) -> &mut Self { + self.key = Some(value); + self + } + + pub fn last4(&mut self, value: String) -> &mut Self { + self.last4 = Some(value); + self + } + + pub fn modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 f0e91b170..500579191 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,7 +31,34 @@ impl FullApplicationKey { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::FullApplicationKeyAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::ApplicationKeyRelationships, + ) -> &mut Self { + self.relationships = Some(value); + 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 a06c7b9e1..4eb7f008b 100644 --- a/src/datadogV2/model/model_full_application_key_attributes.rs +++ b/src/datadogV2/model/model_full_application_key_attributes.rs @@ -35,7 +35,33 @@ impl FullApplicationKeyAttributes { scopes: None, } } + + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn key(&mut self, value: String) -> &mut Self { + self.key = Some(value); + self + } + + pub fn last4(&mut self, value: String) -> &mut Self { + self.last4 = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 82061ab8e..af7a42887 100644 --- a/src/datadogV2/model/model_gcp_service_account_meta.rs +++ b/src/datadogV2/model/model_gcp_service_account_meta.rs @@ -19,7 +19,13 @@ impl GCPServiceAccountMeta { accessible_projects: None, } } + + 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 7b30c7c8e..0847d25c0 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,7 +27,29 @@ impl GCPSTSDelegateAccount { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::GCPSTSDelegateAccountAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::GCPSTSDelegateAccountType, + ) -> &mut Self { + self.type_ = Some(value); + 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 d44f862de..bca10834f 100644 --- a/src/datadogV2/model/model_gcpsts_delegate_account_attributes.rs +++ b/src/datadogV2/model/model_gcpsts_delegate_account_attributes.rs @@ -19,7 +19,13 @@ impl GCPSTSDelegateAccountAttributes { delegate_account_email: None, } } + + 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 5f908896d..0b1070b8c 100644 --- a/src/datadogV2/model/model_gcpsts_delegate_account_response.rs +++ b/src/datadogV2/model/model_gcpsts_delegate_account_response.rs @@ -10,14 +10,20 @@ 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 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 2c6ffad3a..1ebeafa0c 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,7 +31,31 @@ impl GCPSTSServiceAccount { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::GCPSTSServiceAccountAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn meta(&mut self, value: crate::datadogV2::model::GCPServiceAccountMeta) -> &mut Self { + self.meta = Some(value); + 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 8e55134d8..134a8af1c 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_attributes.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_attributes.rs @@ -43,7 +43,43 @@ impl GCPSTSServiceAccountAttributes { resource_collection_enabled: None, } } + + pub fn account_tags(&mut self, value: Vec) -> &mut Self { + self.account_tags = Some(value); + self + } + + pub fn automute(&mut self, value: bool) -> &mut Self { + self.automute = Some(value); + self + } + + pub fn client_email(&mut self, value: String) -> &mut Self { + self.client_email = Some(value); + self + } + + pub fn host_filters(&mut self, value: Vec) -> &mut Self { + self.host_filters = Some(value); + self + } + + pub fn is_cspm_enabled(&mut self, value: bool) -> &mut Self { + self.is_cspm_enabled = Some(value); + 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 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 d79568c08..016d1fe65 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_create_request.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_create_request.rs @@ -10,14 +10,20 @@ 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 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 bbea22730..3f5b8edc6 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,7 +23,21 @@ impl GCPSTSServiceAccountData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::GCPSTSServiceAccountAttributes, + ) -> &mut Self { + self.attributes = Some(value); + 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 e508475af..bc6f046a7 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_response.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_response.rs @@ -10,14 +10,20 @@ 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 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 fcc2e4462..c02b9cc98 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_update_request.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_update_request.rs @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: crate::datadogV2::model::GCPSTSServiceAccountUpdateRequestData, + ) -> &mut Self { + self.data = Some(value); + 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 5bb24d583..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 @@ -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,7 +27,26 @@ impl GCPSTSServiceAccountUpdateRequestData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::GCPSTSServiceAccountAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 e2ba9013e..eb02d4ae6 100644 --- a/src/datadogV2/model/model_gcpsts_service_accounts_response.rs +++ b/src/datadogV2/model/model_gcpsts_service_accounts_response.rs @@ -17,7 +17,13 @@ impl GCPSTSServiceAccountsResponse { pub fn new() -> GCPSTSServiceAccountsResponse { GCPSTSServiceAccountsResponse { data: None } } + + 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_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..2dfecd138 100644 --- a/src/datadogV2/model/model_group_scalar_column.rs +++ b/src/datadogV2/model/model_group_scalar_column.rs @@ -27,7 +27,23 @@ impl GroupScalarColumn { values: None, } } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn type_(&mut self, value: crate::datadogV2::model::ScalarColumnTypeGroup) -> &mut Self { + self.type_ = Some(value); + 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 cd359bcae..7b12fff38 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,7 +27,26 @@ impl HourlyUsage { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::HourlyUsageAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 5678bc43d..1739b80b9 100644 --- a/src/datadogV2/model/model_hourly_usage_attributes.rs +++ b/src/datadogV2/model/model_hourly_usage_attributes.rs @@ -39,7 +39,41 @@ impl HourlyUsageAttributes { timestamp: None, } } + + pub fn measurements( + &mut self, + value: Vec, + ) -> &mut Self { + self.measurements = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn product_family(&mut self, value: String) -> &mut Self { + self.product_family = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + 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 968501545..4d232f35b 100644 --- a/src/datadogV2/model/model_hourly_usage_measurement.rs +++ b/src/datadogV2/model/model_hourly_usage_measurement.rs @@ -23,7 +23,18 @@ impl HourlyUsageMeasurement { value: None, } } + + pub fn usage_type(&mut self, value: String) -> &mut Self { + self.usage_type = Some(value); + 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 bd7efe048..8995ae422 100644 --- a/src/datadogV2/model/model_hourly_usage_metadata.rs +++ b/src/datadogV2/model/model_hourly_usage_metadata.rs @@ -10,14 +10,23 @@ 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 pagination( + &mut self, + value: crate::datadogV2::model::HourlyUsagePagination, + ) -> &mut Self { + self.pagination = Some(value); + 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 4dadd5ff3..a4a001cc9 100644 --- a/src/datadogV2/model/model_hourly_usage_pagination.rs +++ b/src/datadogV2/model/model_hourly_usage_pagination.rs @@ -23,7 +23,13 @@ impl HourlyUsagePagination { next_record_id: None, } } + + 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 7a6a622a0..cd6ec837d 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,7 +23,18 @@ impl HourlyUsageResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + 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 5fb39369a..42fa8ae1c 100644 --- a/src/datadogV2/model/model_http_log_error.rs +++ b/src/datadogV2/model/model_http_log_error.rs @@ -27,7 +27,23 @@ impl HTTPLogError { title: None, } } + + pub fn detail(&mut self, value: String) -> &mut Self { + self.detail = Some(value); + self + } + + pub fn status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + 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 358c917ce..2e311e3b8 100644 --- a/src/datadogV2/model/model_http_log_errors.rs +++ b/src/datadogV2/model/model_http_log_errors.rs @@ -17,7 +17,13 @@ impl HTTPLogErrors { pub fn new() -> HTTPLogErrors { HTTPLogErrors { errors: None } } + + 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 cd934f5ef..f6d16ec42 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 ddsource(&mut self, value: String) -> &mut Self { + self.ddsource = Some(value); + self + } + + pub fn ddtags(&mut self, value: String) -> &mut Self { + self.ddtags = Some(value); + self + } + + pub fn hostname(&mut self, value: String) -> &mut Self { + self.hostname = Some(value); + 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 7e2041457..a2118f8cc 100644 --- a/src/datadogV2/model/model_httpci_app_error.rs +++ b/src/datadogV2/model/model_httpci_app_error.rs @@ -27,7 +27,23 @@ impl HTTPCIAppError { title: None, } } + + pub fn detail(&mut self, value: String) -> &mut Self { + self.detail = Some(value); + self + } + + pub fn status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + 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 4804035f1..5852e8542 100644 --- a/src/datadogV2/model/model_httpci_app_errors.rs +++ b/src/datadogV2/model/model_httpci_app_errors.rs @@ -17,7 +17,13 @@ impl HTTPCIAppErrors { pub fn new() -> HTTPCIAppErrors { HTTPCIAppErrors { errors: None } } + + 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 8dec5a5b8..ab205fe01 100644 --- a/src/datadogV2/model/model_id_p_metadata_form_data.rs +++ b/src/datadogV2/model/model_id_p_metadata_form_data.rs @@ -17,7 +17,13 @@ impl IdPMetadataFormData { pub fn new() -> IdPMetadataFormData { IdPMetadataFormData { idp_file: None } } + + 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_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..c0dc6f864 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 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..149af271e 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,7 +19,16 @@ impl IncidentAttachmentRelationships { last_modified_by_user: None, } } + + pub fn 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 { Self::new() diff --git a/src/datadogV2/model/model_incident_attachment_update_data.rs b/src/datadogV2/model/model_incident_attachment_update_data.rs index 179946804..a892b6b6e 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 attributes( + &mut self, + value: crate::datadogV2::model::IncidentAttachmentUpdateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + 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 cd7af3797..f072c7327 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 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..ea4070cb2 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 included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_create_attributes.rs b/src/datadogV2/model/model_incident_create_attributes.rs index 6ae87fc08..8425b045e 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 customer_impact_scope(&mut self, value: String) -> &mut Self { + self.customer_impact_scope = Some(value); + self + } + + pub fn fields( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.fields = Some(value); + self + } + + pub fn initial_cells( + &mut self, + value: Vec, + ) -> &mut Self { + self.initial_cells = Some(value); + self + } + + pub fn 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..18405b179 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 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_multiple_value.rs b/src/datadogV2/model/model_incident_field_attributes_multiple_value.rs index afaa03496..c20cf7f0b 100644 --- a/src/datadogV2/model/model_incident_field_attributes_multiple_value.rs +++ b/src/datadogV2/model/model_incident_field_attributes_multiple_value.rs @@ -23,7 +23,21 @@ impl IncidentFieldAttributesMultipleValue { value: None, } } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::IncidentFieldAttributesValueType, + ) -> &mut Self { + self.type_ = Some(value); + 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 136f163d8..3b26022a9 100644 --- a/src/datadogV2/model/model_incident_field_attributes_single_value.rs +++ b/src/datadogV2/model/model_incident_field_attributes_single_value.rs @@ -23,7 +23,21 @@ impl IncidentFieldAttributesSingleValue { value: None, } } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::IncidentFieldAttributesSingleValueType, + ) -> &mut Self { + self.type_ = Some(value); + 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 d93bc60fe..e49daf0af 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 created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn incident_id(&mut self, value: String) -> &mut Self { + self.incident_id = Some(value); + self + } + + pub fn modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + 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_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..92ae2dd12 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 included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + 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_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..051177f24 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 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..050312f2b 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 attributes( + &mut self, + value: crate::datadogV2::model::IncidentIntegrationMetadataAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::IncidentIntegrationRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_integration_relationships.rs b/src/datadogV2/model/model_incident_integration_relationships.rs index d96a3dee7..c81b0e80a 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,7 +23,24 @@ impl IncidentIntegrationRelationships { last_modified_by_user: None, } } + + pub fn created_by_user( + &mut self, + value: crate::datadogV2::model::RelationshipToUser, + ) -> &mut Self { + self.created_by_user = Some(value); + self + } + + pub fn 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 { 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 9d8b59ea9..36535d074 100644 --- a/src/datadogV2/model/model_incident_non_datadog_creator.rs +++ b/src/datadogV2/model/model_incident_non_datadog_creator.rs @@ -23,7 +23,18 @@ impl IncidentNonDatadogCreator { name: None, } } + + pub fn image_48_px(&mut self, value: String) -> &mut Self { + self.image_48_px = Some(value); + 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 451c9b34f..b3abab04b 100644 --- a/src/datadogV2/model/model_incident_notification_handle.rs +++ b/src/datadogV2/model/model_incident_notification_handle.rs @@ -23,7 +23,18 @@ impl IncidentNotificationHandle { handle: None, } } + + pub fn display_name(&mut self, value: String) -> &mut Self { + self.display_name = Some(value); + 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 8b5d47840..a8d1b8caa 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 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..55cc1f24a 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 archived(&mut self, value: Option) -> &mut Self { + self.archived = Some(value); + self + } + + pub fn case_id(&mut self, value: Option) -> &mut Self { + self.case_id = Some(value); + self + } + + pub fn created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn customer_impact_duration(&mut self, value: i64) -> &mut Self { + self.customer_impact_duration = Some(value); + self + } + + pub fn customer_impact_end(&mut self, value: Option) -> &mut Self { + self.customer_impact_end = Some(value); + self + } + + pub fn customer_impact_scope(&mut self, value: Option) -> &mut Self { + self.customer_impact_scope = Some(value); + self + } + + pub fn customer_impact_start(&mut self, value: Option) -> &mut Self { + self.customer_impact_start = Some(value); + self + } + + pub fn customer_impacted(&mut self, value: bool) -> &mut Self { + self.customer_impacted = Some(value); + self + } + + pub fn detected(&mut self, value: Option) -> &mut Self { + self.detected = Some(value); + self + } + + pub fn fields( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.fields = Some(value); + self + } + + pub fn modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn non_datadog_creator( + &mut self, + value: Option, + ) -> &mut Self { + self.non_datadog_creator = Some(value); + self + } + + pub fn notification_handles( + &mut self, + value: Option>, + ) -> &mut Self { + self.notification_handles = Some(value); + self + } + + pub fn public_id(&mut self, value: i64) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn resolved(&mut self, value: Option) -> &mut Self { + self.resolved = Some(value); + self + } + + pub fn severity(&mut self, value: crate::datadogV2::model::IncidentSeverity) -> &mut Self { + self.severity = Some(value); + self + } + + pub fn state(&mut self, value: Option) -> &mut Self { + self.state = Some(value); + self + } + + pub fn time_to_detect(&mut self, value: i64) -> &mut Self { + self.time_to_detect = Some(value); + self + } + + pub fn time_to_internal_response(&mut self, value: i64) -> &mut Self { + self.time_to_internal_response = Some(value); + self + } + + pub fn time_to_repair(&mut self, value: i64) -> &mut Self { + self.time_to_repair = Some(value); + self + } + + pub fn time_to_resolve(&mut self, value: i64) -> &mut Self { + self.time_to_resolve = Some(value); + 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 5b77321dd..f5567069c 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 attributes( + &mut self, + value: crate::datadogV2::model::IncidentResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::IncidentResponseRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_response_meta.rs b/src/datadogV2/model/model_incident_response_meta.rs index 297ac3d34..b1fc09e3c 100644 --- a/src/datadogV2/model/model_incident_response_meta.rs +++ b/src/datadogV2/model/model_incident_response_meta.rs @@ -10,14 +10,23 @@ 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 pagination( + &mut self, + value: crate::datadogV2::model::IncidentResponseMetaPagination, + ) -> &mut Self { + self.pagination = Some(value); + 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 1b70fb490..31f7236a1 100644 --- a/src/datadogV2/model/model_incident_response_meta_pagination.rs +++ b/src/datadogV2/model/model_incident_response_meta_pagination.rs @@ -27,7 +27,23 @@ impl IncidentResponseMetaPagination { size: None, } } + + pub fn next_offset(&mut self, value: i64) -> &mut Self { + self.next_offset = Some(value); + self + } + + pub fn offset(&mut self, value: i64) -> &mut Self { + self.offset = Some(value); + 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 48c639c09..9414b3fda 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,7 +52,72 @@ impl IncidentResponseRelationships { user_defined_fields: None, } } + + pub fn attachments( + &mut self, + value: crate::datadogV2::model::RelationshipToIncidentAttachment, + ) -> &mut Self { + self.attachments = Some(value); + self + } + + pub fn commander_user( + &mut self, + value: Option, + ) -> &mut Self { + self.commander_user = Some(value); + self + } + + pub fn created_by_user( + &mut self, + value: crate::datadogV2::model::RelationshipToUser, + ) -> &mut Self { + self.created_by_user = Some(value); + self + } + + pub fn impacts( + &mut self, + value: crate::datadogV2::model::RelationshipToIncidentImpacts, + ) -> &mut Self { + self.impacts = Some(value); + self + } + + pub fn integrations( + &mut self, + value: crate::datadogV2::model::RelationshipToIncidentIntegrationMetadatas, + ) -> &mut Self { + self.integrations = Some(value); + self + } + + pub fn last_modified_by_user( + &mut self, + value: crate::datadogV2::model::RelationshipToUser, + ) -> &mut Self { + self.last_modified_by_user = Some(value); + self + } + + pub fn responders( + &mut self, + value: crate::datadogV2::model::RelationshipToIncidentResponders, + ) -> &mut Self { + self.responders = Some(value); + self + } + + pub fn 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 { Self::new() diff --git a/src/datadogV2/model/model_incident_search_response.rs b/src/datadogV2/model/model_incident_search_response.rs index 92f05e819..10b73fe4a 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 included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } + + pub fn 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..9d513b03e 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,7 +23,24 @@ impl IncidentSearchResponseData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::IncidentSearchResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::IncidentSearchResultsType, + ) -> &mut Self { + self.type_ = Some(value); + 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 b807940d4..9c0133d50 100644 --- a/src/datadogV2/model/model_incident_search_response_facets_data.rs +++ b/src/datadogV2/model/model_incident_search_response_facets_data.rs @@ -61,7 +61,96 @@ impl IncidentSearchResponseFacetsData { time_to_resolve: None, } } + + pub fn commander( + &mut self, + value: Vec, + ) -> &mut Self { + self.commander = Some(value); + self + } + + pub fn created_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.created_by = Some(value); + self + } + + pub fn fields( + &mut self, + value: Vec, + ) -> &mut Self { + self.fields = Some(value); + self + } + + pub fn impact( + &mut self, + value: Vec, + ) -> &mut Self { + self.impact = Some(value); + self + } + + pub fn last_modified_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.last_modified_by = Some(value); + self + } + + pub fn postmortem( + &mut self, + value: Vec, + ) -> &mut Self { + self.postmortem = Some(value); + self + } + + pub fn responder( + &mut self, + value: Vec, + ) -> &mut Self { + self.responder = Some(value); + self + } + + pub fn severity( + &mut self, + value: Vec, + ) -> &mut Self { + self.severity = Some(value); + self + } + + pub fn state( + &mut self, + value: Vec, + ) -> &mut Self { + self.state = Some(value); + self + } + + pub fn time_to_repair( + &mut self, + value: Vec, + ) -> &mut Self { + self.time_to_repair = Some(value); + self + } + + pub fn time_to_resolve( + &mut self, + value: Vec, + ) -> &mut Self { + self.time_to_resolve = Some(value); + 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 fd25cd39e..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 @@ -23,7 +23,18 @@ impl IncidentSearchResponseFieldFacetData { name: None, } } + + pub fn count(&mut self, value: i32) -> &mut Self { + self.count = Some(value); + 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_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..b55b7efb0 100644 --- a/src/datadogV2/model/model_incident_search_response_meta.rs +++ b/src/datadogV2/model/model_incident_search_response_meta.rs @@ -10,14 +10,23 @@ 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 pagination( + &mut self, + value: crate::datadogV2::model::IncidentResponseMetaPagination, + ) -> &mut Self { + self.pagination = Some(value); + self + } } + impl Default for IncidentSearchResponseMeta { fn default() -> Self { Self::new() 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..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 @@ -23,7 +23,18 @@ impl IncidentSearchResponseNumericFacetDataAggregates { min: None, } } + + pub fn max(&mut self, value: Option) -> &mut Self { + self.max = Some(value); + 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 6aeaf1eae..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 @@ -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 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..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 @@ -35,7 +35,33 @@ impl IncidentSearchResponseUserFacetData { uuid: None, } } + + pub fn count(&mut self, value: i32) -> &mut Self { + self.count = Some(value); + self + } + + pub fn email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 ffd205a9f..0f1ddf255 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 attributes( + &mut self, + value: crate::datadogV2::model::IncidentServiceCreateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn 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_relationships.rs b/src/datadogV2/model/model_incident_service_relationships.rs index 47680edc1..3ebebee02 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,7 +23,21 @@ impl IncidentServiceRelationships { last_modified_by: None, } } + + pub fn created_by(&mut self, value: crate::datadogV2::model::RelationshipToUser) -> &mut Self { + self.created_by = Some(value); + self + } + + pub fn 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 { Self::new() diff --git a/src/datadogV2/model/model_incident_service_response.rs b/src/datadogV2/model/model_incident_service_response.rs index a2b0366bc..b63991b89 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 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..ccb6ba923 100644 --- a/src/datadogV2/model/model_incident_service_response_attributes.rs +++ b/src/datadogV2/model/model_incident_service_response_attributes.rs @@ -27,7 +27,23 @@ impl IncidentServiceResponseAttributes { name: None, } } + + pub fn created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + 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 fd2f4afc0..7eab5ced1 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 attributes( + &mut self, + value: crate::datadogV2::model::IncidentServiceResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn 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..cf423e109 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 attributes( + &mut self, + value: crate::datadogV2::model::IncidentServiceUpdateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn 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..33765540c 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 included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + 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 2f2e2618b..dcbaf24a6 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 attributes( + &mut self, + value: crate::datadogV2::model::IncidentTeamCreateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn 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_relationships.rs b/src/datadogV2/model/model_incident_team_relationships.rs index 988554626..6ec915ad4 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,7 +23,21 @@ impl IncidentTeamRelationships { last_modified_by: None, } } + + pub fn created_by(&mut self, value: crate::datadogV2::model::RelationshipToUser) -> &mut Self { + self.created_by = Some(value); + self + } + + pub fn 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 { Self::new() diff --git a/src/datadogV2/model/model_incident_team_response.rs b/src/datadogV2/model/model_incident_team_response.rs index aa17239cc..451936ac4 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 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..781e2ccc2 100644 --- a/src/datadogV2/model/model_incident_team_response_attributes.rs +++ b/src/datadogV2/model/model_incident_team_response_attributes.rs @@ -27,7 +27,23 @@ impl IncidentTeamResponseAttributes { name: None, } } + + pub fn created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn modified(&mut self, value: String) -> &mut Self { + self.modified = Some(value); + 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 63795a26e..16a3755cf 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,7 +31,34 @@ impl IncidentTeamResponseData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::IncidentTeamResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::IncidentTeamRelationships, + ) -> &mut Self { + self.relationships = Some(value); + 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 0ecda33d6..d6429da13 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 attributes( + &mut self, + value: crate::datadogV2::model::IncidentTeamUpdateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn 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..b4c30382e 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 included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + 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_markdown_create_attributes.rs b/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes.rs index ba8f3e7e0..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 @@ -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 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..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 @@ -17,7 +17,13 @@ impl IncidentTimelineCellMarkdownCreateAttributesContent { pub fn new() -> IncidentTimelineCellMarkdownCreateAttributesContent { IncidentTimelineCellMarkdownCreateAttributesContent { content: None } } + + 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_attributes.rs b/src/datadogV2/model/model_incident_todo_attributes.rs index deaab79b1..960943c80 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 completed(&mut self, value: Option) -> &mut Self { + self.completed = Some(value); + self + } + + pub fn created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn due_date(&mut self, value: Option) -> &mut Self { + self.due_date = Some(value); + self + } + + pub fn incident_id(&mut self, value: String) -> &mut Self { + self.incident_id = Some(value); + self + } + + pub fn 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..b6a1d0db0 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 included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + 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_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..1cea60424 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,7 +23,24 @@ impl IncidentTodoRelationships { last_modified_by_user: None, } } + + pub fn created_by_user( + &mut self, + value: crate::datadogV2::model::RelationshipToUser, + ) -> &mut Self { + self.created_by_user = Some(value); + self + } + + pub fn 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 { Self::new() diff --git a/src/datadogV2/model/model_incident_todo_response.rs b/src/datadogV2/model/model_incident_todo_response.rs index 5d7077206..15b78fbf4 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 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..464a04706 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 attributes( + &mut self, + value: crate::datadogV2::model::IncidentTodoAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::IncidentTodoRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } } diff --git a/src/datadogV2/model/model_incident_update_attributes.rs b/src/datadogV2/model/model_incident_update_attributes.rs index ce7610516..9b49680b7 100644 --- a/src/datadogV2/model/model_incident_update_attributes.rs +++ b/src/datadogV2/model/model_incident_update_attributes.rs @@ -61,7 +61,54 @@ impl IncidentUpdateAttributes { title: None, } } + + pub fn customer_impact_end(&mut self, value: Option) -> &mut Self { + self.customer_impact_end = Some(value); + self + } + + pub fn customer_impact_scope(&mut self, value: String) -> &mut Self { + self.customer_impact_scope = Some(value); + self + } + + pub fn customer_impact_start(&mut self, value: Option) -> &mut Self { + self.customer_impact_start = Some(value); + self + } + + pub fn customer_impacted(&mut self, value: bool) -> &mut Self { + self.customer_impacted = Some(value); + self + } + + pub fn detected(&mut self, value: Option) -> &mut Self { + self.detected = Some(value); + self + } + + pub fn fields( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.fields = Some(value); + self + } + + pub fn notification_handles( + &mut self, + value: Vec, + ) -> &mut Self { + self.notification_handles = Some(value); + 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 68659b80a..f1dc5f6b5 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 attributes( + &mut self, + value: crate::datadogV2::model::IncidentUpdateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn 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..63b50a4be 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,7 +31,32 @@ impl IncidentUpdateRelationships { postmortem: None, } } + + pub fn commander_user( + &mut self, + value: Option, + ) -> &mut Self { + self.commander_user = Some(value); + self + } + + pub fn integrations( + &mut self, + value: crate::datadogV2::model::RelationshipToIncidentIntegrationMetadatas, + ) -> &mut Self { + self.integrations = Some(value); + self + } + + pub fn postmortem( + &mut self, + value: crate::datadogV2::model::RelationshipToIncidentPostmortem, + ) -> &mut Self { + self.postmortem = Some(value); + self + } } + impl Default for IncidentUpdateRelationships { fn default() -> Self { Self::new() 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..5cd066ce9 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 included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + 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 c101dadd9..853208118 100644 --- a/src/datadogV2/model/model_intake_payload_accepted.rs +++ b/src/datadogV2/model/model_intake_payload_accepted.rs @@ -17,7 +17,13 @@ impl IntakePayloadAccepted { pub fn new() -> IntakePayloadAccepted { IntakePayloadAccepted { errors: None } } + + 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 3e66f0c8e..f0932e8d2 100644 --- a/src/datadogV2/model/model_ip_allowlist_attributes.rs +++ b/src/datadogV2/model/model_ip_allowlist_attributes.rs @@ -23,7 +23,18 @@ impl IPAllowlistAttributes { entries: None, } } + + pub fn enabled(&mut self, value: bool) -> &mut Self { + self.enabled = Some(value); + 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 606b6e073..f7f9291e2 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 attributes( + &mut self, + value: crate::datadogV2::model::IPAllowlistAttributes, + ) -> &mut Self { + self.attributes = Some(value); + 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.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..fe0d6f0ef 100644 --- a/src/datadogV2/model/model_ip_allowlist_entry_attributes.rs +++ b/src/datadogV2/model/model_ip_allowlist_entry_attributes.rs @@ -31,7 +31,28 @@ impl IPAllowlistEntryAttributes { note: None, } } + + pub fn cidr_block(&mut self, value: String) -> &mut Self { + self.cidr_block = Some(value); + self + } + + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + 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 acf5dfeea..eb3bc2a4e 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 attributes( + &mut self, + value: crate::datadogV2::model::IPAllowlistEntryAttributes, + ) -> &mut Self { + self.attributes = Some(value); + 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 7476eb33b..3c6ee6199 100644 --- a/src/datadogV2/model/model_ip_allowlist_response.rs +++ b/src/datadogV2/model/model_ip_allowlist_response.rs @@ -10,14 +10,20 @@ 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 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_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..08e882728 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 issue_key(&mut self, value: String) -> &mut Self { + self.issue_key = Some(value); + self + } + + pub fn issuetype_id(&mut self, value: String) -> &mut Self { + self.issuetype_id = Some(value); + 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 1f328c9ef..604d2109f 100644 --- a/src/datadogV2/model/model_jsonapi_error_item.rs +++ b/src/datadogV2/model/model_jsonapi_error_item.rs @@ -27,7 +27,23 @@ impl JSONAPIErrorItem { title: None, } } + + pub fn detail(&mut self, value: String) -> &mut Self { + self.detail = Some(value); + self + } + + pub fn status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + 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 2d1d36bbf..647ba50ba 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,7 +27,32 @@ impl ListApplicationKeysResponse { meta: None, } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } + + pub fn meta( + &mut self, + value: crate::datadogV2::model::ApplicationKeyResponseMeta, + ) -> &mut Self { + self.meta = Some(value); + 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 0c231d7d7..6a1d1ea83 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,7 +27,26 @@ impl ListDowntimesResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + 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 3e7006a2c..6fc186678 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,7 +23,18 @@ impl ListFindingsMeta { snapshot_timestamp: None, } } + + pub fn page(&mut self, value: crate::datadogV2::model::ListFindingsPage) -> &mut Self { + self.page = Some(value); + 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 3836898ce..089dbd20f 100644 --- a/src/datadogV2/model/model_list_findings_page.rs +++ b/src/datadogV2/model/model_list_findings_page.rs @@ -23,7 +23,18 @@ impl ListFindingsPage { total_filtered_count: None, } } + + pub fn cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + 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_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..748aee2be 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,7 +31,28 @@ impl ListPowerpacksResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn included(&mut self, value: Vec) -> &mut Self { + self.included = Some(value); + self + } + + pub fn links(&mut self, value: crate::datadogV2::model::PowerpackResponseLinks) -> &mut Self { + self.links = Some(value); + 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 42364e335..33e51f612 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,7 +23,21 @@ impl ListRulesResponse { links: None, } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 86b6aabac..b6217a8ea 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,7 +31,31 @@ impl ListRulesResponseDataItem { type_: None, } } + + pub fn attributes(&mut self, value: crate::datadogV2::model::RuleAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::RelationshipToRule, + ) -> &mut Self { + self.relationships = Some(value); + 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 ccd846025..749e542c4 100644 --- a/src/datadogV2/model/model_list_rules_response_links.rs +++ b/src/datadogV2/model/model_list_rules_response_links.rs @@ -17,7 +17,13 @@ impl ListRulesResponseLinks { pub fn new() -> ListRulesResponseLinks { ListRulesResponseLinks { next: None } } + + 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 6adf1ad2d..d6df7a9ee 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,7 +27,23 @@ impl Log { type_: None, } } + + pub fn attributes(&mut self, value: crate::datadogV2::model::LogAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 230dfe58a..a1f25c557 100644 --- a/src/datadogV2/model/model_log_attributes.rs +++ b/src/datadogV2/model/model_log_attributes.rs @@ -47,7 +47,46 @@ impl LogAttributes { timestamp: None, } } + + pub fn attributes( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn service(&mut self, value: String) -> &mut Self { + self.service = Some(value); + self + } + + pub fn status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + 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 3841453c7..6f57f3f4d 100644 --- a/src/datadogV2/model/model_logs_aggregate_bucket.rs +++ b/src/datadogV2/model/model_logs_aggregate_bucket.rs @@ -25,7 +25,27 @@ impl LogsAggregateBucket { computes: None, } } + + pub fn by( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.by = Some(value); + self + } + + pub fn 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 { 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 999d33759..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 @@ -23,7 +23,18 @@ impl LogsAggregateBucketValueTimeseriesPoint { value: None, } } + + pub fn time(&mut self, value: String) -> &mut Self { + self.time = Some(value); + 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 7ad4a5cb1..c8fd463d4 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,7 +36,33 @@ impl LogsAggregateRequest { page: None, } } + + pub fn compute(&mut self, value: Vec) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn filter(&mut self, value: crate::datadogV2::model::LogsQueryFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn group_by(&mut self, value: Vec) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn options(&mut self, value: crate::datadogV2::model::LogsQueryOptions) -> &mut Self { + self.options = Some(value); + 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 587b45d5c..d9375582f 100644 --- a/src/datadogV2/model/model_logs_aggregate_request_page.rs +++ b/src/datadogV2/model/model_logs_aggregate_request_page.rs @@ -17,7 +17,13 @@ impl LogsAggregateRequestPage { pub fn new() -> LogsAggregateRequestPage { LogsAggregateRequestPage { cursor: None } } + + 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 cfb03478b..4bdf48e21 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,7 +23,18 @@ impl LogsAggregateResponse { meta: None, } } + + pub fn data(&mut self, value: crate::datadogV2::model::LogsAggregateResponseData) -> &mut Self { + self.data = Some(value); + 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 8ee657377..edd0671da 100644 --- a/src/datadogV2/model/model_logs_aggregate_response_data.rs +++ b/src/datadogV2/model/model_logs_aggregate_response_data.rs @@ -17,7 +17,16 @@ impl LogsAggregateResponseData { pub fn new() -> LogsAggregateResponseData { LogsAggregateResponseData { buckets: None } } + + pub fn buckets( + &mut self, + value: Vec, + ) -> &mut Self { + self.buckets = Some(value); + 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 bd9901571..1dcc16ff6 100644 --- a/src/datadogV2/model/model_logs_aggregate_sort.rs +++ b/src/datadogV2/model/model_logs_aggregate_sort.rs @@ -31,7 +31,31 @@ impl LogsAggregateSort { type_: None, } } + + pub fn aggregation( + &mut self, + value: crate::datadogV2::model::LogsAggregationFunction, + ) -> &mut Self { + self.aggregation = Some(value); + self + } + + pub fn metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn order(&mut self, value: crate::datadogV2::model::LogsSortOrder) -> &mut Self { + self.order = Some(value); + 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 8cfd18318..c1aee32be 100644 --- a/src/datadogV2/model/model_logs_archive.rs +++ b/src/datadogV2/model/model_logs_archive.rs @@ -10,14 +10,20 @@ 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 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 2aa0461a7..862eec8f3 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 include_tags(&mut self, value: bool) -> &mut Self { + self.include_tags = Some(value); + 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 rehydration_tags(&mut self, value: Vec) -> &mut Self { + self.rehydration_tags = Some(value); + 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 864e98199..eaf93ad5c 100644 --- a/src/datadogV2/model/model_logs_archive_create_request.rs +++ b/src/datadogV2/model/model_logs_archive_create_request.rs @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: crate::datadogV2::model::LogsArchiveCreateRequestDefinition, + ) -> &mut Self { + self.data = Some(value); + 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 fd65fafb9..807299875 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 include_tags(&mut self, value: bool) -> &mut Self { + self.include_tags = Some(value); + 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 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..1e9a5373b 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 attributes( + &mut self, + value: crate::datadogV2::model::LogsArchiveCreateRequestAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } } diff --git a/src/datadogV2/model/model_logs_archive_definition.rs b/src/datadogV2/model/model_logs_archive_definition.rs index 9b7ae925f..1609b4f1d 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 attributes( + &mut self, + value: crate::datadogV2::model::LogsArchiveAttributes, + ) -> &mut Self { + self.attributes = Some(value); + 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_azure.rs b/src/datadogV2/model/model_logs_archive_destination_azure.rs index 06c5c5d09..37bcc99db 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 path(&mut self, value: String) -> &mut Self { + self.path = Some(value); + 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 17cf4c2ac..2d8ab9939 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 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..0f9470872 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 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..8471db525 100644 --- a/src/datadogV2/model/model_logs_archive_order.rs +++ b/src/datadogV2/model/model_logs_archive_order.rs @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: crate::datadogV2::model::LogsArchiveOrderDefinition, + ) -> &mut Self { + self.data = Some(value); + self + } } + impl Default for LogsArchiveOrder { fn default() -> Self { Self::new() 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..c89b0f429 100644 --- a/src/datadogV2/model/model_logs_archives.rs +++ b/src/datadogV2/model/model_logs_archives.rs @@ -17,7 +17,16 @@ impl LogsArchives { pub fn new() -> LogsArchives { LogsArchives { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 d22749e0b..b93cb0604 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 interval(&mut self, value: String) -> &mut Self { + self.interval = Some(value); + self + } + + pub fn metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + 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 a22d150c6..c31e51013 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,29 @@ impl LogsGroupBy { total: None, } } + + pub fn histogram(&mut self, value: crate::datadogV2::model::LogsGroupByHistogram) -> &mut Self { + self.histogram = Some(value); + self + } + + pub fn limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn missing(&mut self, value: crate::datadogV2::model::LogsGroupByMissing) -> &mut Self { + self.missing = Some(value); + self + } + + pub fn sort(&mut self, value: crate::datadogV2::model::LogsAggregateSort) -> &mut Self { + self.sort = Some(value); + 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 75cfcd36a..64dd7b373 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,7 +32,28 @@ impl LogsListRequest { sort: None, } } + + pub fn filter(&mut self, value: crate::datadogV2::model::LogsQueryFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn options(&mut self, value: crate::datadogV2::model::LogsQueryOptions) -> &mut Self { + self.options = Some(value); + self + } + + pub fn page(&mut self, value: crate::datadogV2::model::LogsListRequestPage) -> &mut Self { + self.page = Some(value); + 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 8bcf26d05..52732eb51 100644 --- a/src/datadogV2/model/model_logs_list_request_page.rs +++ b/src/datadogV2/model/model_logs_list_request_page.rs @@ -23,7 +23,18 @@ impl LogsListRequestPage { limit: None, } } + + pub fn cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + 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 d841ef9cb..1020936df 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,7 +27,23 @@ impl LogsListResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn links(&mut self, value: crate::datadogV2::model::LogsListResponseLinks) -> &mut Self { + self.links = Some(value); + 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 6cc8f8bbb..e9b1de979 100644 --- a/src/datadogV2/model/model_logs_list_response_links.rs +++ b/src/datadogV2/model/model_logs_list_response_links.rs @@ -18,7 +18,13 @@ impl LogsListResponseLinks { pub fn new() -> LogsListResponseLinks { LogsListResponseLinks { next: None } } + + 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 c9338c206..e7fa75f76 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 include_percentiles(&mut self, value: bool) -> &mut Self { + self.include_percentiles = Some(value); + 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 823f4ab82..ec54b4cd9 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 filter(&mut self, value: crate::datadogV2::model::LogsMetricFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn 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..11ea2b6fa 100644 --- a/src/datadogV2/model/model_logs_metric_filter.rs +++ b/src/datadogV2/model/model_logs_metric_filter.rs @@ -17,7 +17,13 @@ impl LogsMetricFilter { pub fn new() -> LogsMetricFilter { LogsMetricFilter { query: None } } + + 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 481210362..d0a18aefb 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 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..81c4ec820 100644 --- a/src/datadogV2/model/model_logs_metric_response.rs +++ b/src/datadogV2/model/model_logs_metric_response.rs @@ -10,14 +10,20 @@ 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 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 3dc6ef2be..403f987fc 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,7 +27,32 @@ impl LogsMetricResponseAttributes { group_by: None, } } + + pub fn compute( + &mut self, + value: crate::datadogV2::model::LogsMetricResponseCompute, + ) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn filter( + &mut self, + value: crate::datadogV2::model::LogsMetricResponseFilter, + ) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + 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 96c04aee9..5d768e953 100644 --- a/src/datadogV2/model/model_logs_metric_response_compute.rs +++ b/src/datadogV2/model/model_logs_metric_response_compute.rs @@ -28,7 +28,26 @@ impl LogsMetricResponseCompute { path: None, } } + + pub fn aggregation_type( + &mut self, + value: crate::datadogV2::model::LogsMetricResponseComputeAggregationType, + ) -> &mut Self { + self.aggregation_type = Some(value); + self + } + + pub fn include_percentiles(&mut self, value: bool) -> &mut Self { + self.include_percentiles = Some(value); + 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 0f03eeed2..1e62689ce 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,7 +27,26 @@ impl LogsMetricResponseData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::LogsMetricResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 225ad442b..e71f62f56 100644 --- a/src/datadogV2/model/model_logs_metric_response_filter.rs +++ b/src/datadogV2/model/model_logs_metric_response_filter.rs @@ -17,7 +17,13 @@ impl LogsMetricResponseFilter { pub fn new() -> LogsMetricResponseFilter { LogsMetricResponseFilter { query: None } } + + 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 d5d835e58..c02581478 100644 --- a/src/datadogV2/model/model_logs_metric_response_group_by.rs +++ b/src/datadogV2/model/model_logs_metric_response_group_by.rs @@ -23,7 +23,18 @@ impl LogsMetricResponseGroupBy { tag_name: None, } } + + pub fn path(&mut self, value: String) -> &mut Self { + self.path = Some(value); + 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 6ce5a236c..c15780dc3 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,7 +27,29 @@ impl LogsMetricUpdateAttributes { group_by: None, } } + + pub fn compute( + &mut self, + value: crate::datadogV2::model::LogsMetricUpdateCompute, + ) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn filter(&mut self, value: crate::datadogV2::model::LogsMetricFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + 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 6f59fd7d2..905f245fc 100644 --- a/src/datadogV2/model/model_logs_metric_update_compute.rs +++ b/src/datadogV2/model/model_logs_metric_update_compute.rs @@ -20,7 +20,13 @@ impl LogsMetricUpdateCompute { include_percentiles: None, } } + + 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_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..a7b0c2534 100644 --- a/src/datadogV2/model/model_logs_metrics_response.rs +++ b/src/datadogV2/model/model_logs_metrics_response.rs @@ -17,7 +17,16 @@ impl LogsMetricsResponse { pub fn new() -> LogsMetricsResponse { LogsMetricsResponse { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 6e4a70f00..d56dc9886 100644 --- a/src/datadogV2/model/model_logs_query_filter.rs +++ b/src/datadogV2/model/model_logs_query_filter.rs @@ -35,7 +35,33 @@ impl LogsQueryFilter { to: None, } } + + pub fn from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + self + } + + pub fn indexes(&mut self, value: Vec) -> &mut Self { + self.indexes = Some(value); + self + } + + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn storage_tier(&mut self, value: crate::datadogV2::model::LogsStorageTier) -> &mut Self { + self.storage_tier = Some(value); + 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 1cf63b207..f040a21e6 100644 --- a/src/datadogV2/model/model_logs_query_options.rs +++ b/src/datadogV2/model/model_logs_query_options.rs @@ -24,7 +24,18 @@ impl LogsQueryOptions { timezone: None, } } + + pub fn time_offset(&mut self, value: i64) -> &mut Self { + self.time_offset = Some(value); + 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 878bb1a56..b8bc25e21 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,7 +36,36 @@ impl LogsResponseMetadata { warnings: None, } } + + pub fn elapsed(&mut self, value: i64) -> &mut Self { + self.elapsed = Some(value); + self + } + + pub fn page(&mut self, value: crate::datadogV2::model::LogsResponseMetadataPage) -> &mut Self { + self.page = Some(value); + self + } + + pub fn request_id(&mut self, value: String) -> &mut Self { + self.request_id = Some(value); + self + } + + pub fn status( + &mut self, + value: crate::datadogV2::model::LogsAggregateResponseStatus, + ) -> &mut Self { + self.status = Some(value); + 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 798d5dae6..e34ccdbdf 100644 --- a/src/datadogV2/model/model_logs_response_metadata_page.rs +++ b/src/datadogV2/model/model_logs_response_metadata_page.rs @@ -18,7 +18,13 @@ impl LogsResponseMetadataPage { pub fn new() -> LogsResponseMetadataPage { LogsResponseMetadataPage { after: None } } + + 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 0890026d6..5a7cfc950 100644 --- a/src/datadogV2/model/model_logs_warning.rs +++ b/src/datadogV2/model/model_logs_warning.rs @@ -27,7 +27,23 @@ impl LogsWarning { title: None, } } + + pub fn code(&mut self, value: String) -> &mut Self { + self.code = Some(value); + self + } + + pub fn detail(&mut self, value: String) -> &mut Self { + self.detail = Some(value); + 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 348e920db..c02fa2e1d 100644 --- a/src/datadogV2/model/model_metric.rs +++ b/src/datadogV2/model/model_metric.rs @@ -23,7 +23,18 @@ impl Metric { type_: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 c02a07a7c..6c7110c4c 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,7 +27,26 @@ impl MetricAllTags { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::MetricAllTagsAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 be3ffb6d2..db077926e 100644 --- a/src/datadogV2/model/model_metric_all_tags_attributes.rs +++ b/src/datadogV2/model/model_metric_all_tags_attributes.rs @@ -17,7 +17,13 @@ impl MetricAllTagsAttributes { pub fn new() -> MetricAllTagsAttributes { MetricAllTagsAttributes { tags: None } } + + 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 fc571b1b5..671031e6e 100644 --- a/src/datadogV2/model/model_metric_all_tags_response.rs +++ b/src/datadogV2/model/model_metric_all_tags_response.rs @@ -10,14 +10,20 @@ 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 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 24be7fd2e..2a357763c 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 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..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 @@ -29,7 +29,23 @@ impl MetricBulkTagConfigCreateAttributes { tags: None, } } + + pub fn emails(&mut self, value: Vec) -> &mut Self { + self.emails = Some(value); + self + } + + pub fn exclude_tags_mode(&mut self, value: bool) -> &mut Self { + self.exclude_tags_mode = Some(value); + 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_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..cfc4cf46f 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 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..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 @@ -17,7 +17,13 @@ impl MetricBulkTagConfigDeleteAttributes { pub fn new() -> MetricBulkTagConfigDeleteAttributes { MetricBulkTagConfigDeleteAttributes { emails: None } } + + 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_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..aaf223af8 100644 --- a/src/datadogV2/model/model_metric_bulk_tag_config_response.rs +++ b/src/datadogV2/model/model_metric_bulk_tag_config_response.rs @@ -11,14 +11,20 @@ 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 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 3c01a11ef..2e85e60a3 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 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..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 @@ -32,7 +32,28 @@ impl MetricBulkTagConfigStatusAttributes { tags: None, } } + + pub fn emails(&mut self, value: Vec) -> &mut Self { + self.emails = Some(value); + self + } + + pub fn exclude_tags_mode(&mut self, value: bool) -> &mut Self { + self.exclude_tags_mode = Some(value); + self + } + + pub fn status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + 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 f5fd95e74..94ccb6e32 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,7 +27,26 @@ impl MetricDistinctVolume { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::MetricDistinctVolumeAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 e44c2c8bb..783f29eef 100644 --- a/src/datadogV2/model/model_metric_distinct_volume_attributes.rs +++ b/src/datadogV2/model/model_metric_distinct_volume_attributes.rs @@ -19,7 +19,13 @@ impl MetricDistinctVolumeAttributes { distinct_volume: None, } } + + 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 dc646edad..74d36b6ec 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,7 +27,29 @@ impl MetricEstimate { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::MetricEstimateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::MetricEstimateResourceType, + ) -> &mut Self { + self.type_ = Some(value); + 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 f790e527e..eb18bb0a0 100644 --- a/src/datadogV2/model/model_metric_estimate_attributes.rs +++ b/src/datadogV2/model/model_metric_estimate_attributes.rs @@ -27,7 +27,26 @@ impl MetricEstimateAttributes { estimated_output_series: None, } } + + pub fn estimate_type( + &mut self, + value: crate::datadogV2::model::MetricEstimateType, + ) -> &mut Self { + self.estimate_type = Some(value); + self + } + + pub fn estimated_at(&mut self, value: String) -> &mut Self { + self.estimated_at = Some(value); + 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 37931bc4a..9d0553f0a 100644 --- a/src/datadogV2/model/model_metric_estimate_response.rs +++ b/src/datadogV2/model/model_metric_estimate_response.rs @@ -10,14 +10,20 @@ 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 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 1a1cf3a90..89e14281e 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,7 +27,29 @@ impl MetricIngestedIndexedVolume { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::MetricIngestedIndexedVolumeAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::MetricIngestedIndexedVolumeType, + ) -> &mut Self { + self.type_ = Some(value); + 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 24758dbe1..07f913548 100644 --- a/src/datadogV2/model/model_metric_ingested_indexed_volume_attributes.rs +++ b/src/datadogV2/model/model_metric_ingested_indexed_volume_attributes.rs @@ -23,7 +23,18 @@ impl MetricIngestedIndexedVolumeAttributes { ingested_volume: None, } } + + pub fn indexed_volume(&mut self, value: i64) -> &mut Self { + self.indexed_volume = Some(value); + 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 36e6c2003..4dfb3d38b 100644 --- a/src/datadogV2/model/model_metric_metadata.rs +++ b/src/datadogV2/model/model_metric_metadata.rs @@ -10,14 +10,20 @@ 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 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 2e8a77074..30d3bfcc2 100644 --- a/src/datadogV2/model/model_metric_origin.rs +++ b/src/datadogV2/model/model_metric_origin.rs @@ -27,7 +27,23 @@ impl MetricOrigin { service: None, } } + + pub fn metric_type(&mut self, value: i32) -> &mut Self { + self.metric_type = Some(value); + self + } + + pub fn product(&mut self, value: i32) -> &mut Self { + self.product = Some(value); + 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 c54eecf01..70aa452d7 100644 --- a/src/datadogV2/model/model_metric_point.rs +++ b/src/datadogV2/model/model_metric_point.rs @@ -24,7 +24,18 @@ impl MetricPoint { value: None, } } + + pub fn timestamp(&mut self, value: i64) -> &mut Self { + self.timestamp = Some(value); + 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 7ba53384c..c31785e4a 100644 --- a/src/datadogV2/model/model_metric_resource.rs +++ b/src/datadogV2/model/model_metric_resource.rs @@ -23,7 +23,18 @@ impl MetricResource { type_: None, } } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 390632dec..9b9097a64 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,39 @@ impl MetricSeries { unit: None, } } + + pub fn interval(&mut self, value: i64) -> &mut Self { + self.interval = Some(value); + self + } + + pub fn metadata(&mut self, value: crate::datadogV2::model::MetricMetadata) -> &mut Self { + self.metadata = Some(value); + self + } + + pub fn resources(&mut self, value: Vec) -> &mut Self { + self.resources = Some(value); + self + } + + pub fn source_type_name(&mut self, value: String) -> &mut Self { + self.source_type_name = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn type_(&mut self, value: crate::datadogV2::model::MetricIntakeType) -> &mut Self { + self.type_ = Some(value); + 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 fd2880028..e0344e2ae 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,7 +27,29 @@ impl MetricSuggestedTagsAndAggregations { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::MetricSuggestedTagsAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::MetricActiveConfigurationType, + ) -> &mut Self { + self.type_ = Some(value); + 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 6e12766e9..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 @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: crate::datadogV2::model::MetricSuggestedTagsAndAggregations, + ) -> &mut Self { + self.data = Some(value); + 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 7697ded63..6274b56fb 100644 --- a/src/datadogV2/model/model_metric_suggested_tags_attributes.rs +++ b/src/datadogV2/model/model_metric_suggested_tags_attributes.rs @@ -23,7 +23,21 @@ impl MetricSuggestedTagsAttributes { active_tags: None, } } + + pub fn active_aggregations( + &mut self, + value: Vec, + ) -> &mut Self { + self.active_aggregations = Some(value); + 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 2e2cee82c..0b2574ab6 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,7 +27,29 @@ impl MetricTagConfiguration { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::MetricTagConfigurationAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::MetricTagConfigurationType, + ) -> &mut Self { + self.type_ = Some(value); + 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 7eb28766e..a26aafcb3 100644 --- a/src/datadogV2/model/model_metric_tag_configuration_attributes.rs +++ b/src/datadogV2/model/model_metric_tag_configuration_attributes.rs @@ -61,7 +61,49 @@ impl MetricTagConfigurationAttributes { tags: None, } } + + pub fn aggregations( + &mut self, + value: Vec, + ) -> &mut Self { + self.aggregations = Some(value); + self + } + + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn exclude_tags_mode(&mut self, value: bool) -> &mut Self { + self.exclude_tags_mode = Some(value); + self + } + + pub fn include_percentiles(&mut self, value: bool) -> &mut Self { + self.include_percentiles = Some(value); + self + } + + pub fn metric_type( + &mut self, + value: crate::datadogV2::model::MetricTagConfigurationMetricTypes, + ) -> &mut Self { + self.metric_type = Some(value); + self + } + + pub fn modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + 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 5f4aba2c0..15a7775af 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 aggregations( + &mut self, + value: Vec, + ) -> &mut Self { + self.aggregations = Some(value); + self + } + + pub fn exclude_tags_mode(&mut self, value: bool) -> &mut Self { + self.exclude_tags_mode = Some(value); + 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 7c48226f0..7b64dedb8 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 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..e4a458da8 100644 --- a/src/datadogV2/model/model_metric_tag_configuration_response.rs +++ b/src/datadogV2/model/model_metric_tag_configuration_response.rs @@ -10,14 +10,20 @@ 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 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 dca92b672..e9194599c 100644 --- a/src/datadogV2/model/model_metric_tag_configuration_update_attributes.rs +++ b/src/datadogV2/model/model_metric_tag_configuration_update_attributes.rs @@ -49,7 +49,31 @@ impl MetricTagConfigurationUpdateAttributes { tags: None, } } + + pub fn aggregations( + &mut self, + value: Vec, + ) -> &mut Self { + self.aggregations = Some(value); + self + } + + pub fn exclude_tags_mode(&mut self, value: bool) -> &mut Self { + self.exclude_tags_mode = Some(value); + self + } + + pub fn include_percentiles(&mut self, value: bool) -> &mut Self { + self.include_percentiles = Some(value); + 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 88158d031..7ce82125f 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 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_response.rs b/src/datadogV2/model/model_metric_volumes_response.rs index 106b3f811..36b40cdff 100644 --- a/src/datadogV2/model/model_metric_volumes_response.rs +++ b/src/datadogV2/model/model_metric_volumes_response.rs @@ -10,14 +10,20 @@ 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 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_response.rs b/src/datadogV2/model/model_metrics_and_metric_tag_configurations_response.rs index e5311b863..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 @@ -17,7 +17,16 @@ impl MetricsAndMetricTagConfigurationsResponse { pub fn new() -> MetricsAndMetricTagConfigurationsResponse { MetricsAndMetricTagConfigurationsResponse { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 e9ff4f78d..6d7f7d717 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 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..36b8154d5 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 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..c6adcf251 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,7 +23,24 @@ impl MonitorConfigPolicyAttributeResponse { policy_type: None, } } + + pub fn policy( + &mut self, + value: crate::datadogV2::model::MonitorConfigPolicyPolicy, + ) -> &mut Self { + self.policy = Some(value); + self + } + + pub fn policy_type( + &mut self, + value: crate::datadogV2::model::MonitorConfigPolicyType, + ) -> &mut Self { + self.policy_type = Some(value); + self + } } + impl Default for MonitorConfigPolicyAttributeResponse { fn default() -> Self { Self::new() 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..6fc2364b2 100644 --- a/src/datadogV2/model/model_monitor_config_policy_list_response.rs +++ b/src/datadogV2/model/model_monitor_config_policy_list_response.rs @@ -17,7 +17,16 @@ impl MonitorConfigPolicyListResponse { pub fn new() -> MonitorConfigPolicyListResponse { MonitorConfigPolicyListResponse { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } + impl Default for MonitorConfigPolicyListResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_monitor_config_policy_response.rs b/src/datadogV2/model/model_monitor_config_policy_response.rs index aa118c363..52e195be3 100644 --- a/src/datadogV2/model/model_monitor_config_policy_response.rs +++ b/src/datadogV2/model/model_monitor_config_policy_response.rs @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: crate::datadogV2::model::MonitorConfigPolicyResponseData, + ) -> &mut Self { + self.data = Some(value); + 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 092bdc6c7..92b137372 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,7 +27,29 @@ impl MonitorConfigPolicyResponseData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::MonitorConfigPolicyAttributeResponse, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::MonitorConfigPolicyResourceType, + ) -> &mut Self { + self.type_ = Some(value); + 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 068033f0b..48dceb74f 100644 --- a/src/datadogV2/model/model_monitor_config_policy_tag_policy.rs +++ b/src/datadogV2/model/model_monitor_config_policy_tag_policy.rs @@ -27,7 +27,23 @@ impl MonitorConfigPolicyTagPolicy { valid_tag_values: None, } } + + pub fn tag_key(&mut self, value: String) -> &mut Self { + self.tag_key = Some(value); + self + } + + pub fn tag_key_required(&mut self, value: bool) -> &mut Self { + self.tag_key_required = Some(value); + 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 fb8c9f1d7..8ca467ade 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,7 +23,21 @@ impl MonitorDowntimeMatchResponse { meta: None, } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 5a5c7e2dd..4504b73d2 100644 --- a/src/datadogV2/model/model_monitor_downtime_match_response_attributes.rs +++ b/src/datadogV2/model/model_monitor_downtime_match_response_attributes.rs @@ -31,7 +31,28 @@ impl MonitorDowntimeMatchResponseAttributes { start: None, } } + + pub fn end(&mut self, value: Option) -> &mut Self { + self.end = Some(value); + self + } + + pub fn groups(&mut self, value: Vec) -> &mut Self { + self.groups = Some(value); + self + } + + pub fn scope(&mut self, value: String) -> &mut Self { + self.scope = Some(value); + 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 82a4251c6..9bea4e012 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,7 +27,29 @@ impl MonitorDowntimeMatchResponseData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::MonitorDowntimeMatchResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: Option) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::MonitorDowntimeMatchResourceType, + ) -> &mut Self { + self.type_ = Some(value); + 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 e2e64d0d0..83b063c3a 100644 --- a/src/datadogV2/model/model_monitor_type.rs +++ b/src/datadogV2/model/model_monitor_type.rs @@ -59,7 +59,63 @@ impl MonitorType { type_: None, } } + + pub fn created_at(&mut self, value: i64) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn group_status(&mut self, value: i32) -> &mut Self { + self.group_status = Some(value); + self + } + + pub fn groups(&mut self, value: Vec) -> &mut Self { + self.groups = Some(value); + self + } + + pub fn id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + self + } + + pub fn message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn modified(&mut self, value: i64) -> &mut Self { + self.modified = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn templated_name(&mut self, value: String) -> &mut Self { + self.templated_name = Some(value); + 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 276ef23e0..4f06800b1 100644 --- a/src/datadogV2/model/model_monthly_cost_attribution_attributes.rs +++ b/src/datadogV2/model/model_monthly_cost_attribution_attributes.rs @@ -46,7 +46,49 @@ impl MonthlyCostAttributionAttributes { values: None, } } + + pub fn month(&mut self, value: String) -> &mut Self { + self.month = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn tag_config_source(&mut self, value: String) -> &mut Self { + self.tag_config_source = Some(value); + self + } + + pub fn tags( + &mut self, + value: Option>>>, + ) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn updated_at(&mut self, value: String) -> &mut Self { + self.updated_at = Some(value); + self + } + + pub fn values( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.values = Some(value); + 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 3bf1e42b9..1fe3a5e1f 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,7 +27,26 @@ impl MonthlyCostAttributionBody { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::MonthlyCostAttributionAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 2d982481e..6c11d4d63 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,7 +23,24 @@ impl MonthlyCostAttributionMeta { pagination: None, } } + + pub fn aggregates( + &mut self, + value: Vec, + ) -> &mut Self { + self.aggregates = Some(value); + self + } + + pub fn pagination( + &mut self, + value: crate::datadogV2::model::MonthlyCostAttributionPagination, + ) -> &mut Self { + self.pagination = Some(value); + 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 235d8a20d..607f37a50 100644 --- a/src/datadogV2/model/model_monthly_cost_attribution_pagination.rs +++ b/src/datadogV2/model/model_monthly_cost_attribution_pagination.rs @@ -23,7 +23,13 @@ impl MonthlyCostAttributionPagination { next_record_id: None, } } + + 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 54994a11b..b30094732 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,7 +23,24 @@ impl MonthlyCostAttributionResponse { meta: None, } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn meta( + &mut self, + value: crate::datadogV2::model::MonthlyCostAttributionMeta, + ) -> &mut Self { + self.meta = Some(value); + self + } } + impl Default for MonthlyCostAttributionResponse { fn default() -> Self { Self::new() 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..744a1caa8 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 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..d497fb6ea 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 api_key(&mut self, value: String) -> &mut Self { + self.api_key = Some(value); + self + } + + pub fn client_id(&mut self, value: String) -> &mut Self { + self.client_id = Some(value); + 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_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..b9594b990 100644 --- a/src/datadogV2/model/model_okta_account_response.rs +++ b/src/datadogV2/model/model_okta_account_response.rs @@ -10,14 +10,20 @@ 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 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_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..ad83fc340 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 api_key(&mut self, value: String) -> &mut Self { + self.api_key = Some(value); + self + } + + pub fn client_id(&mut self, value: String) -> &mut Self { + self.client_id = Some(value); + 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 3ae3bd8e3..b9e430b45 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,7 +23,21 @@ impl OktaAccountUpdateRequestData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::OktaAccountUpdateRequestAttributes, + ) -> &mut Self { + self.attributes = Some(value); + 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 28ea8419f..2153f7be9 100644 --- a/src/datadogV2/model/model_okta_accounts_response.rs +++ b/src/datadogV2/model/model_okta_accounts_response.rs @@ -17,7 +17,16 @@ impl OktaAccountsResponse { pub fn new() -> OktaAccountsResponse { OktaAccountsResponse { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 7550d1abd..252a77704 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,7 +23,24 @@ impl OnDemandConcurrencyCap { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::OnDemandConcurrencyCapAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::OnDemandConcurrencyCapType, + ) -> &mut Self { + self.type_ = Some(value); + 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 4eff362ae..319a88aaa 100644 --- a/src/datadogV2/model/model_on_demand_concurrency_cap_attributes.rs +++ b/src/datadogV2/model/model_on_demand_concurrency_cap_attributes.rs @@ -19,7 +19,13 @@ impl OnDemandConcurrencyCapAttributes { on_demand_concurrency_cap: None, } } + + 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 c802bfed6..6c581029d 100644 --- a/src/datadogV2/model/model_on_demand_concurrency_cap_response.rs +++ b/src/datadogV2/model/model_on_demand_concurrency_cap_response.rs @@ -10,14 +10,20 @@ 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 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 7c19fb874..339d5937f 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 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..35f517191 100644 --- a/src/datadogV2/model/model_opsgenie_service_response_attributes.rs +++ b/src/datadogV2/model/model_opsgenie_service_response_attributes.rs @@ -31,7 +31,26 @@ impl OpsgenieServiceResponseAttributes { region: None, } } + + pub fn custom_url(&mut self, value: Option) -> &mut Self { + self.custom_url = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn region( + &mut self, + value: crate::datadogV2::model::OpsgenieServiceRegionType, + ) -> &mut Self { + self.region = Some(value); + self + } } + impl Default for OpsgenieServiceResponseAttributes { fn default() -> Self { Self::new() 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..062c4ed6e 100644 --- a/src/datadogV2/model/model_opsgenie_service_update_attributes.rs +++ b/src/datadogV2/model/model_opsgenie_service_update_attributes.rs @@ -35,7 +35,31 @@ impl OpsgenieServiceUpdateAttributes { region: None, } } + + pub fn custom_url(&mut self, value: Option) -> &mut Self { + self.custom_url = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn opsgenie_api_key(&mut self, value: String) -> &mut Self { + self.opsgenie_api_key = Some(value); + self + } + + pub fn region( + &mut self, + value: crate::datadogV2::model::OpsgenieServiceRegionType, + ) -> &mut Self { + self.region = Some(value); + self + } } + impl Default for OpsgenieServiceUpdateAttributes { fn default() -> Self { Self::new() 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..dbce909ed 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 attributes( + &mut self, + value: crate::datadogV2::model::OrganizationAttributes, + ) -> &mut Self { + self.attributes = Some(value); + 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 155defe2b..ea90f1a69 100644 --- a/src/datadogV2/model/model_organization_attributes.rs +++ b/src/datadogV2/model/model_organization_attributes.rs @@ -47,7 +47,48 @@ impl OrganizationAttributes { url: None, } } + + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn disabled(&mut self, value: bool) -> &mut Self { + self.disabled = Some(value); + self + } + + pub fn modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn sharing(&mut self, value: String) -> &mut Self { + self.sharing = Some(value); + 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 098999fad..07da4c3c2 100644 --- a/src/datadogV2/model/model_outcomes_batch_attributes.rs +++ b/src/datadogV2/model/model_outcomes_batch_attributes.rs @@ -17,7 +17,16 @@ impl OutcomesBatchAttributes { pub fn new() -> OutcomesBatchAttributes { OutcomesBatchAttributes { results: None } } + + pub fn results( + &mut self, + value: Vec, + ) -> &mut Self { + self.results = Some(value); + 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 96f7aa656..def0d0305 100644 --- a/src/datadogV2/model/model_outcomes_batch_request.rs +++ b/src/datadogV2/model/model_outcomes_batch_request.rs @@ -10,14 +10,20 @@ 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 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 df589e0f2..0fd1324ee 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,7 +23,21 @@ impl OutcomesBatchRequestData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::OutcomesBatchAttributes, + ) -> &mut Self { + self.attributes = Some(value); + 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 eb0210a61..63426e84c 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 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..cbe607ede 100644 --- a/src/datadogV2/model/model_outcomes_batch_response_attributes.rs +++ b/src/datadogV2/model/model_outcomes_batch_response_attributes.rs @@ -35,7 +35,33 @@ impl OutcomesBatchResponseAttributes { state: None, } } + + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn remarks(&mut self, value: String) -> &mut Self { + self.remarks = Some(value); + self + } + + pub fn service_name(&mut self, value: String) -> &mut Self { + self.service_name = Some(value); + 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 b2154fe64..22024009e 100644 --- a/src/datadogV2/model/model_outcomes_batch_response_meta.rs +++ b/src/datadogV2/model/model_outcomes_batch_response_meta.rs @@ -23,7 +23,18 @@ impl OutcomesBatchResponseMeta { total_updated: None, } } + + pub fn total_received(&mut self, value: i64) -> &mut Self { + self.total_received = Some(value); + 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 b78dad21e..900786ac7 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,7 +27,29 @@ impl OutcomesResponse { links: None, } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + 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 468031b3e..0a8c63e3b 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,7 +31,34 @@ impl OutcomesResponseDataItem { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::OutcomesBatchResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::RuleOutcomeRelationships, + ) -> &mut Self { + self.relationships = Some(value); + 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 d726a0e04..89780c7f2 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,7 +27,26 @@ impl OutcomesResponseIncludedItem { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::OutcomesResponseIncludedRuleAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 368bd8f7a..cc071e6aa 100644 --- a/src/datadogV2/model/model_outcomes_response_included_rule_attributes.rs +++ b/src/datadogV2/model/model_outcomes_response_included_rule_attributes.rs @@ -23,7 +23,18 @@ impl OutcomesResponseIncludedRuleAttributes { scorecard_name: None, } } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 d1d07ac33..e21358fcd 100644 --- a/src/datadogV2/model/model_outcomes_response_links.rs +++ b/src/datadogV2/model/model_outcomes_response_links.rs @@ -17,7 +17,13 @@ impl OutcomesResponseLinks { pub fn new() -> OutcomesResponseLinks { OutcomesResponseLinks { next: None } } + + 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 dbbe59bca..e5e97e1e1 100644 --- a/src/datadogV2/model/model_pagination.rs +++ b/src/datadogV2/model/model_pagination.rs @@ -23,7 +23,18 @@ impl Pagination { total_filtered_count: None, } } + + pub fn total_count(&mut self, value: i64) -> &mut Self { + self.total_count = Some(value); + 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 fb5d1aa35..dad1ec708 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,7 +31,34 @@ impl PartialAPIKey { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::PartialAPIKeyAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::APIKeyRelationships, + ) -> &mut Self { + self.relationships = Some(value); + 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 d35f1cb11..3f1860123 100644 --- a/src/datadogV2/model/model_partial_api_key_attributes.rs +++ b/src/datadogV2/model/model_partial_api_key_attributes.rs @@ -39,7 +39,38 @@ impl PartialAPIKeyAttributes { remote_config_read_enabled: None, } } + + pub fn category(&mut self, value: String) -> &mut Self { + self.category = Some(value); + self + } + + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn last4(&mut self, value: String) -> &mut Self { + self.last4 = Some(value); + self + } + + pub fn modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 3f3669948..5cc9c2541 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,7 +31,34 @@ impl PartialApplicationKey { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::PartialApplicationKeyAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::ApplicationKeyRelationships, + ) -> &mut Self { + self.relationships = Some(value); + 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 8977bb094..ad5e26e7e 100644 --- a/src/datadogV2/model/model_partial_application_key_attributes.rs +++ b/src/datadogV2/model/model_partial_application_key_attributes.rs @@ -31,7 +31,28 @@ impl PartialApplicationKeyAttributes { scopes: None, } } + + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn last4(&mut self, value: String) -> &mut Self { + self.last4 = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 f5bb88b44..ba9092e7d 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,7 +23,21 @@ impl PartialApplicationKeyResponse { included: None, } } + + pub fn data(&mut self, value: crate::datadogV2::model::PartialApplicationKey) -> &mut Self { + self.data = Some(value); + self + } + + pub fn included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + 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 f329df766..40857eac2 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 attributes( + &mut self, + value: crate::datadogV2::model::PermissionAttributes, + ) -> &mut Self { + self.attributes = Some(value); + 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 83f389f63..b3bfa0f98 100644 --- a/src/datadogV2/model/model_permission_attributes.rs +++ b/src/datadogV2/model/model_permission_attributes.rs @@ -43,7 +43,43 @@ impl PermissionAttributes { restricted: None, } } + + pub fn created(&mut self, value: String) -> &mut Self { + self.created = Some(value); + self + } + + pub fn description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn display_name(&mut self, value: String) -> &mut Self { + self.display_name = Some(value); + self + } + + pub fn display_type(&mut self, value: String) -> &mut Self { + self.display_type = Some(value); + self + } + + pub fn group_name(&mut self, value: String) -> &mut Self { + self.group_name = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 647b69245..6a2cd203e 100644 --- a/src/datadogV2/model/model_permissions_response.rs +++ b/src/datadogV2/model/model_permissions_response.rs @@ -17,7 +17,13 @@ impl PermissionsResponse { pub fn new() -> PermissionsResponse { PermissionsResponse { data: None } } + + 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 14bb8a591..a58109ae6 100644 --- a/src/datadogV2/model/model_powerpack.rs +++ b/src/datadogV2/model/model_powerpack.rs @@ -10,14 +10,20 @@ 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 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 ff311864d..ed740e51d 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 description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn 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..ceb6e9a17 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,7 +31,31 @@ impl PowerpackData { type_: None, } } + + pub fn attributes(&mut self, value: crate::datadogV2::model::PowerpackAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::PowerpackRelationships, + ) -> &mut Self { + self.relationships = Some(value); + 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 f0aaddbf5..d273b7b51 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 layout( + &mut self, + value: crate::datadogV2::model::PowerpackGroupWidgetLayout, + ) -> &mut Self { + self.layout = Some(value); + 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 ff20d1426..99ddddab1 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 show_title(&mut self, value: bool) -> &mut Self { + self.show_title = Some(value); + 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 f1fabe21f..70cf369d1 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 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..5084a27fc 100644 --- a/src/datadogV2/model/model_powerpack_relationships.rs +++ b/src/datadogV2/model/model_powerpack_relationships.rs @@ -10,14 +10,20 @@ 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 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 9c78ccbfd..ae02b21dc 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,7 +23,18 @@ impl PowerpackResponse { included: None, } } + + pub fn data(&mut self, value: crate::datadogV2::model::PowerpackData) -> &mut Self { + self.data = Some(value); + 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 d6a4ec8aa..db421a265 100644 --- a/src/datadogV2/model/model_powerpack_response_links.rs +++ b/src/datadogV2/model/model_powerpack_response_links.rs @@ -35,7 +35,33 @@ impl PowerpackResponseLinks { self_: None, } } + + pub fn first(&mut self, value: String) -> &mut Self { + self.first = Some(value); + self + } + + pub fn last(&mut self, value: Option) -> &mut Self { + self.last = Some(value); + self + } + + pub fn next(&mut self, value: String) -> &mut Self { + self.next = Some(value); + self + } + + pub fn prev(&mut self, value: Option) -> &mut Self { + self.prev = Some(value); + 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 005cd3b74..54e84334c 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 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..bc77a670a 100644 --- a/src/datadogV2/model/model_powerpacks_response_meta.rs +++ b/src/datadogV2/model/model_powerpacks_response_meta.rs @@ -10,14 +10,23 @@ 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 pagination( + &mut self, + value: crate::datadogV2::model::PowerpacksResponseMetaPagination, + ) -> &mut Self { + self.pagination = Some(value); + 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 d6371093f..4bc4aee03 100644 --- a/src/datadogV2/model/model_powerpacks_response_meta_pagination.rs +++ b/src/datadogV2/model/model_powerpacks_response_meta_pagination.rs @@ -51,7 +51,48 @@ impl PowerpacksResponseMetaPagination { type_: None, } } + + pub fn first_offset(&mut self, value: i64) -> &mut Self { + self.first_offset = Some(value); + self + } + + pub fn last_offset(&mut self, value: Option) -> &mut Self { + self.last_offset = Some(value); + self + } + + pub fn limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn next_offset(&mut self, value: i64) -> &mut Self { + self.next_offset = Some(value); + self + } + + pub fn offset(&mut self, value: i64) -> &mut Self { + self.offset = Some(value); + self + } + + pub fn prev_offset(&mut self, value: i64) -> &mut Self { + self.prev_offset = Some(value); + self + } + + pub fn total(&mut self, value: i64) -> &mut Self { + self.total = Some(value); + 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 a18e63544..f2396b5aa 100644 --- a/src/datadogV2/model/model_process_summaries_meta.rs +++ b/src/datadogV2/model/model_process_summaries_meta.rs @@ -10,14 +10,20 @@ 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 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 e82ab2efc..b961d87bd 100644 --- a/src/datadogV2/model/model_process_summaries_meta_page.rs +++ b/src/datadogV2/model/model_process_summaries_meta_page.rs @@ -24,7 +24,18 @@ impl ProcessSummariesMetaPage { size: None, } } + + pub fn after(&mut self, value: String) -> &mut Self { + self.after = Some(value); + 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 790eb9bb7..874cfa5f3 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,7 +23,18 @@ impl ProcessSummariesResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + 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 cb387befd..b9da1ae78 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,7 +27,26 @@ impl ProcessSummary { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::ProcessSummaryAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 a9f694976..acd68115a 100644 --- a/src/datadogV2/model/model_process_summary_attributes.rs +++ b/src/datadogV2/model/model_process_summary_attributes.rs @@ -47,7 +47,48 @@ impl ProcessSummaryAttributes { user: None, } } + + pub fn cmdline(&mut self, value: String) -> &mut Self { + self.cmdline = Some(value); + self + } + + pub fn host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn pid(&mut self, value: i64) -> &mut Self { + self.pid = Some(value); + self + } + + pub fn ppid(&mut self, value: i64) -> &mut Self { + self.ppid = Some(value); + self + } + + pub fn start(&mut self, value: String) -> &mut Self { + self.start = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn timestamp(&mut self, value: String) -> &mut Self { + self.timestamp = Some(value); + 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 8eed73235..38f2d4483 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,7 +27,26 @@ impl ProjectedCost { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::ProjectedCostAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 5b60fcf8e..ae860cb5c 100644 --- a/src/datadogV2/model/model_projected_cost_attributes.rs +++ b/src/datadogV2/model/model_projected_cost_attributes.rs @@ -39,7 +39,41 @@ impl ProjectedCostAttributes { region: None, } } + + pub fn charges( + &mut self, + value: Vec, + ) -> &mut Self { + self.charges = Some(value); + self + } + + pub fn date(&mut self, value: String) -> &mut Self { + self.date = Some(value); + self + } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn projected_total_cost(&mut self, value: f64) -> &mut Self { + self.projected_total_cost = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + 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 044ee3f2d..f27c21aa6 100644 --- a/src/datadogV2/model/model_projected_cost_response.rs +++ b/src/datadogV2/model/model_projected_cost_response.rs @@ -17,7 +17,13 @@ impl ProjectedCostResponse { pub fn new() -> ProjectedCostResponse { ProjectedCostResponse { data: None } } + + 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 9ee7eb1db..fad77d8d2 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 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..028e13e59 100644 --- a/src/datadogV2/model/model_relationship_to_outcome.rs +++ b/src/datadogV2/model/model_relationship_to_outcome.rs @@ -10,14 +10,20 @@ 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 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 9b5d04244..980c32cc7 100644 --- a/src/datadogV2/model/model_relationship_to_outcome_data.rs +++ b/src/datadogV2/model/model_relationship_to_outcome_data.rs @@ -23,7 +23,18 @@ impl RelationshipToOutcomeData { type_: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 5ad94ba51..7840b622a 100644 --- a/src/datadogV2/model/model_relationship_to_permission.rs +++ b/src/datadogV2/model/model_relationship_to_permission.rs @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: crate::datadogV2::model::RelationshipToPermissionData, + ) -> &mut Self { + self.data = Some(value); + 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 33315033b..045ce72a6 100644 --- a/src/datadogV2/model/model_relationship_to_permission_data.rs +++ b/src/datadogV2/model/model_relationship_to_permission_data.rs @@ -23,7 +23,18 @@ impl RelationshipToPermissionData { type_: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 85c2fbd11..13bc81ea5 100644 --- a/src/datadogV2/model/model_relationship_to_permissions.rs +++ b/src/datadogV2/model/model_relationship_to_permissions.rs @@ -17,7 +17,16 @@ impl RelationshipToPermissions { pub fn new() -> RelationshipToPermissions { RelationshipToPermissions { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 a175eabe0..0e20aab55 100644 --- a/src/datadogV2/model/model_relationship_to_role.rs +++ b/src/datadogV2/model/model_relationship_to_role.rs @@ -10,14 +10,20 @@ 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 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 55d8b6d3b..080b75ec1 100644 --- a/src/datadogV2/model/model_relationship_to_role_data.rs +++ b/src/datadogV2/model/model_relationship_to_role_data.rs @@ -23,7 +23,18 @@ impl RelationshipToRoleData { type_: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 cd9262fc5..f376cccd5 100644 --- a/src/datadogV2/model/model_relationship_to_roles.rs +++ b/src/datadogV2/model/model_relationship_to_roles.rs @@ -17,7 +17,16 @@ impl RelationshipToRoles { pub fn new() -> RelationshipToRoles { RelationshipToRoles { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 09a42079e..fd4d52182 100644 --- a/src/datadogV2/model/model_relationship_to_rule.rs +++ b/src/datadogV2/model/model_relationship_to_rule.rs @@ -10,14 +10,23 @@ 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 scorecard( + &mut self, + value: crate::datadogV2::model::RelationshipToRuleData, + ) -> &mut Self { + self.scorecard = Some(value); + 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 43acd780a..dff998650 100644 --- a/src/datadogV2/model/model_relationship_to_rule_data.rs +++ b/src/datadogV2/model/model_relationship_to_rule_data.rs @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: crate::datadogV2::model::RelationshipToRuleDataObject, + ) -> &mut Self { + self.data = Some(value); + 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 3fcbaa53b..190b0cd22 100644 --- a/src/datadogV2/model/model_relationship_to_rule_data_object.rs +++ b/src/datadogV2/model/model_relationship_to_rule_data_object.rs @@ -23,7 +23,18 @@ impl RelationshipToRuleDataObject { type_: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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_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..33a75d9bd 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,7 +23,21 @@ impl RelationshipToTeamLinks { links: None, } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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.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..46141a644 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,7 +23,21 @@ impl RelationshipToUserTeamPermission { links: None, } } + + pub fn data( + &mut self, + value: crate::datadogV2::model::RelationshipToUserTeamPermissionData, + ) -> &mut Self { + self.data = Some(value); + 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_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..a5f973ce3 100644 --- a/src/datadogV2/model/model_response_meta_attributes.rs +++ b/src/datadogV2/model/model_response_meta_attributes.rs @@ -10,14 +10,20 @@ 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 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_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..eda0d62ac 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,7 +60,66 @@ impl RetentionFilterAllAttributes { rate: None, } } + + pub fn created_at(&mut self, value: i64) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn created_by(&mut self, value: String) -> &mut Self { + self.created_by = Some(value); + self + } + + pub fn editable(&mut self, value: bool) -> &mut Self { + self.editable = Some(value); + self + } + + pub fn enabled(&mut self, value: bool) -> &mut Self { + self.enabled = Some(value); + self + } + + pub fn execution_order(&mut self, value: i64) -> &mut Self { + self.execution_order = Some(value); + self + } + + pub fn filter(&mut self, value: crate::datadogV2::model::SpansFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn filter_type( + &mut self, + value: crate::datadogV2::model::RetentionFilterAllType, + ) -> &mut Self { + self.filter_type = Some(value); + self + } + + pub fn modified_at(&mut self, value: i64) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn modified_by(&mut self, value: String) -> &mut Self { + self.modified_by = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 399893f34..aaabad3be 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,7 +60,66 @@ impl RetentionFilterAttributes { rate: None, } } + + pub fn created_at(&mut self, value: i64) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn created_by(&mut self, value: String) -> &mut Self { + self.created_by = Some(value); + self + } + + pub fn editable(&mut self, value: bool) -> &mut Self { + self.editable = Some(value); + self + } + + pub fn enabled(&mut self, value: bool) -> &mut Self { + self.enabled = Some(value); + self + } + + pub fn execution_order(&mut self, value: i64) -> &mut Self { + self.execution_order = Some(value); + self + } + + pub fn filter(&mut self, value: crate::datadogV2::model::SpansFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn filter_type( + &mut self, + value: crate::datadogV2::model::RetentionFilterType, + ) -> &mut Self { + self.filter_type = Some(value); + self + } + + pub fn modified_at(&mut self, value: i64) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn modified_by(&mut self, value: String) -> &mut Self { + self.modified_by = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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_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..b93694ce1 100644 --- a/src/datadogV2/model/model_retention_filter_response.rs +++ b/src/datadogV2/model/model_retention_filter_response.rs @@ -10,14 +10,20 @@ 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 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_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..0142939fc 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 attributes(&mut self, value: crate::datadogV2::model::RoleAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn 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..319e9af03 100644 --- a/src/datadogV2/model/model_role_attributes.rs +++ b/src/datadogV2/model/model_role_attributes.rs @@ -31,7 +31,28 @@ impl RoleAttributes { user_count: None, } } + + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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_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..40c53156d 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 created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + 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 59475842d..2576c1cab 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 relationships( + &mut self, + value: crate::datadogV2::model::RoleRelationships, + ) -> &mut Self { + self.relationships = Some(value); + 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_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..70d0b2684 100644 --- a/src/datadogV2/model/model_role_create_response.rs +++ b/src/datadogV2/model/model_role_create_response.rs @@ -10,14 +10,20 @@ 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 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 570f9b201..866c4e850 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 attributes( + &mut self, + value: crate::datadogV2::model::RoleCreateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn 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..ab621caed 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,7 +23,21 @@ impl RoleRelationships { users: None, } } + + pub fn permissions( + &mut self, + value: crate::datadogV2::model::RelationshipToPermissions, + ) -> &mut Self { + self.permissions = Some(value); + 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 5b3fc9911..cac75bd80 100644 --- a/src/datadogV2/model/model_role_response.rs +++ b/src/datadogV2/model/model_role_response.rs @@ -10,14 +10,20 @@ 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 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 730ac8fe3..f08734c53 100644 --- a/src/datadogV2/model/model_role_response_relationships.rs +++ b/src/datadogV2/model/model_role_response_relationships.rs @@ -10,14 +10,23 @@ 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 permissions( + &mut self, + value: crate::datadogV2::model::RelationshipToPermissions, + ) -> &mut Self { + self.permissions = Some(value); + 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 99e1e92b7..45d72e704 100644 --- a/src/datadogV2/model/model_role_update_attributes.rs +++ b/src/datadogV2/model/model_role_update_attributes.rs @@ -27,7 +27,23 @@ impl RoleUpdateAttributes { name: None, } } + + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + 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 73823c007..add78aa50 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 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..a71f6f37b 100644 --- a/src/datadogV2/model/model_role_update_response.rs +++ b/src/datadogV2/model/model_role_update_response.rs @@ -10,14 +10,20 @@ 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 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 ac5728afd..7b98747a9 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 attributes( + &mut self, + value: crate::datadogV2::model::RoleUpdateAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn 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..9f5fa5e71 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,7 +23,18 @@ impl RolesResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + 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 87dfef588..f314efdf3 100644 --- a/src/datadogV2/model/model_rule_attributes.rs +++ b/src/datadogV2/model/model_rule_attributes.rs @@ -53,7 +53,62 @@ impl RuleAttributes { scorecard_name: None, } } + + #[allow(deprecated)] + pub fn category(&mut self, value: String) -> &mut Self { + self.category = Some(value); + self + } + + #[allow(deprecated)] + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + #[allow(deprecated)] + pub fn custom(&mut self, value: bool) -> &mut Self { + self.custom = Some(value); + self + } + + #[allow(deprecated)] + pub fn description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + #[allow(deprecated)] + pub fn enabled(&mut self, value: bool) -> &mut Self { + self.enabled = Some(value); + self + } + + #[allow(deprecated)] + pub fn modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + #[allow(deprecated)] + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + #[allow(deprecated)] + pub fn owner(&mut self, value: String) -> &mut Self { + self.owner = Some(value); + self + } + + #[allow(deprecated)] + 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 8179c9582..d306719ae 100644 --- a/src/datadogV2/model/model_rule_outcome_relationships.rs +++ b/src/datadogV2/model/model_rule_outcome_relationships.rs @@ -10,14 +10,20 @@ 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 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 a475e14de..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 @@ -23,7 +23,18 @@ impl RUMAggregateBucketValueTimeseriesPoint { value: None, } } + + pub fn time(&mut self, value: String) -> &mut Self { + self.time = Some(value); + 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 a33b3300e..8ca93cb72 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,7 +36,33 @@ impl RUMAggregateRequest { page: None, } } + + pub fn compute(&mut self, value: Vec) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn filter(&mut self, value: crate::datadogV2::model::RUMQueryFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn group_by(&mut self, value: Vec) -> &mut Self { + self.group_by = Some(value); + self + } + + pub fn options(&mut self, value: crate::datadogV2::model::RUMQueryOptions) -> &mut Self { + self.options = Some(value); + 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 a1c9f0a03..75623f39e 100644 --- a/src/datadogV2/model/model_rum_aggregate_sort.rs +++ b/src/datadogV2/model/model_rum_aggregate_sort.rs @@ -31,7 +31,31 @@ impl RUMAggregateSort { type_: None, } } + + pub fn aggregation( + &mut self, + value: crate::datadogV2::model::RUMAggregationFunction, + ) -> &mut Self { + self.aggregation = Some(value); + self + } + + pub fn metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn order(&mut self, value: crate::datadogV2::model::RUMSortOrder) -> &mut Self { + self.order = Some(value); + 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 fcd5d6bbf..64e91f129 100644 --- a/src/datadogV2/model/model_rum_aggregation_buckets_response.rs +++ b/src/datadogV2/model/model_rum_aggregation_buckets_response.rs @@ -17,7 +17,13 @@ impl RUMAggregationBucketsResponse { pub fn new() -> RUMAggregationBucketsResponse { RUMAggregationBucketsResponse { buckets: None } } + + 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 5f71bb132..61356dd66 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,7 +27,26 @@ impl RUMAnalyticsAggregateResponse { meta: None, } } + + pub fn data( + &mut self, + value: crate::datadogV2::model::RUMAggregationBucketsResponse, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn links(&mut self, value: crate::datadogV2::model::RUMResponseLinks) -> &mut Self { + self.links = Some(value); + 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.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..412eef8af 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 hash(&mut self, value: String) -> &mut Self { + self.hash = Some(value); + 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.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..fe2a1ac00 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 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..b49dd8cee 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 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..42383997a 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 hash(&mut self, value: String) -> &mut Self { + self.hash = Some(value); + 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 87b704c79..304d77839 100644 --- a/src/datadogV2/model/model_rum_application_response.rs +++ b/src/datadogV2/model/model_rum_application_response.rs @@ -10,14 +10,20 @@ 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 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 be5da2dbb..53e8e7167 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 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..4dc9b9928 100644 --- a/src/datadogV2/model/model_rum_application_update_attributes.rs +++ b/src/datadogV2/model/model_rum_application_update_attributes.rs @@ -23,7 +23,18 @@ impl RUMApplicationUpdateAttributes { type_: None, } } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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_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..7f303c2be 100644 --- a/src/datadogV2/model/model_rum_applications_response.rs +++ b/src/datadogV2/model/model_rum_applications_response.rs @@ -17,7 +17,13 @@ impl RUMApplicationsResponse { pub fn new() -> RUMApplicationsResponse { RUMApplicationsResponse { data: None } } + + 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 7a938d81b..e0df78309 100644 --- a/src/datadogV2/model/model_rum_bucket_response.rs +++ b/src/datadogV2/model/model_rum_bucket_response.rs @@ -25,7 +25,21 @@ impl RUMBucketResponse { computes: None, } } + + pub fn by(&mut self, value: std::collections::BTreeMap) -> &mut Self { + self.by = Some(value); + self + } + + pub fn computes( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.computes = Some(value); + 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 885b1fa40..6def54019 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 interval(&mut self, value: String) -> &mut Self { + self.interval = Some(value); + self + } + + pub fn metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + 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 174df60ca..da75ad45f 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,7 +27,23 @@ impl RUMEvent { type_: None, } } + + pub fn attributes(&mut self, value: crate::datadogV2::model::RUMEventAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 a37b4cf4a..8d8b0ae03 100644 --- a/src/datadogV2/model/model_rum_event_attributes.rs +++ b/src/datadogV2/model/model_rum_event_attributes.rs @@ -33,7 +33,31 @@ impl RUMEventAttributes { timestamp: None, } } + + pub fn attributes( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn service(&mut self, value: String) -> &mut Self { + self.service = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + 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 66ecb35df..3e3ad1ffe 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,7 +27,23 @@ impl RUMEventsResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn links(&mut self, value: crate::datadogV2::model::RUMResponseLinks) -> &mut Self { + self.links = Some(value); + 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 6023f0d61..ec66cc68f 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,29 @@ impl RUMGroupBy { total: None, } } + + pub fn histogram(&mut self, value: crate::datadogV2::model::RUMGroupByHistogram) -> &mut Self { + self.histogram = Some(value); + self + } + + pub fn limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn missing(&mut self, value: crate::datadogV2::model::RUMGroupByMissing) -> &mut Self { + self.missing = Some(value); + self + } + + pub fn sort(&mut self, value: crate::datadogV2::model::RUMAggregateSort) -> &mut Self { + self.sort = Some(value); + 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 7c3c80df4..958236814 100644 --- a/src/datadogV2/model/model_rum_query_filter.rs +++ b/src/datadogV2/model/model_rum_query_filter.rs @@ -27,7 +27,23 @@ impl RUMQueryFilter { to: None, } } + + pub fn from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + self + } + + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + 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 444314639..52cd57d6e 100644 --- a/src/datadogV2/model/model_rum_query_options.rs +++ b/src/datadogV2/model/model_rum_query_options.rs @@ -24,7 +24,18 @@ impl RUMQueryOptions { timezone: None, } } + + pub fn time_offset(&mut self, value: i64) -> &mut Self { + self.time_offset = Some(value); + 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 c8fed96a4..76a46cf29 100644 --- a/src/datadogV2/model/model_rum_query_page_options.rs +++ b/src/datadogV2/model/model_rum_query_page_options.rs @@ -23,7 +23,18 @@ impl RUMQueryPageOptions { limit: None, } } + + pub fn cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + 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 d2ad2ebc1..a62a75d77 100644 --- a/src/datadogV2/model/model_rum_response_links.rs +++ b/src/datadogV2/model/model_rum_response_links.rs @@ -18,7 +18,13 @@ impl RUMResponseLinks { pub fn new() -> RUMResponseLinks { RUMResponseLinks { next: None } } + + 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 469a2d111..e4f8022d4 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,7 +36,33 @@ impl RUMResponseMetadata { warnings: None, } } + + pub fn elapsed(&mut self, value: i64) -> &mut Self { + self.elapsed = Some(value); + self + } + + pub fn page(&mut self, value: crate::datadogV2::model::RUMResponsePage) -> &mut Self { + self.page = Some(value); + self + } + + pub fn request_id(&mut self, value: String) -> &mut Self { + self.request_id = Some(value); + self + } + + pub fn status(&mut self, value: crate::datadogV2::model::RUMResponseStatus) -> &mut Self { + self.status = Some(value); + 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 1b6da731d..3dedc328e 100644 --- a/src/datadogV2/model/model_rum_response_page.rs +++ b/src/datadogV2/model/model_rum_response_page.rs @@ -17,7 +17,13 @@ impl RUMResponsePage { pub fn new() -> RUMResponsePage { RUMResponsePage { after: None } } + + 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 e825e4303..3a4aaa98d 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,7 +32,28 @@ impl RUMSearchEventsRequest { sort: None, } } + + pub fn filter(&mut self, value: crate::datadogV2::model::RUMQueryFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn options(&mut self, value: crate::datadogV2::model::RUMQueryOptions) -> &mut Self { + self.options = Some(value); + self + } + + pub fn page(&mut self, value: crate::datadogV2::model::RUMQueryPageOptions) -> &mut Self { + self.page = Some(value); + 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 9b1f92132..5df185c92 100644 --- a/src/datadogV2/model/model_rum_warning.rs +++ b/src/datadogV2/model/model_rum_warning.rs @@ -27,7 +27,23 @@ impl RUMWarning { title: None, } } + + pub fn code(&mut self, value: String) -> &mut Self { + self.code = Some(value); + self + } + + pub fn detail(&mut self, value: String) -> &mut Self { + self.detail = Some(value); + 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 01c96c017..8adc09d8c 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 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..bdb2c9d87 100644 --- a/src/datadogV2/model/model_saml_assertion_attribute_attributes.rs +++ b/src/datadogV2/model/model_saml_assertion_attribute_attributes.rs @@ -23,7 +23,18 @@ impl SAMLAssertionAttributeAttributes { attribute_value: None, } } + + pub fn attribute_key(&mut self, value: String) -> &mut Self { + self.attribute_key = Some(value); + 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_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..cb13c0b23 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,7 +23,18 @@ impl ScalarFormulaQueryResponse { errors: None, } } + + pub fn data(&mut self, value: crate::datadogV2::model::ScalarResponse) -> &mut Self { + self.data = Some(value); + 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.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..931ba516e 100644 --- a/src/datadogV2/model/model_scalar_formula_request_attributes.rs +++ b/src/datadogV2/model/model_scalar_formula_request_attributes.rs @@ -35,4 +35,9 @@ impl ScalarFormulaRequestAttributes { to, } } + + 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 335df8a57..a19aac5e5 100644 --- a/src/datadogV2/model/model_scalar_formula_response_atrributes.rs +++ b/src/datadogV2/model/model_scalar_formula_response_atrributes.rs @@ -17,7 +17,13 @@ impl ScalarFormulaResponseAtrributes { pub fn new() -> ScalarFormulaResponseAtrributes { ScalarFormulaResponseAtrributes { columns: None } } + + 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 1434bb880..c8d49a22c 100644 --- a/src/datadogV2/model/model_scalar_meta.rs +++ b/src/datadogV2/model/model_scalar_meta.rs @@ -20,7 +20,13 @@ impl ScalarMeta { pub fn new() -> ScalarMeta { ScalarMeta { unit: None } } + + 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_response.rs b/src/datadogV2/model/model_scalar_response.rs index 99313c07c..83ae70770 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,7 +23,24 @@ impl ScalarResponse { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::ScalarFormulaResponseAtrributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::ScalarFormulaResponseType, + ) -> &mut Self { + self.type_ = Some(value); + 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 4180c3a4d..2335ab08e 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,7 +27,26 @@ impl SecurityFilter { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::SecurityFilterAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 1c0fc27fb..0a83225db 100644 --- a/src/datadogV2/model/model_security_filter_attributes.rs +++ b/src/datadogV2/model/model_security_filter_attributes.rs @@ -44,7 +44,49 @@ impl SecurityFilterAttributes { version: None, } } + + pub fn exclusion_filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.exclusion_filters = Some(value); + self + } + + pub fn filtered_data_type( + &mut self, + value: crate::datadogV2::model::SecurityFilterFilteredDataType, + ) -> &mut Self { + self.filtered_data_type = Some(value); + self + } + + pub fn is_builtin(&mut self, value: bool) -> &mut Self { + self.is_builtin = Some(value); + self + } + + pub fn is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + 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_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..1268dae7f 100644 --- a/src/datadogV2/model/model_security_filter_exclusion_filter_response.rs +++ b/src/datadogV2/model/model_security_filter_exclusion_filter_response.rs @@ -23,7 +23,18 @@ impl SecurityFilterExclusionFilterResponse { query: None, } } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 3b26e5297..37601c371 100644 --- a/src/datadogV2/model/model_security_filter_meta.rs +++ b/src/datadogV2/model/model_security_filter_meta.rs @@ -17,7 +17,13 @@ impl SecurityFilterMeta { pub fn new() -> SecurityFilterMeta { SecurityFilterMeta { warning: None } } + + 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 baaf019f2..0b26bf608 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,7 +23,18 @@ impl SecurityFilterResponse { meta: None, } } + + pub fn data(&mut self, value: crate::datadogV2::model::SecurityFilter) -> &mut Self { + self.data = Some(value); + 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 369dd97b7..adae7e4fc 100644 --- a/src/datadogV2/model/model_security_filter_update_attributes.rs +++ b/src/datadogV2/model/model_security_filter_update_attributes.rs @@ -39,7 +39,44 @@ impl SecurityFilterUpdateAttributes { version: None, } } + + pub fn exclusion_filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.exclusion_filters = Some(value); + self + } + + pub fn filtered_data_type( + &mut self, + value: crate::datadogV2::model::SecurityFilterFilteredDataType, + ) -> &mut Self { + self.filtered_data_type = Some(value); + self + } + + pub fn is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + 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_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..f419124a5 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,7 +23,18 @@ impl SecurityFiltersResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + 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 1c706189a..5ca84ae0d 100644 --- a/src/datadogV2/model/model_security_monitoring_filter.rs +++ b/src/datadogV2/model/model_security_monitoring_filter.rs @@ -23,7 +23,21 @@ impl SecurityMonitoringFilter { query: None, } } + + pub fn action( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringFilterAction, + ) -> &mut Self { + self.action = Some(value); + 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 60b8df35e..d53a65ef6 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,7 +23,21 @@ impl SecurityMonitoringListRulesResponse { meta: None, } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 91cc1a0db..e67be92e0 100644 --- a/src/datadogV2/model/model_security_monitoring_rule_case.rs +++ b/src/datadogV2/model/model_security_monitoring_rule_case.rs @@ -32,7 +32,31 @@ impl SecurityMonitoringRuleCase { status: None, } } + + pub fn condition(&mut self, value: String) -> &mut Self { + self.condition = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn notifications(&mut self, value: Vec) -> &mut Self { + self.notifications = Some(value); + self + } + + pub fn status( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleSeverity, + ) -> &mut Self { + self.status = Some(value); + 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 e1e88f038..b616d4bed 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 condition(&mut self, value: String) -> &mut Self { + self.condition = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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_impossible_travel_options.rs b/src/datadogV2/model/model_security_monitoring_rule_impossible_travel_options.rs index 2175f6a37..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 @@ -20,7 +20,13 @@ impl SecurityMonitoringRuleImpossibleTravelOptions { baseline_user_locations: None, } } + + 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 6843849a3..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 @@ -36,7 +36,40 @@ impl SecurityMonitoringRuleNewValueOptions { learning_threshold: None, } } + + pub fn forget_after( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleNewValueOptionsForgetAfter, + ) -> &mut Self { + self.forget_after = Some(value); + self + } + + pub fn learning_duration( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleNewValueOptionsLearningDuration, + ) -> &mut Self { + self.learning_duration = Some(value); + self + } + + pub fn learning_method( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleNewValueOptionsLearningMethod, + ) -> &mut Self { + self.learning_method = Some(value); + self + } + + pub fn learning_threshold( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleNewValueOptionsLearningThreshold, + ) -> &mut Self { + self.learning_threshold = Some(value); + 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 36b79aaef..fdcdc4b10 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,7 +67,85 @@ impl SecurityMonitoringRuleOptions { third_party_rule_options: None, } } + + pub fn compliance_rule_options( + &mut self, + value: crate::datadogV2::model::CloudConfigurationComplianceRuleOptions, + ) -> &mut Self { + self.compliance_rule_options = Some(value); + 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 detection_method( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleDetectionMethod, + ) -> &mut Self { + self.detection_method = Some(value); + self + } + + pub fn evaluation_window( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleEvaluationWindow, + ) -> &mut Self { + self.evaluation_window = Some(value); + self + } + + pub fn hardcoded_evaluator_type( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleHardcodedEvaluatorType, + ) -> &mut Self { + self.hardcoded_evaluator_type = Some(value); + self + } + + pub fn impossible_travel_options( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleImpossibleTravelOptions, + ) -> &mut Self { + self.impossible_travel_options = Some(value); + self + } + + pub fn keep_alive( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleKeepAlive, + ) -> &mut Self { + self.keep_alive = Some(value); + self + } + + pub fn max_signal_duration( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleMaxSignalDuration, + ) -> &mut Self { + self.max_signal_duration = Some(value); + self + } + + pub fn new_value_options( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleNewValueOptions, + ) -> &mut Self { + self.new_value_options = Some(value); + self + } + + pub fn 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 { Self::new() 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..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 @@ -31,7 +31,34 @@ impl SecurityMonitoringRuleThirdPartyOptions { signal_title_template: None, } } + + pub fn default_notifications(&mut self, value: Vec) -> &mut Self { + self.default_notifications = Some(value); + self + } + + pub fn default_status( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleSeverity, + ) -> &mut Self { + self.default_status = Some(value); + self + } + + pub fn root_queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.root_queries = Some(value); + 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 0eb9e034f..caafce001 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,7 +65,86 @@ impl SecurityMonitoringRuleUpdatePayload { version: None, } } + + pub fn cases( + &mut self, + value: Vec, + ) -> &mut Self { + self.cases = Some(value); + self + } + + pub fn compliance_signal_options( + &mut self, + value: crate::datadogV2::model::CloudConfigurationRuleComplianceSignalOptions, + ) -> &mut Self { + self.compliance_signal_options = Some(value); + self + } + + pub fn filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.filters = Some(value); + self + } + + pub fn has_extended_title(&mut self, value: bool) -> &mut Self { + self.has_extended_title = Some(value); + self + } + + pub fn is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn options( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleOptions, + ) -> &mut Self { + self.options = Some(value); + self + } + + pub fn queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn third_party_cases( + &mut self, + value: Vec, + ) -> &mut Self { + self.third_party_cases = Some(value); + 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 233c986ef..b1cc8a602 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,7 +28,29 @@ impl SecurityMonitoringSignal { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalType, + ) -> &mut Self { + self.type_ = Some(value); + 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 5f2c5f897..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 @@ -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 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..02e97b639 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_attributes.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_attributes.rs @@ -35,7 +35,31 @@ impl SecurityMonitoringSignalAttributes { additional_properties: std::collections::BTreeMap::new(), } } + + pub fn custom( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.custom = Some(value); + self + } + + pub fn message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + 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 50d077f70..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 @@ -23,4 +23,9 @@ impl SecurityMonitoringSignalIncidentsUpdateAttributes { version: None, } } + + pub fn 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..220a5df5a 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,7 +27,32 @@ impl SecurityMonitoringSignalListRequest { sort: None, } } + + pub fn filter( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalListRequestFilter, + ) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn page( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalListRequestPage, + ) -> &mut Self { + self.page = Some(value); + self + } + + pub fn sort( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalsSort, + ) -> &mut Self { + self.sort = Some(value); + 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 1f6f17408..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 @@ -27,7 +27,23 @@ impl SecurityMonitoringSignalListRequestFilter { to: None, } } + + pub fn from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + self + } + + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + 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 6d4b09ac6..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 @@ -23,7 +23,18 @@ impl SecurityMonitoringSignalListRequestPage { limit: None, } } + + pub fn cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + 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 b8a0109e0..2989eeafc 100644 --- a/src/datadogV2/model/model_security_monitoring_signal_response.rs +++ b/src/datadogV2/model/model_security_monitoring_signal_response.rs @@ -10,14 +10,20 @@ 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 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 9925f1cf5..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 @@ -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 filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.filters = Some(value); + self + } + + pub fn has_extended_title(&mut self, value: bool) -> &mut Self { + self.has_extended_title = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn 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..458bda295 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 aggregation( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleQueryAggregation, + ) -> &mut Self { + self.aggregation = Some(value); + self + } + + pub fn correlated_by_fields(&mut self, value: Vec) -> &mut Self { + self.correlated_by_fields = Some(value); + self + } + + pub fn correlated_query_index(&mut self, value: i32) -> &mut Self { + self.correlated_query_index = Some(value); + self + } + + pub fn metrics(&mut self, value: Vec) -> &mut Self { + self.metrics = Some(value); + 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 de2b76363..8f25905a2 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,7 +87,113 @@ impl SecurityMonitoringSignalRuleResponse { version: None, } } + + pub fn cases( + &mut self, + value: Vec, + ) -> &mut Self { + self.cases = Some(value); + self + } + + pub fn created_at(&mut self, value: i64) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn creation_author_id(&mut self, value: i64) -> &mut Self { + self.creation_author_id = Some(value); + self + } + + pub fn deprecation_date(&mut self, value: i64) -> &mut Self { + self.deprecation_date = Some(value); + self + } + + pub fn filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.filters = Some(value); + self + } + + pub fn has_extended_title(&mut self, value: bool) -> &mut Self { + self.has_extended_title = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn is_default(&mut self, value: bool) -> &mut Self { + self.is_default = Some(value); + self + } + + pub fn is_deleted(&mut self, value: bool) -> &mut Self { + self.is_deleted = Some(value); + self + } + + pub fn is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn options( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleOptions, + ) -> &mut Self { + self.options = Some(value); + self + } + + pub fn queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalRuleType, + ) -> &mut Self { + self.type_ = Some(value); + self + } + + pub fn update_author_id(&mut self, value: i64) -> &mut Self { + self.update_author_id = Some(value); + 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 a6bacabc8..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 @@ -51,7 +51,56 @@ impl SecurityMonitoringSignalRuleResponseQuery { rule_id: None, } } + + pub fn aggregation( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleQueryAggregation, + ) -> &mut Self { + self.aggregation = Some(value); + self + } + + pub fn correlated_by_fields(&mut self, value: Vec) -> &mut Self { + self.correlated_by_fields = Some(value); + self + } + + pub fn correlated_query_index(&mut self, value: i32) -> &mut Self { + self.correlated_query_index = Some(value); + self + } + + pub fn default_rule_id(&mut self, value: String) -> &mut Self { + self.default_rule_id = Some(value); + self + } + + pub fn distinct_fields(&mut self, value: Vec) -> &mut Self { + self.distinct_fields = Some(value); + self + } + + pub fn group_by_fields(&mut self, value: Vec) -> &mut Self { + self.group_by_fields = Some(value); + self + } + + pub fn metrics(&mut self, value: Vec) -> &mut Self { + self.metrics = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 e81910d66..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 @@ -33,4 +33,22 @@ impl SecurityMonitoringSignalStateUpdateAttributes { version: None, } } + + pub fn archive_comment(&mut self, value: String) -> &mut Self { + self.archive_comment = Some(value); + self + } + + pub fn archive_reason( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalArchiveReason, + ) -> &mut Self { + self.archive_reason = Some(value); + 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 3ebc2340b..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 @@ -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 id(&mut self, value: serde_json::Value) -> &mut Self { + self.id = Some(value); + self + } + + pub fn 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..fd132a6d7 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 archive_comment(&mut self, value: String) -> &mut Self { + self.archive_comment = Some(value); + self + } + + pub fn archive_comment_timestamp(&mut self, value: i64) -> &mut Self { + self.archive_comment_timestamp = Some(value); + self + } + + pub fn archive_comment_user( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringTriageUser, + ) -> &mut Self { + self.archive_comment_user = Some(value); + self + } + + pub fn archive_reason( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalArchiveReason, + ) -> &mut Self { + self.archive_reason = Some(value); + self + } + + pub fn state_update_timestamp(&mut self, value: i64) -> &mut Self { + self.state_update_timestamp = Some(value); + self + } + + pub fn 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..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 @@ -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,7 +27,29 @@ impl SecurityMonitoringSignalTriageUpdateData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalTriageAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalMetadataType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } + impl Default for SecurityMonitoringSignalTriageUpdateData { fn default() -> Self { Self::new() 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..f50b91c97 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,7 +28,32 @@ impl SecurityMonitoringSignalsListResponse { meta: None, } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn links( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalsListResponseLinks, + ) -> &mut Self { + self.links = Some(value); + self + } + + pub fn meta( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalsListResponseMeta, + ) -> &mut Self { + self.meta = Some(value); + 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 1c23c4e07..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 @@ -18,7 +18,13 @@ impl SecurityMonitoringSignalsListResponseLinks { pub fn new() -> SecurityMonitoringSignalsListResponseLinks { SecurityMonitoringSignalsListResponseLinks { next: None } } + + 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 0eaa139bb..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 @@ -10,14 +10,23 @@ 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 page( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringSignalsListResponseMetaPage, + ) -> &mut Self { + self.page = Some(value); + 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 ffc4e7f55..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 @@ -18,7 +18,13 @@ impl SecurityMonitoringSignalsListResponseMetaPage { pub fn new() -> SecurityMonitoringSignalsListResponseMetaPage { SecurityMonitoringSignalsListResponseMetaPage { after: None } } + + 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 b722be536..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 @@ -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 filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.filters = Some(value); + self + } + + pub fn has_extended_title(&mut self, value: bool) -> &mut Self { + self.has_extended_title = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn third_party_cases( + &mut self, + value: Vec, + ) -> &mut Self { + self.third_party_cases = Some(value); + self + } + + pub fn 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..1326a1ec5 100644 --- a/src/datadogV2/model/model_security_monitoring_standard_rule_query.rs +++ b/src/datadogV2/model/model_security_monitoring_standard_rule_query.rs @@ -50,7 +50,59 @@ impl SecurityMonitoringStandardRuleQuery { query: None, } } + + #[allow(deprecated)] + pub fn aggregation( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleQueryAggregation, + ) -> &mut Self { + self.aggregation = Some(value); + self + } + + #[allow(deprecated)] + pub fn distinct_fields(&mut self, value: Vec) -> &mut Self { + self.distinct_fields = Some(value); + self + } + + #[allow(deprecated)] + pub fn group_by_fields(&mut self, value: Vec) -> &mut Self { + self.group_by_fields = Some(value); + self + } + + #[allow(deprecated)] + 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 metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + #[allow(deprecated)] + pub fn metrics(&mut self, value: Vec) -> &mut Self { + self.metrics = Some(value); + self + } + + #[allow(deprecated)] + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + #[allow(deprecated)] + 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 fee3d269e..b4970be12 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,7 +97,129 @@ impl SecurityMonitoringStandardRuleResponse { version: None, } } + + pub fn cases( + &mut self, + value: Vec, + ) -> &mut Self { + self.cases = Some(value); + self + } + + pub fn compliance_signal_options( + &mut self, + value: crate::datadogV2::model::CloudConfigurationRuleComplianceSignalOptions, + ) -> &mut Self { + self.compliance_signal_options = Some(value); + self + } + + pub fn created_at(&mut self, value: i64) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn creation_author_id(&mut self, value: i64) -> &mut Self { + self.creation_author_id = Some(value); + self + } + + pub fn deprecation_date(&mut self, value: i64) -> &mut Self { + self.deprecation_date = Some(value); + self + } + + pub fn filters( + &mut self, + value: Vec, + ) -> &mut Self { + self.filters = Some(value); + self + } + + pub fn has_extended_title(&mut self, value: bool) -> &mut Self { + self.has_extended_title = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn is_default(&mut self, value: bool) -> &mut Self { + self.is_default = Some(value); + self + } + + pub fn is_deleted(&mut self, value: bool) -> &mut Self { + self.is_deleted = Some(value); + self + } + + pub fn is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn message(&mut self, value: String) -> &mut Self { + self.message = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn options( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleOptions, + ) -> &mut Self { + self.options = Some(value); + self + } + + pub fn queries( + &mut self, + value: Vec, + ) -> &mut Self { + self.queries = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn third_party_cases( + &mut self, + value: Vec, + ) -> &mut Self { + self.third_party_cases = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleTypeRead, + ) -> &mut Self { + self.type_ = Some(value); + self + } + + pub fn update_author_id(&mut self, value: i64) -> &mut Self { + self.update_author_id = Some(value); + 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 af716ae44..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 @@ -23,7 +23,18 @@ impl SecurityMonitoringThirdPartyRootQuery { query: None, } } + + pub fn group_by_fields(&mut self, value: Vec) -> &mut Self { + self.group_by_fields = Some(value); + 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 115d56912..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 @@ -31,7 +31,31 @@ impl SecurityMonitoringThirdPartyRuleCase { status: None, } } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn notifications(&mut self, value: Vec) -> &mut Self { + self.notifications = Some(value); + self + } + + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + self + } + + pub fn status( + &mut self, + value: crate::datadogV2::model::SecurityMonitoringRuleSeverity, + ) -> &mut Self { + self.status = Some(value); + 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 f1614d102..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 @@ -33,4 +33,19 @@ impl SecurityMonitoringThirdPartyRuleCaseCreate { status, } } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn notifications(&mut self, value: Vec) -> &mut Self { + self.notifications = Some(value); + 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 e5700cb31..79f2e2637 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 handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + self + } + + pub fn icon(&mut self, value: String) -> &mut Self { + self.icon = Some(value); + self + } + + pub fn id(&mut self, value: i64) -> &mut Self { + self.id = Some(value); + 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_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..e0483f771 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_configuration.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_configuration.rs @@ -23,7 +23,21 @@ impl SensitiveDataScannerConfiguration { type_: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerConfigurationType, + ) -> &mut Self { + self.type_ = Some(value); + 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 1ba29354c..c528eba5f 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_configuration_data.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_configuration_data.rs @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerConfiguration, + ) -> &mut Self { + self.data = Some(value); + 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 0bfc62ae6..73ef2def5 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_configuration_relationships.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_configuration_relationships.rs @@ -10,14 +10,23 @@ 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 groups( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupList, + ) -> &mut Self { + self.groups = Some(value); + 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 21765aeed..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 @@ -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,7 +23,24 @@ impl SensitiveDataScannerCreateGroupResponse { meta: None, } } + + pub fn data( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupResponse, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn meta( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, + ) -> &mut Self { + self.meta = Some(value); + 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 509577d20..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 @@ -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,7 +23,24 @@ impl SensitiveDataScannerCreateRuleResponse { meta: None, } } + + pub fn data( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleResponse, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn meta( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, + ) -> &mut Self { + self.meta = Some(value); + 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 710522a37..3b577d1ac 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_filter.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_filter.rs @@ -17,7 +17,13 @@ impl SensitiveDataScannerFilter { pub fn new() -> SensitiveDataScannerFilter { SensitiveDataScannerFilter { query: None } } + + 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_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_get_config_response.rs index 0e80e6cb1..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 @@ -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,7 +27,29 @@ impl SensitiveDataScannerGetConfigResponse { meta: None, } } + + pub fn data( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGetConfigResponseData, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + 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 8727a3afd..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 @@ -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,7 +32,37 @@ impl SensitiveDataScannerGetConfigResponseData { type_: None, } } + + pub fn attributes( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerConfigurationRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerConfigurationType, + ) -> &mut Self { + self.type_ = Some(value); + 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 a278d5161..f071a4856 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group.rs @@ -23,7 +23,21 @@ impl SensitiveDataScannerGroup { type_: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupType, + ) -> &mut Self { + self.type_ = Some(value); + 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 6652e5fa9..f21066d0f 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,7 +35,39 @@ impl SensitiveDataScannerGroupAttributes { product_list: None, } } + + pub fn description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn filter( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerFilter, + ) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn product_list( + &mut self, + value: Vec, + ) -> &mut Self { + self.product_list = Some(value); + 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 453253fa4..51113a68f 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 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..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 @@ -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,7 +23,24 @@ impl SensitiveDataScannerGroupCreateRequest { meta: None, } } + + pub fn data( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupCreate, + ) -> &mut Self { + self.data = Some(value); + self + } + + pub fn meta( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, + ) -> &mut Self { + self.meta = Some(value); + 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 8a44dd018..631a3b14e 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_data.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_data.rs @@ -10,14 +10,20 @@ 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 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_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..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 @@ -10,14 +10,23 @@ 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 meta( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, + ) -> &mut Self { + self.meta = Some(value); + 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 1b55326e8..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 @@ -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,7 +31,37 @@ impl SensitiveDataScannerGroupIncludedItem { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupType, + ) -> &mut Self { + self.type_ = Some(value); + 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 19249212e..469916f35 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_item.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_item.rs @@ -23,7 +23,21 @@ impl SensitiveDataScannerGroupItem { type_: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupType, + ) -> &mut Self { + self.type_ = Some(value); + 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 6da65a891..88fe783dc 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_group_list.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_list.rs @@ -17,7 +17,16 @@ impl SensitiveDataScannerGroupList { pub fn new() -> SensitiveDataScannerGroupList { SensitiveDataScannerGroupList { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 17dde6c2c..56784f4d5 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,7 +23,24 @@ impl SensitiveDataScannerGroupRelationships { rules: None, } } + + pub fn configuration( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerConfigurationData, + ) -> &mut Self { + self.configuration = Some(value); + self + } + + pub fn rules( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleData, + ) -> &mut Self { + self.rules = Some(value); + 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 bbe09f092..5d7c3a621 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,7 +31,37 @@ impl SensitiveDataScannerGroupResponse { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupType, + ) -> &mut Self { + self.type_ = Some(value); + 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 ea938624a..55943586d 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,7 +31,37 @@ impl SensitiveDataScannerGroupUpdate { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } + impl Default for SensitiveDataScannerGroupUpdate { fn default() -> Self { Self::new() 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..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 @@ -10,14 +10,23 @@ 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 meta( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, + ) -> &mut Self { + self.meta = Some(value); + 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 862eb5e3c..fc1507ed3 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_meta.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_meta.rs @@ -39,7 +39,38 @@ impl SensitiveDataScannerMeta { version: None, } } + + pub fn count_limit(&mut self, value: i64) -> &mut Self { + self.count_limit = Some(value); + self + } + + pub fn group_count_limit(&mut self, value: i64) -> &mut Self { + self.group_count_limit = Some(value); + self + } + + pub fn has_highlight_enabled(&mut self, value: bool) -> &mut Self { + self.has_highlight_enabled = Some(value); + self + } + + pub fn has_multi_pass_enabled(&mut self, value: bool) -> &mut Self { + self.has_multi_pass_enabled = Some(value); + self + } + + pub fn is_pci_compliant(&mut self, value: bool) -> &mut Self { + self.is_pci_compliant = Some(value); + 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 f28f484e7..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 @@ -17,7 +17,13 @@ impl SensitiveDataScannerMetaVersionOnly { pub fn new() -> SensitiveDataScannerMetaVersionOnly { SensitiveDataScannerMetaVersionOnly { version: None } } + + 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 081c0a69c..0b6d662c0 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,7 +28,29 @@ impl SensitiveDataScannerReorderConfig { type_: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerConfigurationRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerConfigurationType, + ) -> &mut Self { + self.type_ = Some(value); + 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 e01404003..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 @@ -10,14 +10,20 @@ 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 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 efa22e435..300378fcc 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule.rs @@ -23,7 +23,21 @@ impl SensitiveDataScannerRule { type_: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleType, + ) -> &mut Self { + self.type_ = Some(value); + 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 fbefcf70d..d2c82ddc6 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,7 +52,56 @@ impl SensitiveDataScannerRuleAttributes { text_replacement: None, } } + + pub fn description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn excluded_namespaces(&mut self, value: Vec) -> &mut Self { + self.excluded_namespaces = Some(value); + self + } + + pub fn is_enabled(&mut self, value: bool) -> &mut Self { + self.is_enabled = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn namespaces(&mut self, value: Vec) -> &mut Self { + self.namespaces = Some(value); + self + } + + pub fn pattern(&mut self, value: String) -> &mut Self { + self.pattern = Some(value); + self + } + + pub fn priority(&mut self, value: i64) -> &mut Self { + self.priority = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn text_replacement( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerTextReplacement, + ) -> &mut Self { + self.text_replacement = Some(value); + self + } } + impl Default for SensitiveDataScannerRuleAttributes { fn default() -> Self { Self::new() 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..fe1c1ac76 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_rule_data.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_data.rs @@ -17,7 +17,16 @@ impl SensitiveDataScannerRuleData { pub fn new() -> SensitiveDataScannerRuleData { SensitiveDataScannerRuleData { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + self + } } + impl Default for SensitiveDataScannerRuleData { fn default() -> Self { Self::new() 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..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 @@ -10,14 +10,23 @@ 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 meta( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, + ) -> &mut Self { + self.meta = Some(value); + 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 b2c048576..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 @@ -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,7 +31,37 @@ impl SensitiveDataScannerRuleIncludedItem { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleType, + ) -> &mut Self { + self.type_ = Some(value); + 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 cb9ea4290..b19df973e 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,7 +23,24 @@ impl SensitiveDataScannerRuleRelationships { standard_pattern: None, } } + + pub fn group( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerGroupData, + ) -> &mut Self { + self.group = Some(value); + self + } + + pub fn standard_pattern( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerStandardPatternData, + ) -> &mut Self { + self.standard_pattern = Some(value); + 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 62e3620bf..62c6f98f0 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,7 +31,37 @@ impl SensitiveDataScannerRuleResponse { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleType, + ) -> &mut Self { + self.type_ = Some(value); + 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 387d63c12..9388f86b5 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,7 +31,37 @@ impl SensitiveDataScannerRuleUpdate { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleRelationships, + ) -> &mut Self { + self.relationships = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerRuleType, + ) -> &mut Self { + self.type_ = Some(value); + self + } } + impl Default for SensitiveDataScannerRuleUpdate { fn default() -> Self { Self::new() 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..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 @@ -10,14 +10,23 @@ 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 meta( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerMetaVersionOnly, + ) -> &mut Self { + self.meta = Some(value); + 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 c373cd2c5..06b7677cc 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern.rs @@ -23,7 +23,21 @@ impl SensitiveDataScannerStandardPattern { type_: None, } } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerStandardPatternType, + ) -> &mut Self { + self.type_ = Some(value); + 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 7d7ca7652..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 @@ -39,7 +39,38 @@ impl SensitiveDataScannerStandardPatternAttributes { tags: None, } } + + pub fn description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn included_keywords(&mut self, value: Vec) -> &mut Self { + self.included_keywords = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn pattern(&mut self, value: String) -> &mut Self { + self.pattern = Some(value); + self + } + + pub fn priority(&mut self, value: i64) -> &mut Self { + self.priority = Some(value); + 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 10887ec16..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 @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerStandardPattern, + ) -> &mut Self { + self.data = Some(value); + 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 45f80ef86..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 @@ -18,7 +18,16 @@ impl SensitiveDataScannerStandardPatternsResponseData { pub fn new() -> SensitiveDataScannerStandardPatternsResponseData { SensitiveDataScannerStandardPatternsResponseData { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 b75f6448b..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 @@ -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,7 +27,29 @@ impl SensitiveDataScannerStandardPatternsResponseItem { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerStandardPatternAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerStandardPatternType, + ) -> &mut Self { + self.type_ = Some(value); + 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 63ed45e34..74fb45794 100644 --- a/src/datadogV2/model/model_sensitive_data_scanner_text_replacement.rs +++ b/src/datadogV2/model/model_sensitive_data_scanner_text_replacement.rs @@ -33,7 +33,26 @@ impl SensitiveDataScannerTextReplacement { type_: None, } } + + pub fn number_of_chars(&mut self, value: i64) -> &mut Self { + self.number_of_chars = Some(value); + self + } + + pub fn replacement_string(&mut self, value: String) -> &mut Self { + self.replacement_string = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SensitiveDataScannerTextReplacementType, + ) -> &mut Self { + self.type_ = Some(value); + 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 3f7943c0c..94564bb1b 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 name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 276690dbe..55ee9fc9b 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 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..78eba64df 100644 --- a/src/datadogV2/model/model_service_definition_create_response.rs +++ b/src/datadogV2/model/model_service_definition_create_response.rs @@ -17,7 +17,16 @@ impl ServiceDefinitionCreateResponse { pub fn new() -> ServiceDefinitionCreateResponse { ServiceDefinitionCreateResponse { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 40bfdf64e..1c3a792d9 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,7 +27,26 @@ impl ServiceDefinitionData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionDataAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 6a006ed99..f33b649b1 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,7 +23,18 @@ impl ServiceDefinitionDataAttributes { schema: None, } } + + pub fn meta(&mut self, value: crate::datadogV2::model::ServiceDefinitionMeta) -> &mut Self { + self.meta = Some(value); + 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 973b961a6..5d2c3e9e6 100644 --- a/src/datadogV2/model/model_service_definition_get_response.rs +++ b/src/datadogV2/model/model_service_definition_get_response.rs @@ -10,14 +10,20 @@ 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 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 34dd52e94..910adaf19 100644 --- a/src/datadogV2/model/model_service_definition_meta.rs +++ b/src/datadogV2/model/model_service_definition_meta.rs @@ -43,7 +43,46 @@ impl ServiceDefinitionMeta { warnings: None, } } + + pub fn github_html_url(&mut self, value: String) -> &mut Self { + self.github_html_url = Some(value); + self + } + + pub fn ingested_schema_version(&mut self, value: String) -> &mut Self { + self.ingested_schema_version = Some(value); + self + } + + pub fn ingestion_source(&mut self, value: String) -> &mut Self { + self.ingestion_source = Some(value); + self + } + + pub fn last_modified_time(&mut self, value: String) -> &mut Self { + self.last_modified_time = Some(value); + self + } + + pub fn origin(&mut self, value: String) -> &mut Self { + self.origin = Some(value); + self + } + + pub fn origin_detail(&mut self, value: String) -> &mut Self { + self.origin_detail = Some(value); + self + } + + pub fn warnings( + &mut self, + value: Vec, + ) -> &mut Self { + self.warnings = Some(value); + 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 e1d504b3e..faaea37a5 100644 --- a/src/datadogV2/model/model_service_definition_meta_warnings.rs +++ b/src/datadogV2/model/model_service_definition_meta_warnings.rs @@ -27,7 +27,23 @@ impl ServiceDefinitionMetaWarnings { message: None, } } + + pub fn instance_location(&mut self, value: String) -> &mut Self { + self.instance_location = Some(value); + self + } + + pub fn keyword_location(&mut self, value: String) -> &mut Self { + self.keyword_location = Some(value); + 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_v1.rs b/src/datadogV2/model/model_service_definition_v1.rs index 238896059..c52b8a41a 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,46 @@ impl ServiceDefinitionV1 { tags: None, } } + + pub fn contact( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV1Contact, + ) -> &mut Self { + self.contact = Some(value); + self + } + + pub fn extensions( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.extensions = Some(value); + self + } + + pub fn external_resources( + &mut self, + value: Vec, + ) -> &mut Self { + self.external_resources = Some(value); + self + } + + pub fn integrations( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV1Integrations, + ) -> &mut Self { + self.integrations = Some(value); + self + } + + pub fn org(&mut self, value: crate::datadogV2::model::ServiceDefinitionV1Org) -> &mut Self { + self.org = Some(value); + 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 d6fa78254..073094701 100644 --- a/src/datadogV2/model/model_service_definition_v1_contact.rs +++ b/src/datadogV2/model/model_service_definition_v1_contact.rs @@ -23,7 +23,18 @@ impl ServiceDefinitionV1Contact { slack: None, } } + + pub fn email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + 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 fd192451d..5cf360459 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 description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn display_name(&mut self, value: String) -> &mut Self { + self.display_name = Some(value); + 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 d40a117cd..68aa0ff3c 100644 --- a/src/datadogV2/model/model_service_definition_v1_integrations.rs +++ b/src/datadogV2/model/model_service_definition_v1_integrations.rs @@ -17,7 +17,13 @@ impl ServiceDefinitionV1Integrations { pub fn new() -> ServiceDefinitionV1Integrations { ServiceDefinitionV1Integrations { pagerduty: None } } + + 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 48a339dd5..8923b640c 100644 --- a/src/datadogV2/model/model_service_definition_v1_org.rs +++ b/src/datadogV2/model/model_service_definition_v1_org.rs @@ -23,7 +23,18 @@ impl ServiceDefinitionV1Org { team: None, } } + + pub fn application(&mut self, value: String) -> &mut Self { + self.application = Some(value); + 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 73ea82b96..379021ab4 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 contacts( + &mut self, + value: Vec, + ) -> &mut Self { + self.contacts = Some(value); + self + } + + pub fn dd_team(&mut self, value: String) -> &mut Self { + self.dd_team = Some(value); + self + } + + pub fn docs( + &mut self, + value: Vec, + ) -> &mut Self { + self.docs = Some(value); + self + } + + pub fn extensions( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.extensions = Some(value); + self + } + + pub fn integrations( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2Integrations, + ) -> &mut Self { + self.integrations = Some(value); + self + } + + pub fn links( + &mut self, + value: Vec, + ) -> &mut Self { + self.links = Some(value); + self + } + + pub fn repos( + &mut self, + value: Vec, + ) -> &mut Self { + self.repos = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + 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_doc.rs b/src/datadogV2/model/model_service_definition_v2_doc.rs index 74a2f5a3b..6e7e1431f 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 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..c15daacfb 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 application(&mut self, value: String) -> &mut Self { + self.application = Some(value); + self + } + + pub fn contacts( + &mut self, + value: Vec, + ) -> &mut Self { + self.contacts = Some(value); + self + } + + pub fn description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn extensions( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.extensions = Some(value); + self + } + + pub fn integrations( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2Dot1Integrations, + ) -> &mut Self { + self.integrations = Some(value); + self + } + + pub fn lifecycle(&mut self, value: String) -> &mut Self { + self.lifecycle = Some(value); + self + } + + pub fn links( + &mut self, + value: Vec, + ) -> &mut Self { + self.links = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn team(&mut self, value: String) -> &mut Self { + self.team = Some(value); + 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_email.rs b/src/datadogV2/model/model_service_definition_v2_dot1_email.rs index 832b85448..79f7c45aa 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 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..98ca88648 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,7 +23,24 @@ impl ServiceDefinitionV2Dot1Integrations { pagerduty: None, } } + + pub fn opsgenie( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2Dot1Opsgenie, + ) -> &mut Self { + self.opsgenie = Some(value); + self + } + + pub fn pagerduty( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2Dot1Pagerduty, + ) -> &mut Self { + self.pagerduty = Some(value); + 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 148efd729..3de76c0b3 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 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..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 @@ -30,4 +30,9 @@ impl ServiceDefinitionV2Dot1MSTeams { type_, } } + + 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 5d56866e7..a4acbd08c 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 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..a6837e282 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot1_pagerduty.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot1_pagerduty.rs @@ -17,7 +17,13 @@ impl ServiceDefinitionV2Dot1Pagerduty { pub fn new() -> ServiceDefinitionV2Dot1Pagerduty { ServiceDefinitionV2Dot1Pagerduty { service_url: None } } + + 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 7539fb877..e2affbe28 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 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..d1433fdac 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 application(&mut self, value: String) -> &mut Self { + self.application = Some(value); + self + } + + pub fn contacts( + &mut self, + value: Vec, + ) -> &mut Self { + self.contacts = Some(value); + self + } + + pub fn description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn extensions( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.extensions = Some(value); + self + } + + pub fn integrations( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2Dot2Integrations, + ) -> &mut Self { + self.integrations = Some(value); + self + } + + pub fn languages(&mut self, value: Vec) -> &mut Self { + self.languages = Some(value); + self + } + + pub fn lifecycle(&mut self, value: String) -> &mut Self { + self.lifecycle = Some(value); + self + } + + pub fn links( + &mut self, + value: Vec, + ) -> &mut Self { + self.links = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn team(&mut self, value: String) -> &mut Self { + self.team = Some(value); + self + } + + pub fn tier(&mut self, value: String) -> &mut Self { + self.tier = Some(value); + self + } + + pub fn 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..83eef43ac 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 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..4e79f2eaa 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,7 +23,24 @@ impl ServiceDefinitionV2Dot2Integrations { pagerduty: None, } } + + pub fn opsgenie( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2Dot2Opsgenie, + ) -> &mut Self { + self.opsgenie = Some(value); + self + } + + pub fn pagerduty( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2Dot2Pagerduty, + ) -> &mut Self { + self.pagerduty = Some(value); + 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 b4260c1e3..3ce0296c6 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 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..31d824797 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 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..27fcec6bc 100644 --- a/src/datadogV2/model/model_service_definition_v2_dot2_pagerduty.rs +++ b/src/datadogV2/model/model_service_definition_v2_dot2_pagerduty.rs @@ -17,7 +17,13 @@ impl ServiceDefinitionV2Dot2Pagerduty { pub fn new() -> ServiceDefinitionV2Dot2Pagerduty { ServiceDefinitionV2Dot2Pagerduty { service_url: None } } + + 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 d20dad5ec..496e1b82f 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 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..682d4b59e 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,7 +23,21 @@ impl ServiceDefinitionV2Integrations { pagerduty: None, } } + + pub fn opsgenie( + &mut self, + value: crate::datadogV2::model::ServiceDefinitionV2Opsgenie, + ) -> &mut Self { + self.opsgenie = Some(value); + 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 ce30f45a1..43a22340f 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 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..120c91dad 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 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..7df980e69 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 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..4cc313006 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 name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } } diff --git a/src/datadogV2/model/model_service_definitions_list_response.rs b/src/datadogV2/model/model_service_definitions_list_response.rs index ff027f052..f1269d225 100644 --- a/src/datadogV2/model/model_service_definitions_list_response.rs +++ b/src/datadogV2/model/model_service_definitions_list_response.rs @@ -17,7 +17,16 @@ impl ServiceDefinitionsListResponse { pub fn new() -> ServiceDefinitionsListResponse { ServiceDefinitionsListResponse { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 119597103..9e4445953 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 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..fc394cc5b 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,7 +27,23 @@ impl Span { type_: None, } } + + pub fn attributes(&mut self, value: crate::datadogV2::model::SpansAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 dcce81600..7fabca1be 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,7 +27,26 @@ impl SpansAggregateBucket { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::SpansAggregateBucketAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 fc4638421..4479d25e0 100644 --- a/src/datadogV2/model/model_spans_aggregate_bucket_attributes.rs +++ b/src/datadogV2/model/model_spans_aggregate_bucket_attributes.rs @@ -29,7 +29,35 @@ impl SpansAggregateBucketAttributes { computes: None, } } + + pub fn by( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.by = Some(value); + self + } + + pub fn compute( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn 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 { 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 3da27f132..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 @@ -23,7 +23,18 @@ impl SpansAggregateBucketValueTimeseriesPoint { value: None, } } + + pub fn time(&mut self, value: String) -> &mut Self { + self.time = Some(value); + 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 59c56b4c2..5c8c77098 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,7 +23,24 @@ impl SpansAggregateData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::SpansAggregateRequestAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::SpansAggregateRequestType, + ) -> &mut Self { + self.type_ = Some(value); + 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 2ebec6ba9..876ad5b69 100644 --- a/src/datadogV2/model/model_spans_aggregate_request.rs +++ b/src/datadogV2/model/model_spans_aggregate_request.rs @@ -10,14 +10,20 @@ 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 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 029b257b4..dde3a7aea 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,7 +32,28 @@ impl SpansAggregateRequestAttributes { options: None, } } + + pub fn compute(&mut self, value: Vec) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn filter(&mut self, value: crate::datadogV2::model::SpansQueryFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn group_by(&mut self, value: Vec) -> &mut Self { + self.group_by = Some(value); + 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 195aa46fb..568b92dff 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,7 +23,21 @@ impl SpansAggregateResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn meta( + &mut self, + value: crate::datadogV2::model::SpansAggregateResponseMetadata, + ) -> &mut Self { + self.meta = Some(value); + 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 503660fdc..a6a36e082 100644 --- a/src/datadogV2/model/model_spans_aggregate_response_metadata.rs +++ b/src/datadogV2/model/model_spans_aggregate_response_metadata.rs @@ -32,7 +32,31 @@ impl SpansAggregateResponseMetadata { warnings: None, } } + + pub fn elapsed(&mut self, value: i64) -> &mut Self { + self.elapsed = Some(value); + self + } + + pub fn request_id(&mut self, value: String) -> &mut Self { + self.request_id = Some(value); + self + } + + pub fn status( + &mut self, + value: crate::datadogV2::model::SpansAggregateResponseStatus, + ) -> &mut Self { + self.status = Some(value); + 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 caee2bdc4..9a06690e0 100644 --- a/src/datadogV2/model/model_spans_aggregate_sort.rs +++ b/src/datadogV2/model/model_spans_aggregate_sort.rs @@ -31,7 +31,31 @@ impl SpansAggregateSort { type_: None, } } + + pub fn aggregation( + &mut self, + value: crate::datadogV2::model::SpansAggregationFunction, + ) -> &mut Self { + self.aggregation = Some(value); + self + } + + pub fn metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + self + } + + pub fn order(&mut self, value: crate::datadogV2::model::SpansSortOrder) -> &mut Self { + self.order = Some(value); + 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 f518b2aa0..35f908972 100644 --- a/src/datadogV2/model/model_spans_attributes.rs +++ b/src/datadogV2/model/model_spans_attributes.rs @@ -85,7 +85,99 @@ impl SpansAttributes { type_: None, } } + + pub fn attributes( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn custom( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.custom = Some(value); + self + } + + pub fn end_timestamp(&mut self, value: String) -> &mut Self { + self.end_timestamp = Some(value); + self + } + + pub fn env(&mut self, value: String) -> &mut Self { + self.env = Some(value); + self + } + + pub fn host(&mut self, value: String) -> &mut Self { + self.host = Some(value); + self + } + + pub fn ingestion_reason(&mut self, value: String) -> &mut Self { + self.ingestion_reason = Some(value); + self + } + + pub fn parent_id(&mut self, value: String) -> &mut Self { + self.parent_id = Some(value); + self + } + + pub fn resource_hash(&mut self, value: String) -> &mut Self { + self.resource_hash = Some(value); + self + } + + pub fn resource_name(&mut self, value: String) -> &mut Self { + self.resource_name = Some(value); + self + } + + pub fn retained_by(&mut self, value: String) -> &mut Self { + self.retained_by = Some(value); + self + } + + pub fn service(&mut self, value: String) -> &mut Self { + self.service = Some(value); + self + } + + pub fn single_span(&mut self, value: bool) -> &mut Self { + self.single_span = Some(value); + self + } + + pub fn span_id(&mut self, value: String) -> &mut Self { + self.span_id = Some(value); + self + } + + pub fn start_timestamp(&mut self, value: String) -> &mut Self { + self.start_timestamp = Some(value); + self + } + + pub fn tags(&mut self, value: Vec) -> &mut Self { + self.tags = Some(value); + self + } + + pub fn trace_id(&mut self, value: String) -> &mut Self { + self.trace_id = Some(value); + 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 19399a073..7b7050285 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 interval(&mut self, value: String) -> &mut Self { + self.interval = Some(value); + self + } + + pub fn metric(&mut self, value: String) -> &mut Self { + self.metric = Some(value); + 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 3ae18edfe..5f844ffb1 100644 --- a/src/datadogV2/model/model_spans_filter.rs +++ b/src/datadogV2/model/model_spans_filter.rs @@ -17,7 +17,13 @@ impl SpansFilter { pub fn new() -> SpansFilter { SpansFilter { query: None } } + + 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 d5d9250c7..8dfe55523 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,32 @@ impl SpansGroupBy { total: None, } } + + pub fn histogram( + &mut self, + value: crate::datadogV2::model::SpansGroupByHistogram, + ) -> &mut Self { + self.histogram = Some(value); + self + } + + pub fn limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn missing(&mut self, value: crate::datadogV2::model::SpansGroupByMissing) -> &mut Self { + self.missing = Some(value); + self + } + + pub fn sort(&mut self, value: crate::datadogV2::model::SpansAggregateSort) -> &mut Self { + self.sort = Some(value); + 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 070ee7c95..43057da11 100644 --- a/src/datadogV2/model/model_spans_list_request.rs +++ b/src/datadogV2/model/model_spans_list_request.rs @@ -10,14 +10,20 @@ 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 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 fd00272e4..236f3ce7b 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,7 +32,28 @@ impl SpansListRequestAttributes { sort: None, } } + + pub fn filter(&mut self, value: crate::datadogV2::model::SpansQueryFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn options(&mut self, value: crate::datadogV2::model::SpansQueryOptions) -> &mut Self { + self.options = Some(value); + self + } + + pub fn page(&mut self, value: crate::datadogV2::model::SpansListRequestPage) -> &mut Self { + self.page = Some(value); + 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 6b05c7731..0f4465fad 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,7 +23,21 @@ impl SpansListRequestData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::SpansListRequestAttributes, + ) -> &mut Self { + self.attributes = Some(value); + 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 59b8030d4..d0072f4ac 100644 --- a/src/datadogV2/model/model_spans_list_request_page.rs +++ b/src/datadogV2/model/model_spans_list_request_page.rs @@ -23,7 +23,18 @@ impl SpansListRequestPage { limit: None, } } + + pub fn cursor(&mut self, value: String) -> &mut Self { + self.cursor = Some(value); + 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 41cd7f6d7..81e01ffc6 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,7 +27,23 @@ impl SpansListResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn links(&mut self, value: crate::datadogV2::model::SpansListResponseLinks) -> &mut Self { + self.links = Some(value); + 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 499ae54ca..7c795eab9 100644 --- a/src/datadogV2/model/model_spans_list_response_links.rs +++ b/src/datadogV2/model/model_spans_list_response_links.rs @@ -18,7 +18,13 @@ impl SpansListResponseLinks { pub fn new() -> SpansListResponseLinks { SpansListResponseLinks { next: None } } + + 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 a964c206d..4db993561 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,7 +36,36 @@ impl SpansListResponseMetadata { warnings: None, } } + + pub fn elapsed(&mut self, value: i64) -> &mut Self { + self.elapsed = Some(value); + self + } + + pub fn page(&mut self, value: crate::datadogV2::model::SpansResponseMetadataPage) -> &mut Self { + self.page = Some(value); + self + } + + pub fn request_id(&mut self, value: String) -> &mut Self { + self.request_id = Some(value); + self + } + + pub fn status( + &mut self, + value: crate::datadogV2::model::SpansAggregateResponseStatus, + ) -> &mut Self { + self.status = Some(value); + 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 c7f48a2c5..e6d225692 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 include_percentiles(&mut self, value: bool) -> &mut Self { + self.include_percentiles = Some(value); + 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 31425d255..c448bca6a 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 filter(&mut self, value: crate::datadogV2::model::SpansMetricFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn 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..807b4b4df 100644 --- a/src/datadogV2/model/model_spans_metric_filter.rs +++ b/src/datadogV2/model/model_spans_metric_filter.rs @@ -17,7 +17,13 @@ impl SpansMetricFilter { pub fn new() -> SpansMetricFilter { SpansMetricFilter { query: None } } + + 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 174d01bf3..ed90ac53e 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 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..8cc84b09a 100644 --- a/src/datadogV2/model/model_spans_metric_response.rs +++ b/src/datadogV2/model/model_spans_metric_response.rs @@ -10,14 +10,20 @@ 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 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 1717f291d..1e65d851c 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,7 +27,32 @@ impl SpansMetricResponseAttributes { group_by: None, } } + + pub fn compute( + &mut self, + value: crate::datadogV2::model::SpansMetricResponseCompute, + ) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn filter( + &mut self, + value: crate::datadogV2::model::SpansMetricResponseFilter, + ) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + 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 46780b443..735101f64 100644 --- a/src/datadogV2/model/model_spans_metric_response_compute.rs +++ b/src/datadogV2/model/model_spans_metric_response_compute.rs @@ -28,7 +28,26 @@ impl SpansMetricResponseCompute { path: None, } } + + pub fn aggregation_type( + &mut self, + value: crate::datadogV2::model::SpansMetricComputeAggregationType, + ) -> &mut Self { + self.aggregation_type = Some(value); + self + } + + pub fn include_percentiles(&mut self, value: bool) -> &mut Self { + self.include_percentiles = Some(value); + 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 f6e6cb9b7..d70f5f3bc 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,7 +27,26 @@ impl SpansMetricResponseData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::SpansMetricResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 719dfac21..8438c9d44 100644 --- a/src/datadogV2/model/model_spans_metric_response_filter.rs +++ b/src/datadogV2/model/model_spans_metric_response_filter.rs @@ -17,7 +17,13 @@ impl SpansMetricResponseFilter { pub fn new() -> SpansMetricResponseFilter { SpansMetricResponseFilter { query: None } } + + 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 521024af5..938543675 100644 --- a/src/datadogV2/model/model_spans_metric_response_group_by.rs +++ b/src/datadogV2/model/model_spans_metric_response_group_by.rs @@ -23,7 +23,18 @@ impl SpansMetricResponseGroupBy { tag_name: None, } } + + pub fn path(&mut self, value: String) -> &mut Self { + self.path = Some(value); + 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 e5e1424b6..483aa855e 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,7 +27,29 @@ impl SpansMetricUpdateAttributes { group_by: None, } } + + pub fn compute( + &mut self, + value: crate::datadogV2::model::SpansMetricUpdateCompute, + ) -> &mut Self { + self.compute = Some(value); + self + } + + pub fn filter(&mut self, value: crate::datadogV2::model::SpansMetricFilter) -> &mut Self { + self.filter = Some(value); + self + } + + pub fn group_by( + &mut self, + value: Vec, + ) -> &mut Self { + self.group_by = Some(value); + 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 e6dfe79c3..38d92ed47 100644 --- a/src/datadogV2/model/model_spans_metric_update_compute.rs +++ b/src/datadogV2/model/model_spans_metric_update_compute.rs @@ -20,7 +20,13 @@ impl SpansMetricUpdateCompute { include_percentiles: None, } } + + 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_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..b1b08a19a 100644 --- a/src/datadogV2/model/model_spans_metrics_response.rs +++ b/src/datadogV2/model/model_spans_metrics_response.rs @@ -17,7 +17,16 @@ impl SpansMetricsResponse { pub fn new() -> SpansMetricsResponse { SpansMetricsResponse { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 9428d0651..5a189ec2a 100644 --- a/src/datadogV2/model/model_spans_query_filter.rs +++ b/src/datadogV2/model/model_spans_query_filter.rs @@ -27,7 +27,23 @@ impl SpansQueryFilter { to: None, } } + + pub fn from(&mut self, value: String) -> &mut Self { + self.from = Some(value); + self + } + + pub fn query(&mut self, value: String) -> &mut Self { + self.query = Some(value); + 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 3535d75ba..fccceeb76 100644 --- a/src/datadogV2/model/model_spans_query_options.rs +++ b/src/datadogV2/model/model_spans_query_options.rs @@ -24,7 +24,18 @@ impl SpansQueryOptions { timezone: None, } } + + pub fn time_offset(&mut self, value: i64) -> &mut Self { + self.time_offset = Some(value); + 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 ec979a347..300208959 100644 --- a/src/datadogV2/model/model_spans_response_metadata_page.rs +++ b/src/datadogV2/model/model_spans_response_metadata_page.rs @@ -18,7 +18,13 @@ impl SpansResponseMetadataPage { pub fn new() -> SpansResponseMetadataPage { SpansResponseMetadataPage { after: None } } + + 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 ffbea95db..8d4751b8f 100644 --- a/src/datadogV2/model/model_spans_warning.rs +++ b/src/datadogV2/model/model_spans_warning.rs @@ -27,7 +27,23 @@ impl SpansWarning { title: None, } } + + pub fn code(&mut self, value: String) -> &mut Self { + self.code = Some(value); + self + } + + pub fn detail(&mut self, value: String) -> &mut Self { + self.detail = Some(value); + 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 f72622e07..7bb9207b3 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 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..9788d4441 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 avatar(&mut self, value: Option) -> &mut Self { + self.avatar = Some(value); + self + } + + pub fn banner(&mut self, value: Option) -> &mut Self { + self.banner = Some(value); + self + } + + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn description(&mut self, value: Option) -> &mut Self { + self.description = Some(value); + self + } + + pub fn hidden_modules(&mut self, value: Vec) -> &mut Self { + self.hidden_modules = Some(value); + self + } + + pub fn link_count(&mut self, value: i32) -> &mut Self { + self.link_count = Some(value); + self + } + + pub fn modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn summary(&mut self, value: Option) -> &mut Self { + self.summary = Some(value); + self + } + + pub fn user_count(&mut self, value: i32) -> &mut Self { + self.user_count = Some(value); + 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 5f0311d0f..beb6e439d 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 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..93c3dedda 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 avatar(&mut self, value: Option) -> &mut Self { + self.avatar = Some(value); + self + } + + pub fn banner(&mut self, value: Option) -> &mut Self { + self.banner = Some(value); + self + } + + pub fn description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn hidden_modules(&mut self, value: Vec) -> &mut Self { + self.hidden_modules = Some(value); + 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 b29bf378c..4314202fb 100644 --- a/src/datadogV2/model/model_team_create_relationships.rs +++ b/src/datadogV2/model/model_team_create_relationships.rs @@ -10,14 +10,20 @@ 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 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_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_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..92b85d66f 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 position(&mut self, value: i32) -> &mut Self { + self.position = Some(value); + 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_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..58903b7c0 100644 --- a/src/datadogV2/model/model_team_link_response.rs +++ b/src/datadogV2/model/model_team_link_response.rs @@ -10,14 +10,20 @@ 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 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 98ceb7cc2..cab8b0469 100644 --- a/src/datadogV2/model/model_team_links_response.rs +++ b/src/datadogV2/model/model_team_links_response.rs @@ -17,7 +17,13 @@ impl TeamLinksResponse { pub fn new() -> TeamLinksResponse { TeamLinksResponse { data: None } } + + 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 8042fa7d2..04f8e05f4 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 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..39ad25a21 100644 --- a/src/datadogV2/model/model_team_permission_setting_attributes.rs +++ b/src/datadogV2/model/model_team_permission_setting_attributes.rs @@ -35,7 +35,42 @@ impl TeamPermissionSettingAttributes { value: None, } } + + pub fn action( + &mut self, + value: crate::datadogV2::model::TeamPermissionSettingSerializerAction, + ) -> &mut Self { + self.action = Some(value); + self + } + + pub fn editable(&mut self, value: bool) -> &mut Self { + self.editable = Some(value); + self + } + + pub fn options( + &mut self, + value: Vec, + ) -> &mut Self { + self.options = Some(value); + self + } + + pub fn title(&mut self, value: String) -> &mut Self { + self.title = Some(value); + self + } + + pub fn value( + &mut self, + value: crate::datadogV2::model::TeamPermissionSettingValue, + ) -> &mut Self { + self.value = Some(value); + 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 05b790a2b..17df4f7b8 100644 --- a/src/datadogV2/model/model_team_permission_setting_response.rs +++ b/src/datadogV2/model/model_team_permission_setting_response.rs @@ -10,14 +10,20 @@ 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 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 6c38061e1..1ee13807a 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 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..af5024ce9 100644 --- a/src/datadogV2/model/model_team_permission_setting_update_attributes.rs +++ b/src/datadogV2/model/model_team_permission_setting_update_attributes.rs @@ -17,7 +17,16 @@ impl TeamPermissionSettingUpdateAttributes { pub fn new() -> TeamPermissionSettingUpdateAttributes { TeamPermissionSettingUpdateAttributes { value: None } } + + pub fn value( + &mut self, + value: crate::datadogV2::model::TeamPermissionSettingValue, + ) -> &mut Self { + self.value = Some(value); + self + } } + impl Default for TeamPermissionSettingUpdateAttributes { fn default() -> Self { Self::new() 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..ba7015ec7 100644 --- a/src/datadogV2/model/model_team_permission_settings_response.rs +++ b/src/datadogV2/model/model_team_permission_settings_response.rs @@ -17,7 +17,16 @@ impl TeamPermissionSettingsResponse { pub fn new() -> TeamPermissionSettingsResponse { TeamPermissionSettingsResponse { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 1761c5af9..c8c92a3d4 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,7 +23,24 @@ impl TeamRelationships { user_team_permissions: None, } } + + pub fn team_links( + &mut self, + value: crate::datadogV2::model::RelationshipToTeamLinks, + ) -> &mut Self { + self.team_links = Some(value); + self + } + + pub fn 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 { Self::new() diff --git a/src/datadogV2/model/model_team_relationships_links.rs b/src/datadogV2/model/model_team_relationships_links.rs index 2be3a1313..9fef62b8d 100644 --- a/src/datadogV2/model/model_team_relationships_links.rs +++ b/src/datadogV2/model/model_team_relationships_links.rs @@ -17,7 +17,13 @@ impl TeamRelationshipsLinks { pub fn new() -> TeamRelationshipsLinks { TeamRelationshipsLinks { related: None } } + + 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 0f91e9fb1..2db73c4d3 100644 --- a/src/datadogV2/model/model_team_response.rs +++ b/src/datadogV2/model/model_team_response.rs @@ -10,14 +10,20 @@ 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 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 900f59acb..1abb6a37e 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 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..547a081c1 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 avatar(&mut self, value: Option) -> &mut Self { + self.avatar = Some(value); + self + } + + pub fn banner(&mut self, value: Option) -> &mut Self { + self.banner = Some(value); + self + } + + pub fn color(&mut self, value: i32) -> &mut Self { + self.color = Some(value); + self + } + + pub fn description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn hidden_modules(&mut self, value: Vec) -> &mut Self { + self.hidden_modules = Some(value); + 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 0b051b138..17870ab92 100644 --- a/src/datadogV2/model/model_team_update_relationships.rs +++ b/src/datadogV2/model/model_team_update_relationships.rs @@ -10,14 +10,23 @@ 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 team_links( + &mut self, + value: crate::datadogV2::model::RelationshipToTeamLinks, + ) -> &mut Self { + self.team_links = Some(value); + self + } } + impl Default for TeamUpdateRelationships { fn default() -> Self { Self::new() 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..f074f6e1e 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,7 +31,28 @@ impl TeamsResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn included(&mut self, value: Vec) -> &mut Self { + self.included = Some(value); + self + } + + pub fn links(&mut self, value: crate::datadogV2::model::TeamsResponseLinks) -> &mut Self { + self.links = Some(value); + 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 c381adaf1..981af71f6 100644 --- a/src/datadogV2/model/model_teams_response_links.rs +++ b/src/datadogV2/model/model_teams_response_links.rs @@ -35,7 +35,33 @@ impl TeamsResponseLinks { self_: None, } } + + pub fn first(&mut self, value: String) -> &mut Self { + self.first = Some(value); + self + } + + pub fn last(&mut self, value: Option) -> &mut Self { + self.last = Some(value); + self + } + + pub fn next(&mut self, value: String) -> &mut Self { + self.next = Some(value); + self + } + + pub fn prev(&mut self, value: Option) -> &mut Self { + self.prev = Some(value); + 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 ea5d50ac8..89fe4cdc3 100644 --- a/src/datadogV2/model/model_teams_response_meta.rs +++ b/src/datadogV2/model/model_teams_response_meta.rs @@ -10,14 +10,23 @@ 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 pagination( + &mut self, + value: crate::datadogV2::model::TeamsResponseMetaPagination, + ) -> &mut Self { + self.pagination = Some(value); + 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 193ad50f4..27da1a421 100644 --- a/src/datadogV2/model/model_teams_response_meta_pagination.rs +++ b/src/datadogV2/model/model_teams_response_meta_pagination.rs @@ -47,7 +47,48 @@ impl TeamsResponseMetaPagination { type_: None, } } + + pub fn first_offset(&mut self, value: i64) -> &mut Self { + self.first_offset = Some(value); + self + } + + pub fn last_offset(&mut self, value: i64) -> &mut Self { + self.last_offset = Some(value); + self + } + + pub fn limit(&mut self, value: i64) -> &mut Self { + self.limit = Some(value); + self + } + + pub fn next_offset(&mut self, value: i64) -> &mut Self { + self.next_offset = Some(value); + self + } + + pub fn offset(&mut self, value: i64) -> &mut Self { + self.offset = Some(value); + self + } + + pub fn prev_offset(&mut self, value: i64) -> &mut Self { + self.prev_offset = Some(value); + self + } + + pub fn total(&mut self, value: i64) -> &mut Self { + self.total = Some(value); + 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_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..6f13d145e 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,7 +23,18 @@ impl TimeseriesFormulaQueryResponse { errors: None, } } + + pub fn data(&mut self, value: crate::datadogV2::model::TimeseriesResponse) -> &mut Self { + self.data = Some(value); + 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.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..e06201602 100644 --- a/src/datadogV2/model/model_timeseries_formula_request_attributes.rs +++ b/src/datadogV2/model/model_timeseries_formula_request_attributes.rs @@ -42,4 +42,14 @@ impl TimeseriesFormulaRequestAttributes { to, } } + + pub fn formulas(&mut self, value: Vec) -> &mut Self { + self.formulas = Some(value); + self + } + + pub fn interval(&mut self, value: i64) -> &mut Self { + self.interval = Some(value); + self + } } diff --git a/src/datadogV2/model/model_timeseries_response.rs b/src/datadogV2/model/model_timeseries_response.rs index f14e8548d..8eb2cff46 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,7 +23,24 @@ impl TimeseriesResponse { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::TimeseriesResponseAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn type_( + &mut self, + value: crate::datadogV2::model::TimeseriesFormulaResponseType, + ) -> &mut Self { + self.type_ = Some(value); + 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 0a94a78a7..d063d96ad 100644 --- a/src/datadogV2/model/model_timeseries_response_attributes.rs +++ b/src/datadogV2/model/model_timeseries_response_attributes.rs @@ -27,7 +27,26 @@ impl TimeseriesResponseAttributes { values: None, } } + + pub fn series( + &mut self, + value: Vec, + ) -> &mut Self { + self.series = Some(value); + self + } + + pub fn times(&mut self, value: Vec) -> &mut Self { + self.times = Some(value); + 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 489fb6321..b21de343e 100644 --- a/src/datadogV2/model/model_timeseries_response_series.rs +++ b/src/datadogV2/model/model_timeseries_response_series.rs @@ -30,7 +30,23 @@ impl TimeseriesResponseSeries { unit: None, } } + + pub fn group_tags(&mut self, value: Vec) -> &mut Self { + self.group_tags = Some(value); + self + } + + pub fn query_index(&mut self, value: i32) -> &mut Self { + self.query_index = Some(value); + 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 ff863fbe5..1f3bde050 100644 --- a/src/datadogV2/model/model_unit.rs +++ b/src/datadogV2/model/model_unit.rs @@ -35,7 +35,33 @@ impl Unit { short_name: None, } } + + pub fn family(&mut self, value: String) -> &mut Self { + self.family = Some(value); + self + } + + pub fn name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + self + } + + pub fn plural(&mut self, value: String) -> &mut Self { + self.plural = Some(value); + self + } + + pub fn scale_factor(&mut self, value: f64) -> &mut Self { + self.scale_factor = Some(value); + 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 1837beff8..98ccbf3c0 100644 --- a/src/datadogV2/model/model_usage_application_security_monitoring_response.rs +++ b/src/datadogV2/model/model_usage_application_security_monitoring_response.rs @@ -17,7 +17,13 @@ impl UsageApplicationSecurityMonitoringResponse { pub fn new() -> UsageApplicationSecurityMonitoringResponse { UsageApplicationSecurityMonitoringResponse { data: None } } + + 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 c868ac5cc..2e76b8ec8 100644 --- a/src/datadogV2/model/model_usage_attributes_object.rs +++ b/src/datadogV2/model/model_usage_attributes_object.rs @@ -39,7 +39,41 @@ impl UsageAttributesObject { usage_type: None, } } + + pub fn org_name(&mut self, value: String) -> &mut Self { + self.org_name = Some(value); + self + } + + pub fn product_family(&mut self, value: String) -> &mut Self { + self.product_family = Some(value); + self + } + + pub fn public_id(&mut self, value: String) -> &mut Self { + self.public_id = Some(value); + self + } + + pub fn region(&mut self, value: String) -> &mut Self { + self.region = Some(value); + self + } + + pub fn timeseries( + &mut self, + value: Vec, + ) -> &mut Self { + self.timeseries = Some(value); + 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 29e062d73..5e1ffd532 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,7 +27,26 @@ impl UsageDataObject { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::UsageAttributesObject, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + 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 79f9be6ac..d86c127a9 100644 --- a/src/datadogV2/model/model_usage_lambda_traced_invocations_response.rs +++ b/src/datadogV2/model/model_usage_lambda_traced_invocations_response.rs @@ -17,7 +17,13 @@ impl UsageLambdaTracedInvocationsResponse { pub fn new() -> UsageLambdaTracedInvocationsResponse { UsageLambdaTracedInvocationsResponse { data: None } } + + 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 d48ab15db..999e627e0 100644 --- a/src/datadogV2/model/model_usage_observability_pipelines_response.rs +++ b/src/datadogV2/model/model_usage_observability_pipelines_response.rs @@ -17,7 +17,13 @@ impl UsageObservabilityPipelinesResponse { pub fn new() -> UsageObservabilityPipelinesResponse { UsageObservabilityPipelinesResponse { data: None } } + + 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 7200fe545..0b7a60b47 100644 --- a/src/datadogV2/model/model_usage_time_series_object.rs +++ b/src/datadogV2/model/model_usage_time_series_object.rs @@ -23,7 +23,18 @@ impl UsageTimeSeriesObject { value: None, } } + + pub fn timestamp(&mut self, value: String) -> &mut Self { + self.timestamp = Some(value); + 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 05a77b93d..1713a08f6 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,7 +31,31 @@ impl User { type_: None, } } + + pub fn attributes(&mut self, value: crate::datadogV2::model::UserAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::UserResponseRelationships, + ) -> &mut Self { + self.relationships = Some(value); + 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 6893cc39c..d37280a87 100644 --- a/src/datadogV2/model/model_user_attributes.rs +++ b/src/datadogV2/model/model_user_attributes.rs @@ -59,7 +59,63 @@ impl UserAttributes { verified: None, } } + + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn disabled(&mut self, value: bool) -> &mut Self { + self.disabled = Some(value); + self + } + + pub fn email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + self + } + + pub fn handle(&mut self, value: String) -> &mut Self { + self.handle = Some(value); + self + } + + pub fn icon(&mut self, value: String) -> &mut Self { + self.icon = Some(value); + self + } + + pub fn modified_at(&mut self, value: String) -> &mut Self { + self.modified_at = Some(value); + self + } + + pub fn name(&mut self, value: Option) -> &mut Self { + self.name = Some(value); + self + } + + pub fn service_account(&mut self, value: bool) -> &mut Self { + self.service_account = Some(value); + self + } + + pub fn status(&mut self, value: String) -> &mut Self { + self.status = Some(value); + self + } + + pub fn title(&mut self, value: Option) -> &mut Self { + self.title = Some(value); + 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 07e1d06be..7d0dc4c0b 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 name(&mut self, value: String) -> &mut Self { + self.name = Some(value); + 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 f8028b3df..8e122292f 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 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..dd00e87c9 100644 --- a/src/datadogV2/model/model_user_invitation_data_attributes.rs +++ b/src/datadogV2/model/model_user_invitation_data_attributes.rs @@ -31,7 +31,28 @@ impl UserInvitationDataAttributes { uuid: None, } } + + pub fn created_at(&mut self, value: String) -> &mut Self { + self.created_at = Some(value); + self + } + + pub fn expires_at(&mut self, value: String) -> &mut Self { + self.expires_at = Some(value); + self + } + + pub fn invite_type(&mut self, value: String) -> &mut Self { + self.invite_type = Some(value); + 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_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..3eba172ea 100644 --- a/src/datadogV2/model/model_user_invitation_response.rs +++ b/src/datadogV2/model/model_user_invitation_response.rs @@ -10,14 +10,23 @@ 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 data( + &mut self, + value: crate::datadogV2::model::UserInvitationResponseData, + ) -> &mut Self { + self.data = Some(value); + 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 dd432a9b8..0c8383aa8 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,7 +31,34 @@ impl UserInvitationResponseData { type_: None, } } + + pub fn attributes( + &mut self, + value: crate::datadogV2::model::UserInvitationDataAttributes, + ) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn id(&mut self, value: String) -> &mut Self { + self.id = Some(value); + self + } + + pub fn relationships( + &mut self, + value: crate::datadogV2::model::UserInvitationRelationships, + ) -> &mut Self { + self.relationships = Some(value); + 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 b384d6b70..01ee984db 100644 --- a/src/datadogV2/model/model_user_invitations_response.rs +++ b/src/datadogV2/model/model_user_invitations_response.rs @@ -17,7 +17,16 @@ impl UserInvitationsResponse { pub fn new() -> UserInvitationsResponse { UserInvitationsResponse { data: None } } + + pub fn data( + &mut self, + value: Vec, + ) -> &mut Self { + self.data = Some(value); + 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 23c9f40e7..91132a370 100644 --- a/src/datadogV2/model/model_user_relationships.rs +++ b/src/datadogV2/model/model_user_relationships.rs @@ -10,14 +10,20 @@ 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 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 6da9ab481..74cfd001d 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,7 +23,21 @@ impl UserResponse { included: None, } } + + pub fn data(&mut self, value: crate::datadogV2::model::User) -> &mut Self { + self.data = Some(value); + self + } + + pub fn included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + self + } } + impl Default for UserResponse { fn default() -> Self { Self::new() diff --git a/src/datadogV2/model/model_user_response_relationships.rs b/src/datadogV2/model/model_user_response_relationships.rs index a42db219e..b0e70eb93 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,7 +31,34 @@ impl UserResponseRelationships { roles: None, } } + + pub fn org(&mut self, value: crate::datadogV2::model::RelationshipToOrganization) -> &mut Self { + self.org = Some(value); + self + } + + pub fn other_orgs( + &mut self, + value: crate::datadogV2::model::RelationshipToOrganizations, + ) -> &mut Self { + self.other_orgs = Some(value); + self + } + + pub fn other_users( + &mut self, + value: crate::datadogV2::model::RelationshipToUsers, + ) -> &mut Self { + self.other_users = Some(value); + 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 3f233d71e..8f501532f 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,17 @@ impl UserTeam { type_, } } + + pub fn attributes(&mut self, value: crate::datadogV2::model::UserTeamAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn 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..029e4430d 100644 --- a/src/datadogV2/model/model_user_team_attributes.rs +++ b/src/datadogV2/model/model_user_team_attributes.rs @@ -36,7 +36,23 @@ impl UserTeamAttributes { role: None, } } + + pub fn provisioned_by(&mut self, value: Option) -> &mut Self { + self.provisioned_by = Some(value); + self + } + + pub fn provisioned_by_id(&mut self, value: Option) -> &mut Self { + self.provisioned_by_id = Some(value); + 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 edf13d5a5..d3ecb7aa2 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,17 @@ impl UserTeamCreate { type_, } } + + pub fn attributes(&mut self, value: crate::datadogV2::model::UserTeamAttributes) -> &mut Self { + self.attributes = Some(value); + self + } + + pub fn 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..3447044e2 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 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..7efd64e34 100644 --- a/src/datadogV2/model/model_user_team_permission_attributes.rs +++ b/src/datadogV2/model/model_user_team_permission_attributes.rs @@ -17,7 +17,16 @@ impl UserTeamPermissionAttributes { pub fn new() -> UserTeamPermissionAttributes { UserTeamPermissionAttributes { permissions: None } } + + pub fn permissions( + &mut self, + value: std::collections::BTreeMap, + ) -> &mut Self { + self.permissions = Some(value); + 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 062791528..7bd342f98 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,7 +23,24 @@ impl UserTeamRelationships { user: None, } } + + pub fn team( + &mut self, + value: crate::datadogV2::model::RelationshipToUserTeamTeam, + ) -> &mut Self { + self.team = Some(value); + self + } + + pub fn user( + &mut self, + value: crate::datadogV2::model::RelationshipToUserTeamUser, + ) -> &mut Self { + self.user = Some(value); + self + } } + impl Default for UserTeamRelationships { fn default() -> Self { Self::new() 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..0c9fdbd20 100644 --- a/src/datadogV2/model/model_user_team_response.rs +++ b/src/datadogV2/model/model_user_team_response.rs @@ -10,14 +10,20 @@ 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 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 2d57218e1..e51045ed8 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,9 @@ impl UserTeamUpdate { type_, } } + + 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_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..5eab1a35c 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,7 +27,23 @@ impl UserTeamsResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn links(&mut self, value: crate::datadogV2::model::TeamsResponseLinks) -> &mut Self { + self.links = Some(value); + 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 8b7cb5d3d..a035abe7f 100644 --- a/src/datadogV2/model/model_user_update_attributes.rs +++ b/src/datadogV2/model/model_user_update_attributes.rs @@ -27,7 +27,23 @@ impl UserUpdateAttributes { name: None, } } + + pub fn disabled(&mut self, value: bool) -> &mut Self { + self.disabled = Some(value); + self + } + + pub fn email(&mut self, value: String) -> &mut Self { + self.email = Some(value); + 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_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..ba703bc5a 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,7 +27,26 @@ impl UsersResponse { meta: None, } } + + pub fn data(&mut self, value: Vec) -> &mut Self { + self.data = Some(value); + self + } + + pub fn included( + &mut self, + value: Vec, + ) -> &mut Self { + self.included = Some(value); + 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() 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 {