diff --git a/dlpprofile.go b/dlpprofile.go index 431d2ca1022..4e4292c627c 100644 --- a/dlpprofile.go +++ b/dlpprofile.go @@ -78,9 +78,6 @@ type DLPProfileListResponseDLPPredefinedProfile struct { ID string `json:"id"` // Related DLP policies will trigger when the match count exceeds the number set. AllowedMatchCount float64 `json:"allowed_match_count"` - // Scan the context of predefined entries to only return matches surrounded by - // keywords. - ContextAwareness DLPProfileListResponseDLPPredefinedProfileContextAwareness `json:"context_awareness"` // The entries for this profile. Entries []DLPProfileListResponseDLPPredefinedProfileEntry `json:"entries"` // The name of the profile. @@ -95,7 +92,6 @@ type DLPProfileListResponseDLPPredefinedProfile struct { type dlpProfileListResponseDLPPredefinedProfileJSON struct { ID apijson.Field AllowedMatchCount apijson.Field - ContextAwareness apijson.Field Entries apijson.Field Name apijson.Field Type apijson.Field @@ -109,51 +105,6 @@ func (r *DLPProfileListResponseDLPPredefinedProfile) UnmarshalJSON(data []byte) func (r DLPProfileListResponseDLPPredefinedProfile) implementsDLPProfileListResponse() {} -// Scan the context of predefined entries to only return matches surrounded by -// keywords. -type DLPProfileListResponseDLPPredefinedProfileContextAwareness struct { - // If true, scan the context of predefined entries to only return matches - // surrounded by keywords. - Enabled bool `json:"enabled,required"` - // Content types to exclude from context analysis and return all matches. - Skip DLPProfileListResponseDLPPredefinedProfileContextAwarenessSkip `json:"skip,required"` - JSON dlpProfileListResponseDLPPredefinedProfileContextAwarenessJSON `json:"-"` -} - -// dlpProfileListResponseDLPPredefinedProfileContextAwarenessJSON contains the JSON -// metadata for the struct -// [DLPProfileListResponseDLPPredefinedProfileContextAwareness] -type dlpProfileListResponseDLPPredefinedProfileContextAwarenessJSON struct { - Enabled apijson.Field - Skip apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DLPProfileListResponseDLPPredefinedProfileContextAwareness) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Content types to exclude from context analysis and return all matches. -type DLPProfileListResponseDLPPredefinedProfileContextAwarenessSkip struct { - // If the content type is a file, skip context analysis and return all matches. - Files bool `json:"files,required"` - JSON dlpProfileListResponseDLPPredefinedProfileContextAwarenessSkipJSON `json:"-"` -} - -// dlpProfileListResponseDLPPredefinedProfileContextAwarenessSkipJSON contains the -// JSON metadata for the struct -// [DLPProfileListResponseDLPPredefinedProfileContextAwarenessSkip] -type dlpProfileListResponseDLPPredefinedProfileContextAwarenessSkipJSON struct { - Files apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DLPProfileListResponseDLPPredefinedProfileContextAwarenessSkip) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - // A predefined entry that matches a profile type DLPProfileListResponseDLPPredefinedProfileEntry struct { // The ID for this entry @@ -193,11 +144,8 @@ type DLPProfileListResponseDLPCustomProfile struct { // The ID for this profile ID string `json:"id"` // Related DLP policies will trigger when the match count exceeds the number set. - AllowedMatchCount float64 `json:"allowed_match_count"` - // Scan the context of predefined entries to only return matches surrounded by - // keywords. - ContextAwareness DLPProfileListResponseDLPCustomProfileContextAwareness `json:"context_awareness"` - CreatedAt time.Time `json:"created_at" format:"date-time"` + AllowedMatchCount float64 `json:"allowed_match_count"` + CreatedAt time.Time `json:"created_at" format:"date-time"` // The description of the profile. Description string `json:"description"` // The entries for this profile. @@ -215,7 +163,6 @@ type DLPProfileListResponseDLPCustomProfile struct { type dlpProfileListResponseDLPCustomProfileJSON struct { ID apijson.Field AllowedMatchCount apijson.Field - ContextAwareness apijson.Field CreatedAt apijson.Field Description apijson.Field Entries apijson.Field @@ -232,50 +179,6 @@ func (r *DLPProfileListResponseDLPCustomProfile) UnmarshalJSON(data []byte) (err func (r DLPProfileListResponseDLPCustomProfile) implementsDLPProfileListResponse() {} -// Scan the context of predefined entries to only return matches surrounded by -// keywords. -type DLPProfileListResponseDLPCustomProfileContextAwareness struct { - // If true, scan the context of predefined entries to only return matches - // surrounded by keywords. - Enabled bool `json:"enabled,required"` - // Content types to exclude from context analysis and return all matches. - Skip DLPProfileListResponseDLPCustomProfileContextAwarenessSkip `json:"skip,required"` - JSON dlpProfileListResponseDLPCustomProfileContextAwarenessJSON `json:"-"` -} - -// dlpProfileListResponseDLPCustomProfileContextAwarenessJSON contains the JSON -// metadata for the struct [DLPProfileListResponseDLPCustomProfileContextAwareness] -type dlpProfileListResponseDLPCustomProfileContextAwarenessJSON struct { - Enabled apijson.Field - Skip apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DLPProfileListResponseDLPCustomProfileContextAwareness) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Content types to exclude from context analysis and return all matches. -type DLPProfileListResponseDLPCustomProfileContextAwarenessSkip struct { - // If the content type is a file, skip context analysis and return all matches. - Files bool `json:"files,required"` - JSON dlpProfileListResponseDLPCustomProfileContextAwarenessSkipJSON `json:"-"` -} - -// dlpProfileListResponseDLPCustomProfileContextAwarenessSkipJSON contains the JSON -// metadata for the struct -// [DLPProfileListResponseDLPCustomProfileContextAwarenessSkip] -type dlpProfileListResponseDLPCustomProfileContextAwarenessSkipJSON struct { - Files apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DLPProfileListResponseDLPCustomProfileContextAwarenessSkip) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - // A custom entry that matches a profile type DLPProfileListResponseDLPCustomProfileEntry struct { // The ID for this entry @@ -440,9 +343,6 @@ type DLPProfileGetResponseDLPPredefinedProfile struct { ID string `json:"id"` // Related DLP policies will trigger when the match count exceeds the number set. AllowedMatchCount float64 `json:"allowed_match_count"` - // Scan the context of predefined entries to only return matches surrounded by - // keywords. - ContextAwareness DLPProfileGetResponseDLPPredefinedProfileContextAwareness `json:"context_awareness"` // The entries for this profile. Entries []DLPProfileGetResponseDLPPredefinedProfileEntry `json:"entries"` // The name of the profile. @@ -457,7 +357,6 @@ type DLPProfileGetResponseDLPPredefinedProfile struct { type dlpProfileGetResponseDLPPredefinedProfileJSON struct { ID apijson.Field AllowedMatchCount apijson.Field - ContextAwareness apijson.Field Entries apijson.Field Name apijson.Field Type apijson.Field @@ -471,51 +370,6 @@ func (r *DLPProfileGetResponseDLPPredefinedProfile) UnmarshalJSON(data []byte) ( func (r DLPProfileGetResponseDLPPredefinedProfile) implementsDLPProfileGetResponse() {} -// Scan the context of predefined entries to only return matches surrounded by -// keywords. -type DLPProfileGetResponseDLPPredefinedProfileContextAwareness struct { - // If true, scan the context of predefined entries to only return matches - // surrounded by keywords. - Enabled bool `json:"enabled,required"` - // Content types to exclude from context analysis and return all matches. - Skip DLPProfileGetResponseDLPPredefinedProfileContextAwarenessSkip `json:"skip,required"` - JSON dlpProfileGetResponseDLPPredefinedProfileContextAwarenessJSON `json:"-"` -} - -// dlpProfileGetResponseDLPPredefinedProfileContextAwarenessJSON contains the JSON -// metadata for the struct -// [DLPProfileGetResponseDLPPredefinedProfileContextAwareness] -type dlpProfileGetResponseDLPPredefinedProfileContextAwarenessJSON struct { - Enabled apijson.Field - Skip apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DLPProfileGetResponseDLPPredefinedProfileContextAwareness) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Content types to exclude from context analysis and return all matches. -type DLPProfileGetResponseDLPPredefinedProfileContextAwarenessSkip struct { - // If the content type is a file, skip context analysis and return all matches. - Files bool `json:"files,required"` - JSON dlpProfileGetResponseDLPPredefinedProfileContextAwarenessSkipJSON `json:"-"` -} - -// dlpProfileGetResponseDLPPredefinedProfileContextAwarenessSkipJSON contains the -// JSON metadata for the struct -// [DLPProfileGetResponseDLPPredefinedProfileContextAwarenessSkip] -type dlpProfileGetResponseDLPPredefinedProfileContextAwarenessSkipJSON struct { - Files apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DLPProfileGetResponseDLPPredefinedProfileContextAwarenessSkip) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - // A predefined entry that matches a profile type DLPProfileGetResponseDLPPredefinedProfileEntry struct { // The ID for this entry @@ -555,11 +409,8 @@ type DLPProfileGetResponseDLPCustomProfile struct { // The ID for this profile ID string `json:"id"` // Related DLP policies will trigger when the match count exceeds the number set. - AllowedMatchCount float64 `json:"allowed_match_count"` - // Scan the context of predefined entries to only return matches surrounded by - // keywords. - ContextAwareness DLPProfileGetResponseDLPCustomProfileContextAwareness `json:"context_awareness"` - CreatedAt time.Time `json:"created_at" format:"date-time"` + AllowedMatchCount float64 `json:"allowed_match_count"` + CreatedAt time.Time `json:"created_at" format:"date-time"` // The description of the profile. Description string `json:"description"` // The entries for this profile. @@ -577,7 +428,6 @@ type DLPProfileGetResponseDLPCustomProfile struct { type dlpProfileGetResponseDLPCustomProfileJSON struct { ID apijson.Field AllowedMatchCount apijson.Field - ContextAwareness apijson.Field CreatedAt apijson.Field Description apijson.Field Entries apijson.Field @@ -594,50 +444,6 @@ func (r *DLPProfileGetResponseDLPCustomProfile) UnmarshalJSON(data []byte) (err func (r DLPProfileGetResponseDLPCustomProfile) implementsDLPProfileGetResponse() {} -// Scan the context of predefined entries to only return matches surrounded by -// keywords. -type DLPProfileGetResponseDLPCustomProfileContextAwareness struct { - // If true, scan the context of predefined entries to only return matches - // surrounded by keywords. - Enabled bool `json:"enabled,required"` - // Content types to exclude from context analysis and return all matches. - Skip DLPProfileGetResponseDLPCustomProfileContextAwarenessSkip `json:"skip,required"` - JSON dlpProfileGetResponseDLPCustomProfileContextAwarenessJSON `json:"-"` -} - -// dlpProfileGetResponseDLPCustomProfileContextAwarenessJSON contains the JSON -// metadata for the struct [DLPProfileGetResponseDLPCustomProfileContextAwareness] -type dlpProfileGetResponseDLPCustomProfileContextAwarenessJSON struct { - Enabled apijson.Field - Skip apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DLPProfileGetResponseDLPCustomProfileContextAwareness) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Content types to exclude from context analysis and return all matches. -type DLPProfileGetResponseDLPCustomProfileContextAwarenessSkip struct { - // If the content type is a file, skip context analysis and return all matches. - Files bool `json:"files,required"` - JSON dlpProfileGetResponseDLPCustomProfileContextAwarenessSkipJSON `json:"-"` -} - -// dlpProfileGetResponseDLPCustomProfileContextAwarenessSkipJSON contains the JSON -// metadata for the struct -// [DLPProfileGetResponseDLPCustomProfileContextAwarenessSkip] -type dlpProfileGetResponseDLPCustomProfileContextAwarenessSkipJSON struct { - Files apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DLPProfileGetResponseDLPCustomProfileContextAwarenessSkip) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - // A custom entry that matches a profile type DLPProfileGetResponseDLPCustomProfileEntry struct { // The ID for this entry diff --git a/dlpprofilecustom.go b/dlpprofilecustom.go index 27522c589ca..d4994532c61 100644 --- a/dlpprofilecustom.go +++ b/dlpprofilecustom.go @@ -86,11 +86,8 @@ type DLPProfileCustomNewResponse struct { // The ID for this profile ID string `json:"id"` // Related DLP policies will trigger when the match count exceeds the number set. - AllowedMatchCount float64 `json:"allowed_match_count"` - // Scan the context of predefined entries to only return matches surrounded by - // keywords. - ContextAwareness DLPProfileCustomNewResponseContextAwareness `json:"context_awareness"` - CreatedAt time.Time `json:"created_at" format:"date-time"` + AllowedMatchCount float64 `json:"allowed_match_count"` + CreatedAt time.Time `json:"created_at" format:"date-time"` // The description of the profile. Description string `json:"description"` // The entries for this profile. @@ -108,7 +105,6 @@ type DLPProfileCustomNewResponse struct { type dlpProfileCustomNewResponseJSON struct { ID apijson.Field AllowedMatchCount apijson.Field - ContextAwareness apijson.Field CreatedAt apijson.Field Description apijson.Field Entries apijson.Field @@ -123,49 +119,6 @@ func (r *DLPProfileCustomNewResponse) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -// Scan the context of predefined entries to only return matches surrounded by -// keywords. -type DLPProfileCustomNewResponseContextAwareness struct { - // If true, scan the context of predefined entries to only return matches - // surrounded by keywords. - Enabled bool `json:"enabled,required"` - // Content types to exclude from context analysis and return all matches. - Skip DLPProfileCustomNewResponseContextAwarenessSkip `json:"skip,required"` - JSON dlpProfileCustomNewResponseContextAwarenessJSON `json:"-"` -} - -// dlpProfileCustomNewResponseContextAwarenessJSON contains the JSON metadata for -// the struct [DLPProfileCustomNewResponseContextAwareness] -type dlpProfileCustomNewResponseContextAwarenessJSON struct { - Enabled apijson.Field - Skip apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DLPProfileCustomNewResponseContextAwareness) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Content types to exclude from context analysis and return all matches. -type DLPProfileCustomNewResponseContextAwarenessSkip struct { - // If the content type is a file, skip context analysis and return all matches. - Files bool `json:"files,required"` - JSON dlpProfileCustomNewResponseContextAwarenessSkipJSON `json:"-"` -} - -// dlpProfileCustomNewResponseContextAwarenessSkipJSON contains the JSON metadata -// for the struct [DLPProfileCustomNewResponseContextAwarenessSkip] -type dlpProfileCustomNewResponseContextAwarenessSkipJSON struct { - Files apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DLPProfileCustomNewResponseContextAwarenessSkip) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - // A custom entry that matches a profile type DLPProfileCustomNewResponseEntry struct { // The ID for this entry @@ -243,11 +196,8 @@ type DLPProfileCustomUpdateResponse struct { // The ID for this profile ID string `json:"id"` // Related DLP policies will trigger when the match count exceeds the number set. - AllowedMatchCount float64 `json:"allowed_match_count"` - // Scan the context of predefined entries to only return matches surrounded by - // keywords. - ContextAwareness DLPProfileCustomUpdateResponseContextAwareness `json:"context_awareness"` - CreatedAt time.Time `json:"created_at" format:"date-time"` + AllowedMatchCount float64 `json:"allowed_match_count"` + CreatedAt time.Time `json:"created_at" format:"date-time"` // The description of the profile. Description string `json:"description"` // The entries for this profile. @@ -265,7 +215,6 @@ type DLPProfileCustomUpdateResponse struct { type dlpProfileCustomUpdateResponseJSON struct { ID apijson.Field AllowedMatchCount apijson.Field - ContextAwareness apijson.Field CreatedAt apijson.Field Description apijson.Field Entries apijson.Field @@ -280,49 +229,6 @@ func (r *DLPProfileCustomUpdateResponse) UnmarshalJSON(data []byte) (err error) return apijson.UnmarshalRoot(data, r) } -// Scan the context of predefined entries to only return matches surrounded by -// keywords. -type DLPProfileCustomUpdateResponseContextAwareness struct { - // If true, scan the context of predefined entries to only return matches - // surrounded by keywords. - Enabled bool `json:"enabled,required"` - // Content types to exclude from context analysis and return all matches. - Skip DLPProfileCustomUpdateResponseContextAwarenessSkip `json:"skip,required"` - JSON dlpProfileCustomUpdateResponseContextAwarenessJSON `json:"-"` -} - -// dlpProfileCustomUpdateResponseContextAwarenessJSON contains the JSON metadata -// for the struct [DLPProfileCustomUpdateResponseContextAwareness] -type dlpProfileCustomUpdateResponseContextAwarenessJSON struct { - Enabled apijson.Field - Skip apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DLPProfileCustomUpdateResponseContextAwareness) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Content types to exclude from context analysis and return all matches. -type DLPProfileCustomUpdateResponseContextAwarenessSkip struct { - // If the content type is a file, skip context analysis and return all matches. - Files bool `json:"files,required"` - JSON dlpProfileCustomUpdateResponseContextAwarenessSkipJSON `json:"-"` -} - -// dlpProfileCustomUpdateResponseContextAwarenessSkipJSON contains the JSON -// metadata for the struct [DLPProfileCustomUpdateResponseContextAwarenessSkip] -type dlpProfileCustomUpdateResponseContextAwarenessSkipJSON struct { - Files apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DLPProfileCustomUpdateResponseContextAwarenessSkip) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - // A custom entry that matches a profile type DLPProfileCustomUpdateResponseEntry struct { // The ID for this entry @@ -417,11 +323,8 @@ type DLPProfileCustomGetResponse struct { // The ID for this profile ID string `json:"id"` // Related DLP policies will trigger when the match count exceeds the number set. - AllowedMatchCount float64 `json:"allowed_match_count"` - // Scan the context of predefined entries to only return matches surrounded by - // keywords. - ContextAwareness DLPProfileCustomGetResponseContextAwareness `json:"context_awareness"` - CreatedAt time.Time `json:"created_at" format:"date-time"` + AllowedMatchCount float64 `json:"allowed_match_count"` + CreatedAt time.Time `json:"created_at" format:"date-time"` // The description of the profile. Description string `json:"description"` // The entries for this profile. @@ -439,7 +342,6 @@ type DLPProfileCustomGetResponse struct { type dlpProfileCustomGetResponseJSON struct { ID apijson.Field AllowedMatchCount apijson.Field - ContextAwareness apijson.Field CreatedAt apijson.Field Description apijson.Field Entries apijson.Field @@ -454,49 +356,6 @@ func (r *DLPProfileCustomGetResponse) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -// Scan the context of predefined entries to only return matches surrounded by -// keywords. -type DLPProfileCustomGetResponseContextAwareness struct { - // If true, scan the context of predefined entries to only return matches - // surrounded by keywords. - Enabled bool `json:"enabled,required"` - // Content types to exclude from context analysis and return all matches. - Skip DLPProfileCustomGetResponseContextAwarenessSkip `json:"skip,required"` - JSON dlpProfileCustomGetResponseContextAwarenessJSON `json:"-"` -} - -// dlpProfileCustomGetResponseContextAwarenessJSON contains the JSON metadata for -// the struct [DLPProfileCustomGetResponseContextAwareness] -type dlpProfileCustomGetResponseContextAwarenessJSON struct { - Enabled apijson.Field - Skip apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DLPProfileCustomGetResponseContextAwareness) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Content types to exclude from context analysis and return all matches. -type DLPProfileCustomGetResponseContextAwarenessSkip struct { - // If the content type is a file, skip context analysis and return all matches. - Files bool `json:"files,required"` - JSON dlpProfileCustomGetResponseContextAwarenessSkipJSON `json:"-"` -} - -// dlpProfileCustomGetResponseContextAwarenessSkipJSON contains the JSON metadata -// for the struct [DLPProfileCustomGetResponseContextAwarenessSkip] -type dlpProfileCustomGetResponseContextAwarenessSkipJSON struct { - Files apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DLPProfileCustomGetResponseContextAwarenessSkip) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - // A custom entry that matches a profile type DLPProfileCustomGetResponseEntry struct { // The ID for this entry @@ -583,9 +442,6 @@ func (r DLPProfileCustomNewParams) MarshalJSON() (data []byte, err error) { type DLPProfileCustomNewParamsProfile struct { // Related DLP policies will trigger when the match count exceeds the number set. AllowedMatchCount param.Field[float64] `json:"allowed_match_count"` - // Scan the context of predefined entries to only return matches surrounded by - // keywords. - ContextAwareness param.Field[DLPProfileCustomNewParamsProfilesContextAwareness] `json:"context_awareness"` // The description of the profile. Description param.Field[string] `json:"description"` // The entries for this profile. @@ -598,30 +454,6 @@ func (r DLPProfileCustomNewParamsProfile) MarshalJSON() (data []byte, err error) return apijson.MarshalRoot(r) } -// Scan the context of predefined entries to only return matches surrounded by -// keywords. -type DLPProfileCustomNewParamsProfilesContextAwareness struct { - // If true, scan the context of predefined entries to only return matches - // surrounded by keywords. - Enabled param.Field[bool] `json:"enabled,required"` - // Content types to exclude from context analysis and return all matches. - Skip param.Field[DLPProfileCustomNewParamsProfilesContextAwarenessSkip] `json:"skip,required"` -} - -func (r DLPProfileCustomNewParamsProfilesContextAwareness) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Content types to exclude from context analysis and return all matches. -type DLPProfileCustomNewParamsProfilesContextAwarenessSkip struct { - // If the content type is a file, skip context analysis and return all matches. - Files param.Field[bool] `json:"files,required"` -} - -func (r DLPProfileCustomNewParamsProfilesContextAwarenessSkip) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - // A custom entry create payload type DLPProfileCustomNewParamsProfilesEntry struct { // Whether the entry is enabled or not. @@ -760,9 +592,6 @@ type DLPProfileCustomUpdateParams struct { AccountID param.Field[string] `path:"account_id,required"` // Related DLP policies will trigger when the match count exceeds the number set. AllowedMatchCount param.Field[float64] `json:"allowed_match_count"` - // Scan the context of predefined entries to only return matches surrounded by - // keywords. - ContextAwareness param.Field[DLPProfileCustomUpdateParamsContextAwareness] `json:"context_awareness"` // The description of the profile. Description param.Field[string] `json:"description"` // The custom entries for this profile. Array elements with IDs are modifying the @@ -780,30 +609,6 @@ func (r DLPProfileCustomUpdateParams) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -// Scan the context of predefined entries to only return matches surrounded by -// keywords. -type DLPProfileCustomUpdateParamsContextAwareness struct { - // If true, scan the context of predefined entries to only return matches - // surrounded by keywords. - Enabled param.Field[bool] `json:"enabled,required"` - // Content types to exclude from context analysis and return all matches. - Skip param.Field[DLPProfileCustomUpdateParamsContextAwarenessSkip] `json:"skip,required"` -} - -func (r DLPProfileCustomUpdateParamsContextAwareness) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Content types to exclude from context analysis and return all matches. -type DLPProfileCustomUpdateParamsContextAwarenessSkip struct { - // If the content type is a file, skip context analysis and return all matches. - Files param.Field[bool] `json:"files,required"` -} - -func (r DLPProfileCustomUpdateParamsContextAwarenessSkip) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - // A custom entry that matches a profile type DLPProfileCustomUpdateParamsEntry struct { // Whether the entry is enabled or not. diff --git a/dlpprofilecustom_test.go b/dlpprofilecustom_test.go index 06d350513a7..2e530d7b2c6 100644 --- a/dlpprofilecustom_test.go +++ b/dlpprofilecustom_test.go @@ -33,13 +33,7 @@ func TestDLPProfileCustomNew(t *testing.T) { AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Profiles: cloudflare.F([]cloudflare.DLPProfileCustomNewParamsProfile{{ AllowedMatchCount: cloudflare.F(5.000000), - ContextAwareness: cloudflare.F(cloudflare.DLPProfileCustomNewParamsProfilesContextAwareness{ - Enabled: cloudflare.F(true), - Skip: cloudflare.F(cloudflare.DLPProfileCustomNewParamsProfilesContextAwarenessSkip{ - Files: cloudflare.F(true), - }), - }), - Description: cloudflare.F("A standard CVV card number"), + Description: cloudflare.F("A standard CVV card number"), Entries: cloudflare.F([]cloudflare.DLPProfileCustomNewParamsProfilesEntry{{ Enabled: cloudflare.F(true), Name: cloudflare.F("Credit card (Visa)"), @@ -65,13 +59,7 @@ func TestDLPProfileCustomNew(t *testing.T) { Name: cloudflare.F("Generic CVV Card Number"), }, { AllowedMatchCount: cloudflare.F(5.000000), - ContextAwareness: cloudflare.F(cloudflare.DLPProfileCustomNewParamsProfilesContextAwareness{ - Enabled: cloudflare.F(true), - Skip: cloudflare.F(cloudflare.DLPProfileCustomNewParamsProfilesContextAwarenessSkip{ - Files: cloudflare.F(true), - }), - }), - Description: cloudflare.F("A standard CVV card number"), + Description: cloudflare.F("A standard CVV card number"), Entries: cloudflare.F([]cloudflare.DLPProfileCustomNewParamsProfilesEntry{{ Enabled: cloudflare.F(true), Name: cloudflare.F("Credit card (Visa)"), @@ -97,13 +85,7 @@ func TestDLPProfileCustomNew(t *testing.T) { Name: cloudflare.F("Generic CVV Card Number"), }, { AllowedMatchCount: cloudflare.F(5.000000), - ContextAwareness: cloudflare.F(cloudflare.DLPProfileCustomNewParamsProfilesContextAwareness{ - Enabled: cloudflare.F(true), - Skip: cloudflare.F(cloudflare.DLPProfileCustomNewParamsProfilesContextAwarenessSkip{ - Files: cloudflare.F(true), - }), - }), - Description: cloudflare.F("A standard CVV card number"), + Description: cloudflare.F("A standard CVV card number"), Entries: cloudflare.F([]cloudflare.DLPProfileCustomNewParamsProfilesEntry{{ Enabled: cloudflare.F(true), Name: cloudflare.F("Credit card (Visa)"), @@ -160,13 +142,7 @@ func TestDLPProfileCustomUpdateWithOptionalParams(t *testing.T) { cloudflare.DLPProfileCustomUpdateParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), AllowedMatchCount: cloudflare.F(5.000000), - ContextAwareness: cloudflare.F(cloudflare.DLPProfileCustomUpdateParamsContextAwareness{ - Enabled: cloudflare.F(true), - Skip: cloudflare.F(cloudflare.DLPProfileCustomUpdateParamsContextAwarenessSkip{ - Files: cloudflare.F(true), - }), - }), - Description: cloudflare.F("A standard CVV card number"), + Description: cloudflare.F("A standard CVV card number"), Entries: cloudflare.F([]cloudflare.DLPProfileCustomUpdateParamsEntry{{ Enabled: cloudflare.F(true), Name: cloudflare.F("Credit card (Visa)"), diff --git a/dlpprofilepredefined.go b/dlpprofilepredefined.go index 4f56c583eb6..feb3fbbf016 100644 --- a/dlpprofilepredefined.go +++ b/dlpprofilepredefined.go @@ -57,9 +57,6 @@ type DLPProfilePredefinedUpdateResponse struct { ID string `json:"id"` // Related DLP policies will trigger when the match count exceeds the number set. AllowedMatchCount float64 `json:"allowed_match_count"` - // Scan the context of predefined entries to only return matches surrounded by - // keywords. - ContextAwareness DLPProfilePredefinedUpdateResponseContextAwareness `json:"context_awareness"` // The entries for this profile. Entries []DLPProfilePredefinedUpdateResponseEntry `json:"entries"` // The name of the profile. @@ -74,7 +71,6 @@ type DLPProfilePredefinedUpdateResponse struct { type dlpProfilePredefinedUpdateResponseJSON struct { ID apijson.Field AllowedMatchCount apijson.Field - ContextAwareness apijson.Field Entries apijson.Field Name apijson.Field Type apijson.Field @@ -86,49 +82,6 @@ func (r *DLPProfilePredefinedUpdateResponse) UnmarshalJSON(data []byte) (err err return apijson.UnmarshalRoot(data, r) } -// Scan the context of predefined entries to only return matches surrounded by -// keywords. -type DLPProfilePredefinedUpdateResponseContextAwareness struct { - // If true, scan the context of predefined entries to only return matches - // surrounded by keywords. - Enabled bool `json:"enabled,required"` - // Content types to exclude from context analysis and return all matches. - Skip DLPProfilePredefinedUpdateResponseContextAwarenessSkip `json:"skip,required"` - JSON dlpProfilePredefinedUpdateResponseContextAwarenessJSON `json:"-"` -} - -// dlpProfilePredefinedUpdateResponseContextAwarenessJSON contains the JSON -// metadata for the struct [DLPProfilePredefinedUpdateResponseContextAwareness] -type dlpProfilePredefinedUpdateResponseContextAwarenessJSON struct { - Enabled apijson.Field - Skip apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DLPProfilePredefinedUpdateResponseContextAwareness) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Content types to exclude from context analysis and return all matches. -type DLPProfilePredefinedUpdateResponseContextAwarenessSkip struct { - // If the content type is a file, skip context analysis and return all matches. - Files bool `json:"files,required"` - JSON dlpProfilePredefinedUpdateResponseContextAwarenessSkipJSON `json:"-"` -} - -// dlpProfilePredefinedUpdateResponseContextAwarenessSkipJSON contains the JSON -// metadata for the struct [DLPProfilePredefinedUpdateResponseContextAwarenessSkip] -type dlpProfilePredefinedUpdateResponseContextAwarenessSkipJSON struct { - Files apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DLPProfilePredefinedUpdateResponseContextAwarenessSkip) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - // A predefined entry that matches a profile type DLPProfilePredefinedUpdateResponseEntry struct { // The ID for this entry @@ -169,9 +122,6 @@ type DLPProfilePredefinedGetResponse struct { ID string `json:"id"` // Related DLP policies will trigger when the match count exceeds the number set. AllowedMatchCount float64 `json:"allowed_match_count"` - // Scan the context of predefined entries to only return matches surrounded by - // keywords. - ContextAwareness DLPProfilePredefinedGetResponseContextAwareness `json:"context_awareness"` // The entries for this profile. Entries []DLPProfilePredefinedGetResponseEntry `json:"entries"` // The name of the profile. @@ -186,7 +136,6 @@ type DLPProfilePredefinedGetResponse struct { type dlpProfilePredefinedGetResponseJSON struct { ID apijson.Field AllowedMatchCount apijson.Field - ContextAwareness apijson.Field Entries apijson.Field Name apijson.Field Type apijson.Field @@ -198,49 +147,6 @@ func (r *DLPProfilePredefinedGetResponse) UnmarshalJSON(data []byte) (err error) return apijson.UnmarshalRoot(data, r) } -// Scan the context of predefined entries to only return matches surrounded by -// keywords. -type DLPProfilePredefinedGetResponseContextAwareness struct { - // If true, scan the context of predefined entries to only return matches - // surrounded by keywords. - Enabled bool `json:"enabled,required"` - // Content types to exclude from context analysis and return all matches. - Skip DLPProfilePredefinedGetResponseContextAwarenessSkip `json:"skip,required"` - JSON dlpProfilePredefinedGetResponseContextAwarenessJSON `json:"-"` -} - -// dlpProfilePredefinedGetResponseContextAwarenessJSON contains the JSON metadata -// for the struct [DLPProfilePredefinedGetResponseContextAwareness] -type dlpProfilePredefinedGetResponseContextAwarenessJSON struct { - Enabled apijson.Field - Skip apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DLPProfilePredefinedGetResponseContextAwareness) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -// Content types to exclude from context analysis and return all matches. -type DLPProfilePredefinedGetResponseContextAwarenessSkip struct { - // If the content type is a file, skip context analysis and return all matches. - Files bool `json:"files,required"` - JSON dlpProfilePredefinedGetResponseContextAwarenessSkipJSON `json:"-"` -} - -// dlpProfilePredefinedGetResponseContextAwarenessSkipJSON contains the JSON -// metadata for the struct [DLPProfilePredefinedGetResponseContextAwarenessSkip] -type dlpProfilePredefinedGetResponseContextAwarenessSkipJSON struct { - Files apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DLPProfilePredefinedGetResponseContextAwarenessSkip) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - // A predefined entry that matches a profile type DLPProfilePredefinedGetResponseEntry struct { // The ID for this entry @@ -281,9 +187,6 @@ type DLPProfilePredefinedUpdateParams struct { AccountID param.Field[string] `path:"account_id,required"` // Related DLP policies will trigger when the match count exceeds the number set. AllowedMatchCount param.Field[float64] `json:"allowed_match_count"` - // Scan the context of predefined entries to only return matches surrounded by - // keywords. - ContextAwareness param.Field[DLPProfilePredefinedUpdateParamsContextAwareness] `json:"context_awareness"` // The entries for this profile. Entries param.Field[[]DLPProfilePredefinedUpdateParamsEntry] `json:"entries"` } @@ -292,30 +195,6 @@ func (r DLPProfilePredefinedUpdateParams) MarshalJSON() (data []byte, err error) return apijson.MarshalRoot(r) } -// Scan the context of predefined entries to only return matches surrounded by -// keywords. -type DLPProfilePredefinedUpdateParamsContextAwareness struct { - // If true, scan the context of predefined entries to only return matches - // surrounded by keywords. - Enabled param.Field[bool] `json:"enabled,required"` - // Content types to exclude from context analysis and return all matches. - Skip param.Field[DLPProfilePredefinedUpdateParamsContextAwarenessSkip] `json:"skip,required"` -} - -func (r DLPProfilePredefinedUpdateParamsContextAwareness) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// Content types to exclude from context analysis and return all matches. -type DLPProfilePredefinedUpdateParamsContextAwarenessSkip struct { - // If the content type is a file, skip context analysis and return all matches. - Files param.Field[bool] `json:"files,required"` -} - -func (r DLPProfilePredefinedUpdateParamsContextAwarenessSkip) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - type DLPProfilePredefinedUpdateParamsEntry struct { // Whether the entry is enabled or not. Enabled param.Field[bool] `json:"enabled"` diff --git a/dlpprofilepredefined_test.go b/dlpprofilepredefined_test.go index c6229b8230b..cfa4e99be9f 100644 --- a/dlpprofilepredefined_test.go +++ b/dlpprofilepredefined_test.go @@ -35,12 +35,6 @@ func TestDLPProfilePredefinedUpdateWithOptionalParams(t *testing.T) { cloudflare.DLPProfilePredefinedUpdateParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), AllowedMatchCount: cloudflare.F(5.000000), - ContextAwareness: cloudflare.F(cloudflare.DLPProfilePredefinedUpdateParamsContextAwareness{ - Enabled: cloudflare.F(true), - Skip: cloudflare.F(cloudflare.DLPProfilePredefinedUpdateParamsContextAwarenessSkip{ - Files: cloudflare.F(true), - }), - }), Entries: cloudflare.F([]cloudflare.DLPProfilePredefinedUpdateParamsEntry{{ Enabled: cloudflare.F(true), }, {