@@ -548,6 +548,7 @@ def test_create_security_settings(
548548 redaction_strategy = gcdc_security_settings .SecuritySettings .RedactionStrategy .REDACT_WITH_SERVICE ,
549549 redaction_scope = gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE ,
550550 inspect_template = "inspect_template_value" ,
551+ deidentify_template = "deidentify_template_value" ,
551552 purge_data_types = [
552553 gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
553554 ],
@@ -573,6 +574,7 @@ def test_create_security_settings(
573574 == gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE
574575 )
575576 assert response .inspect_template == "inspect_template_value"
577+ assert response .deidentify_template == "deidentify_template_value"
576578 assert response .purge_data_types == [
577579 gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
578580 ]
@@ -624,6 +626,7 @@ async def test_create_security_settings_async(
624626 redaction_strategy = gcdc_security_settings .SecuritySettings .RedactionStrategy .REDACT_WITH_SERVICE ,
625627 redaction_scope = gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE ,
626628 inspect_template = "inspect_template_value" ,
629+ deidentify_template = "deidentify_template_value" ,
627630 purge_data_types = [
628631 gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
629632 ],
@@ -649,6 +652,7 @@ async def test_create_security_settings_async(
649652 == gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE
650653 )
651654 assert response .inspect_template == "inspect_template_value"
655+ assert response .deidentify_template == "deidentify_template_value"
652656 assert response .purge_data_types == [
653657 gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
654658 ]
@@ -840,6 +844,7 @@ def test_get_security_settings(
840844 redaction_strategy = security_settings .SecuritySettings .RedactionStrategy .REDACT_WITH_SERVICE ,
841845 redaction_scope = security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE ,
842846 inspect_template = "inspect_template_value" ,
847+ deidentify_template = "deidentify_template_value" ,
843848 purge_data_types = [
844849 security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
845850 ],
@@ -865,6 +870,7 @@ def test_get_security_settings(
865870 == security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE
866871 )
867872 assert response .inspect_template == "inspect_template_value"
873+ assert response .deidentify_template == "deidentify_template_value"
868874 assert response .purge_data_types == [
869875 security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
870876 ]
@@ -916,6 +922,7 @@ async def test_get_security_settings_async(
916922 redaction_strategy = security_settings .SecuritySettings .RedactionStrategy .REDACT_WITH_SERVICE ,
917923 redaction_scope = security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE ,
918924 inspect_template = "inspect_template_value" ,
925+ deidentify_template = "deidentify_template_value" ,
919926 purge_data_types = [
920927 security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
921928 ],
@@ -941,6 +948,7 @@ async def test_get_security_settings_async(
941948 == security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE
942949 )
943950 assert response .inspect_template == "inspect_template_value"
951+ assert response .deidentify_template == "deidentify_template_value"
944952 assert response .purge_data_types == [
945953 security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
946954 ]
@@ -1109,6 +1117,7 @@ def test_update_security_settings(
11091117 redaction_strategy = gcdc_security_settings .SecuritySettings .RedactionStrategy .REDACT_WITH_SERVICE ,
11101118 redaction_scope = gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE ,
11111119 inspect_template = "inspect_template_value" ,
1120+ deidentify_template = "deidentify_template_value" ,
11121121 purge_data_types = [
11131122 gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
11141123 ],
@@ -1134,6 +1143,7 @@ def test_update_security_settings(
11341143 == gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE
11351144 )
11361145 assert response .inspect_template == "inspect_template_value"
1146+ assert response .deidentify_template == "deidentify_template_value"
11371147 assert response .purge_data_types == [
11381148 gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
11391149 ]
@@ -1185,6 +1195,7 @@ async def test_update_security_settings_async(
11851195 redaction_strategy = gcdc_security_settings .SecuritySettings .RedactionStrategy .REDACT_WITH_SERVICE ,
11861196 redaction_scope = gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE ,
11871197 inspect_template = "inspect_template_value" ,
1198+ deidentify_template = "deidentify_template_value" ,
11881199 purge_data_types = [
11891200 gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
11901201 ],
@@ -1210,6 +1221,7 @@ async def test_update_security_settings_async(
12101221 == gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE
12111222 )
12121223 assert response .inspect_template == "inspect_template_value"
1224+ assert response .deidentify_template == "deidentify_template_value"
12131225 assert response .purge_data_types == [
12141226 gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
12151227 ]
@@ -2485,6 +2497,60 @@ def test_security_settings_service_transport_channel_mtls_with_adc(transport_cla
24852497 assert transport .grpc_channel == mock_grpc_channel
24862498
24872499
2500+ def test_deidentify_template_path ():
2501+ organization = "squid"
2502+ location = "clam"
2503+ deidentify_template = "whelk"
2504+ expected = "organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}" .format (
2505+ organization = organization ,
2506+ location = location ,
2507+ deidentify_template = deidentify_template ,
2508+ )
2509+ actual = SecuritySettingsServiceClient .deidentify_template_path (
2510+ organization , location , deidentify_template
2511+ )
2512+ assert expected == actual
2513+
2514+
2515+ def test_parse_deidentify_template_path ():
2516+ expected = {
2517+ "organization" : "octopus" ,
2518+ "location" : "oyster" ,
2519+ "deidentify_template" : "nudibranch" ,
2520+ }
2521+ path = SecuritySettingsServiceClient .deidentify_template_path (** expected )
2522+
2523+ # Check that the path construction is reversible.
2524+ actual = SecuritySettingsServiceClient .parse_deidentify_template_path (path )
2525+ assert expected == actual
2526+
2527+
2528+ def test_inspect_template_path ():
2529+ organization = "cuttlefish"
2530+ location = "mussel"
2531+ inspect_template = "winkle"
2532+ expected = "organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}" .format (
2533+ organization = organization , location = location , inspect_template = inspect_template ,
2534+ )
2535+ actual = SecuritySettingsServiceClient .inspect_template_path (
2536+ organization , location , inspect_template
2537+ )
2538+ assert expected == actual
2539+
2540+
2541+ def test_parse_inspect_template_path ():
2542+ expected = {
2543+ "organization" : "nautilus" ,
2544+ "location" : "scallop" ,
2545+ "inspect_template" : "abalone" ,
2546+ }
2547+ path = SecuritySettingsServiceClient .inspect_template_path (** expected )
2548+
2549+ # Check that the path construction is reversible.
2550+ actual = SecuritySettingsServiceClient .parse_inspect_template_path (path )
2551+ assert expected == actual
2552+
2553+
24882554def test_security_settings_path ():
24892555 project = "squid"
24902556 location = "clam"
0 commit comments