Skip to content

Commit 2c874e7

Browse files
stainless-app[bot]stainless-bot
authored andcommittedNov 6, 2024·
feat(api): api update (#3575)
1 parent edfbb01 commit 2c874e7

File tree

4 files changed

+1971
-244
lines changed

4 files changed

+1971
-244
lines changed
 

‎.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1397
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d7ac42a96dd2d1679005f853c1c4c29034e362c73f2d75ad004d948ad8abfb74.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-66874390672543889c6f739266ab0e815d7c6a65deb464a2c41c965b45d3e24a.yml

‎api.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -5326,11 +5326,12 @@ Params Types:
53265326
Response Types:
53275327

53285328
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#Pattern">Pattern</a>
5329+
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#DLPProfileCustomNewResponseUnion">DLPProfileCustomNewResponseUnion</a>
53295330
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#DLPProfileCustomDeleteResponse">DLPProfileCustomDeleteResponse</a>
53305331

53315332
Methods:
53325333

5333-
- <code title="post /accounts/{account_id}/dlp/profiles/custom">client.ZeroTrust.DLP.Profiles.Custom.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#DLPProfileCustomService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#DLPProfileCustomNewParams">DLPProfileCustomNewParams</a>) ([]<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#Profile">Profile</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
5334+
- <code title="post /accounts/{account_id}/dlp/profiles/custom">client.ZeroTrust.DLP.Profiles.Custom.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#DLPProfileCustomService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#DLPProfileCustomNewParams">DLPProfileCustomNewParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#DLPProfileCustomNewResponseUnion">DLPProfileCustomNewResponseUnion</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
53345335
- <code title="put /accounts/{account_id}/dlp/profiles/custom/{profile_id}">client.ZeroTrust.DLP.Profiles.Custom.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#DLPProfileCustomService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, profileID <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#DLPProfileCustomUpdateParams">DLPProfileCustomUpdateParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#Profile">Profile</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
53355336
- <code title="delete /accounts/{account_id}/dlp/profiles/custom/{profile_id}">client.ZeroTrust.DLP.Profiles.Custom.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#DLPProfileCustomService.Delete">Delete</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, profileID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#DLPProfileCustomDeleteParams">DLPProfileCustomDeleteParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#DLPProfileCustomDeleteResponse">DLPProfileCustomDeleteResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
53365337
- <code title="get /accounts/{account_id}/dlp/profiles/custom/{profile_id}">client.ZeroTrust.DLP.Profiles.Custom.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#DLPProfileCustomService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, profileID <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#DLPProfileCustomGetParams">DLPProfileCustomGetParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#Profile">Profile</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

‎zero_trust/dlpprofilecustom.go

+1,815-91
Large diffs are not rendered by default.

‎zero_trust/dlpprofilecustom_test.go

+153-151
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/cloudflare/cloudflare-go/v3/zero_trust"
1515
)
1616

17-
func TestDLPProfileCustomNew(t *testing.T) {
17+
func TestDLPProfileCustomNewWithOptionalParams(t *testing.T) {
1818
baseURL := "http://localhost:4010"
1919
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
2020
baseURL = envURL
@@ -29,148 +29,150 @@ func TestDLPProfileCustomNew(t *testing.T) {
2929
)
3030
_, err := client.ZeroTrust.DLP.Profiles.Custom.New(context.TODO(), zero_trust.DLPProfileCustomNewParams{
3131
AccountID: cloudflare.F("account_id"),
32-
Profiles: cloudflare.F([]zero_trust.DLPProfileCustomNewParamsProfile{{
33-
Entries: cloudflare.F([]zero_trust.DLPProfileCustomNewParamsProfilesEntryUnion{zero_trust.DLPProfileCustomNewParamsProfilesEntriesDLPNewCustomEntry{
34-
Enabled: cloudflare.F(true),
35-
Name: cloudflare.F("name"),
36-
Pattern: cloudflare.F(zero_trust.PatternParam{
37-
Regex: cloudflare.F("regex"),
38-
Validation: cloudflare.F(zero_trust.PatternValidationLuhn),
39-
}),
40-
}, zero_trust.DLPProfileCustomNewParamsProfilesEntriesDLPNewCustomEntry{
41-
Enabled: cloudflare.F(true),
42-
Name: cloudflare.F("name"),
43-
Pattern: cloudflare.F(zero_trust.PatternParam{
44-
Regex: cloudflare.F("regex"),
45-
Validation: cloudflare.F(zero_trust.PatternValidationLuhn),
46-
}),
47-
}, zero_trust.DLPProfileCustomNewParamsProfilesEntriesDLPNewCustomEntry{
48-
Enabled: cloudflare.F(true),
49-
Name: cloudflare.F("name"),
50-
Pattern: cloudflare.F(zero_trust.PatternParam{
51-
Regex: cloudflare.F("regex"),
52-
Validation: cloudflare.F(zero_trust.PatternValidationLuhn),
53-
}),
54-
}}),
55-
Name: cloudflare.F("name"),
56-
AllowedMatchCount: cloudflare.F(int64(5)),
57-
ConfidenceThreshold: cloudflare.F("confidence_threshold"),
58-
ContextAwareness: cloudflare.F(zero_trust.ContextAwarenessParam{
59-
Enabled: cloudflare.F(true),
60-
Skip: cloudflare.F(zero_trust.SkipConfigurationParam{
61-
Files: cloudflare.F(true),
62-
}),
63-
}),
64-
Description: cloudflare.F("description"),
65-
OCREnabled: cloudflare.F(true),
66-
SharedEntries: cloudflare.F([]zero_trust.DLPProfileCustomNewParamsProfilesSharedEntryUnion{zero_trust.DLPProfileCustomNewParamsProfilesSharedEntriesCustom{
67-
Enabled: cloudflare.F(true),
68-
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
69-
EntryType: cloudflare.F(zero_trust.DLPProfileCustomNewParamsProfilesSharedEntriesCustomEntryTypeCustom),
70-
}, zero_trust.DLPProfileCustomNewParamsProfilesSharedEntriesCustom{
71-
Enabled: cloudflare.F(true),
72-
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
73-
EntryType: cloudflare.F(zero_trust.DLPProfileCustomNewParamsProfilesSharedEntriesCustomEntryTypeCustom),
74-
}, zero_trust.DLPProfileCustomNewParamsProfilesSharedEntriesCustom{
75-
Enabled: cloudflare.F(true),
76-
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
77-
EntryType: cloudflare.F(zero_trust.DLPProfileCustomNewParamsProfilesSharedEntriesCustomEntryTypeCustom),
78-
}}),
79-
}, {
80-
Entries: cloudflare.F([]zero_trust.DLPProfileCustomNewParamsProfilesEntryUnion{zero_trust.DLPProfileCustomNewParamsProfilesEntriesDLPNewCustomEntry{
81-
Enabled: cloudflare.F(true),
82-
Name: cloudflare.F("name"),
83-
Pattern: cloudflare.F(zero_trust.PatternParam{
84-
Regex: cloudflare.F("regex"),
85-
Validation: cloudflare.F(zero_trust.PatternValidationLuhn),
32+
Body: zero_trust.DLPProfileCustomNewParamsBodyProfiles{
33+
Profiles: cloudflare.F([]zero_trust.DLPProfileCustomNewParamsBodyProfilesProfile{{
34+
Entries: cloudflare.F([]zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesEntryUnion{zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesEntriesDLPNewCustomEntry{
35+
Enabled: cloudflare.F(true),
36+
Name: cloudflare.F("name"),
37+
Pattern: cloudflare.F(zero_trust.PatternParam{
38+
Regex: cloudflare.F("regex"),
39+
Validation: cloudflare.F(zero_trust.PatternValidationLuhn),
40+
}),
41+
}, zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesEntriesDLPNewCustomEntry{
42+
Enabled: cloudflare.F(true),
43+
Name: cloudflare.F("name"),
44+
Pattern: cloudflare.F(zero_trust.PatternParam{
45+
Regex: cloudflare.F("regex"),
46+
Validation: cloudflare.F(zero_trust.PatternValidationLuhn),
47+
}),
48+
}, zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesEntriesDLPNewCustomEntry{
49+
Enabled: cloudflare.F(true),
50+
Name: cloudflare.F("name"),
51+
Pattern: cloudflare.F(zero_trust.PatternParam{
52+
Regex: cloudflare.F("regex"),
53+
Validation: cloudflare.F(zero_trust.PatternValidationLuhn),
54+
}),
55+
}}),
56+
Name: cloudflare.F("name"),
57+
AllowedMatchCount: cloudflare.F(int64(5)),
58+
ConfidenceThreshold: cloudflare.F("confidence_threshold"),
59+
ContextAwareness: cloudflare.F(zero_trust.ContextAwarenessParam{
60+
Enabled: cloudflare.F(true),
61+
Skip: cloudflare.F(zero_trust.SkipConfigurationParam{
62+
Files: cloudflare.F(true),
63+
}),
8664
}),
87-
}, zero_trust.DLPProfileCustomNewParamsProfilesEntriesDLPNewCustomEntry{
88-
Enabled: cloudflare.F(true),
89-
Name: cloudflare.F("name"),
90-
Pattern: cloudflare.F(zero_trust.PatternParam{
91-
Regex: cloudflare.F("regex"),
92-
Validation: cloudflare.F(zero_trust.PatternValidationLuhn),
65+
Description: cloudflare.F("description"),
66+
OCREnabled: cloudflare.F(true),
67+
SharedEntries: cloudflare.F([]zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntryUnion{zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntriesCustom{
68+
Enabled: cloudflare.F(true),
69+
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
70+
EntryType: cloudflare.F(zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntriesCustomEntryTypeCustom),
71+
}, zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntriesCustom{
72+
Enabled: cloudflare.F(true),
73+
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
74+
EntryType: cloudflare.F(zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntriesCustomEntryTypeCustom),
75+
}, zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntriesCustom{
76+
Enabled: cloudflare.F(true),
77+
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
78+
EntryType: cloudflare.F(zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntriesCustomEntryTypeCustom),
79+
}}),
80+
}, {
81+
Entries: cloudflare.F([]zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesEntryUnion{zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesEntriesDLPNewCustomEntry{
82+
Enabled: cloudflare.F(true),
83+
Name: cloudflare.F("name"),
84+
Pattern: cloudflare.F(zero_trust.PatternParam{
85+
Regex: cloudflare.F("regex"),
86+
Validation: cloudflare.F(zero_trust.PatternValidationLuhn),
87+
}),
88+
}, zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesEntriesDLPNewCustomEntry{
89+
Enabled: cloudflare.F(true),
90+
Name: cloudflare.F("name"),
91+
Pattern: cloudflare.F(zero_trust.PatternParam{
92+
Regex: cloudflare.F("regex"),
93+
Validation: cloudflare.F(zero_trust.PatternValidationLuhn),
94+
}),
95+
}, zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesEntriesDLPNewCustomEntry{
96+
Enabled: cloudflare.F(true),
97+
Name: cloudflare.F("name"),
98+
Pattern: cloudflare.F(zero_trust.PatternParam{
99+
Regex: cloudflare.F("regex"),
100+
Validation: cloudflare.F(zero_trust.PatternValidationLuhn),
101+
}),
102+
}}),
103+
Name: cloudflare.F("name"),
104+
AllowedMatchCount: cloudflare.F(int64(5)),
105+
ConfidenceThreshold: cloudflare.F("confidence_threshold"),
106+
ContextAwareness: cloudflare.F(zero_trust.ContextAwarenessParam{
107+
Enabled: cloudflare.F(true),
108+
Skip: cloudflare.F(zero_trust.SkipConfigurationParam{
109+
Files: cloudflare.F(true),
110+
}),
93111
}),
94-
}, zero_trust.DLPProfileCustomNewParamsProfilesEntriesDLPNewCustomEntry{
95-
Enabled: cloudflare.F(true),
96-
Name: cloudflare.F("name"),
97-
Pattern: cloudflare.F(zero_trust.PatternParam{
98-
Regex: cloudflare.F("regex"),
99-
Validation: cloudflare.F(zero_trust.PatternValidationLuhn),
112+
Description: cloudflare.F("description"),
113+
OCREnabled: cloudflare.F(true),
114+
SharedEntries: cloudflare.F([]zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntryUnion{zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntriesCustom{
115+
Enabled: cloudflare.F(true),
116+
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
117+
EntryType: cloudflare.F(zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntriesCustomEntryTypeCustom),
118+
}, zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntriesCustom{
119+
Enabled: cloudflare.F(true),
120+
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
121+
EntryType: cloudflare.F(zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntriesCustomEntryTypeCustom),
122+
}, zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntriesCustom{
123+
Enabled: cloudflare.F(true),
124+
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
125+
EntryType: cloudflare.F(zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntriesCustomEntryTypeCustom),
126+
}}),
127+
}, {
128+
Entries: cloudflare.F([]zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesEntryUnion{zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesEntriesDLPNewCustomEntry{
129+
Enabled: cloudflare.F(true),
130+
Name: cloudflare.F("name"),
131+
Pattern: cloudflare.F(zero_trust.PatternParam{
132+
Regex: cloudflare.F("regex"),
133+
Validation: cloudflare.F(zero_trust.PatternValidationLuhn),
134+
}),
135+
}, zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesEntriesDLPNewCustomEntry{
136+
Enabled: cloudflare.F(true),
137+
Name: cloudflare.F("name"),
138+
Pattern: cloudflare.F(zero_trust.PatternParam{
139+
Regex: cloudflare.F("regex"),
140+
Validation: cloudflare.F(zero_trust.PatternValidationLuhn),
141+
}),
142+
}, zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesEntriesDLPNewCustomEntry{
143+
Enabled: cloudflare.F(true),
144+
Name: cloudflare.F("name"),
145+
Pattern: cloudflare.F(zero_trust.PatternParam{
146+
Regex: cloudflare.F("regex"),
147+
Validation: cloudflare.F(zero_trust.PatternValidationLuhn),
148+
}),
149+
}}),
150+
Name: cloudflare.F("name"),
151+
AllowedMatchCount: cloudflare.F(int64(5)),
152+
ConfidenceThreshold: cloudflare.F("confidence_threshold"),
153+
ContextAwareness: cloudflare.F(zero_trust.ContextAwarenessParam{
154+
Enabled: cloudflare.F(true),
155+
Skip: cloudflare.F(zero_trust.SkipConfigurationParam{
156+
Files: cloudflare.F(true),
157+
}),
100158
}),
159+
Description: cloudflare.F("description"),
160+
OCREnabled: cloudflare.F(true),
161+
SharedEntries: cloudflare.F([]zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntryUnion{zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntriesCustom{
162+
Enabled: cloudflare.F(true),
163+
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
164+
EntryType: cloudflare.F(zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntriesCustomEntryTypeCustom),
165+
}, zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntriesCustom{
166+
Enabled: cloudflare.F(true),
167+
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
168+
EntryType: cloudflare.F(zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntriesCustomEntryTypeCustom),
169+
}, zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntriesCustom{
170+
Enabled: cloudflare.F(true),
171+
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
172+
EntryType: cloudflare.F(zero_trust.DLPProfileCustomNewParamsBodyProfilesProfilesSharedEntriesCustomEntryTypeCustom),
173+
}}),
101174
}}),
102-
Name: cloudflare.F("name"),
103-
AllowedMatchCount: cloudflare.F(int64(5)),
104-
ConfidenceThreshold: cloudflare.F("confidence_threshold"),
105-
ContextAwareness: cloudflare.F(zero_trust.ContextAwarenessParam{
106-
Enabled: cloudflare.F(true),
107-
Skip: cloudflare.F(zero_trust.SkipConfigurationParam{
108-
Files: cloudflare.F(true),
109-
}),
110-
}),
111-
Description: cloudflare.F("description"),
112-
OCREnabled: cloudflare.F(true),
113-
SharedEntries: cloudflare.F([]zero_trust.DLPProfileCustomNewParamsProfilesSharedEntryUnion{zero_trust.DLPProfileCustomNewParamsProfilesSharedEntriesCustom{
114-
Enabled: cloudflare.F(true),
115-
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
116-
EntryType: cloudflare.F(zero_trust.DLPProfileCustomNewParamsProfilesSharedEntriesCustomEntryTypeCustom),
117-
}, zero_trust.DLPProfileCustomNewParamsProfilesSharedEntriesCustom{
118-
Enabled: cloudflare.F(true),
119-
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
120-
EntryType: cloudflare.F(zero_trust.DLPProfileCustomNewParamsProfilesSharedEntriesCustomEntryTypeCustom),
121-
}, zero_trust.DLPProfileCustomNewParamsProfilesSharedEntriesCustom{
122-
Enabled: cloudflare.F(true),
123-
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
124-
EntryType: cloudflare.F(zero_trust.DLPProfileCustomNewParamsProfilesSharedEntriesCustomEntryTypeCustom),
125-
}}),
126-
}, {
127-
Entries: cloudflare.F([]zero_trust.DLPProfileCustomNewParamsProfilesEntryUnion{zero_trust.DLPProfileCustomNewParamsProfilesEntriesDLPNewCustomEntry{
128-
Enabled: cloudflare.F(true),
129-
Name: cloudflare.F("name"),
130-
Pattern: cloudflare.F(zero_trust.PatternParam{
131-
Regex: cloudflare.F("regex"),
132-
Validation: cloudflare.F(zero_trust.PatternValidationLuhn),
133-
}),
134-
}, zero_trust.DLPProfileCustomNewParamsProfilesEntriesDLPNewCustomEntry{
135-
Enabled: cloudflare.F(true),
136-
Name: cloudflare.F("name"),
137-
Pattern: cloudflare.F(zero_trust.PatternParam{
138-
Regex: cloudflare.F("regex"),
139-
Validation: cloudflare.F(zero_trust.PatternValidationLuhn),
140-
}),
141-
}, zero_trust.DLPProfileCustomNewParamsProfilesEntriesDLPNewCustomEntry{
142-
Enabled: cloudflare.F(true),
143-
Name: cloudflare.F("name"),
144-
Pattern: cloudflare.F(zero_trust.PatternParam{
145-
Regex: cloudflare.F("regex"),
146-
Validation: cloudflare.F(zero_trust.PatternValidationLuhn),
147-
}),
148-
}}),
149-
Name: cloudflare.F("name"),
150-
AllowedMatchCount: cloudflare.F(int64(5)),
151-
ConfidenceThreshold: cloudflare.F("confidence_threshold"),
152-
ContextAwareness: cloudflare.F(zero_trust.ContextAwarenessParam{
153-
Enabled: cloudflare.F(true),
154-
Skip: cloudflare.F(zero_trust.SkipConfigurationParam{
155-
Files: cloudflare.F(true),
156-
}),
157-
}),
158-
Description: cloudflare.F("description"),
159-
OCREnabled: cloudflare.F(true),
160-
SharedEntries: cloudflare.F([]zero_trust.DLPProfileCustomNewParamsProfilesSharedEntryUnion{zero_trust.DLPProfileCustomNewParamsProfilesSharedEntriesCustom{
161-
Enabled: cloudflare.F(true),
162-
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
163-
EntryType: cloudflare.F(zero_trust.DLPProfileCustomNewParamsProfilesSharedEntriesCustomEntryTypeCustom),
164-
}, zero_trust.DLPProfileCustomNewParamsProfilesSharedEntriesCustom{
165-
Enabled: cloudflare.F(true),
166-
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
167-
EntryType: cloudflare.F(zero_trust.DLPProfileCustomNewParamsProfilesSharedEntriesCustomEntryTypeCustom),
168-
}, zero_trust.DLPProfileCustomNewParamsProfilesSharedEntriesCustom{
169-
Enabled: cloudflare.F(true),
170-
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
171-
EntryType: cloudflare.F(zero_trust.DLPProfileCustomNewParamsProfilesSharedEntriesCustomEntryTypeCustom),
172-
}}),
173-
}}),
175+
},
174176
})
175177
if err != nil {
176178
var apierr *cloudflare.Error
@@ -198,7 +200,17 @@ func TestDLPProfileCustomUpdateWithOptionalParams(t *testing.T) {
198200
context.TODO(),
199201
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
200202
zero_trust.DLPProfileCustomUpdateParams{
201-
AccountID: cloudflare.F("account_id"),
203+
AccountID: cloudflare.F("account_id"),
204+
Name: cloudflare.F("name"),
205+
AllowedMatchCount: cloudflare.F(int64(0)),
206+
ConfidenceThreshold: cloudflare.F("confidence_threshold"),
207+
ContextAwareness: cloudflare.F(zero_trust.ContextAwarenessParam{
208+
Enabled: cloudflare.F(true),
209+
Skip: cloudflare.F(zero_trust.SkipConfigurationParam{
210+
Files: cloudflare.F(true),
211+
}),
212+
}),
213+
Description: cloudflare.F("description"),
202214
Entries: cloudflare.F([]zero_trust.DLPProfileCustomUpdateParamsEntryUnion{zero_trust.DLPProfileCustomUpdateParamsEntriesDLPNewCustomEntryWithID{
203215
Enabled: cloudflare.F(true),
204216
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
@@ -224,17 +236,7 @@ func TestDLPProfileCustomUpdateWithOptionalParams(t *testing.T) {
224236
Validation: cloudflare.F(zero_trust.PatternValidationLuhn),
225237
}),
226238
}}),
227-
Name: cloudflare.F("name"),
228-
AllowedMatchCount: cloudflare.F(int64(0)),
229-
ConfidenceThreshold: cloudflare.F("confidence_threshold"),
230-
ContextAwareness: cloudflare.F(zero_trust.ContextAwarenessParam{
231-
Enabled: cloudflare.F(true),
232-
Skip: cloudflare.F(zero_trust.SkipConfigurationParam{
233-
Files: cloudflare.F(true),
234-
}),
235-
}),
236-
Description: cloudflare.F("description"),
237-
OCREnabled: cloudflare.F(true),
239+
OCREnabled: cloudflare.F(true),
238240
SharedEntries: cloudflare.F([]zero_trust.DLPProfileCustomUpdateParamsSharedEntryUnion{zero_trust.DLPProfileCustomUpdateParamsSharedEntriesPredefined{
239241
Enabled: cloudflare.F(true),
240242
EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),

0 commit comments

Comments
 (0)
Please sign in to comment.