From 31aa8a1092a922a8fede9ff1aed78091972e19bc Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 12:58:13 +0000 Subject: [PATCH] Add schema for mobile test (#2682) Co-authored-by: ci.datadog-api-spec --- .apigentools-info | 8 +- .generator/schemas/v1/openapi.yaml | 944 ++++++++++++++++++ api/datadogV1/api_synthetics.go | 219 ++++ api/datadogV1/doc.go | 3 + .../model_synthetics_config_variable_type.go | 2 + .../model_synthetics_mobile_device_id.go | 514 ++++++++++ api/datadogV1/model_synthetics_mobile_step.go | 392 ++++++++ .../model_synthetics_mobile_step_type.go | 96 ++ .../model_synthetics_mobile_test_.go | 465 +++++++++ .../model_synthetics_mobile_test_binding.go | 111 ++ ...el_synthetics_mobile_test_binding_items.go | 147 +++ ...nthetics_mobile_test_binding_items_role.go | 66 ++ ...model_synthetics_mobile_test_ci_options.go | 111 ++ .../model_synthetics_mobile_test_config.go | 146 +++ ...bile_test_initial_application_arguments.go | 111 ++ ...al_application_arguments_property_names.go | 102 ++ .../model_synthetics_mobile_test_options.go | 684 +++++++++++++ ...ics_mobile_test_options_monitor_options.go | 219 ++++ ...onitor_options_notification_preset_name.go | 70 ++ .../model_synthetics_mobile_test_type.go | 64 ++ ...thetics_mobile_tests_mobile_application.go | 182 ++++ ...tests_mobile_application_reference_type.go | 66 ++ .../synthetics/CreateSyntheticsMobileTest.go | 50 + examples/v1/synthetics/GetMobileTest.go | 32 + examples/v1/synthetics/UpdateMobileTest.go | 53 + ..._the_created_test_details._response.freeze | 1 + ...ns_the_created_test_details._response.yaml | 46 + ...t_a_Mobile_test_returns_OK_response.freeze | 1 + ...dit_a_Mobile_test_returns_OK_response.yaml | 68 ++ ...t_a_Mobile_test_returns_OK_response.freeze | 1 + ...Get_a_Mobile_test_returns_OK_response.yaml | 65 ++ tests/scenarios/features/v1/given.json | 12 + .../scenarios/features/v1/synthetics.feature | 77 ++ .../v1/synthetics_mobile_test_payload.json | 21 + ...synthetics_mobile_test_update_payload.json | 21 + tests/scenarios/features/v1/undo.json | 25 + 36 files changed, 5191 insertions(+), 4 deletions(-) create mode 100644 api/datadogV1/model_synthetics_mobile_device_id.go create mode 100644 api/datadogV1/model_synthetics_mobile_step.go create mode 100644 api/datadogV1/model_synthetics_mobile_step_type.go create mode 100644 api/datadogV1/model_synthetics_mobile_test_.go create mode 100644 api/datadogV1/model_synthetics_mobile_test_binding.go create mode 100644 api/datadogV1/model_synthetics_mobile_test_binding_items.go create mode 100644 api/datadogV1/model_synthetics_mobile_test_binding_items_role.go create mode 100644 api/datadogV1/model_synthetics_mobile_test_ci_options.go create mode 100644 api/datadogV1/model_synthetics_mobile_test_config.go create mode 100644 api/datadogV1/model_synthetics_mobile_test_initial_application_arguments.go create mode 100644 api/datadogV1/model_synthetics_mobile_test_initial_application_arguments_property_names.go create mode 100644 api/datadogV1/model_synthetics_mobile_test_options.go create mode 100644 api/datadogV1/model_synthetics_mobile_test_options_monitor_options.go create mode 100644 api/datadogV1/model_synthetics_mobile_test_options_monitor_options_notification_preset_name.go create mode 100644 api/datadogV1/model_synthetics_mobile_test_type.go create mode 100644 api/datadogV1/model_synthetics_mobile_tests_mobile_application.go create mode 100644 api/datadogV1/model_synthetics_mobile_tests_mobile_application_reference_type.go create mode 100644 examples/v1/synthetics/CreateSyntheticsMobileTest.go create mode 100644 examples/v1/synthetics/GetMobileTest.go create mode 100644 examples/v1/synthetics/UpdateMobileTest.go create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_mobile_test_returns_OK_-_Returns_the_created_test_details._response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_mobile_test_returns_OK_-_Returns_the_created_test_details._response.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Edit_a_Mobile_test_returns_OK_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Edit_a_Mobile_test_returns_OK_response.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Get_a_Mobile_test_returns_OK_response.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Get_a_Mobile_test_returns_OK_response.yaml create mode 100644 tests/scenarios/features/v1/synthetics_mobile_test_payload.json create mode 100644 tests/scenarios/features/v1/synthetics_mobile_test_update_payload.json diff --git a/.apigentools-info b/.apigentools-info index 57e3dfcf7c3..90fc74a00dc 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-10-01 19:12:34.277643", - "spec_repo_commit": "34a01c1d" + "regenerated": "2024-10-02 11:36:16.717771", + "spec_repo_commit": "c09e55c6" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-10-01 19:12:34.293247", - "spec_repo_commit": "34a01c1d" + "regenerated": "2024-10-02 11:36:16.732159", + "spec_repo_commit": "c09e55c6" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 3ed2686dde2..fa65f3a5d10 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -15061,11 +15061,13 @@ components: enum: - global - text + - email example: text type: string x-enum-varnames: - GLOBAL - TEXT + - EMAIL SyntheticsCoreWebVitals: description: Core Web Vitals attached to a browser test step. properties: @@ -15468,6 +15470,795 @@ components: $ref: '#/components/schemas/SyntheticsLocation' type: array type: object + SyntheticsMobileDeviceID: + description: The device ID. + enum: + - apple ipad (2022),16.4 + - apple ipad (2022),17.3.1 + - apple ipad 7th gen (2019),13.3 + - apple ipad 9th gen (2021),15.0.2 + - apple ipad 9th gen (2021),16.1 + - apple ipad air (2022),15.4.1 + - apple ipad mini (5th gen),14.6 + - apple ipad mini (6th gen),15.1 + - apple ipad pro 11 (2022),16.3 + - apple ipad pro 12.9 (2020),14.8 + - apple ipad pro 12.9 (2021),15.6.1 + - apple ipad pro 12.9 (2022),16.5 + - apple iphone 11 pro max,13.1.3 + - apple iphone 11 pro,13.6 + - apple iphone 11 pro,15.5 + - apple iphone 11,13.3.1 + - apple iphone 11,14.0 + - apple iphone 11,16.3 + - apple iphone 12 mini,14.2 + - apple iphone 12 mini,16.5 + - apple iphone 12 pro max,14.5.1 + - apple iphone 12 pro,14.5.1 + - apple iphone 12 pro,14.8 + - apple iphone 12 pro,15.0.2 + - apple iphone 12 pro,16.2 + - apple iphone 12,14.2 + - apple iphone 12,14.6 + - apple iphone 12,14.8 + - apple iphone 12,15.6.1 + - apple iphone 12,16.6.1 + - apple iphone 13 mini,15.0.2 + - apple iphone 13 mini,16.6 + - apple iphone 13 pro max,15.1 + - apple iphone 13 pro max,17.3 + - apple iphone 13 pro,15.0.2 + - apple iphone 13 pro,15.2 + - apple iphone 14 plus,16.1 + - apple iphone 14 pro max,16.2 + - apple iphone 14 pro,16.1 + - apple iphone 14 pro,17.3.1 + - apple iphone 14,16.1 + - apple iphone 15 pro max,17.3.1 + - apple iphone 15 pro,17.3.1 + - apple iphone 15,17.2.1 + - apple iphone se (2022),15.4.1 + - galaxy a40,9 + - galaxy a5,8.0.0 + - galaxy note 10,9 + - galaxy note5 (at&t),7.0 + - galaxy s10,9 + - galaxy s6 edge sm-g925f,7.0 + - galaxy s8 (t-mobile),8.0.0 + - galaxy s8 unlocked,8.0.0 + - galaxy s9 (unlocked),9 + - galaxy s9+ (unlocked),8.0.0 + - galaxy s9+ (unlocked),9 + - google pixel 2,8.0.0 + - google pixel 2,9 + - google pixel 3 xl,10 + - google pixel 3 xl,9 + - google pixel 3,10 + - google pixel 3,9 + - google pixel 3a xl,11 + - google pixel 3a xl,12 + - google pixel 3a,10 + - google pixel 4 (unlocked),10 + - google pixel 4 (unlocked),11 + - google pixel 4 xl (unlocked),10 + - google pixel 4a,11 + - google pixel 4a,12 + - google pixel 5a 5g,12 + - google pixel 6 pro,12 + - google pixel 6,12 + - google pixel 6a,13 + - google pixel 7 pro,13 + - google pixel 7,13 + - google pixel 7,14 + - google pixel 8 pro,14 + - google pixel 8,14 + - ipad 8th gen (2020),14.8 + - ipad air 2,13.6 + - ipad air 4th gen (2020),14.8 + - iphone 13,15.0.2 + - iphone 13,16.0.2 + - iphone 6,12.5.4 + - iphone 6s,14.4.2 + - iphone 7,14.8 + - iphone 8,13.5.1 + - iphone 8,14.4.2 + - iphone se (2020),13.6 + - iphone se (2020),14.6 + - iphone se (2020),15.0.2 + - iphone x,14.6 + - iphone xr,12.0 + - iphone xr,14.0 + - iphone xs max,12.1 + - iphone xs,13.6 + - lg stylo 5,9 + - lg stylo 6,10 + - moto g 4,7.0 + - moto g7 play,9 + - nexus 7 - 2nd gen (wifi),6.0 + - oneplus 8t,11 + - pixel 2 xl,8.1.0 + - pixel 2 xl,9 + - pixel 5,11 + - pixel 5,12 + - pixel xl,8.0.0 + - pixel,7.1.2 + - samsung a51,10 + - samsung galaxy a10s,10 + - samsung galaxy a13 5g,11 + - samsung galaxy a53 5g,12 + - samsung galaxy a7,8.0.0 + - samsung galaxy a71,11 + - samsung galaxy a73 5g,12 + - samsung galaxy j7 (2018),8.0.0 + - samsung galaxy note20,11 + - samsung galaxy s20 (unlocked),10 + - samsung galaxy s20+ (unlocked),10 + - samsung galaxy s21 ultra,11 + - samsung galaxy s21 ultra,12 + - samsung galaxy s21+,11 + - samsung galaxy s21,11 + - samsung galaxy s21,12 + - samsung galaxy s22 5g,12 + - samsung galaxy s22 5g,13 + - samsung galaxy s22 ultra 5g,12 + - samsung galaxy s22+ 5g,12 + - samsung galaxy s23 ultra,13 + - samsung galaxy s23+,13 + - samsung galaxy s23,13 + - samsung galaxy s23,14 + - samsung galaxy tab a 10.1,10 + - samsung galaxy tab a 10.1,7.0 + - samsung galaxy tab a8 (2021),11 + - samsung galaxy tab s4,8.1.0 + - samsung galaxy tab s6,9 + - samsung galaxy tab s7,11 + - samsung galaxy tab s8,12 + - samsung s20 ultra,10 + - sony xperia xz3,9 + - xiaomi redmi note 10 5g,11 + - synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16 + - synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_17 + - synthetics:mobile:device:apple_ipad_9th_gen_2021_ios_15 + - synthetics:mobile:device:apple_ipad_air_2022_ios_15 + - synthetics:mobile:device:apple_ipad_mini_5th_gen_ios_14 + - synthetics:mobile:device:apple_ipad_mini_6th_gen_ios_15 + - synthetics:mobile:device:apple_ipad_pro_11_2022_ios_16 + - synthetics:mobile:device:apple_ipad_pro_12_9_2020_ios_14 + - synthetics:mobile:device:apple_ipad_pro_12_9_2021_ios_15 + - synthetics:mobile:device:apple_ipad_pro_12_9_2022_ios_16 + - synthetics:mobile:device:apple_iphone_11_ios_14 + - synthetics:mobile:device:apple_iphone_11_ios_16 + - synthetics:mobile:device:apple_iphone_11_pro_ios_15 + - synthetics:mobile:device:apple_iphone_12_ios_14 + - synthetics:mobile:device:apple_iphone_12_ios_15 + - synthetics:mobile:device:apple_iphone_12_ios_16 + - synthetics:mobile:device:apple_iphone_12_mini_ios_14 + - synthetics:mobile:device:apple_iphone_12_mini_ios_16 + - synthetics:mobile:device:apple_iphone_12_pro_ios_14 + - synthetics:mobile:device:apple_iphone_12_pro_max_ios_14 + - synthetics:mobile:device:apple_iphone_13_mini_ios_15 + - synthetics:mobile:device:apple_iphone_13_mini_ios_16 + - synthetics:mobile:device:apple_iphone_13_pro_ios_15 + - synthetics:mobile:device:apple_iphone_13_pro_max_ios_15 + - synthetics:mobile:device:apple_iphone_13_pro_max_ios_17 + - synthetics:mobile:device:apple_iphone_14_ios_16 + - synthetics:mobile:device:apple_iphone_14_plus_ios_16 + - synthetics:mobile:device:apple_iphone_14_pro_ios_16 + - synthetics:mobile:device:apple_iphone_14_pro_ios_17 + - synthetics:mobile:device:apple_iphone_14_pro_max_ios_16 + - synthetics:mobile:device:apple_iphone_6_ios_12 + - synthetics:mobile:device:apple_iphone_8_ios_13 + - synthetics:mobile:device:apple_iphone_8_ios_14 + - synthetics:mobile:device:apple_iphone_se_2022_ios_15 + - synthetics:mobile:device:apple_iphone_se_2022_ios_16 + - synthetics:mobile:device:galaxy_a5_android_8 + - synthetics:mobile:device:galaxy_note5_android_7 + - synthetics:mobile:device:google_pixel_3a_xl_android_11 + - synthetics:mobile:device:google_pixel_4_unlocked_android_11 + - synthetics:mobile:device:google_pixel_4_xl_unlocked_android_10 + - synthetics:mobile:device:google_pixel_4a_android_11 + - synthetics:mobile:device:google_pixel_6_android_12 + - synthetics:mobile:device:google_pixel_6_pro_android_12 + - synthetics:mobile:device:google_pixel_6a_android_13 + - synthetics:mobile:device:google_pixel_7_android_13 + - synthetics:mobile:device:google_pixel_7_android_14 + - synthetics:mobile:device:google_pixel_7_pro_android_13 + - synthetics:mobile:device:google_pixel_8_android_14 + - synthetics:mobile:device:google_pixel_8_pro_android_14 + - synthetics:mobile:device:ipad_air_2_ios_13 + - synthetics:mobile:device:ipad_air_4th_gen_2020_ios_14 + - synthetics:mobile:device:iphone_13_ios_15 + - synthetics:mobile:device:iphone_13_ios_16 + - synthetics:mobile:device:iphone_15_ios_17 + - synthetics:mobile:device:iphone_15_pro_ios_17 + - synthetics:mobile:device:iphone_15_pro_max_ios_17 + - synthetics:mobile:device:iphone_se_2020_ios_13 + - synthetics:mobile:device:iphone_se_2020_ios_14 + - synthetics:mobile:device:iphone_x_ios_14 + - synthetics:mobile:device:iphone_xr_ios_14 + - synthetics:mobile:device:iphone_xs_ios_13 + - synthetics:mobile:device:lg_stylo_6_android_10 + - synthetics:mobile:device:pixel_5_android_12 + - synthetics:mobile:device:samsung_a51_android_10 + - synthetics:mobile:device:samsung_galaxy_a71_android_11 + - synthetics:mobile:device:samsung_galaxy_note20_android_11 + - synthetics:mobile:device:samsung_galaxy_s21_android_11 + - synthetics:mobile:device:samsung_galaxy_s21_android_12 + - synthetics:mobile:device:samsung_galaxy_s21_plus_android_11 + - synthetics:mobile:device:samsung_galaxy_s21_ultra_android_11 + - synthetics:mobile:device:samsung_galaxy_s22_5g_android_12 + - synthetics:mobile:device:samsung_galaxy_s22_5g_android_13 + - synthetics:mobile:device:samsung_galaxy_s22_plus_5g_android_12 + - synthetics:mobile:device:samsung_galaxy_s22_ultra_5g_android_12 + - synthetics:mobile:device:samsung_galaxy_s23_android_13 + - synthetics:mobile:device:samsung_galaxy_s23_android_14 + - synthetics:mobile:device:samsung_galaxy_s23_plus_android_13 + - synthetics:mobile:device:samsung_galaxy_s23_plus_android_14 + - synthetics:mobile:device:samsung_galaxy_s23_ultra_android_13 + - synthetics:mobile:device:samsung_galaxy_tab_a_10_1_android_7 + - synthetics:mobile:device:samsung_galaxy_tab_s7_android_11 + - synthetics:mobile:device:samsung_galaxy_tab_s8_android_12 + - synthetics:mobile:device:xiaomi_redmi_note_10_5g_android_11 + example: apple ipad (2022),16.4 + type: string + x-enum-varnames: + - APPLE_IPAD__2022__16_4 + - APPLE_IPAD__2022__17_3_1 + - APPLE_IPAD_7TH_GEN__2019__13_3 + - APPLE_IPAD_9TH_GEN__2021__15_0_2 + - APPLE_IPAD_9TH_GEN__2021__16_1 + - APPLE_IPAD_AIR__2022__15_4_1 + - APPLE_IPAD_MINI__5TH_GEN__14_6 + - APPLE_IPAD_MINI__6TH_GEN__15_1 + - APPLE_IPAD_PRO_11__2022__16_3 + - APPLE_IPAD_PRO_12_9__2020__14_8 + - APPLE_IPAD_PRO_12_9__2021__15_6_1 + - APPLE_IPAD_PRO_12_9__2022__16_5 + - APPLE_IPHONE_11_PRO_MAX_13_1_3 + - APPLE_IPHONE_11_PRO_13_6 + - APPLE_IPHONE_11_PRO_15_5 + - APPLE_IPHONE_11_13_3_1 + - APPLE_IPHONE_11_14_0 + - APPLE_IPHONE_11_16_3 + - APPLE_IPHONE_12_MINI_14_2 + - APPLE_IPHONE_12_MINI_16_5 + - APPLE_IPHONE_12_PRO_MAX_14_5_1 + - APPLE_IPHONE_12_PRO_14_5_1 + - APPLE_IPHONE_12_PRO_14_8 + - APPLE_IPHONE_12_PRO_15_0_2 + - APPLE_IPHONE_12_PRO_16_2 + - APPLE_IPHONE_12_14_2 + - APPLE_IPHONE_12_14_6 + - APPLE_IPHONE_12_14_8 + - APPLE_IPHONE_12_15_6_1 + - APPLE_IPHONE_12_16_6_1 + - APPLE_IPHONE_13_MINI_15_0_2 + - APPLE_IPHONE_13_MINI_16_6 + - APPLE_IPHONE_13_PRO_MAX_15_1 + - APPLE_IPHONE_13_PRO_MAX_17_3 + - APPLE_IPHONE_13_PRO_15_0_2 + - APPLE_IPHONE_13_PRO_15_2 + - APPLE_IPHONE_14_PLUS_16_1 + - APPLE_IPHONE_14_PRO_MAX_16_2 + - APPLE_IPHONE_14_PRO_16_1 + - APPLE_IPHONE_14_PRO_17_3_1 + - APPLE_IPHONE_14_16_1 + - APPLE_IPHONE_15_PRO_MAX_17_3_1 + - APPLE_IPHONE_15_PRO_17_3_1 + - APPLE_IPHONE_15_17_2_1 + - APPLE_IPHONE_SE__2022__15_4_1 + - GALAXY_A40_9 + - GALAXY_A5_8_0_0 + - GALAXY_NOTE_10_9 + - GALAXY_NOTE5__AT_T__7_0 + - GALAXY_S10_9 + - GALAXY_S6_EDGE_SMNOT_G925F_7_0 + - GALAXY_S8__TNOT_MOBILE__8_0_0 + - GALAXY_S8_UNLOCKED_8_0_0 + - GALAXY_S9__UNLOCKED__9 + - GALAXY_S9___UNLOCKED__8_0_0 + - GALAXY_S9___UNLOCKED__9 + - GOOGLE_PIXEL_2_8_0_0 + - GOOGLE_PIXEL_2_9 + - GOOGLE_PIXEL_3_XL_10 + - GOOGLE_PIXEL_3_XL_9 + - GOOGLE_PIXEL_3_10 + - GOOGLE_PIXEL_3_9 + - GOOGLE_PIXEL_3A_XL_11 + - GOOGLE_PIXEL_3A_XL_12 + - GOOGLE_PIXEL_3A_10 + - GOOGLE_PIXEL_4__UNLOCKED__10 + - GOOGLE_PIXEL_4__UNLOCKED__11 + - GOOGLE_PIXEL_4_XL__UNLOCKED__10 + - GOOGLE_PIXEL_4A_11 + - GOOGLE_PIXEL_4A_12 + - GOOGLE_PIXEL_5A_5G_12 + - GOOGLE_PIXEL_6_PRO_12 + - GOOGLE_PIXEL_6_12 + - GOOGLE_PIXEL_6A_13 + - GOOGLE_PIXEL_7_PRO_13 + - GOOGLE_PIXEL_7_13 + - GOOGLE_PIXEL_7_14 + - GOOGLE_PIXEL_8_PRO_14 + - GOOGLE_PIXEL_8_14 + - IPAD_8TH_GEN__2020__14_8 + - IPAD_AIR_2_13_6 + - IPAD_AIR_4TH_GEN__2020__14_8 + - IPHONE_13_15_0_2 + - IPHONE_13_16_0_2 + - IPHONE_6_12_5_4 + - IPHONE_6S_14_4_2 + - IPHONE_7_14_8 + - IPHONE_8_13_5_1 + - IPHONE_8_14_4_2 + - IPHONE_SE__2020__13_6 + - IPHONE_SE__2020__14_6 + - IPHONE_SE__2020__15_0_2 + - IPHONE_X_14_6 + - IPHONE_XR_12_0 + - IPHONE_XR_14_0 + - IPHONE_XS_MAX_12_1 + - IPHONE_XS_13_6 + - LG_STYLO_5_9 + - LG_STYLO_6_10 + - MOTO_G_4_7_0 + - MOTO_G7_PLAY_9 + - NEXUS_7_NOT__2ND_GEN__WIFI__6_0 + - ONEPLUS_8T_11 + - PIXEL_2_XL_8_1_0 + - PIXEL_2_XL_9 + - PIXEL_5_11 + - PIXEL_5_12 + - PIXEL_XL_8_0_0 + - PIXEL_7_1_2 + - SAMSUNG_A51_10 + - SAMSUNG_GALAXY_A10S_10 + - SAMSUNG_GALAXY_A13_5G_11 + - SAMSUNG_GALAXY_A53_5G_12 + - SAMSUNG_GALAXY_A7_8_0_0 + - SAMSUNG_GALAXY_A71_11 + - SAMSUNG_GALAXY_A73_5G_12 + - SAMSUNG_GALAXY_J7__2018__8_0_0 + - SAMSUNG_GALAXY_NOTE20_11 + - SAMSUNG_GALAXY_S20__UNLOCKED__10 + - SAMSUNG_GALAXY_S20___UNLOCKED__10 + - SAMSUNG_GALAXY_S21_ULTRA_11 + - SAMSUNG_GALAXY_S21_ULTRA_12 + - SAMSUNG_GALAXY_S21__11 + - SAMSUNG_GALAXY_S21_11 + - SAMSUNG_GALAXY_S21_12 + - SAMSUNG_GALAXY_S22_5G_12 + - SAMSUNG_GALAXY_S22_5G_13 + - SAMSUNG_GALAXY_S22_ULTRA_5G_12 + - SAMSUNG_GALAXY_S22__5G_12 + - SAMSUNG_GALAXY_S23_ULTRA_13 + - SAMSUNG_GALAXY_S23__13 + - SAMSUNG_GALAXY_S23_13 + - SAMSUNG_GALAXY_S23_14 + - SAMSUNG_GALAXY_TAB_A_10_1_10 + - SAMSUNG_GALAXY_TAB_A_10_1_7_0 + - SAMSUNG_GALAXY_TAB_A8__2021__11 + - SAMSUNG_GALAXY_TAB_S4_8_1_0 + - SAMSUNG_GALAXY_TAB_S6_9 + - SAMSUNG_GALAXY_TAB_S7_11 + - SAMSUNG_GALAXY_TAB_S8_12 + - SAMSUNG_S20_ULTRA_10 + - SONY_XPERIA_XZ3_9 + - XIAOMI_REDMI_NOTE_10_5G_11 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_10TH_GEN_2022_IOS_16 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_10TH_GEN_2022_IOS_17 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_9TH_GEN_2021_IOS_15 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_AIR_2022_IOS_15 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_MINI_5TH_GEN_IOS_14 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_MINI_6TH_GEN_IOS_15 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_11_2022_IOS_16 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_12_9_2020_IOS_14 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_12_9_2021_IOS_15 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_12_9_2022_IOS_16 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_11_IOS_14 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_11_IOS_16 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_11_PRO_IOS_15 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_IOS_14 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_IOS_15 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_IOS_16 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_MINI_IOS_14 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_MINI_IOS_16 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_PRO_IOS_14 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_PRO_MAX_IOS_14 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_MINI_IOS_15 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_MINI_IOS_16 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_PRO_IOS_15 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_PRO_MAX_IOS_15 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_PRO_MAX_IOS_17 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_IOS_16 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PLUS_IOS_16 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PRO_IOS_16 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PRO_IOS_17 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PRO_MAX_IOS_16 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_6_IOS_12 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_8_IOS_13 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_8_IOS_14 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_SE_2022_IOS_15 + - SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_SE_2022_IOS_16 + - SYNTHETICS_MOBILE_DEVICE_GALAXY_A5_ANDROID_8 + - SYNTHETICS_MOBILE_DEVICE_GALAXY_NOTE5_ANDROID_7 + - SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_3A_XL_ANDROID_11 + - SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_4_UNLOCKED_ANDROID_11 + - SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_4_XL_UNLOCKED_ANDROID_10 + - SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_4A_ANDROID_11 + - SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_6_ANDROID_12 + - SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_6_PRO_ANDROID_12 + - SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_6A_ANDROID_13 + - SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_7_ANDROID_13 + - SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_7_ANDROID_14 + - SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_7_PRO_ANDROID_13 + - SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_8_ANDROID_14 + - SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_8_PRO_ANDROID_14 + - SYNTHETICS_MOBILE_DEVICE_IPAD_AIR_2_IOS_13 + - SYNTHETICS_MOBILE_DEVICE_IPAD_AIR_4TH_GEN_2020_IOS_14 + - SYNTHETICS_MOBILE_DEVICE_IPHONE_13_IOS_15 + - SYNTHETICS_MOBILE_DEVICE_IPHONE_13_IOS_16 + - SYNTHETICS_MOBILE_DEVICE_IPHONE_15_IOS_17 + - SYNTHETICS_MOBILE_DEVICE_IPHONE_15_PRO_IOS_17 + - SYNTHETICS_MOBILE_DEVICE_IPHONE_15_PRO_MAX_IOS_17 + - SYNTHETICS_MOBILE_DEVICE_IPHONE_SE_2020_IOS_13 + - SYNTHETICS_MOBILE_DEVICE_IPHONE_SE_2020_IOS_14 + - SYNTHETICS_MOBILE_DEVICE_IPHONE_X_IOS_14 + - SYNTHETICS_MOBILE_DEVICE_IPHONE_XR_IOS_14 + - SYNTHETICS_MOBILE_DEVICE_IPHONE_XS_IOS_13 + - SYNTHETICS_MOBILE_DEVICE_LG_STYLO_6_ANDROID_10 + - SYNTHETICS_MOBILE_DEVICE_PIXEL_5_ANDROID_12 + - SYNTHETICS_MOBILE_DEVICE_SAMSUNG_A51_ANDROID_10 + - SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_A71_ANDROID_11 + - SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_NOTE20_ANDROID_11 + - SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_ANDROID_11 + - SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_ANDROID_12 + - SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_PLUS_ANDROID_11 + - SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_ULTRA_ANDROID_11 + - SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_5G_ANDROID_12 + - SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_5G_ANDROID_13 + - SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_PLUS_5G_ANDROID_12 + - SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_ULTRA_5G_ANDROID_12 + - SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_ANDROID_13 + - SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_ANDROID_14 + - SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_PLUS_ANDROID_13 + - SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_PLUS_ANDROID_14 + - SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_ULTRA_ANDROID_13 + - SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_TAB_A_10_1_ANDROID_7 + - SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_TAB_S7_ANDROID_11 + - SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_TAB_S8_ANDROID_12 + - SYNTHETICS_MOBILE_DEVICE_XIAOMI_REDMI_NOTE_10_5G_ANDROID_11 + SyntheticsMobileStep: + description: The steps used in a Synthetic mobile test. + properties: + allowFailure: + description: A boolean set to allow this step to fail. + type: boolean + hasNewStepElement: + description: A boolean set to determine if the step has a new step element. + type: boolean + isCritical: + description: A boolean to use in addition to `allowFailure` to determine + if the test should be marked as failed when the step fails. + type: boolean + name: + description: The name of the step. + maxLength: 1500 + type: string + noScreenshot: + description: A boolean set to not take a screenshot for the step. + type: boolean + params: + description: The parameters of the mobile step. + type: object + publicId: + description: The public ID of the step. + example: pub-lic-id0 + type: string + timeout: + description: The time before declaring a step failed. + format: int64 + type: integer + type: + $ref: '#/components/schemas/SyntheticsMobileStepType' + type: object + SyntheticsMobileStepType: + description: Step type used in your mobile Synthetic test. + enum: + - assertElementContent + - assertScreenContains + - assertScreenLacks + - doubleTap + - extractVariable + - flick + - openDeeplink + - playSubTest + - pressBack + - restartApplication + - rotate + - scroll + - scrollToElement + - tap + - toggleWiFi + - typeText + - wait + example: assertElementContent + type: string + x-enum-varnames: + - ASSERTELEMENTCONTENT + - ASSERTSCREENCONTAINS + - ASSERTSCREENLACKS + - DOUBLETAP + - EXTRACTVARIABLE + - FLICK + - OPENDEEPLINK + - PLAYSUBTEST + - PRESSBACK + - RESTARTAPPLICATION + - ROTATE + - SCROLL + - SCROLLTOELEMENT + - TAP + - TOGGLEWIFI + - TYPETEXT + - WAIT + SyntheticsMobileTest: + description: Object containing details about a Synthetic mobile test. + properties: + config: + $ref: '#/components/schemas/SyntheticsMobileTestConfig' + device_ids: + description: The `SyntheticsMobileTest` `device_ids`. + items: + $ref: '#/components/schemas/SyntheticsMobileDeviceID' + type: array + message: + description: Notification message associated with the test. + example: Notification message + type: string + monitor_id: + description: The associated monitor ID. + example: 12345678 + format: int64 + readOnly: true + type: integer + name: + description: Name of the test. + example: Example test name + type: string + options: + $ref: '#/components/schemas/SyntheticsMobileTestOptions' + public_id: + description: The public ID of the test. + example: 123-abc-456 + readOnly: true + type: string + status: + $ref: '#/components/schemas/SyntheticsTestPauseStatus' + steps: + description: Array of steps for the test. + items: + $ref: '#/components/schemas/SyntheticsMobileStep' + type: array + tags: + description: Array of tags attached to the test. + example: + - env:production + items: + description: A tag attached to the test. + type: string + type: array + type: + $ref: '#/components/schemas/SyntheticsMobileTestType' + required: + - config + - name + - options + - type + type: object + SyntheticsMobileTestBinding: + description: Objects describing the binding used for a mobile test. + properties: + items: + $ref: '#/components/schemas/SyntheticsMobileTestBindingItems' + type: object + SyntheticsMobileTestBindingItems: + description: Object describing the binding used for a mobile test. + properties: + principals: + $ref: '#/components/schemas/SyntheticsMobileTestBindingPrincipals' + role: + $ref: '#/components/schemas/SyntheticsMobileTestBindingItemsRole' + type: object + SyntheticsMobileTestBindingItemsRole: + description: The definition of `SyntheticsMobileTestBindingItemsRole` object. + enum: + - editor + - viewer + type: string + x-enum-varnames: + - EDITOR + - VIEWER + SyntheticsMobileTestBindingPrincipals: + description: List of principals for a mobile test binding. + items: + description: A principal for a mobile test binding. + maxLength: 1500 + type: string + type: array + SyntheticsMobileTestCiOptions: + description: CI/CD options for a Synthetic test. + properties: + executionRule: + $ref: '#/components/schemas/SyntheticsTestExecutionRule' + required: + - executionRule + type: object + SyntheticsMobileTestConfig: + description: Configuration object for a Synthetic mobile test. + properties: + initialApplicationArguments: + $ref: '#/components/schemas/SyntheticsMobileTestInitialApplicationArguments' + variables: + description: Array of variables used for the test steps. + items: + $ref: '#/components/schemas/SyntheticsConfigVariable' + type: array + type: object + SyntheticsMobileTestInitialApplicationArguments: + description: Initial application arguments for a mobile test. + properties: + propertyNames: + $ref: '#/components/schemas/SyntheticsMobileTestInitialApplicationArgumentsPropertyNames' + type: object + SyntheticsMobileTestInitialApplicationArgumentsPropertyNames: + description: Name of the property. + properties: + pattern: + description: The `propertyNames` `pattern`. + example: ^(?!_dd).*$ + type: string + type: object + SyntheticsMobileTestOptions: + description: Object describing the extra options for a Synthetic test. + properties: + allowApplicationCrash: + description: The `SyntheticsMobileTestOptions` `allowApplicationCrash`. + type: boolean + bindings: + description: Array of bindings used for the mobile test. + items: + $ref: '#/components/schemas/SyntheticsMobileTestBinding' + type: array + ci: + $ref: '#/components/schemas/SyntheticsMobileTestCiOptions' + defaultStepTimeout: + description: The `SyntheticsMobileTestOptions` `defaultStepTimeout`. + format: int32 + maximum: 300 + minimum: 1 + type: integer + device_ids: + description: For mobile test, array with the different device IDs used to + run the test. + items: + $ref: '#/components/schemas/SyntheticsMobileDeviceID' + type: array + disableAutoAcceptAlert: + description: The `SyntheticsMobileTestOptions` `disableAutoAcceptAlert`. + type: boolean + min_failure_duration: + description: Minimum amount of time in failure required to trigger an alert. + format: int64 + maximum: 7200 + minimum: 0 + type: integer + mobileApplication: + $ref: '#/components/schemas/SyntheticsMobileTestsMobileApplication' + monitor_name: + description: The monitor name is used for the alert title as well as for + all monitor dashboard widgets and SLOs. + type: string + monitor_options: + $ref: '#/components/schemas/SyntheticsMobileTestOptionsMonitorOptions' + monitor_priority: + description: Integer from 1 (high) to 5 (low) indicating alert severity. + format: int32 + maximum: 5 + minimum: 1 + type: integer + noScreenshot: + description: The `SyntheticsMobileTestOptions` `noScreenshot`. + type: boolean + restricted_roles: + $ref: '#/components/schemas/SyntheticsRestrictedRoles' + retry: + $ref: '#/components/schemas/SyntheticsTestOptionsRetry' + scheduling: + $ref: '#/components/schemas/SyntheticsTestOptionsScheduling' + tick_every: + description: The frequency at which to run the Synthetic test (in seconds). + format: int64 + maximum: 604800 + minimum: 300 + type: integer + verbosity: + description: The `SyntheticsMobileTestOptions` `verbosity`. + format: int32 + maximum: 5 + minimum: 0 + type: integer + type: object + SyntheticsMobileTestOptionsMonitorOptions: + description: 'Object containing the options for a mobile Synthetic test as a + monitor + + (for example, renotification).' + properties: + escalation_message: + description: Message to include in the escalation notification. + type: string + notification_preset_name: + $ref: '#/components/schemas/SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName' + renotify_interval: + description: 'Time interval before renotifying if the test is still failing + + (in minutes).' + format: int64 + minimum: 0 + type: integer + renotify_occurrences: + description: The `SyntheticsMobileTestOptionsMonitorOptions` `renotify_occurrences`. + format: int64 + type: integer + type: object + SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName: + description: The definition of `SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName` + object. + enum: + - show_all + - hide_all + - hide_query + - hide_handles + type: string + x-enum-varnames: + - SHOW_ALL + - HIDE_ALL + - HIDE_QUERY + - HIDE_HANDLES + SyntheticsMobileTestType: + default: mobile + description: Type of the Synthetic test, `mobile`. + enum: + - mobile + example: mobile + type: string + x-enum-varnames: + - MOBILE + SyntheticsMobileTestsMobileApplication: + description: Mobile application for mobile synthetics test. + properties: + applicationId: + description: Application ID of the mobile application. + maxLength: 1500 + type: string + referenceId: + description: Reference ID of the mobile application. + maxLength: 1500 + type: string + referenceType: + $ref: '#/components/schemas/SyntheticsMobileTestsMobileApplicationReferenceType' + type: object + SyntheticsMobileTestsMobileApplicationReferenceType: + description: Reference type for the mobile application for a mobile synthetics + test. + enum: + - latest + - version + type: string + x-enum-varnames: + - LATEST + - VERSION SyntheticsParsingOptions: description: Parsing options for variables to extract. example: {} @@ -16048,6 +16839,7 @@ components: - blocking - non_blocking - skipped + example: blocking type: string x-enum-varnames: - BLOCKING @@ -31912,6 +32704,158 @@ paths: operator: OR permissions: - synthetics_write + /api/v1/synthetics/tests/mobile: + post: + description: Create a Synthetic mobile test. + operationId: CreateSyntheticsMobileTest + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsMobileTest' + description: Details of the test to create. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsMobileTest' + description: OK - Returns the created test details. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: '- JSON format is wrong + + - Creation failed' + '402': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Test quota is reached + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: Create a mobile test + tags: + - Synthetics + x-codegen-request-body-name: body + /api/v1/synthetics/tests/mobile/{public_id}: + get: + description: 'Get the detailed configuration associated with + + a Synthetic Mobile test.' + operationId: GetMobileTest + parameters: + - description: The public ID of the test to get details from. + in: path + name: public_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsMobileTest' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: '- Synthetic Monitoring is not activated for the user + + - Test is not owned by the user' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_read + summary: Get a Mobile test + tags: + - Synthetics + put: + description: Edit the configuration of a Synthetic Mobile test. + operationId: UpdateMobileTest + parameters: + - description: The public ID of the test to get details from. + in: path + name: public_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsMobileTest' + description: New test details to be saved. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsMobileTest' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: '- JSON format is wrong + + - Updating sub-type is forbidden' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: '- Synthetic Monitoring is not activated for the user + + - Test is not owned by the user + + - Test can''t be found' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: Edit a Mobile test + tags: + - Synthetics + x-codegen-request-body-name: body /api/v1/synthetics/tests/trigger: post: description: Trigger a set of Synthetic tests. diff --git a/api/datadogV1/api_synthetics.go b/api/datadogV1/api_synthetics.go index b3a7709e577..54c5154bf23 100644 --- a/api/datadogV1/api_synthetics.go +++ b/api/datadogV1/api_synthetics.go @@ -309,6 +309,79 @@ func (a *SyntheticsApi) CreateSyntheticsBrowserTest(ctx _context.Context, body S return localVarReturnValue, localVarHTTPResponse, nil } +// CreateSyntheticsMobileTest Create a mobile test. +// Create a Synthetic mobile test. +func (a *SyntheticsApi) CreateSyntheticsMobileTest(ctx _context.Context, body SyntheticsMobileTest) (SyntheticsMobileTest, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarReturnValue SyntheticsMobileTest + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v1.SyntheticsApi.CreateSyntheticsMobileTest") + if err != nil { + return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/synthetics/tests/mobile" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Content-Type"] = "application/json" + localVarHeaderParams["Accept"] = "application/json" + + // body params + localVarPostBody = &body + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 402 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + // DeleteGlobalVariable Delete a global variable. // Delete a Synthetic global variable. func (a *SyntheticsApi) DeleteGlobalVariable(ctx _context.Context, variableId string) (*_nethttp.Response, error) { @@ -1191,6 +1264,78 @@ func (a *SyntheticsApi) GetGlobalVariable(ctx _context.Context, variableId strin return localVarReturnValue, localVarHTTPResponse, nil } +// GetMobileTest Get a Mobile test. +// Get the detailed configuration associated with +// a Synthetic Mobile test. +func (a *SyntheticsApi) GetMobileTest(ctx _context.Context, publicId string) (SyntheticsMobileTest, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarReturnValue SyntheticsMobileTest + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v1.SyntheticsApi.GetMobileTest") + if err != nil { + return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/synthetics/tests/mobile/{public_id}" + localVarPath = strings.Replace(localVarPath, "{"+"public_id"+"}", _neturl.PathEscape(datadog.ParameterToString(publicId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Accept"] = "application/json" + + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + // GetPrivateLocation Get a private location. // Get a Synthetic private location. func (a *SyntheticsApi) GetPrivateLocation(ctx _context.Context, locationId string) (SyntheticsPrivateLocation, *_nethttp.Response, error) { @@ -2139,6 +2284,80 @@ func (a *SyntheticsApi) UpdateBrowserTest(ctx _context.Context, publicId string, return localVarReturnValue, localVarHTTPResponse, nil } +// UpdateMobileTest Edit a Mobile test. +// Edit the configuration of a Synthetic Mobile test. +func (a *SyntheticsApi) UpdateMobileTest(ctx _context.Context, publicId string, body SyntheticsMobileTest) (SyntheticsMobileTest, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPut + localVarPostBody interface{} + localVarReturnValue SyntheticsMobileTest + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v1.SyntheticsApi.UpdateMobileTest") + if err != nil { + return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/synthetics/tests/mobile/{public_id}" + localVarPath = strings.Replace(localVarPath, "{"+"public_id"+"}", _neturl.PathEscape(datadog.ParameterToString(publicId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Content-Type"] = "application/json" + localVarHeaderParams["Accept"] = "application/json" + + // body params + localVarPostBody = &body + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + // UpdatePrivateLocation Edit a private location. // Edit a Synthetic private location. func (a *SyntheticsApi) UpdatePrivateLocation(ctx _context.Context, locationId string, body SyntheticsPrivateLocation) (SyntheticsPrivateLocation, *_nethttp.Response, error) { diff --git a/api/datadogV1/doc.go b/api/datadogV1/doc.go index 9d8b94fbd90..df7ca083df1 100644 --- a/api/datadogV1/doc.go +++ b/api/datadogV1/doc.go @@ -152,6 +152,7 @@ // - [SyntheticsApi.CreatePrivateLocation] // - [SyntheticsApi.CreateSyntheticsAPITest] // - [SyntheticsApi.CreateSyntheticsBrowserTest] +// - [SyntheticsApi.CreateSyntheticsMobileTest] // - [SyntheticsApi.DeleteGlobalVariable] // - [SyntheticsApi.DeletePrivateLocation] // - [SyntheticsApi.DeleteTests] @@ -163,6 +164,7 @@ // - [SyntheticsApi.GetBrowserTestLatestResults] // - [SyntheticsApi.GetBrowserTestResult] // - [SyntheticsApi.GetGlobalVariable] +// - [SyntheticsApi.GetMobileTest] // - [SyntheticsApi.GetPrivateLocation] // - [SyntheticsApi.GetSyntheticsCIBatch] // - [SyntheticsApi.GetSyntheticsDefaultLocations] @@ -175,6 +177,7 @@ // - [SyntheticsApi.TriggerTests] // - [SyntheticsApi.UpdateAPITest] // - [SyntheticsApi.UpdateBrowserTest] +// - [SyntheticsApi.UpdateMobileTest] // - [SyntheticsApi.UpdatePrivateLocation] // - [SyntheticsApi.UpdateTestPauseStatus] // - [TagsApi.CreateHostTags] diff --git a/api/datadogV1/model_synthetics_config_variable_type.go b/api/datadogV1/model_synthetics_config_variable_type.go index d70cf966977..f93cf821c08 100644 --- a/api/datadogV1/model_synthetics_config_variable_type.go +++ b/api/datadogV1/model_synthetics_config_variable_type.go @@ -17,11 +17,13 @@ type SyntheticsConfigVariableType string const ( SYNTHETICSCONFIGVARIABLETYPE_GLOBAL SyntheticsConfigVariableType = "global" SYNTHETICSCONFIGVARIABLETYPE_TEXT SyntheticsConfigVariableType = "text" + SYNTHETICSCONFIGVARIABLETYPE_EMAIL SyntheticsConfigVariableType = "email" ) var allowedSyntheticsConfigVariableTypeEnumValues = []SyntheticsConfigVariableType{ SYNTHETICSCONFIGVARIABLETYPE_GLOBAL, SYNTHETICSCONFIGVARIABLETYPE_TEXT, + SYNTHETICSCONFIGVARIABLETYPE_EMAIL, } // GetAllowedValues reeturns the list of possible values. diff --git a/api/datadogV1/model_synthetics_mobile_device_id.go b/api/datadogV1/model_synthetics_mobile_device_id.go new file mode 100644 index 00000000000..d4b9263d5b8 --- /dev/null +++ b/api/datadogV1/model_synthetics_mobile_device_id.go @@ -0,0 +1,514 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileDeviceID The device ID. +type SyntheticsMobileDeviceID string + +// List of SyntheticsMobileDeviceID. +const ( + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD__2022__16_4 SyntheticsMobileDeviceID = "apple ipad (2022),16.4" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD__2022__17_3_1 SyntheticsMobileDeviceID = "apple ipad (2022),17.3.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_7TH_GEN__2019__13_3 SyntheticsMobileDeviceID = "apple ipad 7th gen (2019),13.3" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_9TH_GEN__2021__15_0_2 SyntheticsMobileDeviceID = "apple ipad 9th gen (2021),15.0.2" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_9TH_GEN__2021__16_1 SyntheticsMobileDeviceID = "apple ipad 9th gen (2021),16.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_AIR__2022__15_4_1 SyntheticsMobileDeviceID = "apple ipad air (2022),15.4.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_MINI__5TH_GEN__14_6 SyntheticsMobileDeviceID = "apple ipad mini (5th gen),14.6" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_MINI__6TH_GEN__15_1 SyntheticsMobileDeviceID = "apple ipad mini (6th gen),15.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_PRO_11__2022__16_3 SyntheticsMobileDeviceID = "apple ipad pro 11 (2022),16.3" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_PRO_12_9__2020__14_8 SyntheticsMobileDeviceID = "apple ipad pro 12.9 (2020),14.8" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_PRO_12_9__2021__15_6_1 SyntheticsMobileDeviceID = "apple ipad pro 12.9 (2021),15.6.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_PRO_12_9__2022__16_5 SyntheticsMobileDeviceID = "apple ipad pro 12.9 (2022),16.5" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_PRO_MAX_13_1_3 SyntheticsMobileDeviceID = "apple iphone 11 pro max,13.1.3" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_PRO_13_6 SyntheticsMobileDeviceID = "apple iphone 11 pro,13.6" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_PRO_15_5 SyntheticsMobileDeviceID = "apple iphone 11 pro,15.5" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_13_3_1 SyntheticsMobileDeviceID = "apple iphone 11,13.3.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_14_0 SyntheticsMobileDeviceID = "apple iphone 11,14.0" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_16_3 SyntheticsMobileDeviceID = "apple iphone 11,16.3" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_MINI_14_2 SyntheticsMobileDeviceID = "apple iphone 12 mini,14.2" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_MINI_16_5 SyntheticsMobileDeviceID = "apple iphone 12 mini,16.5" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_MAX_14_5_1 SyntheticsMobileDeviceID = "apple iphone 12 pro max,14.5.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_14_5_1 SyntheticsMobileDeviceID = "apple iphone 12 pro,14.5.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_14_8 SyntheticsMobileDeviceID = "apple iphone 12 pro,14.8" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_15_0_2 SyntheticsMobileDeviceID = "apple iphone 12 pro,15.0.2" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_16_2 SyntheticsMobileDeviceID = "apple iphone 12 pro,16.2" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_14_2 SyntheticsMobileDeviceID = "apple iphone 12,14.2" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_14_6 SyntheticsMobileDeviceID = "apple iphone 12,14.6" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_14_8 SyntheticsMobileDeviceID = "apple iphone 12,14.8" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_15_6_1 SyntheticsMobileDeviceID = "apple iphone 12,15.6.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_16_6_1 SyntheticsMobileDeviceID = "apple iphone 12,16.6.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_MINI_15_0_2 SyntheticsMobileDeviceID = "apple iphone 13 mini,15.0.2" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_MINI_16_6 SyntheticsMobileDeviceID = "apple iphone 13 mini,16.6" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_PRO_MAX_15_1 SyntheticsMobileDeviceID = "apple iphone 13 pro max,15.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_PRO_MAX_17_3 SyntheticsMobileDeviceID = "apple iphone 13 pro max,17.3" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_PRO_15_0_2 SyntheticsMobileDeviceID = "apple iphone 13 pro,15.0.2" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_PRO_15_2 SyntheticsMobileDeviceID = "apple iphone 13 pro,15.2" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_PLUS_16_1 SyntheticsMobileDeviceID = "apple iphone 14 plus,16.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_PRO_MAX_16_2 SyntheticsMobileDeviceID = "apple iphone 14 pro max,16.2" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_PRO_16_1 SyntheticsMobileDeviceID = "apple iphone 14 pro,16.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_PRO_17_3_1 SyntheticsMobileDeviceID = "apple iphone 14 pro,17.3.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_16_1 SyntheticsMobileDeviceID = "apple iphone 14,16.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_15_PRO_MAX_17_3_1 SyntheticsMobileDeviceID = "apple iphone 15 pro max,17.3.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_15_PRO_17_3_1 SyntheticsMobileDeviceID = "apple iphone 15 pro,17.3.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_15_17_2_1 SyntheticsMobileDeviceID = "apple iphone 15,17.2.1" + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_SE__2022__15_4_1 SyntheticsMobileDeviceID = "apple iphone se (2022),15.4.1" + SYNTHETICSMOBILEDEVICEID_GALAXY_A40_9 SyntheticsMobileDeviceID = "galaxy a40,9" + SYNTHETICSMOBILEDEVICEID_GALAXY_A5_8_0_0 SyntheticsMobileDeviceID = "galaxy a5,8.0.0" + SYNTHETICSMOBILEDEVICEID_GALAXY_NOTE_10_9 SyntheticsMobileDeviceID = "galaxy note 10,9" + SYNTHETICSMOBILEDEVICEID_GALAXY_NOTE5__AT_T__7_0 SyntheticsMobileDeviceID = "galaxy note5 (at&t),7.0" + SYNTHETICSMOBILEDEVICEID_GALAXY_S10_9 SyntheticsMobileDeviceID = "galaxy s10,9" + SYNTHETICSMOBILEDEVICEID_GALAXY_S6_EDGE_SMNOT_G925F_7_0 SyntheticsMobileDeviceID = "galaxy s6 edge sm-g925f,7.0" + SYNTHETICSMOBILEDEVICEID_GALAXY_S8__TNOT_MOBILE__8_0_0 SyntheticsMobileDeviceID = "galaxy s8 (t-mobile),8.0.0" + SYNTHETICSMOBILEDEVICEID_GALAXY_S8_UNLOCKED_8_0_0 SyntheticsMobileDeviceID = "galaxy s8 unlocked,8.0.0" + SYNTHETICSMOBILEDEVICEID_GALAXY_S9__UNLOCKED__9 SyntheticsMobileDeviceID = "galaxy s9 (unlocked),9" + SYNTHETICSMOBILEDEVICEID_GALAXY_S9___UNLOCKED__8_0_0 SyntheticsMobileDeviceID = "galaxy s9+ (unlocked),8.0.0" + SYNTHETICSMOBILEDEVICEID_GALAXY_S9___UNLOCKED__9 SyntheticsMobileDeviceID = "galaxy s9+ (unlocked),9" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_2_8_0_0 SyntheticsMobileDeviceID = "google pixel 2,8.0.0" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_2_9 SyntheticsMobileDeviceID = "google pixel 2,9" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3_XL_10 SyntheticsMobileDeviceID = "google pixel 3 xl,10" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3_XL_9 SyntheticsMobileDeviceID = "google pixel 3 xl,9" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3_10 SyntheticsMobileDeviceID = "google pixel 3,10" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3_9 SyntheticsMobileDeviceID = "google pixel 3,9" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3A_XL_11 SyntheticsMobileDeviceID = "google pixel 3a xl,11" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3A_XL_12 SyntheticsMobileDeviceID = "google pixel 3a xl,12" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3A_10 SyntheticsMobileDeviceID = "google pixel 3a,10" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4__UNLOCKED__10 SyntheticsMobileDeviceID = "google pixel 4 (unlocked),10" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4__UNLOCKED__11 SyntheticsMobileDeviceID = "google pixel 4 (unlocked),11" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4_XL__UNLOCKED__10 SyntheticsMobileDeviceID = "google pixel 4 xl (unlocked),10" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4A_11 SyntheticsMobileDeviceID = "google pixel 4a,11" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4A_12 SyntheticsMobileDeviceID = "google pixel 4a,12" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_5A_5G_12 SyntheticsMobileDeviceID = "google pixel 5a 5g,12" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_6_PRO_12 SyntheticsMobileDeviceID = "google pixel 6 pro,12" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_6_12 SyntheticsMobileDeviceID = "google pixel 6,12" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_6A_13 SyntheticsMobileDeviceID = "google pixel 6a,13" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_7_PRO_13 SyntheticsMobileDeviceID = "google pixel 7 pro,13" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_7_13 SyntheticsMobileDeviceID = "google pixel 7,13" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_7_14 SyntheticsMobileDeviceID = "google pixel 7,14" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_8_PRO_14 SyntheticsMobileDeviceID = "google pixel 8 pro,14" + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_8_14 SyntheticsMobileDeviceID = "google pixel 8,14" + SYNTHETICSMOBILEDEVICEID_IPAD_8TH_GEN__2020__14_8 SyntheticsMobileDeviceID = "ipad 8th gen (2020),14.8" + SYNTHETICSMOBILEDEVICEID_IPAD_AIR_2_13_6 SyntheticsMobileDeviceID = "ipad air 2,13.6" + SYNTHETICSMOBILEDEVICEID_IPAD_AIR_4TH_GEN__2020__14_8 SyntheticsMobileDeviceID = "ipad air 4th gen (2020),14.8" + SYNTHETICSMOBILEDEVICEID_IPHONE_13_15_0_2 SyntheticsMobileDeviceID = "iphone 13,15.0.2" + SYNTHETICSMOBILEDEVICEID_IPHONE_13_16_0_2 SyntheticsMobileDeviceID = "iphone 13,16.0.2" + SYNTHETICSMOBILEDEVICEID_IPHONE_6_12_5_4 SyntheticsMobileDeviceID = "iphone 6,12.5.4" + SYNTHETICSMOBILEDEVICEID_IPHONE_6S_14_4_2 SyntheticsMobileDeviceID = "iphone 6s,14.4.2" + SYNTHETICSMOBILEDEVICEID_IPHONE_7_14_8 SyntheticsMobileDeviceID = "iphone 7,14.8" + SYNTHETICSMOBILEDEVICEID_IPHONE_8_13_5_1 SyntheticsMobileDeviceID = "iphone 8,13.5.1" + SYNTHETICSMOBILEDEVICEID_IPHONE_8_14_4_2 SyntheticsMobileDeviceID = "iphone 8,14.4.2" + SYNTHETICSMOBILEDEVICEID_IPHONE_SE__2020__13_6 SyntheticsMobileDeviceID = "iphone se (2020),13.6" + SYNTHETICSMOBILEDEVICEID_IPHONE_SE__2020__14_6 SyntheticsMobileDeviceID = "iphone se (2020),14.6" + SYNTHETICSMOBILEDEVICEID_IPHONE_SE__2020__15_0_2 SyntheticsMobileDeviceID = "iphone se (2020),15.0.2" + SYNTHETICSMOBILEDEVICEID_IPHONE_X_14_6 SyntheticsMobileDeviceID = "iphone x,14.6" + SYNTHETICSMOBILEDEVICEID_IPHONE_XR_12_0 SyntheticsMobileDeviceID = "iphone xr,12.0" + SYNTHETICSMOBILEDEVICEID_IPHONE_XR_14_0 SyntheticsMobileDeviceID = "iphone xr,14.0" + SYNTHETICSMOBILEDEVICEID_IPHONE_XS_MAX_12_1 SyntheticsMobileDeviceID = "iphone xs max,12.1" + SYNTHETICSMOBILEDEVICEID_IPHONE_XS_13_6 SyntheticsMobileDeviceID = "iphone xs,13.6" + SYNTHETICSMOBILEDEVICEID_LG_STYLO_5_9 SyntheticsMobileDeviceID = "lg stylo 5,9" + SYNTHETICSMOBILEDEVICEID_LG_STYLO_6_10 SyntheticsMobileDeviceID = "lg stylo 6,10" + SYNTHETICSMOBILEDEVICEID_MOTO_G_4_7_0 SyntheticsMobileDeviceID = "moto g 4,7.0" + SYNTHETICSMOBILEDEVICEID_MOTO_G7_PLAY_9 SyntheticsMobileDeviceID = "moto g7 play,9" + SYNTHETICSMOBILEDEVICEID_NEXUS_7_NOT__2ND_GEN__WIFI__6_0 SyntheticsMobileDeviceID = "nexus 7 - 2nd gen (wifi),6.0" + SYNTHETICSMOBILEDEVICEID_ONEPLUS_8T_11 SyntheticsMobileDeviceID = "oneplus 8t,11" + SYNTHETICSMOBILEDEVICEID_PIXEL_2_XL_8_1_0 SyntheticsMobileDeviceID = "pixel 2 xl,8.1.0" + SYNTHETICSMOBILEDEVICEID_PIXEL_2_XL_9 SyntheticsMobileDeviceID = "pixel 2 xl,9" + SYNTHETICSMOBILEDEVICEID_PIXEL_5_11 SyntheticsMobileDeviceID = "pixel 5,11" + SYNTHETICSMOBILEDEVICEID_PIXEL_5_12 SyntheticsMobileDeviceID = "pixel 5,12" + SYNTHETICSMOBILEDEVICEID_PIXEL_XL_8_0_0 SyntheticsMobileDeviceID = "pixel xl,8.0.0" + SYNTHETICSMOBILEDEVICEID_PIXEL_7_1_2 SyntheticsMobileDeviceID = "pixel,7.1.2" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_A51_10 SyntheticsMobileDeviceID = "samsung a51,10" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A10S_10 SyntheticsMobileDeviceID = "samsung galaxy a10s,10" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A13_5G_11 SyntheticsMobileDeviceID = "samsung galaxy a13 5g,11" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A53_5G_12 SyntheticsMobileDeviceID = "samsung galaxy a53 5g,12" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A7_8_0_0 SyntheticsMobileDeviceID = "samsung galaxy a7,8.0.0" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A71_11 SyntheticsMobileDeviceID = "samsung galaxy a71,11" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A73_5G_12 SyntheticsMobileDeviceID = "samsung galaxy a73 5g,12" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_J7__2018__8_0_0 SyntheticsMobileDeviceID = "samsung galaxy j7 (2018),8.0.0" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_NOTE20_11 SyntheticsMobileDeviceID = "samsung galaxy note20,11" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S20__UNLOCKED__10 SyntheticsMobileDeviceID = "samsung galaxy s20 (unlocked),10" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S20___UNLOCKED__10 SyntheticsMobileDeviceID = "samsung galaxy s20+ (unlocked),10" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21_ULTRA_11 SyntheticsMobileDeviceID = "samsung galaxy s21 ultra,11" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21_ULTRA_12 SyntheticsMobileDeviceID = "samsung galaxy s21 ultra,12" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21__11 SyntheticsMobileDeviceID = "samsung galaxy s21+,11" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21_11 SyntheticsMobileDeviceID = "samsung galaxy s21,11" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21_12 SyntheticsMobileDeviceID = "samsung galaxy s21,12" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S22_5G_12 SyntheticsMobileDeviceID = "samsung galaxy s22 5g,12" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S22_5G_13 SyntheticsMobileDeviceID = "samsung galaxy s22 5g,13" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S22_ULTRA_5G_12 SyntheticsMobileDeviceID = "samsung galaxy s22 ultra 5g,12" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S22__5G_12 SyntheticsMobileDeviceID = "samsung galaxy s22+ 5g,12" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S23_ULTRA_13 SyntheticsMobileDeviceID = "samsung galaxy s23 ultra,13" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S23__13 SyntheticsMobileDeviceID = "samsung galaxy s23+,13" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S23_13 SyntheticsMobileDeviceID = "samsung galaxy s23,13" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S23_14 SyntheticsMobileDeviceID = "samsung galaxy s23,14" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_A_10_1_10 SyntheticsMobileDeviceID = "samsung galaxy tab a 10.1,10" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_A_10_1_7_0 SyntheticsMobileDeviceID = "samsung galaxy tab a 10.1,7.0" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_A8__2021__11 SyntheticsMobileDeviceID = "samsung galaxy tab a8 (2021),11" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_S4_8_1_0 SyntheticsMobileDeviceID = "samsung galaxy tab s4,8.1.0" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_S6_9 SyntheticsMobileDeviceID = "samsung galaxy tab s6,9" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_S7_11 SyntheticsMobileDeviceID = "samsung galaxy tab s7,11" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_S8_12 SyntheticsMobileDeviceID = "samsung galaxy tab s8,12" + SYNTHETICSMOBILEDEVICEID_SAMSUNG_S20_ULTRA_10 SyntheticsMobileDeviceID = "samsung s20 ultra,10" + SYNTHETICSMOBILEDEVICEID_SONY_XPERIA_XZ3_9 SyntheticsMobileDeviceID = "sony xperia xz3,9" + SYNTHETICSMOBILEDEVICEID_XIAOMI_REDMI_NOTE_10_5G_11 SyntheticsMobileDeviceID = "xiaomi redmi note 10 5g,11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_10TH_GEN_2022_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_10TH_GEN_2022_IOS_17 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_17" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_9TH_GEN_2021_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_9th_gen_2021_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_AIR_2022_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_air_2022_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_MINI_5TH_GEN_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_mini_5th_gen_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_MINI_6TH_GEN_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_mini_6th_gen_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_11_2022_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_pro_11_2022_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_12_9_2020_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_pro_12_9_2020_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_12_9_2021_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_pro_12_9_2021_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_12_9_2022_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_ipad_pro_12_9_2022_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_11_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_11_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_11_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_11_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_11_PRO_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_11_pro_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_12_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_12_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_12_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_MINI_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_12_mini_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_MINI_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_12_mini_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_PRO_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_12_pro_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_PRO_MAX_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_12_pro_max_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_MINI_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_13_mini_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_MINI_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_13_mini_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_PRO_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_13_pro_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_PRO_MAX_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_13_pro_max_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_PRO_MAX_IOS_17 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_13_pro_max_ios_17" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_14_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PLUS_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_14_plus_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PRO_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_14_pro_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PRO_IOS_17 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_14_pro_ios_17" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PRO_MAX_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_14_pro_max_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_6_IOS_12 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_6_ios_12" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_8_IOS_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_8_ios_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_8_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_8_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_SE_2022_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_se_2022_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_SE_2022_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:apple_iphone_se_2022_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GALAXY_A5_ANDROID_8 SyntheticsMobileDeviceID = "synthetics:mobile:device:galaxy_a5_android_8" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GALAXY_NOTE5_ANDROID_7 SyntheticsMobileDeviceID = "synthetics:mobile:device:galaxy_note5_android_7" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_3A_XL_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_3a_xl_android_11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_4_UNLOCKED_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_4_unlocked_android_11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_4_XL_UNLOCKED_ANDROID_10 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_4_xl_unlocked_android_10" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_4A_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_4a_android_11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_6_ANDROID_12 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_6_android_12" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_6_PRO_ANDROID_12 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_6_pro_android_12" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_6A_ANDROID_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_6a_android_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_7_ANDROID_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_7_android_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_7_ANDROID_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_7_android_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_7_PRO_ANDROID_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_7_pro_android_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_8_ANDROID_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_8_android_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_8_PRO_ANDROID_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:google_pixel_8_pro_android_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPAD_AIR_2_IOS_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:ipad_air_2_ios_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPAD_AIR_4TH_GEN_2020_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:ipad_air_4th_gen_2020_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_13_IOS_15 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_13_ios_15" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_13_IOS_16 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_13_ios_16" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_15_IOS_17 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_15_ios_17" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_15_PRO_IOS_17 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_15_pro_ios_17" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_15_PRO_MAX_IOS_17 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_15_pro_max_ios_17" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_SE_2020_IOS_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_se_2020_ios_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_SE_2020_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_se_2020_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_X_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_x_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_XR_IOS_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_xr_ios_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_XS_IOS_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:iphone_xs_ios_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_LG_STYLO_6_ANDROID_10 SyntheticsMobileDeviceID = "synthetics:mobile:device:lg_stylo_6_android_10" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_PIXEL_5_ANDROID_12 SyntheticsMobileDeviceID = "synthetics:mobile:device:pixel_5_android_12" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_A51_ANDROID_10 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_a51_android_10" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_A71_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_a71_android_11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_NOTE20_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_note20_android_11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s21_android_11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_ANDROID_12 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s21_android_12" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_PLUS_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s21_plus_android_11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_ULTRA_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s21_ultra_android_11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_5G_ANDROID_12 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s22_5g_android_12" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_5G_ANDROID_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s22_5g_android_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_PLUS_5G_ANDROID_12 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s22_plus_5g_android_12" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_ULTRA_5G_ANDROID_12 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s22_ultra_5g_android_12" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_ANDROID_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s23_android_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_ANDROID_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s23_android_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_PLUS_ANDROID_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s23_plus_android_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_PLUS_ANDROID_14 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s23_plus_android_14" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_ULTRA_ANDROID_13 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_s23_ultra_android_13" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_TAB_A_10_1_ANDROID_7 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_tab_a_10_1_android_7" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_TAB_S7_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_tab_s7_android_11" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_TAB_S8_ANDROID_12 SyntheticsMobileDeviceID = "synthetics:mobile:device:samsung_galaxy_tab_s8_android_12" + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_XIAOMI_REDMI_NOTE_10_5G_ANDROID_11 SyntheticsMobileDeviceID = "synthetics:mobile:device:xiaomi_redmi_note_10_5g_android_11" +) + +var allowedSyntheticsMobileDeviceIDEnumValues = []SyntheticsMobileDeviceID{ + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD__2022__16_4, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD__2022__17_3_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_7TH_GEN__2019__13_3, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_9TH_GEN__2021__15_0_2, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_9TH_GEN__2021__16_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_AIR__2022__15_4_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_MINI__5TH_GEN__14_6, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_MINI__6TH_GEN__15_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_PRO_11__2022__16_3, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_PRO_12_9__2020__14_8, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_PRO_12_9__2021__15_6_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPAD_PRO_12_9__2022__16_5, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_PRO_MAX_13_1_3, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_PRO_13_6, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_PRO_15_5, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_13_3_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_14_0, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_11_16_3, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_MINI_14_2, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_MINI_16_5, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_MAX_14_5_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_14_5_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_14_8, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_15_0_2, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_PRO_16_2, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_14_2, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_14_6, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_14_8, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_15_6_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_12_16_6_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_MINI_15_0_2, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_MINI_16_6, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_PRO_MAX_15_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_PRO_MAX_17_3, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_PRO_15_0_2, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_13_PRO_15_2, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_PLUS_16_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_PRO_MAX_16_2, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_PRO_16_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_PRO_17_3_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_14_16_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_15_PRO_MAX_17_3_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_15_PRO_17_3_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_15_17_2_1, + SYNTHETICSMOBILEDEVICEID_APPLE_IPHONE_SE__2022__15_4_1, + SYNTHETICSMOBILEDEVICEID_GALAXY_A40_9, + SYNTHETICSMOBILEDEVICEID_GALAXY_A5_8_0_0, + SYNTHETICSMOBILEDEVICEID_GALAXY_NOTE_10_9, + SYNTHETICSMOBILEDEVICEID_GALAXY_NOTE5__AT_T__7_0, + SYNTHETICSMOBILEDEVICEID_GALAXY_S10_9, + SYNTHETICSMOBILEDEVICEID_GALAXY_S6_EDGE_SMNOT_G925F_7_0, + SYNTHETICSMOBILEDEVICEID_GALAXY_S8__TNOT_MOBILE__8_0_0, + SYNTHETICSMOBILEDEVICEID_GALAXY_S8_UNLOCKED_8_0_0, + SYNTHETICSMOBILEDEVICEID_GALAXY_S9__UNLOCKED__9, + SYNTHETICSMOBILEDEVICEID_GALAXY_S9___UNLOCKED__8_0_0, + SYNTHETICSMOBILEDEVICEID_GALAXY_S9___UNLOCKED__9, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_2_8_0_0, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_2_9, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3_XL_10, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3_XL_9, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3_10, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3_9, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3A_XL_11, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3A_XL_12, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_3A_10, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4__UNLOCKED__10, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4__UNLOCKED__11, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4_XL__UNLOCKED__10, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4A_11, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_4A_12, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_5A_5G_12, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_6_PRO_12, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_6_12, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_6A_13, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_7_PRO_13, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_7_13, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_7_14, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_8_PRO_14, + SYNTHETICSMOBILEDEVICEID_GOOGLE_PIXEL_8_14, + SYNTHETICSMOBILEDEVICEID_IPAD_8TH_GEN__2020__14_8, + SYNTHETICSMOBILEDEVICEID_IPAD_AIR_2_13_6, + SYNTHETICSMOBILEDEVICEID_IPAD_AIR_4TH_GEN__2020__14_8, + SYNTHETICSMOBILEDEVICEID_IPHONE_13_15_0_2, + SYNTHETICSMOBILEDEVICEID_IPHONE_13_16_0_2, + SYNTHETICSMOBILEDEVICEID_IPHONE_6_12_5_4, + SYNTHETICSMOBILEDEVICEID_IPHONE_6S_14_4_2, + SYNTHETICSMOBILEDEVICEID_IPHONE_7_14_8, + SYNTHETICSMOBILEDEVICEID_IPHONE_8_13_5_1, + SYNTHETICSMOBILEDEVICEID_IPHONE_8_14_4_2, + SYNTHETICSMOBILEDEVICEID_IPHONE_SE__2020__13_6, + SYNTHETICSMOBILEDEVICEID_IPHONE_SE__2020__14_6, + SYNTHETICSMOBILEDEVICEID_IPHONE_SE__2020__15_0_2, + SYNTHETICSMOBILEDEVICEID_IPHONE_X_14_6, + SYNTHETICSMOBILEDEVICEID_IPHONE_XR_12_0, + SYNTHETICSMOBILEDEVICEID_IPHONE_XR_14_0, + SYNTHETICSMOBILEDEVICEID_IPHONE_XS_MAX_12_1, + SYNTHETICSMOBILEDEVICEID_IPHONE_XS_13_6, + SYNTHETICSMOBILEDEVICEID_LG_STYLO_5_9, + SYNTHETICSMOBILEDEVICEID_LG_STYLO_6_10, + SYNTHETICSMOBILEDEVICEID_MOTO_G_4_7_0, + SYNTHETICSMOBILEDEVICEID_MOTO_G7_PLAY_9, + SYNTHETICSMOBILEDEVICEID_NEXUS_7_NOT__2ND_GEN__WIFI__6_0, + SYNTHETICSMOBILEDEVICEID_ONEPLUS_8T_11, + SYNTHETICSMOBILEDEVICEID_PIXEL_2_XL_8_1_0, + SYNTHETICSMOBILEDEVICEID_PIXEL_2_XL_9, + SYNTHETICSMOBILEDEVICEID_PIXEL_5_11, + SYNTHETICSMOBILEDEVICEID_PIXEL_5_12, + SYNTHETICSMOBILEDEVICEID_PIXEL_XL_8_0_0, + SYNTHETICSMOBILEDEVICEID_PIXEL_7_1_2, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_A51_10, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A10S_10, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A13_5G_11, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A53_5G_12, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A7_8_0_0, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A71_11, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_A73_5G_12, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_J7__2018__8_0_0, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_NOTE20_11, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S20__UNLOCKED__10, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S20___UNLOCKED__10, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21_ULTRA_11, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21_ULTRA_12, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21__11, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21_11, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S21_12, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S22_5G_12, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S22_5G_13, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S22_ULTRA_5G_12, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S22__5G_12, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S23_ULTRA_13, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S23__13, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S23_13, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_S23_14, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_A_10_1_10, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_A_10_1_7_0, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_A8__2021__11, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_S4_8_1_0, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_S6_9, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_S7_11, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_GALAXY_TAB_S8_12, + SYNTHETICSMOBILEDEVICEID_SAMSUNG_S20_ULTRA_10, + SYNTHETICSMOBILEDEVICEID_SONY_XPERIA_XZ3_9, + SYNTHETICSMOBILEDEVICEID_XIAOMI_REDMI_NOTE_10_5G_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_10TH_GEN_2022_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_10TH_GEN_2022_IOS_17, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_9TH_GEN_2021_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_AIR_2022_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_MINI_5TH_GEN_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_MINI_6TH_GEN_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_11_2022_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_12_9_2020_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_12_9_2021_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPAD_PRO_12_9_2022_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_11_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_11_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_11_PRO_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_MINI_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_MINI_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_PRO_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_12_PRO_MAX_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_MINI_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_MINI_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_PRO_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_PRO_MAX_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_13_PRO_MAX_IOS_17, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PLUS_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PRO_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PRO_IOS_17, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_14_PRO_MAX_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_6_IOS_12, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_8_IOS_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_8_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_SE_2022_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_APPLE_IPHONE_SE_2022_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GALAXY_A5_ANDROID_8, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GALAXY_NOTE5_ANDROID_7, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_3A_XL_ANDROID_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_4_UNLOCKED_ANDROID_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_4_XL_UNLOCKED_ANDROID_10, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_4A_ANDROID_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_6_ANDROID_12, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_6_PRO_ANDROID_12, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_6A_ANDROID_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_7_ANDROID_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_7_ANDROID_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_7_PRO_ANDROID_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_8_ANDROID_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_GOOGLE_PIXEL_8_PRO_ANDROID_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPAD_AIR_2_IOS_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPAD_AIR_4TH_GEN_2020_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_13_IOS_15, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_13_IOS_16, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_15_IOS_17, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_15_PRO_IOS_17, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_15_PRO_MAX_IOS_17, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_SE_2020_IOS_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_SE_2020_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_X_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_XR_IOS_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_XS_IOS_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_LG_STYLO_6_ANDROID_10, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_PIXEL_5_ANDROID_12, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_A51_ANDROID_10, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_A71_ANDROID_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_NOTE20_ANDROID_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_ANDROID_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_ANDROID_12, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_PLUS_ANDROID_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S21_ULTRA_ANDROID_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_5G_ANDROID_12, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_5G_ANDROID_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_PLUS_5G_ANDROID_12, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S22_ULTRA_5G_ANDROID_12, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_ANDROID_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_ANDROID_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_PLUS_ANDROID_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_PLUS_ANDROID_14, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_S23_ULTRA_ANDROID_13, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_TAB_A_10_1_ANDROID_7, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_TAB_S7_ANDROID_11, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_SAMSUNG_GALAXY_TAB_S8_ANDROID_12, + SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_XIAOMI_REDMI_NOTE_10_5G_ANDROID_11, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *SyntheticsMobileDeviceID) GetAllowedValues() []SyntheticsMobileDeviceID { + return allowedSyntheticsMobileDeviceIDEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *SyntheticsMobileDeviceID) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = SyntheticsMobileDeviceID(value) + return nil +} + +// NewSyntheticsMobileDeviceIDFromValue returns a pointer to a valid SyntheticsMobileDeviceID +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewSyntheticsMobileDeviceIDFromValue(v string) (*SyntheticsMobileDeviceID, error) { + ev := SyntheticsMobileDeviceID(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for SyntheticsMobileDeviceID: valid values are %v", v, allowedSyntheticsMobileDeviceIDEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v SyntheticsMobileDeviceID) IsValid() bool { + for _, existing := range allowedSyntheticsMobileDeviceIDEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SyntheticsMobileDeviceID value. +func (v SyntheticsMobileDeviceID) Ptr() *SyntheticsMobileDeviceID { + return &v +} diff --git a/api/datadogV1/model_synthetics_mobile_step.go b/api/datadogV1/model_synthetics_mobile_step.go new file mode 100644 index 00000000000..556b0403ba1 --- /dev/null +++ b/api/datadogV1/model_synthetics_mobile_step.go @@ -0,0 +1,392 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileStep The steps used in a Synthetic mobile test. +type SyntheticsMobileStep struct { + // A boolean set to allow this step to fail. + AllowFailure *bool `json:"allowFailure,omitempty"` + // A boolean set to determine if the step has a new step element. + HasNewStepElement *bool `json:"hasNewStepElement,omitempty"` + // A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails. + IsCritical *bool `json:"isCritical,omitempty"` + // The name of the step. + Name *string `json:"name,omitempty"` + // A boolean set to not take a screenshot for the step. + NoScreenshot *bool `json:"noScreenshot,omitempty"` + // The parameters of the mobile step. + Params interface{} `json:"params,omitempty"` + // The public ID of the step. + PublicId *string `json:"publicId,omitempty"` + // The time before declaring a step failed. + Timeout *int64 `json:"timeout,omitempty"` + // Step type used in your mobile Synthetic test. + Type *SyntheticsMobileStepType `json:"type,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileStep instantiates a new SyntheticsMobileStep object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileStep() *SyntheticsMobileStep { + this := SyntheticsMobileStep{} + return &this +} + +// NewSyntheticsMobileStepWithDefaults instantiates a new SyntheticsMobileStep object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileStepWithDefaults() *SyntheticsMobileStep { + this := SyntheticsMobileStep{} + return &this +} + +// GetAllowFailure returns the AllowFailure field value if set, zero value otherwise. +func (o *SyntheticsMobileStep) GetAllowFailure() bool { + if o == nil || o.AllowFailure == nil { + var ret bool + return ret + } + return *o.AllowFailure +} + +// GetAllowFailureOk returns a tuple with the AllowFailure field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileStep) GetAllowFailureOk() (*bool, bool) { + if o == nil || o.AllowFailure == nil { + return nil, false + } + return o.AllowFailure, true +} + +// HasAllowFailure returns a boolean if a field has been set. +func (o *SyntheticsMobileStep) HasAllowFailure() bool { + return o != nil && o.AllowFailure != nil +} + +// SetAllowFailure gets a reference to the given bool and assigns it to the AllowFailure field. +func (o *SyntheticsMobileStep) SetAllowFailure(v bool) { + o.AllowFailure = &v +} + +// GetHasNewStepElement returns the HasNewStepElement field value if set, zero value otherwise. +func (o *SyntheticsMobileStep) GetHasNewStepElement() bool { + if o == nil || o.HasNewStepElement == nil { + var ret bool + return ret + } + return *o.HasNewStepElement +} + +// GetHasNewStepElementOk returns a tuple with the HasNewStepElement field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileStep) GetHasNewStepElementOk() (*bool, bool) { + if o == nil || o.HasNewStepElement == nil { + return nil, false + } + return o.HasNewStepElement, true +} + +// HasHasNewStepElement returns a boolean if a field has been set. +func (o *SyntheticsMobileStep) HasHasNewStepElement() bool { + return o != nil && o.HasNewStepElement != nil +} + +// SetHasNewStepElement gets a reference to the given bool and assigns it to the HasNewStepElement field. +func (o *SyntheticsMobileStep) SetHasNewStepElement(v bool) { + o.HasNewStepElement = &v +} + +// GetIsCritical returns the IsCritical field value if set, zero value otherwise. +func (o *SyntheticsMobileStep) GetIsCritical() bool { + if o == nil || o.IsCritical == nil { + var ret bool + return ret + } + return *o.IsCritical +} + +// GetIsCriticalOk returns a tuple with the IsCritical field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileStep) GetIsCriticalOk() (*bool, bool) { + if o == nil || o.IsCritical == nil { + return nil, false + } + return o.IsCritical, true +} + +// HasIsCritical returns a boolean if a field has been set. +func (o *SyntheticsMobileStep) HasIsCritical() bool { + return o != nil && o.IsCritical != nil +} + +// SetIsCritical gets a reference to the given bool and assigns it to the IsCritical field. +func (o *SyntheticsMobileStep) SetIsCritical(v bool) { + o.IsCritical = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *SyntheticsMobileStep) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileStep) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *SyntheticsMobileStep) HasName() bool { + return o != nil && o.Name != nil +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *SyntheticsMobileStep) SetName(v string) { + o.Name = &v +} + +// GetNoScreenshot returns the NoScreenshot field value if set, zero value otherwise. +func (o *SyntheticsMobileStep) GetNoScreenshot() bool { + if o == nil || o.NoScreenshot == nil { + var ret bool + return ret + } + return *o.NoScreenshot +} + +// GetNoScreenshotOk returns a tuple with the NoScreenshot field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileStep) GetNoScreenshotOk() (*bool, bool) { + if o == nil || o.NoScreenshot == nil { + return nil, false + } + return o.NoScreenshot, true +} + +// HasNoScreenshot returns a boolean if a field has been set. +func (o *SyntheticsMobileStep) HasNoScreenshot() bool { + return o != nil && o.NoScreenshot != nil +} + +// SetNoScreenshot gets a reference to the given bool and assigns it to the NoScreenshot field. +func (o *SyntheticsMobileStep) SetNoScreenshot(v bool) { + o.NoScreenshot = &v +} + +// GetParams returns the Params field value if set, zero value otherwise. +func (o *SyntheticsMobileStep) GetParams() interface{} { + if o == nil || o.Params == nil { + var ret interface{} + return ret + } + return o.Params +} + +// GetParamsOk returns a tuple with the Params field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileStep) GetParamsOk() (*interface{}, bool) { + if o == nil || o.Params == nil { + return nil, false + } + return &o.Params, true +} + +// HasParams returns a boolean if a field has been set. +func (o *SyntheticsMobileStep) HasParams() bool { + return o != nil && o.Params != nil +} + +// SetParams gets a reference to the given interface{} and assigns it to the Params field. +func (o *SyntheticsMobileStep) SetParams(v interface{}) { + o.Params = v +} + +// GetPublicId returns the PublicId field value if set, zero value otherwise. +func (o *SyntheticsMobileStep) GetPublicId() string { + if o == nil || o.PublicId == nil { + var ret string + return ret + } + return *o.PublicId +} + +// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileStep) GetPublicIdOk() (*string, bool) { + if o == nil || o.PublicId == nil { + return nil, false + } + return o.PublicId, true +} + +// HasPublicId returns a boolean if a field has been set. +func (o *SyntheticsMobileStep) HasPublicId() bool { + return o != nil && o.PublicId != nil +} + +// SetPublicId gets a reference to the given string and assigns it to the PublicId field. +func (o *SyntheticsMobileStep) SetPublicId(v string) { + o.PublicId = &v +} + +// GetTimeout returns the Timeout field value if set, zero value otherwise. +func (o *SyntheticsMobileStep) GetTimeout() int64 { + if o == nil || o.Timeout == nil { + var ret int64 + return ret + } + return *o.Timeout +} + +// GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileStep) GetTimeoutOk() (*int64, bool) { + if o == nil || o.Timeout == nil { + return nil, false + } + return o.Timeout, true +} + +// HasTimeout returns a boolean if a field has been set. +func (o *SyntheticsMobileStep) HasTimeout() bool { + return o != nil && o.Timeout != nil +} + +// SetTimeout gets a reference to the given int64 and assigns it to the Timeout field. +func (o *SyntheticsMobileStep) SetTimeout(v int64) { + o.Timeout = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SyntheticsMobileStep) GetType() SyntheticsMobileStepType { + if o == nil || o.Type == nil { + var ret SyntheticsMobileStepType + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileStep) GetTypeOk() (*SyntheticsMobileStepType, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *SyntheticsMobileStep) HasType() bool { + return o != nil && o.Type != nil +} + +// SetType gets a reference to the given SyntheticsMobileStepType and assigns it to the Type field. +func (o *SyntheticsMobileStep) SetType(v SyntheticsMobileStepType) { + o.Type = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileStep) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.AllowFailure != nil { + toSerialize["allowFailure"] = o.AllowFailure + } + if o.HasNewStepElement != nil { + toSerialize["hasNewStepElement"] = o.HasNewStepElement + } + if o.IsCritical != nil { + toSerialize["isCritical"] = o.IsCritical + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.NoScreenshot != nil { + toSerialize["noScreenshot"] = o.NoScreenshot + } + if o.Params != nil { + toSerialize["params"] = o.Params + } + if o.PublicId != nil { + toSerialize["publicId"] = o.PublicId + } + if o.Timeout != nil { + toSerialize["timeout"] = o.Timeout + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileStep) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + AllowFailure *bool `json:"allowFailure,omitempty"` + HasNewStepElement *bool `json:"hasNewStepElement,omitempty"` + IsCritical *bool `json:"isCritical,omitempty"` + Name *string `json:"name,omitempty"` + NoScreenshot *bool `json:"noScreenshot,omitempty"` + Params interface{} `json:"params,omitempty"` + PublicId *string `json:"publicId,omitempty"` + Timeout *int64 `json:"timeout,omitempty"` + Type *SyntheticsMobileStepType `json:"type,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"allowFailure", "hasNewStepElement", "isCritical", "name", "noScreenshot", "params", "publicId", "timeout", "type"}) + } else { + return err + } + + hasInvalidField := false + o.AllowFailure = all.AllowFailure + o.HasNewStepElement = all.HasNewStepElement + o.IsCritical = all.IsCritical + o.Name = all.Name + o.NoScreenshot = all.NoScreenshot + o.Params = all.Params + o.PublicId = all.PublicId + o.Timeout = all.Timeout + if all.Type != nil && !all.Type.IsValid() { + hasInvalidField = true + } else { + o.Type = all.Type + } + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/api/datadogV1/model_synthetics_mobile_step_type.go b/api/datadogV1/model_synthetics_mobile_step_type.go new file mode 100644 index 00000000000..2955d5d8229 --- /dev/null +++ b/api/datadogV1/model_synthetics_mobile_step_type.go @@ -0,0 +1,96 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileStepType Step type used in your mobile Synthetic test. +type SyntheticsMobileStepType string + +// List of SyntheticsMobileStepType. +const ( + SYNTHETICSMOBILESTEPTYPE_ASSERTELEMENTCONTENT SyntheticsMobileStepType = "assertElementContent" + SYNTHETICSMOBILESTEPTYPE_ASSERTSCREENCONTAINS SyntheticsMobileStepType = "assertScreenContains" + SYNTHETICSMOBILESTEPTYPE_ASSERTSCREENLACKS SyntheticsMobileStepType = "assertScreenLacks" + SYNTHETICSMOBILESTEPTYPE_DOUBLETAP SyntheticsMobileStepType = "doubleTap" + SYNTHETICSMOBILESTEPTYPE_EXTRACTVARIABLE SyntheticsMobileStepType = "extractVariable" + SYNTHETICSMOBILESTEPTYPE_FLICK SyntheticsMobileStepType = "flick" + SYNTHETICSMOBILESTEPTYPE_OPENDEEPLINK SyntheticsMobileStepType = "openDeeplink" + SYNTHETICSMOBILESTEPTYPE_PLAYSUBTEST SyntheticsMobileStepType = "playSubTest" + SYNTHETICSMOBILESTEPTYPE_PRESSBACK SyntheticsMobileStepType = "pressBack" + SYNTHETICSMOBILESTEPTYPE_RESTARTAPPLICATION SyntheticsMobileStepType = "restartApplication" + SYNTHETICSMOBILESTEPTYPE_ROTATE SyntheticsMobileStepType = "rotate" + SYNTHETICSMOBILESTEPTYPE_SCROLL SyntheticsMobileStepType = "scroll" + SYNTHETICSMOBILESTEPTYPE_SCROLLTOELEMENT SyntheticsMobileStepType = "scrollToElement" + SYNTHETICSMOBILESTEPTYPE_TAP SyntheticsMobileStepType = "tap" + SYNTHETICSMOBILESTEPTYPE_TOGGLEWIFI SyntheticsMobileStepType = "toggleWiFi" + SYNTHETICSMOBILESTEPTYPE_TYPETEXT SyntheticsMobileStepType = "typeText" + SYNTHETICSMOBILESTEPTYPE_WAIT SyntheticsMobileStepType = "wait" +) + +var allowedSyntheticsMobileStepTypeEnumValues = []SyntheticsMobileStepType{ + SYNTHETICSMOBILESTEPTYPE_ASSERTELEMENTCONTENT, + SYNTHETICSMOBILESTEPTYPE_ASSERTSCREENCONTAINS, + SYNTHETICSMOBILESTEPTYPE_ASSERTSCREENLACKS, + SYNTHETICSMOBILESTEPTYPE_DOUBLETAP, + SYNTHETICSMOBILESTEPTYPE_EXTRACTVARIABLE, + SYNTHETICSMOBILESTEPTYPE_FLICK, + SYNTHETICSMOBILESTEPTYPE_OPENDEEPLINK, + SYNTHETICSMOBILESTEPTYPE_PLAYSUBTEST, + SYNTHETICSMOBILESTEPTYPE_PRESSBACK, + SYNTHETICSMOBILESTEPTYPE_RESTARTAPPLICATION, + SYNTHETICSMOBILESTEPTYPE_ROTATE, + SYNTHETICSMOBILESTEPTYPE_SCROLL, + SYNTHETICSMOBILESTEPTYPE_SCROLLTOELEMENT, + SYNTHETICSMOBILESTEPTYPE_TAP, + SYNTHETICSMOBILESTEPTYPE_TOGGLEWIFI, + SYNTHETICSMOBILESTEPTYPE_TYPETEXT, + SYNTHETICSMOBILESTEPTYPE_WAIT, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *SyntheticsMobileStepType) GetAllowedValues() []SyntheticsMobileStepType { + return allowedSyntheticsMobileStepTypeEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *SyntheticsMobileStepType) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = SyntheticsMobileStepType(value) + return nil +} + +// NewSyntheticsMobileStepTypeFromValue returns a pointer to a valid SyntheticsMobileStepType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewSyntheticsMobileStepTypeFromValue(v string) (*SyntheticsMobileStepType, error) { + ev := SyntheticsMobileStepType(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for SyntheticsMobileStepType: valid values are %v", v, allowedSyntheticsMobileStepTypeEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v SyntheticsMobileStepType) IsValid() bool { + for _, existing := range allowedSyntheticsMobileStepTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SyntheticsMobileStepType value. +func (v SyntheticsMobileStepType) Ptr() *SyntheticsMobileStepType { + return &v +} diff --git a/api/datadogV1/model_synthetics_mobile_test_.go b/api/datadogV1/model_synthetics_mobile_test_.go new file mode 100644 index 00000000000..d049016bedd --- /dev/null +++ b/api/datadogV1/model_synthetics_mobile_test_.go @@ -0,0 +1,465 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTest Object containing details about a Synthetic mobile test. +type SyntheticsMobileTest struct { + // Configuration object for a Synthetic mobile test. + Config SyntheticsMobileTestConfig `json:"config"` + // The `SyntheticsMobileTest` `device_ids`. + DeviceIds []SyntheticsMobileDeviceID `json:"device_ids,omitempty"` + // Notification message associated with the test. + Message *string `json:"message,omitempty"` + // The associated monitor ID. + MonitorId *int64 `json:"monitor_id,omitempty"` + // Name of the test. + Name string `json:"name"` + // Object describing the extra options for a Synthetic test. + Options SyntheticsMobileTestOptions `json:"options"` + // The public ID of the test. + PublicId *string `json:"public_id,omitempty"` + // Define whether you want to start (`live`) or pause (`paused`) a + // Synthetic test. + Status *SyntheticsTestPauseStatus `json:"status,omitempty"` + // Array of steps for the test. + Steps []SyntheticsMobileStep `json:"steps,omitempty"` + // Array of tags attached to the test. + Tags []string `json:"tags,omitempty"` + // Type of the Synthetic test, `mobile`. + Type SyntheticsMobileTestType `json:"type"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTest instantiates a new SyntheticsMobileTest object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTest(config SyntheticsMobileTestConfig, name string, options SyntheticsMobileTestOptions, typeVar SyntheticsMobileTestType) *SyntheticsMobileTest { + this := SyntheticsMobileTest{} + this.Config = config + this.Name = name + this.Options = options + this.Type = typeVar + return &this +} + +// NewSyntheticsMobileTestWithDefaults instantiates a new SyntheticsMobileTest object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestWithDefaults() *SyntheticsMobileTest { + this := SyntheticsMobileTest{} + var typeVar SyntheticsMobileTestType = SYNTHETICSMOBILETESTTYPE_MOBILE + this.Type = typeVar + return &this +} + +// GetConfig returns the Config field value. +func (o *SyntheticsMobileTest) GetConfig() SyntheticsMobileTestConfig { + if o == nil { + var ret SyntheticsMobileTestConfig + return ret + } + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetConfigOk() (*SyntheticsMobileTestConfig, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value. +func (o *SyntheticsMobileTest) SetConfig(v SyntheticsMobileTestConfig) { + o.Config = v +} + +// GetDeviceIds returns the DeviceIds field value if set, zero value otherwise. +func (o *SyntheticsMobileTest) GetDeviceIds() []SyntheticsMobileDeviceID { + if o == nil || o.DeviceIds == nil { + var ret []SyntheticsMobileDeviceID + return ret + } + return o.DeviceIds +} + +// GetDeviceIdsOk returns a tuple with the DeviceIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetDeviceIdsOk() (*[]SyntheticsMobileDeviceID, bool) { + if o == nil || o.DeviceIds == nil { + return nil, false + } + return &o.DeviceIds, true +} + +// HasDeviceIds returns a boolean if a field has been set. +func (o *SyntheticsMobileTest) HasDeviceIds() bool { + return o != nil && o.DeviceIds != nil +} + +// SetDeviceIds gets a reference to the given []SyntheticsMobileDeviceID and assigns it to the DeviceIds field. +func (o *SyntheticsMobileTest) SetDeviceIds(v []SyntheticsMobileDeviceID) { + o.DeviceIds = v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *SyntheticsMobileTest) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetMessageOk() (*string, bool) { + if o == nil || o.Message == nil { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *SyntheticsMobileTest) HasMessage() bool { + return o != nil && o.Message != nil +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *SyntheticsMobileTest) SetMessage(v string) { + o.Message = &v +} + +// GetMonitorId returns the MonitorId field value if set, zero value otherwise. +func (o *SyntheticsMobileTest) GetMonitorId() int64 { + if o == nil || o.MonitorId == nil { + var ret int64 + return ret + } + return *o.MonitorId +} + +// GetMonitorIdOk returns a tuple with the MonitorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetMonitorIdOk() (*int64, bool) { + if o == nil || o.MonitorId == nil { + return nil, false + } + return o.MonitorId, true +} + +// HasMonitorId returns a boolean if a field has been set. +func (o *SyntheticsMobileTest) HasMonitorId() bool { + return o != nil && o.MonitorId != nil +} + +// SetMonitorId gets a reference to the given int64 and assigns it to the MonitorId field. +func (o *SyntheticsMobileTest) SetMonitorId(v int64) { + o.MonitorId = &v +} + +// GetName returns the Name field value. +func (o *SyntheticsMobileTest) GetName() string { + if o == nil { + var ret string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value. +func (o *SyntheticsMobileTest) SetName(v string) { + o.Name = v +} + +// GetOptions returns the Options field value. +func (o *SyntheticsMobileTest) GetOptions() SyntheticsMobileTestOptions { + if o == nil { + var ret SyntheticsMobileTestOptions + return ret + } + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetOptionsOk() (*SyntheticsMobileTestOptions, bool) { + if o == nil { + return nil, false + } + return &o.Options, true +} + +// SetOptions sets field value. +func (o *SyntheticsMobileTest) SetOptions(v SyntheticsMobileTestOptions) { + o.Options = v +} + +// GetPublicId returns the PublicId field value if set, zero value otherwise. +func (o *SyntheticsMobileTest) GetPublicId() string { + if o == nil || o.PublicId == nil { + var ret string + return ret + } + return *o.PublicId +} + +// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetPublicIdOk() (*string, bool) { + if o == nil || o.PublicId == nil { + return nil, false + } + return o.PublicId, true +} + +// HasPublicId returns a boolean if a field has been set. +func (o *SyntheticsMobileTest) HasPublicId() bool { + return o != nil && o.PublicId != nil +} + +// SetPublicId gets a reference to the given string and assigns it to the PublicId field. +func (o *SyntheticsMobileTest) SetPublicId(v string) { + o.PublicId = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *SyntheticsMobileTest) GetStatus() SyntheticsTestPauseStatus { + if o == nil || o.Status == nil { + var ret SyntheticsTestPauseStatus + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetStatusOk() (*SyntheticsTestPauseStatus, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *SyntheticsMobileTest) HasStatus() bool { + return o != nil && o.Status != nil +} + +// SetStatus gets a reference to the given SyntheticsTestPauseStatus and assigns it to the Status field. +func (o *SyntheticsMobileTest) SetStatus(v SyntheticsTestPauseStatus) { + o.Status = &v +} + +// GetSteps returns the Steps field value if set, zero value otherwise. +func (o *SyntheticsMobileTest) GetSteps() []SyntheticsMobileStep { + if o == nil || o.Steps == nil { + var ret []SyntheticsMobileStep + return ret + } + return o.Steps +} + +// GetStepsOk returns a tuple with the Steps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetStepsOk() (*[]SyntheticsMobileStep, bool) { + if o == nil || o.Steps == nil { + return nil, false + } + return &o.Steps, true +} + +// HasSteps returns a boolean if a field has been set. +func (o *SyntheticsMobileTest) HasSteps() bool { + return o != nil && o.Steps != nil +} + +// SetSteps gets a reference to the given []SyntheticsMobileStep and assigns it to the Steps field. +func (o *SyntheticsMobileTest) SetSteps(v []SyntheticsMobileStep) { + o.Steps = v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *SyntheticsMobileTest) GetTags() []string { + if o == nil || o.Tags == nil { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetTagsOk() (*[]string, bool) { + if o == nil || o.Tags == nil { + return nil, false + } + return &o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *SyntheticsMobileTest) HasTags() bool { + return o != nil && o.Tags != nil +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *SyntheticsMobileTest) SetTags(v []string) { + o.Tags = v +} + +// GetType returns the Type field value. +func (o *SyntheticsMobileTest) GetType() SyntheticsMobileTestType { + if o == nil { + var ret SyntheticsMobileTestType + return ret + } + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTest) GetTypeOk() (*SyntheticsMobileTestType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value. +func (o *SyntheticsMobileTest) SetType(v SyntheticsMobileTestType) { + o.Type = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["config"] = o.Config + if o.DeviceIds != nil { + toSerialize["device_ids"] = o.DeviceIds + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + if o.MonitorId != nil { + toSerialize["monitor_id"] = o.MonitorId + } + toSerialize["name"] = o.Name + toSerialize["options"] = o.Options + if o.PublicId != nil { + toSerialize["public_id"] = o.PublicId + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Steps != nil { + toSerialize["steps"] = o.Steps + } + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTest) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Config *SyntheticsMobileTestConfig `json:"config"` + DeviceIds []SyntheticsMobileDeviceID `json:"device_ids,omitempty"` + Message *string `json:"message,omitempty"` + MonitorId *int64 `json:"monitor_id,omitempty"` + Name *string `json:"name"` + Options *SyntheticsMobileTestOptions `json:"options"` + PublicId *string `json:"public_id,omitempty"` + Status *SyntheticsTestPauseStatus `json:"status,omitempty"` + Steps []SyntheticsMobileStep `json:"steps,omitempty"` + Tags []string `json:"tags,omitempty"` + Type *SyntheticsMobileTestType `json:"type"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Config == nil { + return fmt.Errorf("required field config missing") + } + if all.Name == nil { + return fmt.Errorf("required field name missing") + } + if all.Options == nil { + return fmt.Errorf("required field options missing") + } + if all.Type == nil { + return fmt.Errorf("required field type missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"config", "device_ids", "message", "monitor_id", "name", "options", "public_id", "status", "steps", "tags", "type"}) + } else { + return err + } + + hasInvalidField := false + if all.Config.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Config = *all.Config + o.DeviceIds = all.DeviceIds + o.Message = all.Message + o.MonitorId = all.MonitorId + o.Name = *all.Name + if all.Options.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Options = *all.Options + o.PublicId = all.PublicId + if all.Status != nil && !all.Status.IsValid() { + hasInvalidField = true + } else { + o.Status = all.Status + } + o.Steps = all.Steps + o.Tags = all.Tags + if !all.Type.IsValid() { + hasInvalidField = true + } else { + o.Type = *all.Type + } + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/api/datadogV1/model_synthetics_mobile_test_binding.go b/api/datadogV1/model_synthetics_mobile_test_binding.go new file mode 100644 index 00000000000..dd2e3032dd6 --- /dev/null +++ b/api/datadogV1/model_synthetics_mobile_test_binding.go @@ -0,0 +1,111 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestBinding Objects describing the binding used for a mobile test. +type SyntheticsMobileTestBinding struct { + // Object describing the binding used for a mobile test. + Items *SyntheticsMobileTestBindingItems `json:"items,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTestBinding instantiates a new SyntheticsMobileTestBinding object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTestBinding() *SyntheticsMobileTestBinding { + this := SyntheticsMobileTestBinding{} + return &this +} + +// NewSyntheticsMobileTestBindingWithDefaults instantiates a new SyntheticsMobileTestBinding object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestBindingWithDefaults() *SyntheticsMobileTestBinding { + this := SyntheticsMobileTestBinding{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *SyntheticsMobileTestBinding) GetItems() SyntheticsMobileTestBindingItems { + if o == nil || o.Items == nil { + var ret SyntheticsMobileTestBindingItems + return ret + } + return *o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestBinding) GetItemsOk() (*SyntheticsMobileTestBindingItems, bool) { + if o == nil || o.Items == nil { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *SyntheticsMobileTestBinding) HasItems() bool { + return o != nil && o.Items != nil +} + +// SetItems gets a reference to the given SyntheticsMobileTestBindingItems and assigns it to the Items field. +func (o *SyntheticsMobileTestBinding) SetItems(v SyntheticsMobileTestBindingItems) { + o.Items = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTestBinding) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Items != nil { + toSerialize["items"] = o.Items + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTestBinding) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Items *SyntheticsMobileTestBindingItems `json:"items,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"items"}) + } else { + return err + } + + hasInvalidField := false + if all.Items != nil && all.Items.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Items = all.Items + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/api/datadogV1/model_synthetics_mobile_test_binding_items.go b/api/datadogV1/model_synthetics_mobile_test_binding_items.go new file mode 100644 index 00000000000..ea531e2386d --- /dev/null +++ b/api/datadogV1/model_synthetics_mobile_test_binding_items.go @@ -0,0 +1,147 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestBindingItems Object describing the binding used for a mobile test. +type SyntheticsMobileTestBindingItems struct { + // List of principals for a mobile test binding. + Principals []string `json:"principals,omitempty"` + // The definition of `SyntheticsMobileTestBindingItemsRole` object. + Role *SyntheticsMobileTestBindingItemsRole `json:"role,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTestBindingItems instantiates a new SyntheticsMobileTestBindingItems object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTestBindingItems() *SyntheticsMobileTestBindingItems { + this := SyntheticsMobileTestBindingItems{} + return &this +} + +// NewSyntheticsMobileTestBindingItemsWithDefaults instantiates a new SyntheticsMobileTestBindingItems object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestBindingItemsWithDefaults() *SyntheticsMobileTestBindingItems { + this := SyntheticsMobileTestBindingItems{} + return &this +} + +// GetPrincipals returns the Principals field value if set, zero value otherwise. +func (o *SyntheticsMobileTestBindingItems) GetPrincipals() []string { + if o == nil || o.Principals == nil { + var ret []string + return ret + } + return o.Principals +} + +// GetPrincipalsOk returns a tuple with the Principals field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestBindingItems) GetPrincipalsOk() (*[]string, bool) { + if o == nil || o.Principals == nil { + return nil, false + } + return &o.Principals, true +} + +// HasPrincipals returns a boolean if a field has been set. +func (o *SyntheticsMobileTestBindingItems) HasPrincipals() bool { + return o != nil && o.Principals != nil +} + +// SetPrincipals gets a reference to the given []string and assigns it to the Principals field. +func (o *SyntheticsMobileTestBindingItems) SetPrincipals(v []string) { + o.Principals = v +} + +// GetRole returns the Role field value if set, zero value otherwise. +func (o *SyntheticsMobileTestBindingItems) GetRole() SyntheticsMobileTestBindingItemsRole { + if o == nil || o.Role == nil { + var ret SyntheticsMobileTestBindingItemsRole + return ret + } + return *o.Role +} + +// GetRoleOk returns a tuple with the Role field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestBindingItems) GetRoleOk() (*SyntheticsMobileTestBindingItemsRole, bool) { + if o == nil || o.Role == nil { + return nil, false + } + return o.Role, true +} + +// HasRole returns a boolean if a field has been set. +func (o *SyntheticsMobileTestBindingItems) HasRole() bool { + return o != nil && o.Role != nil +} + +// SetRole gets a reference to the given SyntheticsMobileTestBindingItemsRole and assigns it to the Role field. +func (o *SyntheticsMobileTestBindingItems) SetRole(v SyntheticsMobileTestBindingItemsRole) { + o.Role = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTestBindingItems) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Principals != nil { + toSerialize["principals"] = o.Principals + } + if o.Role != nil { + toSerialize["role"] = o.Role + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTestBindingItems) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Principals []string `json:"principals,omitempty"` + Role *SyntheticsMobileTestBindingItemsRole `json:"role,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"principals", "role"}) + } else { + return err + } + + hasInvalidField := false + o.Principals = all.Principals + if all.Role != nil && !all.Role.IsValid() { + hasInvalidField = true + } else { + o.Role = all.Role + } + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/api/datadogV1/model_synthetics_mobile_test_binding_items_role.go b/api/datadogV1/model_synthetics_mobile_test_binding_items_role.go new file mode 100644 index 00000000000..e32f120c02f --- /dev/null +++ b/api/datadogV1/model_synthetics_mobile_test_binding_items_role.go @@ -0,0 +1,66 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestBindingItemsRole The definition of `SyntheticsMobileTestBindingItemsRole` object. +type SyntheticsMobileTestBindingItemsRole string + +// List of SyntheticsMobileTestBindingItemsRole. +const ( + SYNTHETICSMOBILETESTBINDINGITEMSROLE_EDITOR SyntheticsMobileTestBindingItemsRole = "editor" + SYNTHETICSMOBILETESTBINDINGITEMSROLE_VIEWER SyntheticsMobileTestBindingItemsRole = "viewer" +) + +var allowedSyntheticsMobileTestBindingItemsRoleEnumValues = []SyntheticsMobileTestBindingItemsRole{ + SYNTHETICSMOBILETESTBINDINGITEMSROLE_EDITOR, + SYNTHETICSMOBILETESTBINDINGITEMSROLE_VIEWER, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *SyntheticsMobileTestBindingItemsRole) GetAllowedValues() []SyntheticsMobileTestBindingItemsRole { + return allowedSyntheticsMobileTestBindingItemsRoleEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *SyntheticsMobileTestBindingItemsRole) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = SyntheticsMobileTestBindingItemsRole(value) + return nil +} + +// NewSyntheticsMobileTestBindingItemsRoleFromValue returns a pointer to a valid SyntheticsMobileTestBindingItemsRole +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewSyntheticsMobileTestBindingItemsRoleFromValue(v string) (*SyntheticsMobileTestBindingItemsRole, error) { + ev := SyntheticsMobileTestBindingItemsRole(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for SyntheticsMobileTestBindingItemsRole: valid values are %v", v, allowedSyntheticsMobileTestBindingItemsRoleEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v SyntheticsMobileTestBindingItemsRole) IsValid() bool { + for _, existing := range allowedSyntheticsMobileTestBindingItemsRoleEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SyntheticsMobileTestBindingItemsRole value. +func (v SyntheticsMobileTestBindingItemsRole) Ptr() *SyntheticsMobileTestBindingItemsRole { + return &v +} diff --git a/api/datadogV1/model_synthetics_mobile_test_ci_options.go b/api/datadogV1/model_synthetics_mobile_test_ci_options.go new file mode 100644 index 00000000000..ee68fe3bd51 --- /dev/null +++ b/api/datadogV1/model_synthetics_mobile_test_ci_options.go @@ -0,0 +1,111 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestCiOptions CI/CD options for a Synthetic test. +type SyntheticsMobileTestCiOptions struct { + // Execution rule for a Synthetic test. + ExecutionRule SyntheticsTestExecutionRule `json:"executionRule"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTestCiOptions instantiates a new SyntheticsMobileTestCiOptions object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTestCiOptions(executionRule SyntheticsTestExecutionRule) *SyntheticsMobileTestCiOptions { + this := SyntheticsMobileTestCiOptions{} + this.ExecutionRule = executionRule + return &this +} + +// NewSyntheticsMobileTestCiOptionsWithDefaults instantiates a new SyntheticsMobileTestCiOptions object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestCiOptionsWithDefaults() *SyntheticsMobileTestCiOptions { + this := SyntheticsMobileTestCiOptions{} + return &this +} + +// GetExecutionRule returns the ExecutionRule field value. +func (o *SyntheticsMobileTestCiOptions) GetExecutionRule() SyntheticsTestExecutionRule { + if o == nil { + var ret SyntheticsTestExecutionRule + return ret + } + return o.ExecutionRule +} + +// GetExecutionRuleOk returns a tuple with the ExecutionRule field value +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestCiOptions) GetExecutionRuleOk() (*SyntheticsTestExecutionRule, bool) { + if o == nil { + return nil, false + } + return &o.ExecutionRule, true +} + +// SetExecutionRule sets field value. +func (o *SyntheticsMobileTestCiOptions) SetExecutionRule(v SyntheticsTestExecutionRule) { + o.ExecutionRule = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTestCiOptions) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["executionRule"] = o.ExecutionRule + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTestCiOptions) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + ExecutionRule *SyntheticsTestExecutionRule `json:"executionRule"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.ExecutionRule == nil { + return fmt.Errorf("required field executionRule missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"executionRule"}) + } else { + return err + } + + hasInvalidField := false + if !all.ExecutionRule.IsValid() { + hasInvalidField = true + } else { + o.ExecutionRule = *all.ExecutionRule + } + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/api/datadogV1/model_synthetics_mobile_test_config.go b/api/datadogV1/model_synthetics_mobile_test_config.go new file mode 100644 index 00000000000..806db6c3796 --- /dev/null +++ b/api/datadogV1/model_synthetics_mobile_test_config.go @@ -0,0 +1,146 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestConfig Configuration object for a Synthetic mobile test. +type SyntheticsMobileTestConfig struct { + // Initial application arguments for a mobile test. + InitialApplicationArguments *SyntheticsMobileTestInitialApplicationArguments `json:"initialApplicationArguments,omitempty"` + // Array of variables used for the test steps. + Variables []SyntheticsConfigVariable `json:"variables,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTestConfig instantiates a new SyntheticsMobileTestConfig object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTestConfig() *SyntheticsMobileTestConfig { + this := SyntheticsMobileTestConfig{} + return &this +} + +// NewSyntheticsMobileTestConfigWithDefaults instantiates a new SyntheticsMobileTestConfig object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestConfigWithDefaults() *SyntheticsMobileTestConfig { + this := SyntheticsMobileTestConfig{} + return &this +} + +// GetInitialApplicationArguments returns the InitialApplicationArguments field value if set, zero value otherwise. +func (o *SyntheticsMobileTestConfig) GetInitialApplicationArguments() SyntheticsMobileTestInitialApplicationArguments { + if o == nil || o.InitialApplicationArguments == nil { + var ret SyntheticsMobileTestInitialApplicationArguments + return ret + } + return *o.InitialApplicationArguments +} + +// GetInitialApplicationArgumentsOk returns a tuple with the InitialApplicationArguments field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestConfig) GetInitialApplicationArgumentsOk() (*SyntheticsMobileTestInitialApplicationArguments, bool) { + if o == nil || o.InitialApplicationArguments == nil { + return nil, false + } + return o.InitialApplicationArguments, true +} + +// HasInitialApplicationArguments returns a boolean if a field has been set. +func (o *SyntheticsMobileTestConfig) HasInitialApplicationArguments() bool { + return o != nil && o.InitialApplicationArguments != nil +} + +// SetInitialApplicationArguments gets a reference to the given SyntheticsMobileTestInitialApplicationArguments and assigns it to the InitialApplicationArguments field. +func (o *SyntheticsMobileTestConfig) SetInitialApplicationArguments(v SyntheticsMobileTestInitialApplicationArguments) { + o.InitialApplicationArguments = &v +} + +// GetVariables returns the Variables field value if set, zero value otherwise. +func (o *SyntheticsMobileTestConfig) GetVariables() []SyntheticsConfigVariable { + if o == nil || o.Variables == nil { + var ret []SyntheticsConfigVariable + return ret + } + return o.Variables +} + +// GetVariablesOk returns a tuple with the Variables field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestConfig) GetVariablesOk() (*[]SyntheticsConfigVariable, bool) { + if o == nil || o.Variables == nil { + return nil, false + } + return &o.Variables, true +} + +// HasVariables returns a boolean if a field has been set. +func (o *SyntheticsMobileTestConfig) HasVariables() bool { + return o != nil && o.Variables != nil +} + +// SetVariables gets a reference to the given []SyntheticsConfigVariable and assigns it to the Variables field. +func (o *SyntheticsMobileTestConfig) SetVariables(v []SyntheticsConfigVariable) { + o.Variables = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTestConfig) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.InitialApplicationArguments != nil { + toSerialize["initialApplicationArguments"] = o.InitialApplicationArguments + } + if o.Variables != nil { + toSerialize["variables"] = o.Variables + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTestConfig) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + InitialApplicationArguments *SyntheticsMobileTestInitialApplicationArguments `json:"initialApplicationArguments,omitempty"` + Variables []SyntheticsConfigVariable `json:"variables,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"initialApplicationArguments", "variables"}) + } else { + return err + } + + hasInvalidField := false + if all.InitialApplicationArguments != nil && all.InitialApplicationArguments.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.InitialApplicationArguments = all.InitialApplicationArguments + o.Variables = all.Variables + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/api/datadogV1/model_synthetics_mobile_test_initial_application_arguments.go b/api/datadogV1/model_synthetics_mobile_test_initial_application_arguments.go new file mode 100644 index 00000000000..c6997606eb6 --- /dev/null +++ b/api/datadogV1/model_synthetics_mobile_test_initial_application_arguments.go @@ -0,0 +1,111 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestInitialApplicationArguments Initial application arguments for a mobile test. +type SyntheticsMobileTestInitialApplicationArguments struct { + // Name of the property. + PropertyNames *SyntheticsMobileTestInitialApplicationArgumentsPropertyNames `json:"propertyNames,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTestInitialApplicationArguments instantiates a new SyntheticsMobileTestInitialApplicationArguments object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTestInitialApplicationArguments() *SyntheticsMobileTestInitialApplicationArguments { + this := SyntheticsMobileTestInitialApplicationArguments{} + return &this +} + +// NewSyntheticsMobileTestInitialApplicationArgumentsWithDefaults instantiates a new SyntheticsMobileTestInitialApplicationArguments object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestInitialApplicationArgumentsWithDefaults() *SyntheticsMobileTestInitialApplicationArguments { + this := SyntheticsMobileTestInitialApplicationArguments{} + return &this +} + +// GetPropertyNames returns the PropertyNames field value if set, zero value otherwise. +func (o *SyntheticsMobileTestInitialApplicationArguments) GetPropertyNames() SyntheticsMobileTestInitialApplicationArgumentsPropertyNames { + if o == nil || o.PropertyNames == nil { + var ret SyntheticsMobileTestInitialApplicationArgumentsPropertyNames + return ret + } + return *o.PropertyNames +} + +// GetPropertyNamesOk returns a tuple with the PropertyNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestInitialApplicationArguments) GetPropertyNamesOk() (*SyntheticsMobileTestInitialApplicationArgumentsPropertyNames, bool) { + if o == nil || o.PropertyNames == nil { + return nil, false + } + return o.PropertyNames, true +} + +// HasPropertyNames returns a boolean if a field has been set. +func (o *SyntheticsMobileTestInitialApplicationArguments) HasPropertyNames() bool { + return o != nil && o.PropertyNames != nil +} + +// SetPropertyNames gets a reference to the given SyntheticsMobileTestInitialApplicationArgumentsPropertyNames and assigns it to the PropertyNames field. +func (o *SyntheticsMobileTestInitialApplicationArguments) SetPropertyNames(v SyntheticsMobileTestInitialApplicationArgumentsPropertyNames) { + o.PropertyNames = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTestInitialApplicationArguments) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.PropertyNames != nil { + toSerialize["propertyNames"] = o.PropertyNames + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTestInitialApplicationArguments) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + PropertyNames *SyntheticsMobileTestInitialApplicationArgumentsPropertyNames `json:"propertyNames,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"propertyNames"}) + } else { + return err + } + + hasInvalidField := false + if all.PropertyNames != nil && all.PropertyNames.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.PropertyNames = all.PropertyNames + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/api/datadogV1/model_synthetics_mobile_test_initial_application_arguments_property_names.go b/api/datadogV1/model_synthetics_mobile_test_initial_application_arguments_property_names.go new file mode 100644 index 00000000000..52bc1b8a895 --- /dev/null +++ b/api/datadogV1/model_synthetics_mobile_test_initial_application_arguments_property_names.go @@ -0,0 +1,102 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestInitialApplicationArgumentsPropertyNames Name of the property. +type SyntheticsMobileTestInitialApplicationArgumentsPropertyNames struct { + // The `propertyNames` `pattern`. + Pattern *string `json:"pattern,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTestInitialApplicationArgumentsPropertyNames instantiates a new SyntheticsMobileTestInitialApplicationArgumentsPropertyNames object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTestInitialApplicationArgumentsPropertyNames() *SyntheticsMobileTestInitialApplicationArgumentsPropertyNames { + this := SyntheticsMobileTestInitialApplicationArgumentsPropertyNames{} + return &this +} + +// NewSyntheticsMobileTestInitialApplicationArgumentsPropertyNamesWithDefaults instantiates a new SyntheticsMobileTestInitialApplicationArgumentsPropertyNames object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestInitialApplicationArgumentsPropertyNamesWithDefaults() *SyntheticsMobileTestInitialApplicationArgumentsPropertyNames { + this := SyntheticsMobileTestInitialApplicationArgumentsPropertyNames{} + return &this +} + +// GetPattern returns the Pattern field value if set, zero value otherwise. +func (o *SyntheticsMobileTestInitialApplicationArgumentsPropertyNames) GetPattern() string { + if o == nil || o.Pattern == nil { + var ret string + return ret + } + return *o.Pattern +} + +// GetPatternOk returns a tuple with the Pattern field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestInitialApplicationArgumentsPropertyNames) GetPatternOk() (*string, bool) { + if o == nil || o.Pattern == nil { + return nil, false + } + return o.Pattern, true +} + +// HasPattern returns a boolean if a field has been set. +func (o *SyntheticsMobileTestInitialApplicationArgumentsPropertyNames) HasPattern() bool { + return o != nil && o.Pattern != nil +} + +// SetPattern gets a reference to the given string and assigns it to the Pattern field. +func (o *SyntheticsMobileTestInitialApplicationArgumentsPropertyNames) SetPattern(v string) { + o.Pattern = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTestInitialApplicationArgumentsPropertyNames) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Pattern != nil { + toSerialize["pattern"] = o.Pattern + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTestInitialApplicationArgumentsPropertyNames) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Pattern *string `json:"pattern,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"pattern"}) + } else { + return err + } + o.Pattern = all.Pattern + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/api/datadogV1/model_synthetics_mobile_test_options.go b/api/datadogV1/model_synthetics_mobile_test_options.go new file mode 100644 index 00000000000..e8ce9751c58 --- /dev/null +++ b/api/datadogV1/model_synthetics_mobile_test_options.go @@ -0,0 +1,684 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestOptions Object describing the extra options for a Synthetic test. +type SyntheticsMobileTestOptions struct { + // The `SyntheticsMobileTestOptions` `allowApplicationCrash`. + AllowApplicationCrash *bool `json:"allowApplicationCrash,omitempty"` + // Array of bindings used for the mobile test. + Bindings []SyntheticsMobileTestBinding `json:"bindings,omitempty"` + // CI/CD options for a Synthetic test. + Ci *SyntheticsMobileTestCiOptions `json:"ci,omitempty"` + // The `SyntheticsMobileTestOptions` `defaultStepTimeout`. + DefaultStepTimeout *int32 `json:"defaultStepTimeout,omitempty"` + // For mobile test, array with the different device IDs used to run the test. + DeviceIds []SyntheticsMobileDeviceID `json:"device_ids,omitempty"` + // The `SyntheticsMobileTestOptions` `disableAutoAcceptAlert`. + DisableAutoAcceptAlert *bool `json:"disableAutoAcceptAlert,omitempty"` + // Minimum amount of time in failure required to trigger an alert. + MinFailureDuration *int64 `json:"min_failure_duration,omitempty"` + // Mobile application for mobile synthetics test. + MobileApplication *SyntheticsMobileTestsMobileApplication `json:"mobileApplication,omitempty"` + // The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs. + MonitorName *string `json:"monitor_name,omitempty"` + // Object containing the options for a mobile Synthetic test as a monitor + // (for example, renotification). + MonitorOptions *SyntheticsMobileTestOptionsMonitorOptions `json:"monitor_options,omitempty"` + // Integer from 1 (high) to 5 (low) indicating alert severity. + MonitorPriority *int32 `json:"monitor_priority,omitempty"` + // The `SyntheticsMobileTestOptions` `noScreenshot`. + NoScreenshot *bool `json:"noScreenshot,omitempty"` + // A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. + RestrictedRoles []string `json:"restricted_roles,omitempty"` + // Object describing the retry strategy to apply to a Synthetic test. + Retry *SyntheticsTestOptionsRetry `json:"retry,omitempty"` + // Object containing timeframes and timezone used for advanced scheduling. + Scheduling *SyntheticsTestOptionsScheduling `json:"scheduling,omitempty"` + // The frequency at which to run the Synthetic test (in seconds). + TickEvery *int64 `json:"tick_every,omitempty"` + // The `SyntheticsMobileTestOptions` `verbosity`. + Verbosity *int32 `json:"verbosity,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTestOptions instantiates a new SyntheticsMobileTestOptions object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTestOptions() *SyntheticsMobileTestOptions { + this := SyntheticsMobileTestOptions{} + return &this +} + +// NewSyntheticsMobileTestOptionsWithDefaults instantiates a new SyntheticsMobileTestOptions object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestOptionsWithDefaults() *SyntheticsMobileTestOptions { + this := SyntheticsMobileTestOptions{} + return &this +} + +// GetAllowApplicationCrash returns the AllowApplicationCrash field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetAllowApplicationCrash() bool { + if o == nil || o.AllowApplicationCrash == nil { + var ret bool + return ret + } + return *o.AllowApplicationCrash +} + +// GetAllowApplicationCrashOk returns a tuple with the AllowApplicationCrash field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetAllowApplicationCrashOk() (*bool, bool) { + if o == nil || o.AllowApplicationCrash == nil { + return nil, false + } + return o.AllowApplicationCrash, true +} + +// HasAllowApplicationCrash returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasAllowApplicationCrash() bool { + return o != nil && o.AllowApplicationCrash != nil +} + +// SetAllowApplicationCrash gets a reference to the given bool and assigns it to the AllowApplicationCrash field. +func (o *SyntheticsMobileTestOptions) SetAllowApplicationCrash(v bool) { + o.AllowApplicationCrash = &v +} + +// GetBindings returns the Bindings field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetBindings() []SyntheticsMobileTestBinding { + if o == nil || o.Bindings == nil { + var ret []SyntheticsMobileTestBinding + return ret + } + return o.Bindings +} + +// GetBindingsOk returns a tuple with the Bindings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetBindingsOk() (*[]SyntheticsMobileTestBinding, bool) { + if o == nil || o.Bindings == nil { + return nil, false + } + return &o.Bindings, true +} + +// HasBindings returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasBindings() bool { + return o != nil && o.Bindings != nil +} + +// SetBindings gets a reference to the given []SyntheticsMobileTestBinding and assigns it to the Bindings field. +func (o *SyntheticsMobileTestOptions) SetBindings(v []SyntheticsMobileTestBinding) { + o.Bindings = v +} + +// GetCi returns the Ci field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetCi() SyntheticsMobileTestCiOptions { + if o == nil || o.Ci == nil { + var ret SyntheticsMobileTestCiOptions + return ret + } + return *o.Ci +} + +// GetCiOk returns a tuple with the Ci field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetCiOk() (*SyntheticsMobileTestCiOptions, bool) { + if o == nil || o.Ci == nil { + return nil, false + } + return o.Ci, true +} + +// HasCi returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasCi() bool { + return o != nil && o.Ci != nil +} + +// SetCi gets a reference to the given SyntheticsMobileTestCiOptions and assigns it to the Ci field. +func (o *SyntheticsMobileTestOptions) SetCi(v SyntheticsMobileTestCiOptions) { + o.Ci = &v +} + +// GetDefaultStepTimeout returns the DefaultStepTimeout field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetDefaultStepTimeout() int32 { + if o == nil || o.DefaultStepTimeout == nil { + var ret int32 + return ret + } + return *o.DefaultStepTimeout +} + +// GetDefaultStepTimeoutOk returns a tuple with the DefaultStepTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetDefaultStepTimeoutOk() (*int32, bool) { + if o == nil || o.DefaultStepTimeout == nil { + return nil, false + } + return o.DefaultStepTimeout, true +} + +// HasDefaultStepTimeout returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasDefaultStepTimeout() bool { + return o != nil && o.DefaultStepTimeout != nil +} + +// SetDefaultStepTimeout gets a reference to the given int32 and assigns it to the DefaultStepTimeout field. +func (o *SyntheticsMobileTestOptions) SetDefaultStepTimeout(v int32) { + o.DefaultStepTimeout = &v +} + +// GetDeviceIds returns the DeviceIds field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetDeviceIds() []SyntheticsMobileDeviceID { + if o == nil || o.DeviceIds == nil { + var ret []SyntheticsMobileDeviceID + return ret + } + return o.DeviceIds +} + +// GetDeviceIdsOk returns a tuple with the DeviceIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetDeviceIdsOk() (*[]SyntheticsMobileDeviceID, bool) { + if o == nil || o.DeviceIds == nil { + return nil, false + } + return &o.DeviceIds, true +} + +// HasDeviceIds returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasDeviceIds() bool { + return o != nil && o.DeviceIds != nil +} + +// SetDeviceIds gets a reference to the given []SyntheticsMobileDeviceID and assigns it to the DeviceIds field. +func (o *SyntheticsMobileTestOptions) SetDeviceIds(v []SyntheticsMobileDeviceID) { + o.DeviceIds = v +} + +// GetDisableAutoAcceptAlert returns the DisableAutoAcceptAlert field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetDisableAutoAcceptAlert() bool { + if o == nil || o.DisableAutoAcceptAlert == nil { + var ret bool + return ret + } + return *o.DisableAutoAcceptAlert +} + +// GetDisableAutoAcceptAlertOk returns a tuple with the DisableAutoAcceptAlert field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetDisableAutoAcceptAlertOk() (*bool, bool) { + if o == nil || o.DisableAutoAcceptAlert == nil { + return nil, false + } + return o.DisableAutoAcceptAlert, true +} + +// HasDisableAutoAcceptAlert returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasDisableAutoAcceptAlert() bool { + return o != nil && o.DisableAutoAcceptAlert != nil +} + +// SetDisableAutoAcceptAlert gets a reference to the given bool and assigns it to the DisableAutoAcceptAlert field. +func (o *SyntheticsMobileTestOptions) SetDisableAutoAcceptAlert(v bool) { + o.DisableAutoAcceptAlert = &v +} + +// GetMinFailureDuration returns the MinFailureDuration field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetMinFailureDuration() int64 { + if o == nil || o.MinFailureDuration == nil { + var ret int64 + return ret + } + return *o.MinFailureDuration +} + +// GetMinFailureDurationOk returns a tuple with the MinFailureDuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetMinFailureDurationOk() (*int64, bool) { + if o == nil || o.MinFailureDuration == nil { + return nil, false + } + return o.MinFailureDuration, true +} + +// HasMinFailureDuration returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasMinFailureDuration() bool { + return o != nil && o.MinFailureDuration != nil +} + +// SetMinFailureDuration gets a reference to the given int64 and assigns it to the MinFailureDuration field. +func (o *SyntheticsMobileTestOptions) SetMinFailureDuration(v int64) { + o.MinFailureDuration = &v +} + +// GetMobileApplication returns the MobileApplication field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetMobileApplication() SyntheticsMobileTestsMobileApplication { + if o == nil || o.MobileApplication == nil { + var ret SyntheticsMobileTestsMobileApplication + return ret + } + return *o.MobileApplication +} + +// GetMobileApplicationOk returns a tuple with the MobileApplication field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetMobileApplicationOk() (*SyntheticsMobileTestsMobileApplication, bool) { + if o == nil || o.MobileApplication == nil { + return nil, false + } + return o.MobileApplication, true +} + +// HasMobileApplication returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasMobileApplication() bool { + return o != nil && o.MobileApplication != nil +} + +// SetMobileApplication gets a reference to the given SyntheticsMobileTestsMobileApplication and assigns it to the MobileApplication field. +func (o *SyntheticsMobileTestOptions) SetMobileApplication(v SyntheticsMobileTestsMobileApplication) { + o.MobileApplication = &v +} + +// GetMonitorName returns the MonitorName field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetMonitorName() string { + if o == nil || o.MonitorName == nil { + var ret string + return ret + } + return *o.MonitorName +} + +// GetMonitorNameOk returns a tuple with the MonitorName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetMonitorNameOk() (*string, bool) { + if o == nil || o.MonitorName == nil { + return nil, false + } + return o.MonitorName, true +} + +// HasMonitorName returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasMonitorName() bool { + return o != nil && o.MonitorName != nil +} + +// SetMonitorName gets a reference to the given string and assigns it to the MonitorName field. +func (o *SyntheticsMobileTestOptions) SetMonitorName(v string) { + o.MonitorName = &v +} + +// GetMonitorOptions returns the MonitorOptions field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetMonitorOptions() SyntheticsMobileTestOptionsMonitorOptions { + if o == nil || o.MonitorOptions == nil { + var ret SyntheticsMobileTestOptionsMonitorOptions + return ret + } + return *o.MonitorOptions +} + +// GetMonitorOptionsOk returns a tuple with the MonitorOptions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetMonitorOptionsOk() (*SyntheticsMobileTestOptionsMonitorOptions, bool) { + if o == nil || o.MonitorOptions == nil { + return nil, false + } + return o.MonitorOptions, true +} + +// HasMonitorOptions returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasMonitorOptions() bool { + return o != nil && o.MonitorOptions != nil +} + +// SetMonitorOptions gets a reference to the given SyntheticsMobileTestOptionsMonitorOptions and assigns it to the MonitorOptions field. +func (o *SyntheticsMobileTestOptions) SetMonitorOptions(v SyntheticsMobileTestOptionsMonitorOptions) { + o.MonitorOptions = &v +} + +// GetMonitorPriority returns the MonitorPriority field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetMonitorPriority() int32 { + if o == nil || o.MonitorPriority == nil { + var ret int32 + return ret + } + return *o.MonitorPriority +} + +// GetMonitorPriorityOk returns a tuple with the MonitorPriority field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetMonitorPriorityOk() (*int32, bool) { + if o == nil || o.MonitorPriority == nil { + return nil, false + } + return o.MonitorPriority, true +} + +// HasMonitorPriority returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasMonitorPriority() bool { + return o != nil && o.MonitorPriority != nil +} + +// SetMonitorPriority gets a reference to the given int32 and assigns it to the MonitorPriority field. +func (o *SyntheticsMobileTestOptions) SetMonitorPriority(v int32) { + o.MonitorPriority = &v +} + +// GetNoScreenshot returns the NoScreenshot field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetNoScreenshot() bool { + if o == nil || o.NoScreenshot == nil { + var ret bool + return ret + } + return *o.NoScreenshot +} + +// GetNoScreenshotOk returns a tuple with the NoScreenshot field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetNoScreenshotOk() (*bool, bool) { + if o == nil || o.NoScreenshot == nil { + return nil, false + } + return o.NoScreenshot, true +} + +// HasNoScreenshot returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasNoScreenshot() bool { + return o != nil && o.NoScreenshot != nil +} + +// SetNoScreenshot gets a reference to the given bool and assigns it to the NoScreenshot field. +func (o *SyntheticsMobileTestOptions) SetNoScreenshot(v bool) { + o.NoScreenshot = &v +} + +// GetRestrictedRoles returns the RestrictedRoles field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetRestrictedRoles() []string { + if o == nil || o.RestrictedRoles == nil { + var ret []string + return ret + } + return o.RestrictedRoles +} + +// GetRestrictedRolesOk returns a tuple with the RestrictedRoles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetRestrictedRolesOk() (*[]string, bool) { + if o == nil || o.RestrictedRoles == nil { + return nil, false + } + return &o.RestrictedRoles, true +} + +// HasRestrictedRoles returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasRestrictedRoles() bool { + return o != nil && o.RestrictedRoles != nil +} + +// SetRestrictedRoles gets a reference to the given []string and assigns it to the RestrictedRoles field. +func (o *SyntheticsMobileTestOptions) SetRestrictedRoles(v []string) { + o.RestrictedRoles = v +} + +// GetRetry returns the Retry field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetRetry() SyntheticsTestOptionsRetry { + if o == nil || o.Retry == nil { + var ret SyntheticsTestOptionsRetry + return ret + } + return *o.Retry +} + +// GetRetryOk returns a tuple with the Retry field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetRetryOk() (*SyntheticsTestOptionsRetry, bool) { + if o == nil || o.Retry == nil { + return nil, false + } + return o.Retry, true +} + +// HasRetry returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasRetry() bool { + return o != nil && o.Retry != nil +} + +// SetRetry gets a reference to the given SyntheticsTestOptionsRetry and assigns it to the Retry field. +func (o *SyntheticsMobileTestOptions) SetRetry(v SyntheticsTestOptionsRetry) { + o.Retry = &v +} + +// GetScheduling returns the Scheduling field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetScheduling() SyntheticsTestOptionsScheduling { + if o == nil || o.Scheduling == nil { + var ret SyntheticsTestOptionsScheduling + return ret + } + return *o.Scheduling +} + +// GetSchedulingOk returns a tuple with the Scheduling field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetSchedulingOk() (*SyntheticsTestOptionsScheduling, bool) { + if o == nil || o.Scheduling == nil { + return nil, false + } + return o.Scheduling, true +} + +// HasScheduling returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasScheduling() bool { + return o != nil && o.Scheduling != nil +} + +// SetScheduling gets a reference to the given SyntheticsTestOptionsScheduling and assigns it to the Scheduling field. +func (o *SyntheticsMobileTestOptions) SetScheduling(v SyntheticsTestOptionsScheduling) { + o.Scheduling = &v +} + +// GetTickEvery returns the TickEvery field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetTickEvery() int64 { + if o == nil || o.TickEvery == nil { + var ret int64 + return ret + } + return *o.TickEvery +} + +// GetTickEveryOk returns a tuple with the TickEvery field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetTickEveryOk() (*int64, bool) { + if o == nil || o.TickEvery == nil { + return nil, false + } + return o.TickEvery, true +} + +// HasTickEvery returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasTickEvery() bool { + return o != nil && o.TickEvery != nil +} + +// SetTickEvery gets a reference to the given int64 and assigns it to the TickEvery field. +func (o *SyntheticsMobileTestOptions) SetTickEvery(v int64) { + o.TickEvery = &v +} + +// GetVerbosity returns the Verbosity field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptions) GetVerbosity() int32 { + if o == nil || o.Verbosity == nil { + var ret int32 + return ret + } + return *o.Verbosity +} + +// GetVerbosityOk returns a tuple with the Verbosity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptions) GetVerbosityOk() (*int32, bool) { + if o == nil || o.Verbosity == nil { + return nil, false + } + return o.Verbosity, true +} + +// HasVerbosity returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptions) HasVerbosity() bool { + return o != nil && o.Verbosity != nil +} + +// SetVerbosity gets a reference to the given int32 and assigns it to the Verbosity field. +func (o *SyntheticsMobileTestOptions) SetVerbosity(v int32) { + o.Verbosity = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTestOptions) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.AllowApplicationCrash != nil { + toSerialize["allowApplicationCrash"] = o.AllowApplicationCrash + } + if o.Bindings != nil { + toSerialize["bindings"] = o.Bindings + } + if o.Ci != nil { + toSerialize["ci"] = o.Ci + } + if o.DefaultStepTimeout != nil { + toSerialize["defaultStepTimeout"] = o.DefaultStepTimeout + } + if o.DeviceIds != nil { + toSerialize["device_ids"] = o.DeviceIds + } + if o.DisableAutoAcceptAlert != nil { + toSerialize["disableAutoAcceptAlert"] = o.DisableAutoAcceptAlert + } + if o.MinFailureDuration != nil { + toSerialize["min_failure_duration"] = o.MinFailureDuration + } + if o.MobileApplication != nil { + toSerialize["mobileApplication"] = o.MobileApplication + } + if o.MonitorName != nil { + toSerialize["monitor_name"] = o.MonitorName + } + if o.MonitorOptions != nil { + toSerialize["monitor_options"] = o.MonitorOptions + } + if o.MonitorPriority != nil { + toSerialize["monitor_priority"] = o.MonitorPriority + } + if o.NoScreenshot != nil { + toSerialize["noScreenshot"] = o.NoScreenshot + } + if o.RestrictedRoles != nil { + toSerialize["restricted_roles"] = o.RestrictedRoles + } + if o.Retry != nil { + toSerialize["retry"] = o.Retry + } + if o.Scheduling != nil { + toSerialize["scheduling"] = o.Scheduling + } + if o.TickEvery != nil { + toSerialize["tick_every"] = o.TickEvery + } + if o.Verbosity != nil { + toSerialize["verbosity"] = o.Verbosity + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTestOptions) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + AllowApplicationCrash *bool `json:"allowApplicationCrash,omitempty"` + Bindings []SyntheticsMobileTestBinding `json:"bindings,omitempty"` + Ci *SyntheticsMobileTestCiOptions `json:"ci,omitempty"` + DefaultStepTimeout *int32 `json:"defaultStepTimeout,omitempty"` + DeviceIds []SyntheticsMobileDeviceID `json:"device_ids,omitempty"` + DisableAutoAcceptAlert *bool `json:"disableAutoAcceptAlert,omitempty"` + MinFailureDuration *int64 `json:"min_failure_duration,omitempty"` + MobileApplication *SyntheticsMobileTestsMobileApplication `json:"mobileApplication,omitempty"` + MonitorName *string `json:"monitor_name,omitempty"` + MonitorOptions *SyntheticsMobileTestOptionsMonitorOptions `json:"monitor_options,omitempty"` + MonitorPriority *int32 `json:"monitor_priority,omitempty"` + NoScreenshot *bool `json:"noScreenshot,omitempty"` + RestrictedRoles []string `json:"restricted_roles,omitempty"` + Retry *SyntheticsTestOptionsRetry `json:"retry,omitempty"` + Scheduling *SyntheticsTestOptionsScheduling `json:"scheduling,omitempty"` + TickEvery *int64 `json:"tick_every,omitempty"` + Verbosity *int32 `json:"verbosity,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"allowApplicationCrash", "bindings", "ci", "defaultStepTimeout", "device_ids", "disableAutoAcceptAlert", "min_failure_duration", "mobileApplication", "monitor_name", "monitor_options", "monitor_priority", "noScreenshot", "restricted_roles", "retry", "scheduling", "tick_every", "verbosity"}) + } else { + return err + } + + hasInvalidField := false + o.AllowApplicationCrash = all.AllowApplicationCrash + o.Bindings = all.Bindings + if all.Ci != nil && all.Ci.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Ci = all.Ci + o.DefaultStepTimeout = all.DefaultStepTimeout + o.DeviceIds = all.DeviceIds + o.DisableAutoAcceptAlert = all.DisableAutoAcceptAlert + o.MinFailureDuration = all.MinFailureDuration + if all.MobileApplication != nil && all.MobileApplication.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.MobileApplication = all.MobileApplication + o.MonitorName = all.MonitorName + if all.MonitorOptions != nil && all.MonitorOptions.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.MonitorOptions = all.MonitorOptions + o.MonitorPriority = all.MonitorPriority + o.NoScreenshot = all.NoScreenshot + o.RestrictedRoles = all.RestrictedRoles + if all.Retry != nil && all.Retry.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Retry = all.Retry + if all.Scheduling != nil && all.Scheduling.UnparsedObject != nil && o.UnparsedObject == nil { + hasInvalidField = true + } + o.Scheduling = all.Scheduling + o.TickEvery = all.TickEvery + o.Verbosity = all.Verbosity + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/api/datadogV1/model_synthetics_mobile_test_options_monitor_options.go b/api/datadogV1/model_synthetics_mobile_test_options_monitor_options.go new file mode 100644 index 00000000000..e9f58d439a9 --- /dev/null +++ b/api/datadogV1/model_synthetics_mobile_test_options_monitor_options.go @@ -0,0 +1,219 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestOptionsMonitorOptions Object containing the options for a mobile Synthetic test as a monitor +// (for example, renotification). +type SyntheticsMobileTestOptionsMonitorOptions struct { + // Message to include in the escalation notification. + EscalationMessage *string `json:"escalation_message,omitempty"` + // The definition of `SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName` object. + NotificationPresetName *SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName `json:"notification_preset_name,omitempty"` + // Time interval before renotifying if the test is still failing + // (in minutes). + RenotifyInterval *int64 `json:"renotify_interval,omitempty"` + // The `SyntheticsMobileTestOptionsMonitorOptions` `renotify_occurrences`. + RenotifyOccurrences *int64 `json:"renotify_occurrences,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTestOptionsMonitorOptions instantiates a new SyntheticsMobileTestOptionsMonitorOptions object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTestOptionsMonitorOptions() *SyntheticsMobileTestOptionsMonitorOptions { + this := SyntheticsMobileTestOptionsMonitorOptions{} + return &this +} + +// NewSyntheticsMobileTestOptionsMonitorOptionsWithDefaults instantiates a new SyntheticsMobileTestOptionsMonitorOptions object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestOptionsMonitorOptionsWithDefaults() *SyntheticsMobileTestOptionsMonitorOptions { + this := SyntheticsMobileTestOptionsMonitorOptions{} + return &this +} + +// GetEscalationMessage returns the EscalationMessage field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptionsMonitorOptions) GetEscalationMessage() string { + if o == nil || o.EscalationMessage == nil { + var ret string + return ret + } + return *o.EscalationMessage +} + +// GetEscalationMessageOk returns a tuple with the EscalationMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptionsMonitorOptions) GetEscalationMessageOk() (*string, bool) { + if o == nil || o.EscalationMessage == nil { + return nil, false + } + return o.EscalationMessage, true +} + +// HasEscalationMessage returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptionsMonitorOptions) HasEscalationMessage() bool { + return o != nil && o.EscalationMessage != nil +} + +// SetEscalationMessage gets a reference to the given string and assigns it to the EscalationMessage field. +func (o *SyntheticsMobileTestOptionsMonitorOptions) SetEscalationMessage(v string) { + o.EscalationMessage = &v +} + +// GetNotificationPresetName returns the NotificationPresetName field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptionsMonitorOptions) GetNotificationPresetName() SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName { + if o == nil || o.NotificationPresetName == nil { + var ret SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName + return ret + } + return *o.NotificationPresetName +} + +// GetNotificationPresetNameOk returns a tuple with the NotificationPresetName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptionsMonitorOptions) GetNotificationPresetNameOk() (*SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName, bool) { + if o == nil || o.NotificationPresetName == nil { + return nil, false + } + return o.NotificationPresetName, true +} + +// HasNotificationPresetName returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptionsMonitorOptions) HasNotificationPresetName() bool { + return o != nil && o.NotificationPresetName != nil +} + +// SetNotificationPresetName gets a reference to the given SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName and assigns it to the NotificationPresetName field. +func (o *SyntheticsMobileTestOptionsMonitorOptions) SetNotificationPresetName(v SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName) { + o.NotificationPresetName = &v +} + +// GetRenotifyInterval returns the RenotifyInterval field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptionsMonitorOptions) GetRenotifyInterval() int64 { + if o == nil || o.RenotifyInterval == nil { + var ret int64 + return ret + } + return *o.RenotifyInterval +} + +// GetRenotifyIntervalOk returns a tuple with the RenotifyInterval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptionsMonitorOptions) GetRenotifyIntervalOk() (*int64, bool) { + if o == nil || o.RenotifyInterval == nil { + return nil, false + } + return o.RenotifyInterval, true +} + +// HasRenotifyInterval returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptionsMonitorOptions) HasRenotifyInterval() bool { + return o != nil && o.RenotifyInterval != nil +} + +// SetRenotifyInterval gets a reference to the given int64 and assigns it to the RenotifyInterval field. +func (o *SyntheticsMobileTestOptionsMonitorOptions) SetRenotifyInterval(v int64) { + o.RenotifyInterval = &v +} + +// GetRenotifyOccurrences returns the RenotifyOccurrences field value if set, zero value otherwise. +func (o *SyntheticsMobileTestOptionsMonitorOptions) GetRenotifyOccurrences() int64 { + if o == nil || o.RenotifyOccurrences == nil { + var ret int64 + return ret + } + return *o.RenotifyOccurrences +} + +// GetRenotifyOccurrencesOk returns a tuple with the RenotifyOccurrences field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestOptionsMonitorOptions) GetRenotifyOccurrencesOk() (*int64, bool) { + if o == nil || o.RenotifyOccurrences == nil { + return nil, false + } + return o.RenotifyOccurrences, true +} + +// HasRenotifyOccurrences returns a boolean if a field has been set. +func (o *SyntheticsMobileTestOptionsMonitorOptions) HasRenotifyOccurrences() bool { + return o != nil && o.RenotifyOccurrences != nil +} + +// SetRenotifyOccurrences gets a reference to the given int64 and assigns it to the RenotifyOccurrences field. +func (o *SyntheticsMobileTestOptionsMonitorOptions) SetRenotifyOccurrences(v int64) { + o.RenotifyOccurrences = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTestOptionsMonitorOptions) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.EscalationMessage != nil { + toSerialize["escalation_message"] = o.EscalationMessage + } + if o.NotificationPresetName != nil { + toSerialize["notification_preset_name"] = o.NotificationPresetName + } + if o.RenotifyInterval != nil { + toSerialize["renotify_interval"] = o.RenotifyInterval + } + if o.RenotifyOccurrences != nil { + toSerialize["renotify_occurrences"] = o.RenotifyOccurrences + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTestOptionsMonitorOptions) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + EscalationMessage *string `json:"escalation_message,omitempty"` + NotificationPresetName *SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName `json:"notification_preset_name,omitempty"` + RenotifyInterval *int64 `json:"renotify_interval,omitempty"` + RenotifyOccurrences *int64 `json:"renotify_occurrences,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"escalation_message", "notification_preset_name", "renotify_interval", "renotify_occurrences"}) + } else { + return err + } + + hasInvalidField := false + o.EscalationMessage = all.EscalationMessage + if all.NotificationPresetName != nil && !all.NotificationPresetName.IsValid() { + hasInvalidField = true + } else { + o.NotificationPresetName = all.NotificationPresetName + } + o.RenotifyInterval = all.RenotifyInterval + o.RenotifyOccurrences = all.RenotifyOccurrences + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/api/datadogV1/model_synthetics_mobile_test_options_monitor_options_notification_preset_name.go b/api/datadogV1/model_synthetics_mobile_test_options_monitor_options_notification_preset_name.go new file mode 100644 index 00000000000..73cff926a37 --- /dev/null +++ b/api/datadogV1/model_synthetics_mobile_test_options_monitor_options_notification_preset_name.go @@ -0,0 +1,70 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName The definition of `SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName` object. +type SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName string + +// List of SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName. +const ( + SYNTHETICSMOBILETESTOPTIONSMONITOROPTIONSNOTIFICATIONPRESETNAME_SHOW_ALL SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName = "show_all" + SYNTHETICSMOBILETESTOPTIONSMONITOROPTIONSNOTIFICATIONPRESETNAME_HIDE_ALL SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName = "hide_all" + SYNTHETICSMOBILETESTOPTIONSMONITOROPTIONSNOTIFICATIONPRESETNAME_HIDE_QUERY SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName = "hide_query" + SYNTHETICSMOBILETESTOPTIONSMONITOROPTIONSNOTIFICATIONPRESETNAME_HIDE_HANDLES SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName = "hide_handles" +) + +var allowedSyntheticsMobileTestOptionsMonitorOptionsNotificationPresetNameEnumValues = []SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName{ + SYNTHETICSMOBILETESTOPTIONSMONITOROPTIONSNOTIFICATIONPRESETNAME_SHOW_ALL, + SYNTHETICSMOBILETESTOPTIONSMONITOROPTIONSNOTIFICATIONPRESETNAME_HIDE_ALL, + SYNTHETICSMOBILETESTOPTIONSMONITOROPTIONSNOTIFICATIONPRESETNAME_HIDE_QUERY, + SYNTHETICSMOBILETESTOPTIONSMONITOROPTIONSNOTIFICATIONPRESETNAME_HIDE_HANDLES, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName) GetAllowedValues() []SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName { + return allowedSyntheticsMobileTestOptionsMonitorOptionsNotificationPresetNameEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName(value) + return nil +} + +// NewSyntheticsMobileTestOptionsMonitorOptionsNotificationPresetNameFromValue returns a pointer to a valid SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewSyntheticsMobileTestOptionsMonitorOptionsNotificationPresetNameFromValue(v string) (*SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName, error) { + ev := SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName: valid values are %v", v, allowedSyntheticsMobileTestOptionsMonitorOptionsNotificationPresetNameEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName) IsValid() bool { + for _, existing := range allowedSyntheticsMobileTestOptionsMonitorOptionsNotificationPresetNameEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName value. +func (v SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName) Ptr() *SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName { + return &v +} diff --git a/api/datadogV1/model_synthetics_mobile_test_type.go b/api/datadogV1/model_synthetics_mobile_test_type.go new file mode 100644 index 00000000000..72ecacef9aa --- /dev/null +++ b/api/datadogV1/model_synthetics_mobile_test_type.go @@ -0,0 +1,64 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestType Type of the Synthetic test, `mobile`. +type SyntheticsMobileTestType string + +// List of SyntheticsMobileTestType. +const ( + SYNTHETICSMOBILETESTTYPE_MOBILE SyntheticsMobileTestType = "mobile" +) + +var allowedSyntheticsMobileTestTypeEnumValues = []SyntheticsMobileTestType{ + SYNTHETICSMOBILETESTTYPE_MOBILE, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *SyntheticsMobileTestType) GetAllowedValues() []SyntheticsMobileTestType { + return allowedSyntheticsMobileTestTypeEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *SyntheticsMobileTestType) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = SyntheticsMobileTestType(value) + return nil +} + +// NewSyntheticsMobileTestTypeFromValue returns a pointer to a valid SyntheticsMobileTestType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewSyntheticsMobileTestTypeFromValue(v string) (*SyntheticsMobileTestType, error) { + ev := SyntheticsMobileTestType(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for SyntheticsMobileTestType: valid values are %v", v, allowedSyntheticsMobileTestTypeEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v SyntheticsMobileTestType) IsValid() bool { + for _, existing := range allowedSyntheticsMobileTestTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SyntheticsMobileTestType value. +func (v SyntheticsMobileTestType) Ptr() *SyntheticsMobileTestType { + return &v +} diff --git a/api/datadogV1/model_synthetics_mobile_tests_mobile_application.go b/api/datadogV1/model_synthetics_mobile_tests_mobile_application.go new file mode 100644 index 00000000000..02d7d5928ab --- /dev/null +++ b/api/datadogV1/model_synthetics_mobile_tests_mobile_application.go @@ -0,0 +1,182 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestsMobileApplication Mobile application for mobile synthetics test. +type SyntheticsMobileTestsMobileApplication struct { + // Application ID of the mobile application. + ApplicationId *string `json:"applicationId,omitempty"` + // Reference ID of the mobile application. + ReferenceId *string `json:"referenceId,omitempty"` + // Reference type for the mobile application for a mobile synthetics test. + ReferenceType *SyntheticsMobileTestsMobileApplicationReferenceType `json:"referenceType,omitempty"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewSyntheticsMobileTestsMobileApplication instantiates a new SyntheticsMobileTestsMobileApplication object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewSyntheticsMobileTestsMobileApplication() *SyntheticsMobileTestsMobileApplication { + this := SyntheticsMobileTestsMobileApplication{} + return &this +} + +// NewSyntheticsMobileTestsMobileApplicationWithDefaults instantiates a new SyntheticsMobileTestsMobileApplication object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewSyntheticsMobileTestsMobileApplicationWithDefaults() *SyntheticsMobileTestsMobileApplication { + this := SyntheticsMobileTestsMobileApplication{} + return &this +} + +// GetApplicationId returns the ApplicationId field value if set, zero value otherwise. +func (o *SyntheticsMobileTestsMobileApplication) GetApplicationId() string { + if o == nil || o.ApplicationId == nil { + var ret string + return ret + } + return *o.ApplicationId +} + +// GetApplicationIdOk returns a tuple with the ApplicationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestsMobileApplication) GetApplicationIdOk() (*string, bool) { + if o == nil || o.ApplicationId == nil { + return nil, false + } + return o.ApplicationId, true +} + +// HasApplicationId returns a boolean if a field has been set. +func (o *SyntheticsMobileTestsMobileApplication) HasApplicationId() bool { + return o != nil && o.ApplicationId != nil +} + +// SetApplicationId gets a reference to the given string and assigns it to the ApplicationId field. +func (o *SyntheticsMobileTestsMobileApplication) SetApplicationId(v string) { + o.ApplicationId = &v +} + +// GetReferenceId returns the ReferenceId field value if set, zero value otherwise. +func (o *SyntheticsMobileTestsMobileApplication) GetReferenceId() string { + if o == nil || o.ReferenceId == nil { + var ret string + return ret + } + return *o.ReferenceId +} + +// GetReferenceIdOk returns a tuple with the ReferenceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestsMobileApplication) GetReferenceIdOk() (*string, bool) { + if o == nil || o.ReferenceId == nil { + return nil, false + } + return o.ReferenceId, true +} + +// HasReferenceId returns a boolean if a field has been set. +func (o *SyntheticsMobileTestsMobileApplication) HasReferenceId() bool { + return o != nil && o.ReferenceId != nil +} + +// SetReferenceId gets a reference to the given string and assigns it to the ReferenceId field. +func (o *SyntheticsMobileTestsMobileApplication) SetReferenceId(v string) { + o.ReferenceId = &v +} + +// GetReferenceType returns the ReferenceType field value if set, zero value otherwise. +func (o *SyntheticsMobileTestsMobileApplication) GetReferenceType() SyntheticsMobileTestsMobileApplicationReferenceType { + if o == nil || o.ReferenceType == nil { + var ret SyntheticsMobileTestsMobileApplicationReferenceType + return ret + } + return *o.ReferenceType +} + +// GetReferenceTypeOk returns a tuple with the ReferenceType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SyntheticsMobileTestsMobileApplication) GetReferenceTypeOk() (*SyntheticsMobileTestsMobileApplicationReferenceType, bool) { + if o == nil || o.ReferenceType == nil { + return nil, false + } + return o.ReferenceType, true +} + +// HasReferenceType returns a boolean if a field has been set. +func (o *SyntheticsMobileTestsMobileApplication) HasReferenceType() bool { + return o != nil && o.ReferenceType != nil +} + +// SetReferenceType gets a reference to the given SyntheticsMobileTestsMobileApplicationReferenceType and assigns it to the ReferenceType field. +func (o *SyntheticsMobileTestsMobileApplication) SetReferenceType(v SyntheticsMobileTestsMobileApplicationReferenceType) { + o.ReferenceType = &v +} + +// MarshalJSON serializes the struct using spec logic. +func (o SyntheticsMobileTestsMobileApplication) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.ApplicationId != nil { + toSerialize["applicationId"] = o.ApplicationId + } + if o.ReferenceId != nil { + toSerialize["referenceId"] = o.ReferenceId + } + if o.ReferenceType != nil { + toSerialize["referenceType"] = o.ReferenceType + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *SyntheticsMobileTestsMobileApplication) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + ApplicationId *string `json:"applicationId,omitempty"` + ReferenceId *string `json:"referenceId,omitempty"` + ReferenceType *SyntheticsMobileTestsMobileApplicationReferenceType `json:"referenceType,omitempty"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"applicationId", "referenceId", "referenceType"}) + } else { + return err + } + + hasInvalidField := false + o.ApplicationId = all.ApplicationId + o.ReferenceId = all.ReferenceId + if all.ReferenceType != nil && !all.ReferenceType.IsValid() { + hasInvalidField = true + } else { + o.ReferenceType = all.ReferenceType + } + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + if hasInvalidField { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + + return nil +} diff --git a/api/datadogV1/model_synthetics_mobile_tests_mobile_application_reference_type.go b/api/datadogV1/model_synthetics_mobile_tests_mobile_application_reference_type.go new file mode 100644 index 00000000000..645dea37850 --- /dev/null +++ b/api/datadogV1/model_synthetics_mobile_tests_mobile_application_reference_type.go @@ -0,0 +1,66 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV1 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// SyntheticsMobileTestsMobileApplicationReferenceType Reference type for the mobile application for a mobile synthetics test. +type SyntheticsMobileTestsMobileApplicationReferenceType string + +// List of SyntheticsMobileTestsMobileApplicationReferenceType. +const ( + SYNTHETICSMOBILETESTSMOBILEAPPLICATIONREFERENCETYPE_LATEST SyntheticsMobileTestsMobileApplicationReferenceType = "latest" + SYNTHETICSMOBILETESTSMOBILEAPPLICATIONREFERENCETYPE_VERSION SyntheticsMobileTestsMobileApplicationReferenceType = "version" +) + +var allowedSyntheticsMobileTestsMobileApplicationReferenceTypeEnumValues = []SyntheticsMobileTestsMobileApplicationReferenceType{ + SYNTHETICSMOBILETESTSMOBILEAPPLICATIONREFERENCETYPE_LATEST, + SYNTHETICSMOBILETESTSMOBILEAPPLICATIONREFERENCETYPE_VERSION, +} + +// GetAllowedValues reeturns the list of possible values. +func (v *SyntheticsMobileTestsMobileApplicationReferenceType) GetAllowedValues() []SyntheticsMobileTestsMobileApplicationReferenceType { + return allowedSyntheticsMobileTestsMobileApplicationReferenceTypeEnumValues +} + +// UnmarshalJSON deserializes the given payload. +func (v *SyntheticsMobileTestsMobileApplicationReferenceType) UnmarshalJSON(src []byte) error { + var value string + err := datadog.Unmarshal(src, &value) + if err != nil { + return err + } + *v = SyntheticsMobileTestsMobileApplicationReferenceType(value) + return nil +} + +// NewSyntheticsMobileTestsMobileApplicationReferenceTypeFromValue returns a pointer to a valid SyntheticsMobileTestsMobileApplicationReferenceType +// for the value passed as argument, or an error if the value passed is not allowed by the enum. +func NewSyntheticsMobileTestsMobileApplicationReferenceTypeFromValue(v string) (*SyntheticsMobileTestsMobileApplicationReferenceType, error) { + ev := SyntheticsMobileTestsMobileApplicationReferenceType(v) + if ev.IsValid() { + return &ev, nil + } + return nil, fmt.Errorf("invalid value '%v' for SyntheticsMobileTestsMobileApplicationReferenceType: valid values are %v", v, allowedSyntheticsMobileTestsMobileApplicationReferenceTypeEnumValues) +} + +// IsValid return true if the value is valid for the enum, false otherwise. +func (v SyntheticsMobileTestsMobileApplicationReferenceType) IsValid() bool { + for _, existing := range allowedSyntheticsMobileTestsMobileApplicationReferenceTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SyntheticsMobileTestsMobileApplicationReferenceType value. +func (v SyntheticsMobileTestsMobileApplicationReferenceType) Ptr() *SyntheticsMobileTestsMobileApplicationReferenceType { + return &v +} diff --git a/examples/v1/synthetics/CreateSyntheticsMobileTest.go b/examples/v1/synthetics/CreateSyntheticsMobileTest.go new file mode 100644 index 00000000000..9439d8719ba --- /dev/null +++ b/examples/v1/synthetics/CreateSyntheticsMobileTest.go @@ -0,0 +1,50 @@ +// Create a mobile test returns "OK - Returns the created test details." response + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" + "github.com/DataDog/datadog-api-client-go/v2/api/datadogV1" +) + +func main() { + body := datadogV1.SyntheticsMobileTest{ + Name: "Example-Synthetic", + Status: datadogV1.SYNTHETICSTESTPAUSESTATUS_PAUSED.Ptr(), + Type: datadogV1.SYNTHETICSMOBILETESTTYPE_MOBILE, + Config: datadogV1.SyntheticsMobileTestConfig{ + Variables: []datadogV1.SyntheticsConfigVariable{}, + }, + Message: datadog.PtrString(""), + Options: datadogV1.SyntheticsMobileTestOptions{ + DeviceIds: []datadogV1.SyntheticsMobileDeviceID{ + datadogV1.SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_15_IOS_17, + }, + MobileApplication: &datadogV1.SyntheticsMobileTestsMobileApplication{ + ApplicationId: datadog.PtrString("ab0e0aed-536d-411a-9a99-5428c27d8f8e"), + ReferenceId: datadog.PtrString("6115922a-5f5d-455e-bc7e-7955a57f3815"), + ReferenceType: datadogV1.SYNTHETICSMOBILETESTSMOBILEAPPLICATIONREFERENCETYPE_VERSION.Ptr(), + }, + TickEvery: datadog.PtrInt64(3600), + }, + Steps: []datadogV1.SyntheticsMobileStep{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + api := datadogV1.NewSyntheticsApi(apiClient) + resp, r, err := api.CreateSyntheticsMobileTest(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.CreateSyntheticsMobileTest`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.CreateSyntheticsMobileTest`:\n%s\n", responseContent) +} diff --git a/examples/v1/synthetics/GetMobileTest.go b/examples/v1/synthetics/GetMobileTest.go new file mode 100644 index 00000000000..7679114bd23 --- /dev/null +++ b/examples/v1/synthetics/GetMobileTest.go @@ -0,0 +1,32 @@ +// Get a Mobile test returns "OK" response + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" + "github.com/DataDog/datadog-api-client-go/v2/api/datadogV1" +) + +func main() { + // there is a valid "synthetics_mobile_test" in the system + SyntheticsMobileTestPublicID := os.Getenv("SYNTHETICS_MOBILE_TEST_PUBLIC_ID") + + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + api := datadogV1.NewSyntheticsApi(apiClient) + resp, r, err := api.GetMobileTest(ctx, SyntheticsMobileTestPublicID) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.GetMobileTest`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.GetMobileTest`:\n%s\n", responseContent) +} diff --git a/examples/v1/synthetics/UpdateMobileTest.go b/examples/v1/synthetics/UpdateMobileTest.go new file mode 100644 index 00000000000..9b9ad24d64c --- /dev/null +++ b/examples/v1/synthetics/UpdateMobileTest.go @@ -0,0 +1,53 @@ +// Edit a Mobile test returns "OK" response + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" + "github.com/DataDog/datadog-api-client-go/v2/api/datadogV1" +) + +func main() { + // there is a valid "synthetics_mobile_test" in the system + SyntheticsMobileTestPublicID := os.Getenv("SYNTHETICS_MOBILE_TEST_PUBLIC_ID") + + body := datadogV1.SyntheticsMobileTest{ + Name: "Example-Synthetic-updated", + Status: datadogV1.SYNTHETICSTESTPAUSESTATUS_PAUSED.Ptr(), + Type: datadogV1.SYNTHETICSMOBILETESTTYPE_MOBILE, + Config: datadogV1.SyntheticsMobileTestConfig{ + Variables: []datadogV1.SyntheticsConfigVariable{}, + }, + Message: datadog.PtrString(""), + Options: datadogV1.SyntheticsMobileTestOptions{ + DeviceIds: []datadogV1.SyntheticsMobileDeviceID{ + datadogV1.SYNTHETICSMOBILEDEVICEID_SYNTHETICS_MOBILE_DEVICE_IPHONE_15_IOS_17, + }, + MobileApplication: &datadogV1.SyntheticsMobileTestsMobileApplication{ + ApplicationId: datadog.PtrString("ab0e0aed-536d-411a-9a99-5428c27d8f8e"), + ReferenceId: datadog.PtrString("6115922a-5f5d-455e-bc7e-7955a57f3815"), + ReferenceType: datadogV1.SYNTHETICSMOBILETESTSMOBILEAPPLICATIONREFERENCETYPE_VERSION.Ptr(), + }, + TickEvery: datadog.PtrInt64(3600), + }, + Steps: []datadogV1.SyntheticsMobileStep{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + api := datadogV1.NewSyntheticsApi(apiClient) + resp, r, err := api.UpdateMobileTest(ctx, SyntheticsMobileTestPublicID, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.UpdateMobileTest`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.UpdateMobileTest`:\n%s\n", responseContent) +} diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_mobile_test_returns_OK_-_Returns_the_created_test_details._response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_mobile_test_returns_OK_-_Returns_the_created_test_details._response.freeze new file mode 100644 index 00000000000..b401cf850c4 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_mobile_test_returns_OK_-_Returns_the_created_test_details._response.freeze @@ -0,0 +1 @@ +2024-10-01T12:07:30.183Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_mobile_test_returns_OK_-_Returns_the_created_test_details._response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_mobile_test_returns_OK_-_Returns_the_created_test_details._response.yaml new file mode 100644 index 00000000000..4bf789e68e8 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Create_a_mobile_test_returns_OK_-_Returns_the_created_test_details._response.yaml @@ -0,0 +1,46 @@ +interactions: +- request: + body: | + {"config":{"variables":[]},"message":"","name":"Test-Create_a_mobile_test_returns_OK_Returns_the_created_test_details_response-1727784450","options":{"device_ids":["synthetics:mobile:device:iphone_15_ios_17"],"mobileApplication":{"applicationId":"ab0e0aed-536d-411a-9a99-5428c27d8f8e","referenceId":"6115922a-5f5d-455e-bc7e-7955a57f3815","referenceType":"version"},"tick_every":3600},"status":"paused","steps":[],"type":"mobile"} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + id: 0 + method: POST + url: https://api.datadoghq.com/api/v1/synthetics/tests/mobile + response: + body: '{"public_id":"dt9-u4h-bqv","name":"Test-Create_a_mobile_test_returns_OK_Returns_the_created_test_details_response-1727784450","status":"paused","type":"mobile","tags":[],"created_at":"2024-10-01T12:07:30.710400+00:00","modified_at":"2024-10-01T12:07:30.710400+00:00","config":{"variables":[]},"message":"","options":{"device_ids":["synthetics:mobile:device:iphone_15_ios_17"],"mobileApplication":{"applicationId":"ab0e0aed-536d-411a-9a99-5428c27d8f8e","referenceId":"6115922a-5f5d-455e-bc7e-7955a57f3815","referenceType":"version"},"tick_every":3600},"locations":["aws:us-west-2"],"created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":155147637,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"stepCount":{"assertions":0,"subtests":0,"total":0}} + + ' + code: 200 + duration: 0ms + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: | + {"public_ids":["dt9-u4h-bqv"]} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + id: 1 + method: POST + url: https://api.datadoghq.com/api/v1/synthetics/tests/delete + response: + body: '{"deleted_tests":[{"public_id":"dt9-u4h-bqv","deleted_at":"2024-10-01T12:07:31.533655+00:00"}]} + + ' + code: 200 + duration: 0ms + headers: + Content-Type: + - application/json + status: 200 OK +version: 2 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Edit_a_Mobile_test_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Edit_a_Mobile_test_returns_OK_response.freeze new file mode 100644 index 00000000000..2045efabd58 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Edit_a_Mobile_test_returns_OK_response.freeze @@ -0,0 +1 @@ +2024-10-01T14:13:57.976Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Edit_a_Mobile_test_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Edit_a_Mobile_test_returns_OK_response.yaml new file mode 100644 index 00000000000..5cb260e046f --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Edit_a_Mobile_test_returns_OK_response.yaml @@ -0,0 +1,68 @@ +interactions: +- request: + body: | + {"config":{"variables":[]},"message":"","name":"Test-Edit_a_Mobile_test_returns_OK_response-1727792037","options":{"device_ids":["synthetics:mobile:device:iphone_15_ios_17"],"mobileApplication":{"applicationId":"ab0e0aed-536d-411a-9a99-5428c27d8f8e","referenceId":"6115922a-5f5d-455e-bc7e-7955a57f3815","referenceType":"version"},"tick_every":3600},"status":"paused","steps":[],"type":"mobile"} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + id: 0 + method: POST + url: https://api.datadoghq.com/api/v1/synthetics/tests/mobile + response: + body: '{"public_id":"ga7-aph-db8","name":"Test-Edit_a_Mobile_test_returns_OK_response-1727792037","status":"paused","type":"mobile","tags":[],"created_at":"2024-10-01T14:13:58.675045+00:00","modified_at":"2024-10-01T14:13:58.675045+00:00","config":{"variables":[]},"message":"","options":{"device_ids":["synthetics:mobile:device:iphone_15_ios_17"],"mobileApplication":{"applicationId":"ab0e0aed-536d-411a-9a99-5428c27d8f8e","referenceId":"6115922a-5f5d-455e-bc7e-7955a57f3815","referenceType":"version"},"tick_every":3600},"locations":["aws:us-west-2"],"created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":155155663,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"stepCount":{"assertions":0,"subtests":0,"total":0}} + + ' + code: 200 + duration: 0ms + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: | + {"config":{"variables":[]},"message":"","name":"Test-Edit_a_Mobile_test_returns_OK_response-1727792037-updated","options":{"device_ids":["synthetics:mobile:device:iphone_15_ios_17"],"mobileApplication":{"applicationId":"ab0e0aed-536d-411a-9a99-5428c27d8f8e","referenceId":"6115922a-5f5d-455e-bc7e-7955a57f3815","referenceType":"version"},"tick_every":3600},"status":"paused","steps":[],"type":"mobile"} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + id: 1 + method: PUT + url: https://api.datadoghq.com/api/v1/synthetics/tests/mobile/ga7-aph-db8 + response: + body: '{"public_id":"ga7-aph-db8","name":"Test-Edit_a_Mobile_test_returns_OK_response-1727792037-updated","status":"paused","type":"mobile","tags":[],"created_at":"2024-10-01T14:13:58.675045+00:00","modified_at":"2024-10-01T14:13:59.399254+00:00","config":{"variables":[]},"message":"","options":{"device_ids":["synthetics:mobile:device:iphone_15_ios_17"],"mobileApplication":{"applicationId":"ab0e0aed-536d-411a-9a99-5428c27d8f8e","referenceId":"6115922a-5f5d-455e-bc7e-7955a57f3815","referenceType":"version"},"tick_every":3600},"locations":["aws:us-west-2"],"created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":155155663,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"overall_state":2,"overall_state_modified":"2024-10-01T14:13:59.470478+00:00","stepCount":{"assertions":0,"subtests":0,"total":0}} + + ' + code: 200 + duration: 0ms + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: | + {"public_ids":["ga7-aph-db8"]} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + id: 2 + method: POST + url: https://api.datadoghq.com/api/v1/synthetics/tests/delete + response: + body: '{"deleted_tests":[{"public_id":"ga7-aph-db8","deleted_at":"2024-10-01T14:14:00.385149+00:00"}]} + + ' + code: 200 + duration: 0ms + headers: + Content-Type: + - application/json + status: 200 OK +version: 2 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Get_a_Mobile_test_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Get_a_Mobile_test_returns_OK_response.freeze new file mode 100644 index 00000000000..b258779c1e5 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Get_a_Mobile_test_returns_OK_response.freeze @@ -0,0 +1 @@ +2024-10-01T13:24:41.737Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Get_a_Mobile_test_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Get_a_Mobile_test_returns_OK_response.yaml new file mode 100644 index 00000000000..f044acd35b1 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Synthetics/Scenario_Get_a_Mobile_test_returns_OK_response.yaml @@ -0,0 +1,65 @@ +interactions: +- request: + body: | + {"config":{"variables":[]},"message":"","name":"Test-Get_a_Mobile_test_returns_OK_response-1727789081","options":{"device_ids":["synthetics:mobile:device:iphone_15_ios_17"],"mobileApplication":{"applicationId":"ab0e0aed-536d-411a-9a99-5428c27d8f8e","referenceId":"6115922a-5f5d-455e-bc7e-7955a57f3815","referenceType":"version"},"tick_every":3600},"status":"paused","steps":[],"type":"mobile"} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + id: 0 + method: POST + url: https://api.datadoghq.com/api/v1/synthetics/tests/mobile + response: + body: '{"public_id":"hxp-wk7-q37","name":"Test-Get_a_Mobile_test_returns_OK_response-1727789081","status":"paused","type":"mobile","tags":[],"created_at":"2024-10-01T13:24:42.354666+00:00","modified_at":"2024-10-01T13:24:42.354666+00:00","config":{"variables":[]},"message":"","options":{"device_ids":["synthetics:mobile:device:iphone_15_ios_17"],"mobileApplication":{"applicationId":"ab0e0aed-536d-411a-9a99-5428c27d8f8e","referenceId":"6115922a-5f5d-455e-bc7e-7955a57f3815","referenceType":"version"},"tick_every":3600},"locations":["aws:us-west-2"],"created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":155152455,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"stepCount":{"assertions":0,"subtests":0,"total":0}} + + ' + code: 200 + duration: 0ms + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - application/json + id: 1 + method: GET + url: https://api.datadoghq.com/api/v1/synthetics/tests/mobile/hxp-wk7-q37 + response: + body: '{"public_id":"hxp-wk7-q37","name":"Test-Get_a_Mobile_test_returns_OK_response-1727789081","status":"paused","type":"mobile","tags":[],"created_at":"2024-10-01T13:24:42.354666+00:00","modified_at":"2024-10-01T13:24:42.354666+00:00","config":{"variables":[]},"message":"","options":{"device_ids":["synthetics:mobile:device:iphone_15_ios_17"],"mobileApplication":{"applicationId":"ab0e0aed-536d-411a-9a99-5428c27d8f8e","referenceId":"6115922a-5f5d-455e-bc7e-7955a57f3815","referenceType":"version"},"tick_every":3600},"locations":["aws:us-west-2"],"monitor_id":155152455,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} + + ' + code: 200 + duration: 0ms + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: | + {"public_ids":["hxp-wk7-q37"]} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + id: 2 + method: POST + url: https://api.datadoghq.com/api/v1/synthetics/tests/delete + response: + body: '{"deleted_tests":[{"public_id":"hxp-wk7-q37","deleted_at":"2024-10-01T13:24:43.687553+00:00"}]} + + ' + code: 200 + duration: 0ms + headers: + Content-Type: + - application/json + status: 200 OK +version: 2 diff --git a/tests/scenarios/features/v1/given.json b/tests/scenarios/features/v1/given.json index 02b5bacf34e..0880d17a921 100644 --- a/tests/scenarios/features/v1/given.json +++ b/tests/scenarios/features/v1/given.json @@ -270,6 +270,18 @@ "tag": "Synthetics", "operationId": "CreateSyntheticsAPITest" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"name\": \"{{ unique }}\",\n \"status\": \"paused\",\n \"type\": \"mobile\",\n \"config\": {\n \"variables\": []\n },\n \"message\": \"\",\n \"options\": {\n \"device_ids\": [\n \"synthetics:mobile:device:iphone_15_ios_17\"\n ],\n \"mobileApplication\": {\n \"applicationId\": \"ab0e0aed-536d-411a-9a99-5428c27d8f8e\",\n \"referenceId\": \"6115922a-5f5d-455e-bc7e-7955a57f3815\",\n \"referenceType\": \"version\"\n },\n \"tick_every\": 3600\n },\n \"steps\": []\n}" + } + ], + "step": "there is a valid \"synthetics_mobile_test\" in the system", + "key": "synthetics_mobile_test", + "tag": "Synthetics", + "operationId": "CreateSyntheticsMobileTest" + }, { "parameters": [ { diff --git a/tests/scenarios/features/v1/synthetics.feature b/tests/scenarios/features/v1/synthetics.feature index 943f0f65588..d2e4068308d 100644 --- a/tests/scenarios/features/v1/synthetics.feature +++ b/tests/scenarios/features/v1/synthetics.feature @@ -125,6 +125,32 @@ Feature: Synthetics When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/synthetics-ct + Scenario: Create a mobile test returns "- JSON format is wrong" response + Given new "CreateSyntheticsMobileTest" request + And body with value {"config": {"initialApplicationArguments": {"propertyNames": {"pattern": "^(?!_dd).*$"}}, "variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["apple ipad (2022),16.4"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"items": {"principals": [], "role": "editor"}}], "ci": {"executionRule": "blocking"}, "device_ids": ["apple ipad (2022),16.4"], "mobileApplication": {"referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}}, "status": "live", "steps": [{"publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"} + When the request is sent + Then the response status is 400 - JSON format is wrong + + @team:DataDog/synthetics-ct + Scenario: Create a mobile test returns "OK - Returns the created test details." response + Given new "CreateSyntheticsMobileTest" request + And body from file "synthetics_mobile_test_payload.json" + When the request is sent + Then the response status is 200 OK - Returns the created test details. + And the response "name" is equal to "{{ unique }}" + And the response "options.device_ids[0]" is equal to "synthetics:mobile:device:iphone_15_ios_17" + And the response "options.mobileApplication.applicationId" is equal to "ab0e0aed-536d-411a-9a99-5428c27d8f8e" + And the response "options.mobileApplication.referenceId" is equal to "6115922a-5f5d-455e-bc7e-7955a57f3815" + And the response "options.mobileApplication.referenceType" is equal to "version" + + @generated @skip @team:DataDog/synthetics-ct + Scenario: Create a mobile test returns "Test quota is reached" response + Given new "CreateSyntheticsMobileTest" request + And body with value {"config": {"initialApplicationArguments": {"propertyNames": {"pattern": "^(?!_dd).*$"}}, "variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["apple ipad (2022),16.4"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"items": {"principals": [], "role": "editor"}}], "ci": {"executionRule": "blocking"}, "device_ids": ["apple ipad (2022),16.4"], "mobileApplication": {"referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}}, "status": "live", "steps": [{"publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"} + When the request is sent + Then the response status is 402 Test quota is reached + @team:DataDog/synthetics-ct Scenario: Create a multi-step api test with every type of basicAuth returns "OK - Returns the created test details." response Given new "CreateSyntheticsAPITest" request @@ -331,6 +357,36 @@ Feature: Synthetics Then the response status is 200 OK. And the response "deleted_tests[0].public_id" is equal to "{{ synthetics_api_test.public_id }}" + @generated @skip @team:DataDog/synthetics-ct + Scenario: Edit a Mobile test returns "- JSON format is wrong" response + Given new "UpdateMobileTest" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"config": {"initialApplicationArguments": {"propertyNames": {"pattern": "^(?!_dd).*$"}}, "variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["apple ipad (2022),16.4"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"items": {"principals": [], "role": "editor"}}], "ci": {"executionRule": "blocking"}, "device_ids": ["apple ipad (2022),16.4"], "mobileApplication": {"referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}}, "status": "live", "steps": [{"publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"} + When the request is sent + Then the response status is 400 - JSON format is wrong + + @generated @skip @team:DataDog/synthetics-ct + Scenario: Edit a Mobile test returns "- Synthetic Monitoring is not activated for the user" response + Given new "UpdateMobileTest" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"config": {"initialApplicationArguments": {"propertyNames": {"pattern": "^(?!_dd).*$"}}, "variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["apple ipad (2022),16.4"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"items": {"principals": [], "role": "editor"}}], "ci": {"executionRule": "blocking"}, "device_ids": ["apple ipad (2022),16.4"], "mobileApplication": {"referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}}, "status": "live", "steps": [{"publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"} + When the request is sent + Then the response status is 404 - Synthetic Monitoring is not activated for the user + + @team:DataDog/synthetics-ct + Scenario: Edit a Mobile test returns "OK" response + Given there is a valid "synthetics_mobile_test" in the system + And new "UpdateMobileTest" request + And request contains "public_id" parameter from "synthetics_mobile_test.public_id" + And body from file "synthetics_mobile_test_update_payload.json" + When the request is sent + Then the response status is 200 OK - Returns the created test details. + And the response "name" is equal to "{{ unique }}-updated" + And the response "options.device_ids[0]" is equal to "synthetics:mobile:device:iphone_15_ios_17" + And the response "options.mobileApplication.applicationId" is equal to "ab0e0aed-536d-411a-9a99-5428c27d8f8e" + And the response "options.mobileApplication.referenceId" is equal to "6115922a-5f5d-455e-bc7e-7955a57f3815" + And the response "options.mobileApplication.referenceType" is equal to "version" + @generated @skip @team:DataDog/synthetics-ct Scenario: Edit a browser test returns "- JSON format is wrong" response Given new "UpdateBrowserTest" request @@ -413,6 +469,27 @@ Feature: Synthetics Then the response status is 200 OK And the response "name" is equal to "{{ synthetics_api_test.name }}-updated" + @generated @skip @team:DataDog/synthetics-ct + Scenario: Get a Mobile test returns "- Synthetic Monitoring is not activated for the user" response + Given new "GetMobileTest" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 - Synthetic Monitoring is not activated for the user + + @team:DataDog/synthetics-ct + Scenario: Get a Mobile test returns "OK" response + Given there is a valid "synthetics_mobile_test" in the system + And new "GetMobileTest" request + And request contains "public_id" parameter from "synthetics_mobile_test.public_id" + When the request is sent + Then the response status is 200 OK + And the response "name" is equal to "{{ synthetics_mobile_test.name }}" + And the response "options.device_ids[0]" is equal to "synthetics:mobile:device:iphone_15_ios_17" + And the response "options.mobileApplication.applicationId" is equal to "ab0e0aed-536d-411a-9a99-5428c27d8f8e" + And the response "options.mobileApplication.referenceId" is equal to "6115922a-5f5d-455e-bc7e-7955a57f3815" + And the response "options.mobileApplication.referenceType" is equal to "version" + And the response "type" is equal to "mobile" + @generated @skip @team:DataDog/synthetics-ct Scenario: Get a browser test result returns "- Synthetic Monitoring is not activated for the user" response Given new "GetBrowserTestResult" request diff --git a/tests/scenarios/features/v1/synthetics_mobile_test_payload.json b/tests/scenarios/features/v1/synthetics_mobile_test_payload.json new file mode 100644 index 00000000000..322b7b973b0 --- /dev/null +++ b/tests/scenarios/features/v1/synthetics_mobile_test_payload.json @@ -0,0 +1,21 @@ +{ + "name": "{{ unique }}", + "status": "paused", + "type": "mobile", + "config": { + "variables": [] + }, + "message": "", + "options": { + "device_ids": [ + "synthetics:mobile:device:iphone_15_ios_17" + ], + "mobileApplication": { + "applicationId": "ab0e0aed-536d-411a-9a99-5428c27d8f8e", + "referenceId": "6115922a-5f5d-455e-bc7e-7955a57f3815", + "referenceType": "version" + }, + "tick_every": 3600 + }, + "steps": [] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/synthetics_mobile_test_update_payload.json b/tests/scenarios/features/v1/synthetics_mobile_test_update_payload.json new file mode 100644 index 00000000000..423deed699d --- /dev/null +++ b/tests/scenarios/features/v1/synthetics_mobile_test_update_payload.json @@ -0,0 +1,21 @@ +{ + "name": "{{ unique }}-updated", + "status": "paused", + "type": "mobile", + "config": { + "variables": [] + }, + "message": "", + "options": { + "device_ids": [ + "synthetics:mobile:device:iphone_15_ios_17" + ], + "mobileApplication": { + "applicationId": "ab0e0aed-536d-411a-9a99-5428c27d8f8e", + "referenceId": "6115922a-5f5d-455e-bc7e-7955a57f3815", + "referenceType": "version" + }, + "tick_every": 3600 + }, + "steps": [] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/undo.json b/tests/scenarios/features/v1/undo.json index 16982e7aa54..a6bfcfb9a25 100644 --- a/tests/scenarios/features/v1/undo.json +++ b/tests/scenarios/features/v1/undo.json @@ -1196,6 +1196,31 @@ "type": "idempotent" } }, + "CreateSyntheticsMobileTest": { + "tag": "Synthetics", + "undo": { + "operationId": "DeleteTests", + "parameters": [ + { + "name": "body", + "template": "{\"public_ids\": [\"{{ public_id }}\"]}" + } + ], + "type": "unsafe" + } + }, + "GetMobileTest": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, + "UpdateMobileTest": { + "tag": "Synthetics", + "undo": { + "type": "idempotent" + } + }, "TriggerTests": { "tag": "Synthetics", "undo": {