@@ -550,6 +550,7 @@ def test_create_security_settings(
550550 redaction_strategy = gcdc_security_settings .SecuritySettings .RedactionStrategy .REDACT_WITH_SERVICE ,
551551 redaction_scope = gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE ,
552552 inspect_template = "inspect_template_value" ,
553+ deidentify_template = "deidentify_template_value" ,
553554 purge_data_types = [
554555 gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
555556 ],
@@ -575,6 +576,7 @@ def test_create_security_settings(
575576 == gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE
576577 )
577578 assert response .inspect_template == "inspect_template_value"
579+ assert response .deidentify_template == "deidentify_template_value"
578580 assert response .purge_data_types == [
579581 gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
580582 ]
@@ -626,6 +628,7 @@ async def test_create_security_settings_async(
626628 redaction_strategy = gcdc_security_settings .SecuritySettings .RedactionStrategy .REDACT_WITH_SERVICE ,
627629 redaction_scope = gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE ,
628630 inspect_template = "inspect_template_value" ,
631+ deidentify_template = "deidentify_template_value" ,
629632 purge_data_types = [
630633 gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
631634 ],
@@ -651,6 +654,7 @@ async def test_create_security_settings_async(
651654 == gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE
652655 )
653656 assert response .inspect_template == "inspect_template_value"
657+ assert response .deidentify_template == "deidentify_template_value"
654658 assert response .purge_data_types == [
655659 gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
656660 ]
@@ -842,6 +846,7 @@ def test_get_security_settings(
842846 redaction_strategy = security_settings .SecuritySettings .RedactionStrategy .REDACT_WITH_SERVICE ,
843847 redaction_scope = security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE ,
844848 inspect_template = "inspect_template_value" ,
849+ deidentify_template = "deidentify_template_value" ,
845850 purge_data_types = [
846851 security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
847852 ],
@@ -867,6 +872,7 @@ def test_get_security_settings(
867872 == security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE
868873 )
869874 assert response .inspect_template == "inspect_template_value"
875+ assert response .deidentify_template == "deidentify_template_value"
870876 assert response .purge_data_types == [
871877 security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
872878 ]
@@ -918,6 +924,7 @@ async def test_get_security_settings_async(
918924 redaction_strategy = security_settings .SecuritySettings .RedactionStrategy .REDACT_WITH_SERVICE ,
919925 redaction_scope = security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE ,
920926 inspect_template = "inspect_template_value" ,
927+ deidentify_template = "deidentify_template_value" ,
921928 purge_data_types = [
922929 security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
923930 ],
@@ -943,6 +950,7 @@ async def test_get_security_settings_async(
943950 == security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE
944951 )
945952 assert response .inspect_template == "inspect_template_value"
953+ assert response .deidentify_template == "deidentify_template_value"
946954 assert response .purge_data_types == [
947955 security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
948956 ]
@@ -1111,6 +1119,7 @@ def test_update_security_settings(
11111119 redaction_strategy = gcdc_security_settings .SecuritySettings .RedactionStrategy .REDACT_WITH_SERVICE ,
11121120 redaction_scope = gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE ,
11131121 inspect_template = "inspect_template_value" ,
1122+ deidentify_template = "deidentify_template_value" ,
11141123 purge_data_types = [
11151124 gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
11161125 ],
@@ -1136,6 +1145,7 @@ def test_update_security_settings(
11361145 == gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE
11371146 )
11381147 assert response .inspect_template == "inspect_template_value"
1148+ assert response .deidentify_template == "deidentify_template_value"
11391149 assert response .purge_data_types == [
11401150 gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
11411151 ]
@@ -1187,6 +1197,7 @@ async def test_update_security_settings_async(
11871197 redaction_strategy = gcdc_security_settings .SecuritySettings .RedactionStrategy .REDACT_WITH_SERVICE ,
11881198 redaction_scope = gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE ,
11891199 inspect_template = "inspect_template_value" ,
1200+ deidentify_template = "deidentify_template_value" ,
11901201 purge_data_types = [
11911202 gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
11921203 ],
@@ -1212,6 +1223,7 @@ async def test_update_security_settings_async(
12121223 == gcdc_security_settings .SecuritySettings .RedactionScope .REDACT_DISK_STORAGE
12131224 )
12141225 assert response .inspect_template == "inspect_template_value"
1226+ assert response .deidentify_template == "deidentify_template_value"
12151227 assert response .purge_data_types == [
12161228 gcdc_security_settings .SecuritySettings .PurgeDataType .DIALOGFLOW_HISTORY
12171229 ]
@@ -2487,6 +2499,60 @@ def test_security_settings_service_transport_channel_mtls_with_adc(transport_cla
24872499 assert transport .grpc_channel == mock_grpc_channel
24882500
24892501
2502+ def test_deidentify_template_path ():
2503+ organization = "squid"
2504+ location = "clam"
2505+ deidentify_template = "whelk"
2506+ expected = "organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}" .format (
2507+ organization = organization ,
2508+ location = location ,
2509+ deidentify_template = deidentify_template ,
2510+ )
2511+ actual = SecuritySettingsServiceClient .deidentify_template_path (
2512+ organization , location , deidentify_template
2513+ )
2514+ assert expected == actual
2515+
2516+
2517+ def test_parse_deidentify_template_path ():
2518+ expected = {
2519+ "organization" : "octopus" ,
2520+ "location" : "oyster" ,
2521+ "deidentify_template" : "nudibranch" ,
2522+ }
2523+ path = SecuritySettingsServiceClient .deidentify_template_path (** expected )
2524+
2525+ # Check that the path construction is reversible.
2526+ actual = SecuritySettingsServiceClient .parse_deidentify_template_path (path )
2527+ assert expected == actual
2528+
2529+
2530+ def test_inspect_template_path ():
2531+ organization = "cuttlefish"
2532+ location = "mussel"
2533+ inspect_template = "winkle"
2534+ expected = "organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}" .format (
2535+ organization = organization , location = location , inspect_template = inspect_template ,
2536+ )
2537+ actual = SecuritySettingsServiceClient .inspect_template_path (
2538+ organization , location , inspect_template
2539+ )
2540+ assert expected == actual
2541+
2542+
2543+ def test_parse_inspect_template_path ():
2544+ expected = {
2545+ "organization" : "nautilus" ,
2546+ "location" : "scallop" ,
2547+ "inspect_template" : "abalone" ,
2548+ }
2549+ path = SecuritySettingsServiceClient .inspect_template_path (** expected )
2550+
2551+ # Check that the path construction is reversible.
2552+ actual = SecuritySettingsServiceClient .parse_inspect_template_path (path )
2553+ assert expected == actual
2554+
2555+
24902556def test_security_settings_path ():
24912557 project = "squid"
24922558 location = "clam"
0 commit comments